Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SX1276GenericLib USBDevice
Fork of NonPingPong_PICO_LoRa_LP1 by
Diff: global_buffers.h
- Revision:
- 6:51f492ca61a2
- Parent:
- 5:9e751733a6f3
- Child:
- 7:6264bc5b6421
--- a/global_buffers.h Tue Oct 13 00:45:46 2020 +0000 +++ b/global_buffers.h Wed Oct 14 00:19:02 2020 +0000 @@ -28,23 +28,23 @@ /*************************************************************************** * MASTER Device **************************************************************************/\ -#define MASTER 1 +//#define MASTER 1 /*************************************************************************** * SLAVE Device **************************************************************************/\ -//#define SLAVE 1 +#define SLAVE 1 /*************************************************************************** * Indexes for which byte specific data begins at in the payload buffer **************************************************************************/ /* size of ID data that defines what the signature of the device is */ -const uint8_t size_signature = 8; +const uint8_t size_signature = 1; /* size of data in bytes that is acquired by the master device */ //const uint8_t size_of_ble = 2; -const uint8_t size_of_dum = 2; +//const uint8_t size_of_dum = 2; /* size of data in bytes that is acquired by the slave device */ //const uint8_t size_of_grid_eye = 128; @@ -64,7 +64,8 @@ * is to be delivered and for data that is received. */ -const uint16_t PAYLOAD_BUFFER_SIZE_MASTER_TO_SLAVE = size_signature + size_of_dum; +const uint16_t PAYLOAD_BUFFER_SIZE_MASTER_TO_SLAVE = size_signature; +//const uint16_t PAYLOAD_BUFFER_SIZE_MASTER_TO_SLAVE = 0; const uint16_t PAYLOAD_BUFFER_SIZE_SLAVE_TO_MASTER = size_signature + size_of_MAX30208 + size_of_MAX44009 + size_of_MAX20361; /* determine the appropriate buffer sizes */ @@ -114,7 +115,7 @@ #if MASTER == 1 // Master Device /* These are indexs used to create the payload buffer to send to Slave */ const uint8_t tx_idx_signature = 0; // 1st buf in tx payload (begins at byte 0) - const uint8_t tx_idx_dum = tx_idx_signature + size_signature; // 2nd buf in tx payload +// const uint8_t tx_idx_dum = tx_idx_signature + size_signature; // 2nd buf in tx payload /* These are indexs used to deconstruct received payload buffer sent by the Slave */ const uint8_t rx_idx_signature = 0; // 1st buf in rx payload (begins at byte 0) @@ -133,7 +134,7 @@ /* These are indexs used to deconstruct received payload buffer sent by the Master */ const uint8_t rx_idx_signature = 0; // 1st buf in rx payload (begins at byte 0) - const uint8_t rx_idx_dum = rx_idx_signature + size_signature; // 2nd buf in rx payload +// const uint8_t rx_idx_dum = rx_idx_signature + size_signature; // 2nd buf in rx payload #endif @@ -151,10 +152,10 @@ * Dummy Data Buffers **************************************************************************/ #if MASTER == 1 // Master Device - static char curr_dum_data_to_slave[size_of_dum]; +// static char curr_dum_data_to_slave[size_of_dum]; #elif SLAVE == 1 // Slave Device - static char curr_dum_data_from_master[size_of_dum]; - static char prev_dum_data_from_master[size_of_dum]; +// static char curr_dum_data_from_master[size_of_dum]; +// static char prev_dum_data_from_master[size_of_dum]; #endif