#include <stdint.h>
#include "ptu.h"
Go to the source code of this file.
Handle the entry of latching fault state.
- Parameters
-
previous | The previous state of the PTU state machine. |
- Returns
- INVALID_STATE if current state is not latching fault, SUCCESS otherwise.
Definition at line 179 of file ptu_latching_fault.c.
185 return NRF_ERROR_INVALID_STATE;
191 APP_ERROR_CHECK(err_code);
194 APP_ERROR_CHECK(err_code);
199 APP_ERROR_CHECK(err_code);
static lf_status_t m_lf_status
#define PTU_LATCH_FAULT_ENTRY_DELAY_MS
#define TIMER_START(timer_id, ms, p_ctx)
#define PTU_LATCH_FAULT_NO_ERR_CLR_TIMEOUT_MS
#define PTU_LATCH_FAULT_EXIT_ATTEMPT_DELAY_MS
#define PTU_SM_CURRENT_STATE()
#define PTU_LATCH_FAULT_MAX_AUTO_CLR_ATTEMPTS
Initialize latching fault module.
- Parameters
-
sm_handler | The state machine handler of the PTU. |
- Returns
- INVALID_PARAM if sm_handler is NULL, SUCCESS otherwise.
Definition at line 212 of file ptu_latching_fault.c.
216 if(sm_handler == NULL)
218 return NRF_ERROR_INVALID_PARAM;
225 err_code = app_timer_create(&m_clear_latching_fault_timer_id,
226 APP_TIMER_MODE_SINGLE_SHOT,
228 APP_ERROR_CHECK(err_code);
230 err_code = app_timer_create(&m_short_beacon_timer_id,
231 APP_TIMER_MODE_SINGLE_SHOT,
233 APP_ERROR_CHECK(err_code);
235 err_code = app_timer_create(&m_reset_nof_consecutive_latching_fault_count_timer_id,
236 APP_TIMER_MODE_SINGLE_SHOT,
238 APP_ERROR_CHECK(err_code);
static lf_status_t m_lf_status
static ptu_sm_handler_t m_ptu_sm_execute
static void m_reset_nof_consecutive_latching_fault_count_timer_handler(void *p_context)
Clear number of consecutive latching faults timer handler.
static void m_latch_fault_attempt_to_clear_timer_handler(void *p_context)
Latch fault entry handler.
static void m_latch_fault_short_beacon_timer_handler(void *p_context)
Latch fault short beacon timer handler.