Embedded SDK
Embedded SDK
Macros | Functions
ledger_ble.h File Reference
#include <stdint.h>
#include "os_id.h"
#include "lcx_crc.h"
Include dependency graph for ledger_ble.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LEDGER_BLE_get_mac_address(address)
 

Functions

void LEDGER_BLE_init (void)
 
void LEDGER_BLE_send (const uint8_t *packet, uint16_t packet_length)
 
void LEDGER_BLE_receive (const uint8_t *spi_buffer)
 
void LEDGER_BLE_set_recv_buffer (uint8_t *buffer, uint16_t buffer_length)
 
void LEDGER_BLE_enable_advertising (uint8_t enable)
 
void LEDGER_BLE_reset_pairings (void)
 
void LEDGER_BLE_accept_pairing (uint8_t status)
 

Macro Definition Documentation

◆ LEDGER_BLE_get_mac_address

#define LEDGER_BLE_get_mac_address (   address)
Value:
{ \
unsigned char se_serial[8] = {0}; \
os_serial(se_serial, sizeof(se_serial)); \
unsigned int uid = cx_crc16(se_serial, 4); \
address[0] = uid; \
address[1] = uid >> 8; \
uid = cx_crc16(se_serial + 4, 4); \
address[2] = uid; \
address[3] = uid >> 8; \
address[4] = 0xF1; \
address[5] = 0xDE; \
}

Definition at line 45 of file ledger_ble.h.

Function Documentation

◆ LEDGER_BLE_accept_pairing()

void LEDGER_BLE_accept_pairing ( uint8_t  status)

Definition at line 1177 of file ledger_ble.c.

◆ LEDGER_BLE_enable_advertising()

void LEDGER_BLE_enable_advertising ( uint8_t  enable)

Definition at line 1144 of file ledger_ble.c.

◆ LEDGER_BLE_init()

void LEDGER_BLE_init ( void  )

Definition at line 1010 of file ledger_ble.c.

◆ LEDGER_BLE_receive()

void LEDGER_BLE_receive ( const uint8_t spi_buffer)

Definition at line 1076 of file ledger_ble.c.

◆ LEDGER_BLE_reset_pairings()

void LEDGER_BLE_reset_pairings ( void  )

Definition at line 1163 of file ledger_ble.c.

◆ LEDGER_BLE_send()

void LEDGER_BLE_send ( const uint8_t packet,
uint16_t  packet_length 
)

Definition at line 1048 of file ledger_ble.c.

◆ LEDGER_BLE_set_recv_buffer()

void LEDGER_BLE_set_recv_buffer ( uint8_t buffer,
uint16_t  buffer_length 
)

Definition at line 1041 of file ledger_ble.c.