Intel® Quark™ Microcontroller Software Interface  1.4.0
Intel® Quark™ Microcontroller BSP
SS Timer

Timer driver for Sensor Subsystem. More...

Data Structures

struct  qm_ss_timer_config_t
 Sensor Subsystem Timer Configuration Type. More...
 

Functions

int qm_ss_timer_set_config (const qm_ss_timer_t timer, const qm_ss_timer_config_t *const cfg)
 Set the SS timer configuration. More...
 
int qm_ss_timer_set (const qm_ss_timer_t timer, const uint32_t count)
 Set SS timer count value. More...
 
int qm_ss_timer_get (const qm_ss_timer_t timer, uint32_t *const count)
 Get SS timer count value. More...
 

Detailed Description

Timer driver for Sensor Subsystem.

Function Documentation

int qm_ss_timer_get ( const qm_ss_timer_t  timer,
uint32_t *const  count 
)

Get SS timer count value.

Get the current count value of the SS timer.

Parameters
[in]timerWhich SS timer to get the count of.
[out]countCurrent value of timer. This must not be NULL.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 59 of file qm_ss_timer.c.

int qm_ss_timer_set ( const qm_ss_timer_t  timer,
const uint32_t  count 
)

Set SS timer count value.

Set the current count value of the SS timer.

Parameters
[in]timerWhich SS timer to set the count of.
[in]countValue to load the timer with.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 50 of file qm_ss_timer.c.

int qm_ss_timer_set_config ( const qm_ss_timer_t  timer,
const qm_ss_timer_config_t *const  cfg 
)

Set the SS timer configuration.

This includes final count value, timer mode and if interrupts are enabled. If interrupts are enabled, it will configure the callback function.

Parameters
[in]timerWhich SS timer to configure.
[in]cfgSS timer configuration. This must not be NULL.
Returns
Standard errno return type for QMSI.
Return values
0on success.
Negativeerrno for possible error codes.

Definition at line 29 of file qm_ss_timer.c.

References qm_ss_timer_config_t::callback, qm_ss_timer_config_t::callback_data, qm_ss_timer_config_t::count, qm_ss_timer_config_t::inc_run_only, qm_ss_timer_config_t::int_en, and qm_ss_timer_config_t::watchdog_mode.