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

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Functions
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] | timer | Which SS timer to get the count of.
  [out] | count | Current value of timer. This must not be NULL.

Returns
  Standard errno return type for QMSI.

Return values

  0 | on success.
  Negative | errno 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] | timer | Which SS timer to set the count of.
  [in] | count | Value to load the timer with.

Returns
  Standard errno return type for QMSI.

Return values

  0 | on success.
  Negative | errno 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] | timer | Which SS timer to configure.
  [in] | cfg | SS timer configuration. This must not be NULL.

Returns
  Standard errno return type for QMSI.

Return values

  0 | on success.
  Negative | errno 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.