S32 SDK
lpit_driver.h File Reference
#include "lpit_hal.h"
#include "interrupt_manager.h"
#include "clock_manager.h"
#include "status.h"

Go to the source code of this file.

Data Structures

struct  lpit_user_config_t
 LPIT configuration structure. More...
 
struct  lpit_user_channel_config_t
 Structure to configure the channel timer. More...
 

Macros

#define MAX_PERIOD_COUNT   (0xFFFFFFFFU)
 Max period in count of all operation mode except for dual 16 bit periodic counter mode. More...
 
#define MAX_PERIOD_COUNT_IN_DUAL_16BIT_MODE   (0x1FFFEU)
 Max period in count of dual 16 bit periodic counter mode. More...
 
#define MAX_PERIOD_COUNT_16_BIT   (0xFFFFU)
 Max count of 16 bit. More...
 

Enumerations

enum  lpit_period_units_t { LPIT_PERIOD_UNITS_COUNTS = 0x00U, LPIT_PERIOD_UNITS_MICROSECONDS = 0x01U }
 Unit options for LPIT period. More...
 

Functions

Initialization and De-initialization
void LPIT_DRV_Init (uint32_t instance, const lpit_user_config_t *userConfig)
 Initializes the LPIT module. More...
 
void LPIT_DRV_Deinit (uint32_t instance)
 De-Initializes the LPIT module. More...
 
status_t LPIT_DRV_InitChannel (uint32_t instance, uint32_t channel, const lpit_user_channel_config_t *userChannelConfig)
 Initializes the LPIT channel. More...
 
Timer Start and Stop
void LPIT_DRV_StartTimerChannels (uint32_t instance, uint32_t mask)
 Starts the timer channel counting. More...
 
void LPIT_DRV_StopTimerChannels (uint32_t instance, uint32_t mask)
 Stops the timer channel counting. More...
 
Timer Period
status_t LPIT_DRV_SetTimerPeriodByUs (uint32_t instance, uint32_t channel, uint32_t periodUs)
 Sets the timer channel period in microseconds. More...
 
status_t LPIT_DRV_SetTimerPeriodInDual16ModeByUs (uint32_t instance, uint32_t channel, uint16_t periodHigh, uint16_t periodLow)
 Sets the timer channel period in microseconds. More...
 
uint64_t LPIT_DRV_GetTimerPeriodByUs (uint32_t instance, uint32_t channel)
 Gets the timer channel period in microseconds. More...
 
uint64_t LPIT_DRV_GetCurrentTimerUs (uint32_t instance, uint32_t channel)
 Gets the current timer channel counting value in microseconds. More...
 
void LPIT_DRV_SetTimerPeriodByCount (uint32_t instance, uint32_t channel, uint32_t count)
 Sets the timer channel period in count unit. More...
 
void LPIT_DRV_SetTimerPeriodInDual16ModeByCount (uint32_t instance, uint32_t channel, uint16_t periodHigh, uint16_t periodLow)
 Sets the timer channel period in count unit. More...
 
uint32_t LPIT_DRV_GetTimerPeriodByCount (uint32_t instance, uint32_t channel)
 Gets the current timer channel period in count unit. More...
 
uint32_t LPIT_DRV_GetCurrentTimerCount (uint32_t instance, uint32_t channel)
 Gets the current timer channel counting value in count. More...
 
Interrupt
uint32_t LPIT_DRV_GetInterruptFlagTimerChannels (uint32_t instance, uint32_t mask)
 Gets the current interrupt flag of timer channels. More...
 
void LPIT_DRV_ClearInterruptFlagTimerChannels (uint32_t instance, uint32_t mask)
 Clears the interrupt flag of timer channels. More...