static bool check_code ( fsm_t * p_this ) Check if there is a new code in the infrared receiver FSM. 1. Call function fsm_rx_get_code() and retrieve the code. 2. If the code is not '0x00' store it in the field rx_code. 3. Return true if the code is not '0x00'. Otherwise, return false. Parameters p_this Pointer to an fsm_t struct than contains an fsm_retina_t.
bool check_code(fsm_t *p_this) { uint8_t code = 0; code = fsm_rx_get_code(p_this->p_retina); if (code != 0) { p_this->rx_code = code; return true; } return false; }