S32 SDK
lpit_hal.h File Reference
#include "device_registers.h"
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  lpit_module_information_t
 Hardware information of LPIT module Implements : lpit_module_information_t_Class. More...
 

Enumerations

enum  lpit_timer_modes_t { LPIT_PERIODIC_COUNTER = 0x00U, LPIT_DUAL_PERIODIC_COUNTER = 0x01U, LPIT_TRIGGER_ACCUMULATOR = 0x02U, LPIT_INPUT_CAPTURE = 0x03U }
 Mode options available for the LPIT timer Implements : lpit_timer_modes_t_Class. More...
 
enum  lpit_trigger_source_t { LPIT_TRIGGER_SOURCE_EXTERNAL = 0x00U, LPIT_TRIGGER_SOURCE_INTERNAL = 0x01U }
 Trigger source options. More...
 

Functions

Timer Initialization
void LPIT_HAL_GetModuleInformation (const LPIT_Type *base, lpit_module_information_t *moduleInfomation)
 Gets the information of LPIT module. More...
 
static void LPIT_HAL_Enable (LPIT_Type *const base)
 Enables the LPIT module. More...
 
static void LPIT_HAL_Disable (LPIT_Type *const base)
 Disables the LPIT module. More...
 
static void LPIT_HAL_Reset (LPIT_Type *const base)
 Resets the LPIT module. More...
 
Timer Start and Stop
static void LPIT_HAL_StartTimerChannels (LPIT_Type *const base, uint32_t mask)
 Starts the timer channel counting. More...
 
static void LPIT_HAL_StopTimerChannels (LPIT_Type *const base, uint32_t mask)
 Stops the timer channel from counting. More...
 
static bool LPIT_HAL_IsTimerChannelRunning (const LPIT_Type *base, uint32_t channel)
 Checks timer channel operation status. More...
 
Timer Period
static void LPIT_HAL_SetTimerPeriodByCount (LPIT_Type *const base, uint32_t channel, uint32_t count)
 Sets the timer channel period in count unit. More...
 
static uint32_t LPIT_HAL_GetTimerPeriodByCount (const LPIT_Type *base, uint32_t channel)
 Gets the timer channel period in count unit. More...
 
static uint32_t LPIT_HAL_GetCurrentTimerCount (const LPIT_Type *base, uint32_t channel)
 Gets the current timer channel counting value. More...
 
Timer Interrupt
static void LPIT_HAL_EnableInterruptTimerChannels (LPIT_Type *const base, uint32_t mask)
 Enables the interrupt generation for timer channels. More...
 
static void LPIT_HAL_DisableInterruptTimerChannels (LPIT_Type *const base, uint32_t mask)
 Disables the interrupt generation for timer channels. More...
 
static uint32_t LPIT_HAL_GetInterruptFlagTimerChannels (const LPIT_Type *base, uint32_t mask)
 Gets the interrupt flag of timer channels. More...
 
static void LPIT_HAL_ClearInterruptFlagTimerChannels (LPIT_Type *const base, uint32_t mask)
 Clears the interrupt flag of timer channels. More...
 
Timer Configuration
static void LPIT_HAL_SetTimerChannelModeCmd (LPIT_Type *const base, uint32_t channel, lpit_timer_modes_t mode)
 Sets operation mode of timer channel. More...
 
static lpit_timer_modes_t LPIT_HAL_GetTimerChannelModeCmd (const LPIT_Type *base, uint32_t channel)
 Gets current operation mode of timer channel. More...
 
static void LPIT_HAL_SetTriggerSelectCmd (LPIT_Type *const base, uint32_t channel, uint32_t triggerChannelSelect)
 Sets internal trigger source for timer channel. More...
 
static void LPIT_HAL_SetTriggerSourceCmd (LPIT_Type *const base, uint32_t channel, lpit_trigger_source_t triggerSource)
 Sets trigger source of timer channel. More...
 
static void LPIT_HAL_SetReloadOnTriggerCmd (LPIT_Type *const base, uint32_t channel, bool isReloadOnTrigger)
 Sets timer channel reload on trigger. More...
 
static void LPIT_HAL_SetStopOnInterruptCmd (LPIT_Type *const base, uint32_t channel, bool isStopOnInterrupt)
 Sets timer channel stop on interrupt. More...
 
static void LPIT_HAL_SetStartOnTriggerCmd (LPIT_Type *const base, uint32_t channel, bool isStartOnTrigger)
 Sets timer channel start on trigger. More...
 
static void LPIT_HAL_SetTimerChannelChainCmd (LPIT_Type *const base, uint32_t channel, bool isChannelChained)
 Sets timer channel chaining. More...
 
static void LPIT_HAL_SetTimerRunInDebugCmd (LPIT_Type *const base, bool isRunInDebug)
 Sets operation of LPIT in debug mode. More...
 
static void LPIT_HAL_SetTimerRunInDozeCmd (LPIT_Type *const base, bool isRunInDoze)
 Sets operation of LPIT in DOZE mode. More...