rename ancsNotification_t to AncsNotification_t
This commit is contained in:
1 parent
cbbf75e6ef
commit
9358e7c052
3 files changed
+6
-6
No files matched your search
@@ -18,7 +18,7 @@ BLEAncs bleancs;
|
||||
|
||||
char buffer[128];
|
||||
|
||||
// Check BLEAncs.h for ancsNotification_t
|
||||
// Check BLEAncs.h for AncsNotification_t
|
||||
const char* EVENT_STR[] = { "Added", "Modified", "Removed" };
|
||||
const char* CAT_STR [] =
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void loop()
|
||||
// Your handling code here
|
||||
}
|
||||
|
||||
void ancs_notification_callback(ancsNotification_t* notif)
|
||||
void ancs_notification_callback(AncsNotification_t* notif)
|
||||
{
|
||||
int n;
|
||||
Serial.printf("| %-8s | ", EVENT_STR[notif->eventID]);
|
||||
|
||||
@@ -305,7 +305,7 @@ bool BLEAncs::performAction(uint32_t uid, uint8_t actionid)
|
||||
void BLEAncs::_handleNotification(uint8_t* data, uint16_t len)
|
||||
{
|
||||
if ( len != 8 ) return;
|
||||
if ( _notif_cb ) _notif_cb((ancsNotification_t*) data);
|
||||
if ( _notif_cb ) _notif_cb((AncsNotification_t*) data);
|
||||
}
|
||||
|
||||
void BLEAncs::_handleData(uint8_t* data, uint16_t len)
|
||||
|
||||
@@ -125,14 +125,14 @@ typedef struct
|
||||
uint8_t categoryID;
|
||||
uint8_t categoryCount;
|
||||
uint32_t uid;
|
||||
} ancsNotification_t;
|
||||
} AncsNotification_t;
|
||||
|
||||
VERIFY_STATIC( sizeof(ancsNotification_t) == 8);
|
||||
VERIFY_STATIC( sizeof(AncsNotification_t) == 8);
|
||||
|
||||
class BLEAncs : public BLECentralService
|
||||
{
|
||||
public:
|
||||
typedef void (*notification_callback_t) (ancsNotification_t* notif);
|
||||
typedef void (*notification_callback_t) (AncsNotification_t* notif);
|
||||
|
||||
BLEAncs(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user