RUI3 (RAK Unified Interface 3) - RAK4631
RAKBleUart.h
Go to the documentation of this file.
1 
9 #ifndef __RAK_BLE_UART_H__
10 #define __RAK_BLE_UART_H__
11 
12 #ifdef SUPPORT_BLE
13 
14 #include "udrv_ble.h"
15 
20 typedef enum
21 {
26 
27 typedef enum
28 {
32 
35 class RAKBleUart {
36  public:
37  RAKBleUart();
38 
50  void start(uint8_t adv_time);
51 
70  void stop(void);
71 
80  bool available(void);
81 
88  char read(void);
89 
99  void write(uint8_t *data, uint16_t size = 6);
100 
110  void setPIN(uint8_t *key, uint16_t size);
111 
121  void setPermission(RAK_CHARS_SECURITY_REQ permission);
122 
128  private:
129  char *localData;
130  uint32_t localLength;
131  uint32_t readCount = 0;
132 };
133 
134 #endif
135 
136 #endif
Set sec_mode pointed to by ptr to require encryption, but no MITM protection.
Definition: RAKBleUart.h:23
void stop(void)
void setPermission(RAK_CHARS_SECURITY_REQ permission)
RAK_CHARS_SECURITY_REQ
Definition: RAKBleUart.h:20
void setPIN(uint8_t *key, uint16_t size)
bool available(void)
Set sec_mode pointed to by ptr to require encryption and MITM protection.
Definition: RAKBleUart.h:24
void write(uint8_t *data, uint16_t size=6)
char read(void)
Set the charactristic property to be Read.
Definition: RAKBleUart.h:29
Definition: RAKBleUart.h:35
RAK_CHARS_PROPERTIES
Definition: RAKBleUart.h:27
Set the charactristic property to be Notify.
Definition: RAKBleUart.h:30
void start(uint8_t adv_time)
Set sec_mode pointed to by ptr to require no protection, open link.
Definition: RAKBleUart.h:22