Sentinel
Loading...
Searching...
No Matches
bluetoothTask.cpp File Reference
#include "tasks/bluetoothTask.h"
#include "SensorData.h"
#include "config.h"
#include "network/bluetooth.h"
#include "utils/threadsafe_serial.h"
#include <Arduino.h>
#include <cstring>

Macros

#define QUEUE_SEND_TIMEOUT_MS   1000
 
#define NETWORK_CONNECTED_BIT   BIT0
 

Functions

void sendBluetoothData (const sensor_message_t &msg)
 Send Bluetooth data to the queue.
 
void bluetoothTask (void *pvParameters)
 bluetoothTask function
 

Variables

QueueHandle_t dataQueue
 
EventGroupHandle_t networkEventGroup
 
SemaphoreHandle_t networkEventMutex
 

Detailed Description

This file contains the implementation of the bluetoothTask function, which is used to handle Bluetooth operations in a FreeRTOS task.

Function Documentation

◆ bluetoothTask()

void bluetoothTask ( void * pvParameters)

bluetoothTask function

This function handles Bluetooth operations in a FreeRTOS task. It reads heart rate data from the Bluetooth client and sends it to a queue for processing.

Parameters
pvParameters

◆ sendBluetoothData()

void sendBluetoothData ( const sensor_message_t & msg)

Send Bluetooth data to the queue.

Parameters
msg