HPM SDK
HPMicro Software Development Kit
TAMPER driver APIs

TAMPER driver APIs. More...

Data Structures

struct  tamper_ch_config_t
 

Enumerations

enum  tamper_speed_t {
  spd_1_time_per_sec = 0 , spd_2_times_per_sec , spd_4_times_per_sec , spd_8_times_per_sec ,
  spd_16_times_per_sec , spd_32_times_per_sec , spd_64_times_per_sec , spd_128_times_per_sec ,
  spd_256_times_per_sec , spd_512_times_per_sec , spd_1024_times_per_sec , spd_2048_times_per_sec ,
  spd_4096_times_per_sec , spd_8192_times_per_sec , spd_16384_times_per_sec , spd_32768_times_per_sec
}
 
enum  tamper_filter_len_t {
  filter_len_1_cycle = 0 , filter_len_2_cycles , filter_len_4_cycles , filter_len_8_cycles ,
  filter_len_16_cycles , filter_len_32_cycles , filter_len_64_cycles , filter_len_128_cycles ,
  filter_len_256_cycles , filter_len_512_cycles , filter_len_1024_cycles , filter_len_2048_cycles ,
  filter_len_4096_cycles , filter_len_8192_cycles , filter_len_16384_cycles , filter_len_32768_cycles
}
 

Functions

void tamp_init_ch_config (TAMP_Type *ptr, uint8_t ch, tamper_ch_config_t *config)
 Init tamper channel config. More...
 
void tamp_get_default_ch_config (TAMP_Type *ptr, tamper_ch_config_t *config)
 Get tamper default channel config. More...
 
static void tamp_set_ch_enable (TAMP_Type *ptr, uint8_t ch, bool enable)
 Set tamper channel enable or disable. More...
 
static void tamp_set_ch_config_lock (TAMP_Type *ptr, uint8_t ch, bool lock)
 Set tamper channel config lock or unlock. More...
 
static uint32_t tamp_get_flags (TAMP_Type *ptr)
 Get tamper all channel flags. More...
 
static void tamp_clear_flags (TAMP_Type *ptr, uint32_t flags)
 Clear tamper flags. More...
 
static bool tamp_check_ch_flag (TAMP_Type *ptr, uint8_t ch)
 Check tamper channel flag. More...
 
static void tamp_clear_ch_flag (TAMP_Type *ptr, uint8_t ch)
 Clear tamper channel flag. More...
 
static void tamp_enable_ch_irq (TAMP_Type *ptr, uint8_t ch, bool enable)
 Set tamper channel irq enable or disable. More...
 
static void tamp_set_irq_lock (TAMP_Type *ptr, bool lock)
 Set tamper irq lock or unlock. More...
 

Detailed Description

TAMPER driver APIs.

Enumeration Type Documentation

◆ tamper_filter_len_t

#include <drivers/inc/hpm_tamp_drv.h>

Enumerator
filter_len_1_cycle 
filter_len_2_cycles 
filter_len_4_cycles 
filter_len_8_cycles 
filter_len_16_cycles 
filter_len_32_cycles 
filter_len_64_cycles 
filter_len_128_cycles 
filter_len_256_cycles 
filter_len_512_cycles 
filter_len_1024_cycles 
filter_len_2048_cycles 
filter_len_4096_cycles 
filter_len_8192_cycles 
filter_len_16384_cycles 
filter_len_32768_cycles 

◆ tamper_speed_t

#include <drivers/inc/hpm_tamp_drv.h>

Enumerator
spd_1_time_per_sec 
spd_2_times_per_sec 
spd_4_times_per_sec 
spd_8_times_per_sec 
spd_16_times_per_sec 
spd_32_times_per_sec 
spd_64_times_per_sec 
spd_128_times_per_sec 
spd_256_times_per_sec 
spd_512_times_per_sec 
spd_1024_times_per_sec 
spd_2048_times_per_sec 
spd_4096_times_per_sec 
spd_8192_times_per_sec 
spd_16384_times_per_sec 
spd_32768_times_per_sec 

Function Documentation

◆ tamp_check_ch_flag()

static bool tamp_check_ch_flag ( TAMP_Type ptr,
uint8_t  ch 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Check tamper channel flag.

Parameters
[in]ptrTAMPER base address
[in]chtamper channel
Returns
true - flag is set, false - falg is unset.

◆ tamp_clear_ch_flag()

static void tamp_clear_ch_flag ( TAMP_Type ptr,
uint8_t  ch 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Clear tamper channel flag.

Parameters
[in]ptrTAMPER base address
[in]chtamper channel

◆ tamp_clear_flags()

static void tamp_clear_flags ( TAMP_Type ptr,
uint32_t  flags 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Clear tamper flags.

Parameters
[in]ptrtamper base address
[in]flagsclear channel flags

◆ tamp_enable_ch_irq()

static void tamp_enable_ch_irq ( TAMP_Type ptr,
uint8_t  ch,
bool  enable 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Set tamper channel irq enable or disable.

Parameters
[in]ptrTAMPER base address
[in]chtamper channel
[in]enabletrue - irq enable, false - irq disable

◆ tamp_get_default_ch_config()

void tamp_get_default_ch_config ( TAMP_Type ptr,
tamper_ch_config_t config 
)

#include <drivers/inc/hpm_tamp_drv.h>

Get tamper default channel config.

Parameters
[in]ptrtamper base address
[in]configtamper default channel config struct pointer

◆ tamp_get_flags()

static uint32_t tamp_get_flags ( TAMP_Type ptr)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Get tamper all channel flags.

Parameters
[in]ptrtamper base address
Returns
all channel flags

◆ tamp_init_ch_config()

void tamp_init_ch_config ( TAMP_Type ptr,
uint8_t  ch,
tamper_ch_config_t config 
)

#include <drivers/inc/hpm_tamp_drv.h>

Init tamper channel config.

Parameters
[in]ptrtamper base address
[in]chtamper channel
[in]configtamper channel config struct pointer

◆ tamp_set_ch_config_lock()

static void tamp_set_ch_config_lock ( TAMP_Type ptr,
uint8_t  ch,
bool  lock 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Set tamper channel config lock or unlock.

Parameters
[in]ptrtamper base address
[in]chtamper channel
[in]locktrue - config lock, false - config unlock

◆ tamp_set_ch_enable()

static void tamp_set_ch_enable ( TAMP_Type ptr,
uint8_t  ch,
bool  enable 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Set tamper channel enable or disable.

Parameters
[in]ptrtamper base address
[in]chtamper channel
[in]enabletrue - enable tamper, false - disable tamper

◆ tamp_set_irq_lock()

static void tamp_set_irq_lock ( TAMP_Type ptr,
bool  lock 
)
inlinestatic

#include <drivers/inc/hpm_tamp_drv.h>

Set tamper irq lock or unlock.

Parameters
[in]ptrtamper base address
[in]locktrue - irq lock, false - irq unlock