Minor fixups
This commit is contained in:
parent
247baf238a
commit
bf1480abf5
|
@ -673,7 +673,6 @@ static void h5_init(void)
|
||||||
LOG_DBG("h5_init");
|
LOG_DBG("h5_init");
|
||||||
|
|
||||||
h5.link_state = UNINIT;
|
h5.link_state = UNINIT;
|
||||||
h5.rx_state = START;
|
|
||||||
h5.tx_win = 4;
|
h5.tx_win = 4;
|
||||||
|
|
||||||
/* TX thread - handles period h5_link messages and forwards commands to controller */
|
/* TX thread - handles period h5_link messages and forwards commands to controller */
|
||||||
|
@ -846,7 +845,7 @@ void gpio_init() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static linkstate_t do_uninit(struct net_buf const *buf) {
|
static h5_linkstate_t do_uninit(struct net_buf const *buf) {
|
||||||
switch (packet_get_type(buf)) {
|
switch (packet_get_type(buf)) {
|
||||||
case H5_SYNC:
|
case H5_SYNC:
|
||||||
LOG_DBG("RX'd SYNC: UNINIT -> UNINIT");
|
LOG_DBG("RX'd SYNC: UNINIT -> UNINIT");
|
||||||
|
@ -864,7 +863,7 @@ static linkstate_t do_uninit(struct net_buf const *buf) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static linkstate_t do_init(struct net_buf const *buf) {
|
static h5_linkstate_t do_init(struct net_buf const *buf) {
|
||||||
switch (packet_get_type(buf)) {
|
switch (packet_get_type(buf)) {
|
||||||
case H5_SYNC:
|
case H5_SYNC:
|
||||||
LOG_DBG("RX'd SYNC: INIT -> INIT");
|
LOG_DBG("RX'd SYNC: INIT -> INIT");
|
||||||
|
@ -878,7 +877,6 @@ static linkstate_t do_init(struct net_buf const *buf) {
|
||||||
h5.tx_win = conf_rsp[2] & 0x7;
|
h5.tx_win = conf_rsp[2] & 0x7;
|
||||||
h5.next_expected_seq_from_host = 0;
|
h5.next_expected_seq_from_host = 0;
|
||||||
h5.local_seq = 0;
|
h5.local_seq = 0;
|
||||||
h5.initializing = true;
|
|
||||||
LOG_DBG("Finished H5 configuration, tx_win %u: INIT -> ACTIVE", h5.tx_win);
|
LOG_DBG("Finished H5 configuration, tx_win %u: INIT -> ACTIVE", h5.tx_win);
|
||||||
return ACTIVE;
|
return ACTIVE;
|
||||||
default:
|
default:
|
||||||
|
@ -887,7 +885,7 @@ static linkstate_t do_init(struct net_buf const *buf) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static linkstate_t do_active(struct net_buf *buf) {
|
static h5_linkstate_t do_active(struct net_buf *buf) {
|
||||||
switch (packet_get_type(buf)) {
|
switch (packet_get_type(buf)) {
|
||||||
case H5_SYNC:
|
case H5_SYNC:
|
||||||
LOG_WRN("SYNC in ACTIVE state, peer reset: ACTIVE -> UNINIT");
|
LOG_WRN("SYNC in ACTIVE state, peer reset: ACTIVE -> UNINIT");
|
||||||
|
|
Loading…
Reference in New Issue