ic_pal.c File Reference
#include "ic_pal.h"
#include "interrupt_manager.h"
#include "ic_irq.h"

Go to the source code of this file.

Functions

static uint8_t icAllocateState (bool *isAllocated, uint32_t *instanceMapping, uint32_t instance)
 
static void icFreeState (bool *isAllocated, const uint32_t *instanceMapping, uint32_t instance)
 
static uint8_t FindIcState (uint32_t instance)
 
status_t IC_Init (const ic_instance_t *const instance, const ic_config_t *configPtr)
 Initializes the input capture mode. More...
 
status_t IC_Deinit (const ic_instance_t *const instance)
 De-initialize a input capture instance. More...
 
void IC_StartChannel (const ic_instance_t *const instance, uint8_t channel)
 Start the counter. More...
 
void IC_StopChannel (const ic_instance_t *const instance, uint8_t channel)
 Stop the counter. More...
 
status_t IC_SetChannelMode (const ic_instance_t *const instance, uint8_t channel, ic_option_mode_t channelMode)
 Get the measured value. More...
 
uint16_t IC_GetMeasurement (const ic_instance_t *const instance, uint8_t channel)
 Get the measured value. More...
 
void IC_EnableNotification (const ic_instance_t *const instance, uint8_t channel)
 Enable channel notifications. More...
 
void IC_DisableNotification (const ic_instance_t *const instance, uint8_t channel)
 Disable channel notifications. More...
 
void IC_IrqHandler (uint32_t instance, uint8_t channel)
 

Variables

static ic_pal_state_t g_icPalStatePtr [NUMBER_OF_IC_PAL_INSTANCES]
 
static uint32_t icStateInstanceMapping [NUMBER_OF_IC_PAL_INSTANCES]
 
static bool icStateIsAllocated [NUMBER_OF_IC_PAL_INSTANCES]
 

Function Documentation

static uint8_t FindIcState ( uint32_t  instance)
static

Definition at line 156 of file ic_pal.c.

void IC_IrqHandler ( uint32_t  instance,
uint8_t  channel 
)

Definition at line 1093 of file ic_pal.c.

static uint8_t icAllocateState ( bool *  isAllocated,
uint32_t *  instanceMapping,
uint32_t  instance 
)
static

Definition at line 107 of file ic_pal.c.

static void icFreeState ( bool *  isAllocated,
const uint32_t *  instanceMapping,
uint32_t  instance 
)
static

Definition at line 133 of file ic_pal.c.

Variable Documentation

ic_pal_state_t g_icPalStatePtr[NUMBER_OF_IC_PAL_INSTANCES]
static

Definition at line 86 of file ic_pal.c.

uint32_t icStateInstanceMapping[NUMBER_OF_IC_PAL_INSTANCES]
static

Definition at line 89 of file ic_pal.c.

bool icStateIsAllocated[NUMBER_OF_IC_PAL_INSTANCES]
static

Definition at line 91 of file ic_pal.c.