npmx  1.0.0
 
Loading...
Searching...
No Matches
ERRLOG

Error Log (ERRLOG) peripheral driver. More...

Data Structures

struct  npmx_errlog_t
 Data structure of the error log driver instance. More...
 

Enumerations

enum  npmx_errlog_scratch_t {
  NPMX_ERRLOG_SCRATCH0 ,
  NPMX_ERRLOG_SCRATCH1 ,
  NPMX_ERRLOG_SCRATCH_COUNT ,
  NPMX_ERRLOG_SCRATCH_INVALID = NPMX_INVALID_ENUM_VALUE
}
 Available scratch registers. More...
 
enum  npmx_errlog_task_t {
  NPMX_ERRLOG_TASK_CLEAR ,
  NPMX_ERRLOG_TASK_COUNT
}
 Error log tasks. More...
 

Functions

npmx_errlog_tnpmx_errlog_get (npmx_instance_t *p_pmic, uint8_t idx)
 Function for returning error log instance based on index.
 
npmx_error_t npmx_errlog_task_trigger (npmx_errlog_t const *p_instance, npmx_errlog_task_t task)
 Function for activating the specified error log task.
 
npmx_error_t npmx_errlog_reset_errors_check (npmx_errlog_t const *p_instance)
 Function for checking reset errors and running registered callbacks.
 
npmx_error_t npmx_errlog_scratch_set (npmx_errlog_t const *p_instance, npmx_errlog_scratch_t scratch, uint8_t value)
 Function for setting scratch value for specified scratch register.
 
npmx_error_t npmx_errlog_scratch_get (npmx_errlog_t const *p_instance, npmx_errlog_scratch_t scratch, uint8_t *p_value)
 Function for reading scratch value for specified scratch register.
 
npmx_error_t npmx_errlog_boot_timer_enable_set (npmx_errlog_t const *p_instance, bool enable)
 Function for enabling or disabling boot monitor timer.
 
npmx_error_t npmx_errlog_boot_timer_enable_get (npmx_errlog_t const *p_instance, bool *p_enable)
 Function checking whether boot monitor timer is enabled.
 

Detailed Description

Error Log (ERRLOG) peripheral driver.

Enumeration Type Documentation

◆ npmx_errlog_scratch_t

Available scratch registers.

Enumerator
NPMX_ERRLOG_SCRATCH0 

Scratch 0 register.

NPMX_ERRLOG_SCRATCH1 

Scratch 1 register.

NPMX_ERRLOG_SCRATCH_COUNT 

Scratch registers count.

NPMX_ERRLOG_SCRATCH_INVALID 

Invalid scratch register.

◆ npmx_errlog_task_t

Error log tasks.

Enumerator
NPMX_ERRLOG_TASK_CLEAR 

Clear all error log registers.

NPMX_ERRLOG_TASK_COUNT 

Error log tasks count.

Function Documentation

◆ npmx_errlog_boot_timer_enable_get()

npmx_error_t npmx_errlog_boot_timer_enable_get ( npmx_errlog_t const * p_instance,
bool * p_enable )

Function checking whether boot monitor timer is enabled.

Parameters
[in]p_instancePointer to the instance of error log.
[out]p_enablePointer to the boot monitor timer variable. True if timer is enabled, false otherwise.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_errlog_boot_timer_enable_set()

npmx_error_t npmx_errlog_boot_timer_enable_set ( npmx_errlog_t const * p_instance,
bool enable )

Function for enabling or disabling boot monitor timer.

Parameters
[in]p_instancePointer to the instance of error log.
[in]enableTrue if boot monitor is to be enabled, false otherwise.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_errlog_get()

npmx_errlog_t * npmx_errlog_get ( npmx_instance_t * p_pmic,
uint8_t idx )

Function for returning error log instance based on index.

Parameters
[in]p_pmicPointer to the PMIC instance.
[in]idxIndex of the error log instance.
Returns
Pointer to the error log instance.

◆ npmx_errlog_reset_errors_check()

npmx_error_t npmx_errlog_reset_errors_check ( npmx_errlog_t const * p_instance)

Function for checking reset errors and running registered callbacks.

Parameters
[in]p_instancePointer to the instance of error log.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_errlog_scratch_get()

npmx_error_t npmx_errlog_scratch_get ( npmx_errlog_t const * p_instance,
npmx_errlog_scratch_t scratch,
uint8_t * p_value )

Function for reading scratch value for specified scratch register.

Parameters
[in]p_instancePointer to the instance of error log.
[in]scratchSelected scratch register.
[out]p_valuePointer to value OF variable.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_errlog_scratch_set()

npmx_error_t npmx_errlog_scratch_set ( npmx_errlog_t const * p_instance,
npmx_errlog_scratch_t scratch,
uint8_t value )

Function for setting scratch value for specified scratch register.

Note
This function must not be used after calling npmx_core_init function with the restore_values parameter selected as true.
Parameters
[in]p_instancePointer to the instance of error log.
[in]scratchSelected scratch register.
[in]valueScratch register value to be saved.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

◆ npmx_errlog_task_trigger()

npmx_error_t npmx_errlog_task_trigger ( npmx_errlog_t const * p_instance,
npmx_errlog_task_t task )

Function for activating the specified error log task.

Parameters
[in]p_instancePointer to the instance of error log.
[in]taskTask to be activated.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.