Send sync when transitioning to UNINIT and add logging
This commit is contained in:
parent
f0b8ff2d24
commit
b6ed265eb8
|
@ -728,6 +728,7 @@ void gpio_init() {
|
||||||
static linkstate_t do_uninit(struct net_buf const *buf) {
|
static 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");
|
||||||
h5_send_sync_response();
|
h5_send_sync_response();
|
||||||
return UNINIT;
|
return UNINIT;
|
||||||
case H5_SYNC_RESPONSE:
|
case H5_SYNC_RESPONSE:
|
||||||
|
@ -768,9 +769,10 @@ static 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_DBG("SYNC in ACTIVE state: ACTIVE -> UNINIT");
|
LOG_DBG("SYNC in ACTIVE state: ACTIVE -> UNINIT");
|
||||||
|
h5_send_sync();
|
||||||
return UNINIT;
|
return UNINIT;
|
||||||
case H5_SYNC_RESPONSE:
|
case H5_SYNC_RESPONSE:
|
||||||
LOG_DBG("Bad packet for ACTIVE state: ACTIVE -> UNINIT");
|
LOG_DBG("SYNC_RESPONSE in ACTIVE state: ACTIVE -> UNINIT");
|
||||||
h5_send_sync();
|
h5_send_sync();
|
||||||
return UNINIT;
|
return UNINIT;
|
||||||
case H5_CONFIG:
|
case H5_CONFIG:
|
||||||
|
|
Loading…
Reference in New Issue