b-parasite-esp32/code/b-parasite/src/prst/ble.h
rbaron 8fd4d7222a Implements BLE protocol v2
The only change from v1 is how the temperature is encoded. In v2, two
bytes at offset 4 and 5  represent a 16-bit signed int (in big-endian).
It contains the temperature in degrees Celsius *  100.

Fixes #29
2022-03-14 18:23:49 +01:00

18 lines
No EOL
430 B
C

#ifndef _PRST_BLE_H_
#define _PRST_BLE_H_
#include <app_error.h>
#include <stdint.h>
// Initializes SoftDevice.
void prst_ble_init();
void prst_adv_start();
void prst_adv_stop();
void prst_ble_update_adv_data(uint16_t batt_millivolts, float temp_celsius,
uint16_t humidity, uint16_t soil_moisture,
uint16_t brightness, uint8_t run_counter);
#endif // _PRST_BLE_H_