| PDL for FM0+ Version1.0 Peripheral Driverl Library for FM0+

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions
C:/pdl_v10/library/driver/dt/dt.h File Reference
`#include "mcu.h"`
`#include "pdl_user.h"`
Include dependency graph for dt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | stc_dt_channel_config
| Dt channel configuration. More...
struct | stc_dt_intern_data
| Datatype for holding internal data needed for DT. More...
struct | stc_dt_instance_data
| DT instance data type. More...
## Defines
#define | DT0 (*((volatile stc_dtn_t *) FM0P_DTIM_BASE))
#define | DT_PRE_TIMER_DIV_1 (0x00)
#define | DT_PRE_TIMER_DIV_16 (0x01)
#define | DT_PRE_TIMER_DIV_256 (0x02)
## Typedefs
typedef FM0P_DTIM_TypeDef | stc_dtn_t
| Redefinition of DT register structure.
typedef enum en_dt_mode | en_dt_mode_t
| Dt mode.
typedef enum en_dt_prescaler | en_dt_prescaler_t
| Dt Prescaler.
typedef enum en_dt_countersize | en_dt_countersize_t
| Dt Counter Size.
typedef enum en_dt_channel | en_dt_channel_t
| Dt channel number.
typedef struct stc_dt_channel_config | stc_dt_channel_config_t
| Dt channel configuration.
typedef void(* | dt_cb_func_ptr_t )(void)
| DtCallback function prototype.
typedef enum en_dt_instance_index | en_dt_instance_index_t
| Enumeration to define an index for each enabled Dual timer instance.
typedef struct stc_dt_intern_data | stc_dt_intern_data_t
| Datatype for holding internal data needed for DT.
typedef struct stc_dt_instance_data | stc_dt_instance_data_t
| DT instance data type.
## Enumerations
enum | en_dt_mode { DtFreeRun = 0, DtPeriodic = 1, DtOneShot = 2 }
| Dt mode. More...
enum | en_dt_prescaler { DtPrescalerDiv1 = 0, DtPrescalerDiv16 = 1, DtPrescalerDiv256 = 2 }
| Dt Prescaler. More...
enum | en_dt_countersize { DtCounterSize16 = 0, DtCounterSize32 = 1 }
| Dt Counter Size. More...
enum | en_dt_channel { DtChannel0 = 0, DtChannel1 = 1, DtMaxChannels = 2 }
| Dt channel number. More...
enum | en_dt_instance_index { DtInstanceIndexDt0 = 0u, DtInstanceIndexMax }
| Enumeration to define an index for each enabled Dual timer instance. More...
## Functions
void | DtIrqHandler (uint8_t u8Ch)
| ISR callback for DT (channel 0 and 1)
en_result_t | Dt_EnableInt (dt_cb_func_ptr_t pfnIntCallback, uint8_t u8Ch)
| Enable Interrupt.
en_result_t | Dt_DisableInt (uint8_t u8Ch)
| Disable Interrupt.
en_result_t | Dt_Init (stc_dt_channel_config_t *pstcConfig, uint8_t u8Ch)
| Initialize DT.
en_result_t | Dt_DeInit (uint8_t u8Ch)
| De-Initialize DT.
en_result_t | Dt_EnableCount (uint8_t u8Ch)
| Enable Timer Counter.
en_result_t | Dt_DisableCount (uint8_t u8Ch)
| Disable Timer Counter.
boolean_t | Dt_GetIntFlag (uint8_t u8Ch)
| Get interrupt status The Function can return the interrupt status (TimerXRIS)
boolean_t | Dt_GetMaskIntFlag (uint8_t u8Ch)
| Get mask interrupt status The Function can return the mask interrupt status (TimerXMIS)
en_result_t | Dt_ClrIntFlag (uint8_t u8Ch)
| Clear interrupt status The Function clears the interrupt status.
en_result_t | Dt_WriteLoadVal (uint32_t u32LoadVal, uint8_t u8Ch)
| Write load value The Function writes the load value to load register.
en_result_t | Dt_WriteBgLoadVal (uint32_t u32BgLoadVal, uint8_t u8Ch)
| Write back-ground load value The Function writes the load value to back-ground load register.
uint32_t | Dt_ReadCurCntVal (uint8_t u8Ch)
| Read current count value The Function reads the value from value register.

## Detailed Description

Headerfile for DT functions

History:

- 2013-04-01 1.0 NT First version.

Definition in file dt.h.