alan broad
/
carbon_v5_arm_studio
arm studio build
Diff: inc/commI2C.h
- Revision:
- 18:d95e1a2c4303
- Parent:
- 17:74d60177c6b6
- Child:
- 20:62a1a264fa1e
--- a/inc/commI2C.h Fri Jan 25 01:46:26 2019 +0000 +++ b/inc/commI2C.h Sun Jan 27 15:27:53 2019 +0000 @@ -20,8 +20,9 @@ -#define BUFFER_SIZE_I2C 64 -#define I2C_MIN_WAIT_DELAY 200 //minimum time between rcv/xmit i2c data and pulsing wake +#define BUFFER_SIZE_I2C 64 //i2c transfer pkt size in ClassA operational mode +#define BUFFER_SIZE_MCAST 160 //i2c transfer pkt size in ClassC code frag mode +#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 32 //max data bytes accepted from Rx downstream pkt @@ -43,7 +44,8 @@ enum I2C_XFR_TYPE{ I2C_READ =0, - I2C_WRITE}; + I2C_WRITE + }; //structure: upstream pkt for xdot to transmit //txData bfr: is located in the struc immediately after dataLen parameter @@ -132,27 +134,6 @@ nvm nvmData; }pkt_setnvmdwn; //-------------------------------------------------------------------------- -//nvm ptks for ABP creds ---> REMOVE ??????????? -//-------------------------------------------------------------------------- -/* -//upstream pkt struc -typedef struct { - uint8_t cmd; //cmd received from proc - uint8_t dataLen; //datalen found in pkt - uint8_t nvm_option; //read,write,restore - nvmABP nvmData; -}pkt_setnvmABPup; - -//dwnstream pkt struc -typedef struct { - uint8_t ack; //ack header response - uint8_t cmd; //cmd received from proc - uint8_t dataLen; //datalen found in pkt - uint8_t bChkSumOK; - nvmABP nvmData; -}pkt_setnvmABPdwn; -*/ -//-------------------------------------------------------------------------- //ptks for class A/B radio change //-------------------------------------------------------------------------- //upstream pkt struc @@ -169,9 +150,6 @@ bool bSwitched; //1 = switched OK }pkt_setClassDwn; - - - //structure: results returned to proc network session typedef struct { uint8_t ack; //ack header response @@ -204,6 +182,7 @@ void i2c_proc_init(); //void i2c_wait4wake_lo(void); void i2c_pulse_wake(void); -I2C_XFR_TYPE i2c_proc_comm(); +//I2C_XFR_TYPE i2c_proc_comm(); //ols +I2C_XFR_TYPE i2c_proc_comm(uint8_t *buf_xmt,uint8_t *buf_rcv,uint16_t bufSize); #endif