HPM SDK
HPMicro Software Development Kit
hpm_ptpc_drv.c File Reference
#include "hpm_soc_feature.h"
#include "hpm_ptpc_drv.h"

Macros

#define PTPC_SS_INCR_UINT_AT_BIN_MODE_IN_PS   (446U)
 

Functions

void ptpc_get_default_config (PTPC_Type *ptr, ptpc_config_t *config)
 Get default config. More...
 
hpm_stat_t ptpc_init (PTPC_Type *ptr, uint8_t index, ptpc_config_t *config)
 Initialize PTPC module. More...
 
hpm_stat_t ptpc_set_timer_output (PTPC_Type *ptr, uint8_t can_index, bool use_ptpc1)
 Set PTPC output destination. More...
 
hpm_stat_t ptpc_set_ns_update (PTPC_Type *ptr, uint8_t index, uint32_t ns, ptpc_counting_mode mode)
 Set ns portion update value. More...
 
hpm_stat_t ptpc_update_timer (PTPC_Type *ptr, uint8_t index, uint32_t sec, uint32_t ns, ptpc_counting_mode mode)
 Update timestamp counter. More...
 
void ptpc_init_timer (PTPC_Type *ptr, uint8_t index)
 Initialize timer to count from 0. More...
 
hpm_stat_t ptpc_init_timer_with_initial (PTPC_Type *ptr, uint8_t index, uint32_t sec, uint32_t ns, ptpc_counting_mode mode)
 Initialize timer with initial values. More...
 
hpm_stat_t ptpc_set_pps (PTPC_Type *ptr, uint8_t index, uint8_t p)
 Set period of pulse generated per second. More...
 

Macro Definition Documentation

◆ PTPC_SS_INCR_UINT_AT_BIN_MODE_IN_PS

#define PTPC_SS_INCR_UINT_AT_BIN_MODE_IN_PS   (446U)