alan broad
/
carbon_v5_arm_studio
arm studio build
Diff: inc/commI2C.h
- Revision:
- 7:fba1e8fc7693
- Parent:
- 6:b2039a285d7f
- Child:
- 9:cc23b2049639
--- a/inc/commI2C.h Tue Aug 07 17:56:23 2018 +0000 +++ b/inc/commI2C.h Fri Aug 10 19:17:43 2018 +0000 @@ -21,9 +21,9 @@ #define BUFFER_SIZE_I2C 64 -#define I2C_MIN_WAIT_DELAY 200 //minimum time between rcv/xmit i2c data and pulsing wake +#define I2C_MIN_WAIT_DELAY 200 //minimum time between rcv/xmit i2c data and pulsing wake #define I2C_ACK_PROC 0xff //first byte of i2c ack msg back to proc -#define I2C_MAX_ACK_DATA 0x32 //max data bytes accepted from Rx downstream pkt +#define I2C_MAX_ACK_DATA 32 //max data bytes accepted from Rx downstream pkt //cmds to xdot enum{ @@ -63,7 +63,7 @@ uint8_t ack; //ack header response uint8_t cmd; //cmd received from proc uint8_t dataLen; //datalen found in pkt - uint8_t bXmitAttempted; //true if xmit attempted, (fail of pkt len too big) + uint8_t bXmitAttempted; //true if xmit attempted, (fail of pkt len too big) uint8_t joinAttempts; //# of join attempts before join occured, if bJoined=0 this = max attempts uint8_t bJoined; //true if successfully joined uint8_t bAck; //true if ack return from xmit @@ -74,6 +74,8 @@ uint8_t rxData[I2C_MAX_ACK_DATA]; //array for rx Data int16_t mdot_ret; //mdot return code after calling send function uint8_t chksum_err; //1 if chksum err on proc upstream pkt + int8_t snr; //last snr, 0 if no rx1/2 ack + uint8_t rsvd[15]; //reserved for future use }pkt_ack; //structure: results returned to proc for eui and api_level //v0307: eui pkt now used to read/set radio params also @@ -86,17 +88,6 @@ uint8_t verLvlData[4]; //ver level }pkt_eui; - -//cmds to set radio params -enum{ - XDOT_CMD_RADIO_SUB_BAND = 1, //set/read radio subband - XDOT_CMD_RADIO_ADR, //set enable/disable ADR or read - XDOT_CMD_RADIO_ANT_GAIN, //set/read antenna gain - XDOT_CMD_RADIO_XMIT_PWR, //set/read transit power - XDOT_CMD_RADIO_SF, //set/read spreading factor - XDOT_CMD_RADIO_SAVE_CFG, //save cfg to non-volative memory => restore in next reboot -}; - //structure: cmd structure to proc for setting radio parameters //upstream pkt struc typedef struct {