|
upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|

Go to the source code of this file.
Data Structures | |
| struct | _hka5_context |
Functions | |
| hka5_context | hka5_init (unsigned int uart, int set_pin, int reset_pin) |
| void | hka5_close (hka5_context dev) |
| upm_result_t | hka5_enable (const hka5_context dev, bool enable) |
| upm_result_t | hka5_reset (const hka5_context dev) |
| upm_result_t | hka5_update (const hka5_context dev) |
| unsigned int | hka5_get_pm1 (const hka5_context dev) |
| unsigned int | hka5_get_pm2_5 (const hka5_context dev) |
| unsigned int | hka5_get_pm10 (const hka5_context dev) |
Typedefs | |
| typedef struct _hka5_context * | hka5_context |
| hka5_context hka5_init | ( | unsigned int | uart, |
| int | set_pin, | ||
| int | reset_pin | ||
| ) |
HKA5 Initializer for generic UART operation
| uart | Specify which uart to use. |
| set_pin | Specify the GPIO pin to use for Set. -1 to not use a set pin. |
| reset_pin | Specify the GPIO pin to use for Reset. -1 to not use a reset pin. |

| void hka5_close | ( | hka5_context | dev | ) |
HKA5 sensor close function


| upm_result_t hka5_enable | ( | const hka5_context | dev, |
| bool | enable | ||
| ) |
Enable or disable the device. When disabled, the device enters a low power mode and does not emit data. You must have initialized and connected the Set pin for this function to work.
| dev | sensor context |
| enable | true to enable the device, false otherwise. |

| upm_result_t hka5_reset | ( | const hka5_context | dev | ) |
Reset the device. You must have initialized and connected the Reset pin for this function to work.
| dev | sensor context |

| upm_result_t hka5_update | ( | const hka5_context | dev | ) |
Query the device and store the latest values. You must call this function before calling any of the hka5_get_*() functions.
| dev | sensor context |

| unsigned int hka5_get_pm1 | ( | const hka5_context | dev | ) |
Return the last read PM 1.0 value. The value is in micrograms per cubic meter (ug/m3). You must have called the hka5_update() function before calling this function.
| dev | sensor context |

| unsigned int hka5_get_pm2_5 | ( | const hka5_context | dev | ) |
Return the last read PM 2.5 value. The value is in micrograms per cubic meter (ug/m3). You must have called the hka5_update() function before calling this function.
| dev | sensor context |

| unsigned int hka5_get_pm10 | ( | const hka5_context | dev | ) |
Return the last read PM 10.0 value. The value is in micrograms per cubic meter (ug/m3). You must have called the hka5_update() function before calling this function.
| dev | sensor context |

| typedef struct _hka5_context * hka5_context |
Device context
1.8.11