Searched refs:hal_ctx (Results 1 – 4 of 4) sorted by relevance
/hal_espressif-3.6.0/components/hal/ |
D | twai_hal_iram.c | 32 static inline uint32_t twai_hal_decode_interrupt(twai_hal_context_t *hal_ctx) argument 35 uint32_t interrupts = twai_ll_get_and_clear_intrs(hal_ctx->dev); 36 uint32_t status = twai_ll_get_status(hal_ctx->dev); 37 uint32_t tec = twai_ll_get_tec(hal_ctx->dev); 38 uint32_t rec = twai_ll_get_rec(hal_ctx->dev); 39 uint32_t state_flags = hal_ctx->state_flags; 57 } else if (hal_ctx->state_flags & TWAI_HAL_STATE_FLAG_RECOVERING) { 73 …if ((interrupts & TWAI_LL_INTR_TI || hal_ctx->state_flags & TWAI_HAL_STATE_FLAG_TX_BUFF_OCCUPIED) … 98 hal_ctx->state_flags = state_flags; 102 uint32_t twai_hal_get_events(twai_hal_context_t *hal_ctx) argument [all …]
|
D | twai_hal.c | 27 bool twai_hal_init(twai_hal_context_t *hal_ctx) in twai_hal_init() argument 30 hal_ctx->dev = &TWAI; in twai_hal_init() 31 hal_ctx->state_flags = 0; in twai_hal_init() 33 twai_ll_enter_reset_mode(hal_ctx->dev); in twai_hal_init() 34 …if (!twai_ll_is_in_reset_mode(hal_ctx->dev)) { //Must enter reset mode to write to config regis… in twai_hal_init() 38 …twai_ll_enable_extended_reg_layout(hal_ctx->dev); //Changes the address layout of the regis… in twai_hal_init() 40 twai_ll_set_mode(hal_ctx->dev, TWAI_MODE_LISTEN_ONLY); //Freeze REC by changing to LOM mode in twai_hal_init() 42 twai_ll_set_tec(hal_ctx->dev, TWAI_HAL_INIT_TEC); in twai_hal_init() 43 twai_ll_set_rec(hal_ctx->dev, TWAI_HAL_INIT_REC); in twai_hal_init() 44 twai_ll_set_err_warn_lim(hal_ctx->dev, TWAI_HAL_INIT_EWL); //Set default value of for EWL in twai_hal_init() [all …]
|
/hal_espressif-3.6.0/components/hal/include/hal/ |
D | twai_hal.h | 88 bool twai_hal_init(twai_hal_context_t *hal_ctx); 97 void twai_hal_deinit(twai_hal_context_t *hal_ctx); 108 void twai_hal_configure(twai_hal_context_t *hal_ctx, const twai_timing_config_t *t_config, const tw… 121 void twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); 131 void twai_hal_stop(twai_hal_context_t *hal_ctx); 138 static inline void twai_hal_start_bus_recovery(twai_hal_context_t *hal_ctx) in twai_hal_start_bus_recovery() argument 140 TWAI_HAL_SET_BITS(hal_ctx->state_flags, TWAI_HAL_STATE_FLAG_RECOVERING); in twai_hal_start_bus_recovery() 141 twai_ll_exit_reset_mode(hal_ctx->dev); in twai_hal_start_bus_recovery() 150 static inline uint32_t twai_hal_get_tec(twai_hal_context_t *hal_ctx) in twai_hal_get_tec() argument 152 return twai_ll_get_tec((hal_ctx)->dev); in twai_hal_get_tec() [all …]
|
/hal_espressif-3.6.0/components/hal/esp32/include/hal/ |
D | can_hal.h | 53 static inline bool can_hal_init(can_hal_context_t *hal_ctx){ in can_hal_init() argument 54 return twai_hal_init(hal_ctx); in can_hal_init() 57 static inline void can_hal_deinit(can_hal_context_t *hal_ctx) in can_hal_deinit() argument 59 twai_hal_deinit(hal_ctx); in can_hal_deinit() 62 static inline void can_hal_configure(can_hal_context_t *hal_ctx, const can_timing_config_t *t_confi… in can_hal_configure() argument 64 twai_hal_configure(hal_ctx, t_config, f_config, intr_mask, clkout_divider); in can_hal_configure() 69 static inline void can_hal_start(can_hal_context_t *hal_ctx, can_mode_t mode) in can_hal_start() argument 71 twai_hal_start(hal_ctx, mode); in can_hal_start() 74 static inline void can_hal_stop(can_hal_context_t *hal_ctx) in can_hal_stop() argument 76 twai_hal_stop(hal_ctx); in can_hal_stop() [all …]
|