rusEFI
The most advanced open source ECU
|
Data Structures | |
struct | GPTConfig |
Driver configuration structure. More... | |
struct | GPTDriver |
Structure representing a GPT driver. More... | |
Functions | |
static void | gpt_lld_serve_interrupt (GPTDriver *gptp) |
Shared IRQ handler. More... | |
OSAL_IRQ_HANDLER (KINETIS_PIT0_IRQ_VECTOR) | |
PIT1 interrupt handler. More... | |
OSAL_IRQ_HANDLER (KINETIS_PIT1_IRQ_VECTOR) | |
PIT1 interrupt handler. More... | |
OSAL_IRQ_HANDLER (KINETIS_PIT2_IRQ_VECTOR) | |
PIT2 interrupt handler. More... | |
OSAL_IRQ_HANDLER (KINETIS_PIT3_IRQ_VECTOR) | |
PIT3 interrupt handler. More... | |
OSAL_IRQ_HANDLER (KINETIS_PIT_IRQ_VECTOR) | |
Common PIT interrupt handler. More... | |
Variables | |
GPTDriver | GPTD1 |
GPTD1 driver identifier. More... | |
GPTDriver | GPTD2 |
GPTD2 driver identifier. More... | |
GPTDriver | GPTD3 |
GPTD3 driver identifier. More... | |
GPTDriver | GPTD4 |
GPTD4 driver identifier. More... | |
static uint8_t | active_channels = 0 |
static const uint32_t | tif_flags [] = { LPIT_MSR_TIF0(1), LPIT_MSR_TIF1(1), LPIT_MSR_TIF2(1), LPIT_MSR_TIF3(1) } |
static const uint32_t | mier_flags [] = { LPIT_MIER_TIE0(1), LPIT_MIER_TIE1(1), LPIT_MIER_TIE2(1), LPIT_MIER_TIE3(1) } |
gptfreq_t | GPTConfig::frequency |
Timer clock in Hz. More... | |
gptcallback_t | GPTConfig::callback |
Timer callback pointer. More... | |
uint32_t | GPTConfig::cr2 |
TIM CR2 register initialization data. More... | |
uint32_t | GPTConfig::dier |
TIM DIER register initialization data. More... | |
gptstate_t | GPTDriver::state |
Driver state. More... | |
const GPTConfig * | GPTDriver::config |
Current configuration data. More... | |
GPT_DRIVER_EXT_FIELDS uint32_t | GPTDriver::clock |
Timer base clock. More... | |
int32_t | GPTDriver::channelIndex |
Channel index. More... | |
struct PIT_CHANNEL * | GPTDriver::channel |
Channel structure in PIT registers block. More... | |
Configuration options | |
typedef uint32_t | gptfreq_t |
GPT frequency type. More... | |
typedef uint32_t | gptcnt_t |
GPT counter type. More... | |
GPTDriver | GPTD1 |
GPTD1 driver identifier. More... | |
GPTDriver | GPTD2 |
GPTD2 driver identifier. More... | |
GPTDriver | GPTD3 |
GPTD3 driver identifier. More... | |
GPTDriver | GPTD4 |
GPTD4 driver identifier. More... | |
void | gpt_lld_init (void) |
Low level GPT driver initialization. More... | |
void | gpt_lld_start (GPTDriver *gptp) |
Configures and activates the GPT peripheral. More... | |
void | gpt_lld_stop (GPTDriver *gptp) |
Deactivates the GPT peripheral. More... | |
void | gpt_lld_start_timer (GPTDriver *gptp, gptcnt_t interval) |
Starts the timer in continuous mode. More... | |
void | gpt_lld_stop_timer (GPTDriver *gptp) |
Stops the timer. More... | |
void | gpt_lld_polled_delay (GPTDriver *gptp, gptcnt_t interval) |
Starts the timer in one shot mode and waits for completion. More... | |
typedef uint32_t gptcnt_t |
GPT counter type.
Definition at line 201 of file hal_gpt_lld.h.
typedef uint32_t gptfreq_t |
GPT frequency type.
Definition at line 196 of file hal_gpt_lld.h.
void gpt_lld_init | ( | void | ) |
Low level GPT driver initialization.
@notapi
Definition at line 220 of file hal_gpt_lld.c.
Starts the timer in one shot mode and waits for completion.
This function specifically polls the timer waiting for completion in order to not have extra delays caused by interrupt servicing, this function is only recommended for short delays.
[in] | gptp | pointer to the GPTDriver object |
[in] | interval | time interval in ticks |
@notapi
Definition at line 449 of file hal_gpt_lld.c.
|
static |
Shared IRQ handler.
[in] | gptp | pointer to a GPTDriver object |
Definition at line 92 of file hal_gpt_lld.c.
Referenced by OSAL_IRQ_HANDLER().
void gpt_lld_start | ( | GPTDriver * | gptp | ) |
Configures and activates the GPT peripheral.
[in] | gptp | pointer to the GPTDriver object |
@notapi
Definition at line 270 of file hal_gpt_lld.c.
Starts the timer in continuous mode.
[in] | gptp | pointer to the GPTDriver object |
[in] | interval | period in ticks |
@notapi
Definition at line 397 of file hal_gpt_lld.c.
void gpt_lld_stop | ( | GPTDriver * | gptp | ) |
Deactivates the GPT peripheral.
[in] | gptp | pointer to the GPTDriver object |
@notapi
Definition at line 335 of file hal_gpt_lld.c.
void gpt_lld_stop_timer | ( | GPTDriver * | gptp | ) |
Stops the timer.
[in] | gptp | pointer to the GPTDriver object |
@notapi
Definition at line 428 of file hal_gpt_lld.c.
Referenced by gpt_lld_serve_interrupt().
OSAL_IRQ_HANDLER | ( | KINETIS_PIT0_IRQ_VECTOR | ) |
PIT1 interrupt handler.
@isr
Definition at line 120 of file hal_gpt_lld.c.
OSAL_IRQ_HANDLER | ( | KINETIS_PIT1_IRQ_VECTOR | ) |
PIT1 interrupt handler.
@isr
Definition at line 133 of file hal_gpt_lld.c.
OSAL_IRQ_HANDLER | ( | KINETIS_PIT2_IRQ_VECTOR | ) |
PIT2 interrupt handler.
@isr
Definition at line 146 of file hal_gpt_lld.c.
OSAL_IRQ_HANDLER | ( | KINETIS_PIT3_IRQ_VECTOR | ) |
PIT3 interrupt handler.
@isr
Definition at line 159 of file hal_gpt_lld.c.
OSAL_IRQ_HANDLER | ( | KINETIS_PIT_IRQ_VECTOR | ) |
Common PIT interrupt handler.
@isr
Definition at line 172 of file hal_gpt_lld.c.
|
static |
Definition at line 75 of file hal_gpt_lld.c.
Referenced by gpt_lld_start(), and gpt_lld_stop().
gptcallback_t GPTConfig::callback |
Timer callback pointer.
NULL
but in that case the one-shot mode cannot be used. Definition at line 220 of file hal_gpt_lld.h.
Referenced by gpt_lld_serve_interrupt().
struct PIT_CHANNEL* GPTDriver::channel |
Channel structure in PIT registers block.
Definition at line 266 of file hal_gpt_lld.h.
Referenced by gpt_lld_init(), gpt_lld_polled_delay(), gpt_lld_serve_interrupt(), gpt_lld_start_timer(), gpt_lld_stop(), gpt_lld_stop_timer(), and OSAL_IRQ_HANDLER().
int32_t GPTDriver::channelIndex |
Channel index.
Definition at line 261 of file hal_gpt_lld.h.
Referenced by gpt_lld_init(), gpt_lld_polled_delay(), gpt_lld_serve_interrupt(), gpt_lld_start_timer(), gpt_lld_stop(), and gpt_lld_stop_timer().
GPT_DRIVER_EXT_FIELDS uint32_t GPTDriver::clock |
Timer base clock.
Definition at line 255 of file hal_gpt_lld.h.
Referenced by gpt_lld_polled_delay(), and gpt_lld_start().
const GPTConfig* GPTDriver::config |
Current configuration data.
Definition at line 247 of file hal_gpt_lld.h.
Referenced by gpt_lld_polled_delay(), gpt_lld_serve_interrupt(), and gpt_lld_start().
uint32_t GPTConfig::cr2 |
TIM CR2 register initialization data.
Definition at line 227 of file hal_gpt_lld.h.
uint32_t GPTConfig::dier |
TIM DIER register initialization data.
Definition at line 233 of file hal_gpt_lld.h.
gptfreq_t GPTConfig::frequency |
Timer clock in Hz.
Definition at line 213 of file hal_gpt_lld.h.
Referenced by gpt_lld_polled_delay(), and gpt_lld_start().
GPTDriver GPTD1 |
GPTD1 driver identifier.
Definition at line 43 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
|
extern |
GPTD1 driver identifier.
Definition at line 43 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
GPTDriver GPTD2 |
GPTD2 driver identifier.
Definition at line 51 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
|
extern |
GPTD2 driver identifier.
Definition at line 51 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
GPTDriver GPTD3 |
GPTD3 driver identifier.
Definition at line 59 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), OSAL_IRQ_HANDLER(), and readSlowAnalogInputs().
|
extern |
GPTD3 driver identifier.
Definition at line 59 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), OSAL_IRQ_HANDLER(), and readSlowAnalogInputs().
GPTDriver GPTD4 |
GPTD4 driver identifier.
Definition at line 67 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
|
extern |
GPTD4 driver identifier.
Definition at line 67 of file hal_gpt_lld.c.
Referenced by gpt_lld_init(), gpt_lld_start(), gpt_lld_stop(), and OSAL_IRQ_HANDLER().
|
static |
Definition at line 80 of file hal_gpt_lld.c.
Referenced by gpt_lld_start_timer(), and gpt_lld_stop().
gptstate_t GPTDriver::state |
Driver state.
Definition at line 243 of file hal_gpt_lld.h.
Referenced by gpt_lld_serve_interrupt(), gpt_lld_start(), and gpt_lld_stop().
|
static |
Definition at line 79 of file hal_gpt_lld.c.
Referenced by gpt_lld_polled_delay(), gpt_lld_serve_interrupt(), gpt_lld_start_timer(), and gpt_lld_stop().