LoRa-BLE-Sensor
Loading...
Searching...
No Matches
Functions
ble_device_service.c File Reference

This is a library to handle the BLE services device configuration. It displays the device name, hardware version, firmware version, and battery/charger information. More...

#include "ble_device_service.h"
#include <zephyr/logging/log.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/gatt.h>
Include dependency graph for ble_device_service.c:

Functions

 LOG_MODULE_REGISTER (BLE_DEVICE_SERVICE, LOG_LEVEL_INF)
 
 BT_GATT_SERVICE_DEFINE (device_svc, BT_GATT_PRIMARY_SERVICE(BT_UUID_DEVICE), BT_GATT_CHARACTERISTIC(BT_UUID_DEVICE_HARDWARE_VERSION, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_hardware_version, NULL, NULL), BT_GATT_CHARACTERISTIC(BT_UUID_DEVICE_FIRMWARE_VERSION, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_firmware_version, NULL, NULL), BT_GATT_CHARACTERISTIC(BT_UUID_DEVICE_BATTERY_VOLTAGE, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_battery_voltage, NULL, NULL), BT_GATT_CHARACTERISTIC(BT_UUID_DEVICE_BATTERY_TEMPERATURE, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_battery_temperature, NULL, NULL),)
 
int ble_device_service_init (pmic_sensor_status_t *status)
 Connect PMIC sensor status to Device BLE Service.
 

Detailed Description

This is a library to handle the BLE services device configuration. It displays the device name, hardware version, firmware version, and battery/charger information.

Author
Tyler Garcia
Version
0.1
Date
2025-05-06

Function Documentation

◆ ble_device_service_init()

int ble_device_service_init ( pmic_sensor_status_t status)

Connect PMIC sensor status to Device BLE Service.

Parameters
statusPMIC sensor status
Returns
int 0 if successful connection, < 0 if unsuccessful