I2C. Test changes
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3068 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
70179f12dd
commit
24987e2873
|
@ -19,7 +19,7 @@ static i2cblock_t accel_rx_data[ACCEL_RX_DEPTH];
|
|||
static i2cblock_t accel_tx_data[ACCEL_TX_DEPTH];
|
||||
|
||||
/* Error trap */
|
||||
static void i2c_lis3_error_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_lis3_error_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void)i2cscfg;
|
||||
int status = 0;
|
||||
status = i2cp->id_i2c->SR1;
|
||||
|
@ -62,7 +62,7 @@ static msg_t I2CAccelThread(void *arg) {
|
|||
}
|
||||
|
||||
/* This callback raise up when transfer finished */
|
||||
static void i2c_lis3_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_lis3_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void) i2cp;
|
||||
// only wake up processing thread
|
||||
if (i2c_accel_tp != NULL) {
|
||||
|
|
|
@ -18,7 +18,7 @@ static uint16_t ch1 = 0, ch2 = 0, ch3 = 0, ch4 = 0;
|
|||
|
||||
|
||||
/* Error trap */
|
||||
static void i2c_max1236_error_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_max1236_error_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void)i2cscfg;
|
||||
int status = 0;
|
||||
status = i2cp->id_i2c->SR1;
|
||||
|
@ -27,7 +27,7 @@ static void i2c_max1236_error_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
|||
|
||||
|
||||
/* This callback raise up when transfer finished */
|
||||
static void i2c_max1236_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_max1236_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void)*i2cp;
|
||||
/* get ADC data */
|
||||
ch1 = ((i2cscfg->rxbuf[0] & 0xF) << 8) + i2cscfg->rxbuf[1];
|
||||
|
|
|
@ -19,7 +19,7 @@ static i2cblock_t tmp75_tx_data[TMP75_TX_DEPTH];
|
|||
static int16_t temperature = 0;
|
||||
|
||||
// Simple error trap
|
||||
static void i2c_tmp75_error_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_tmp75_error_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void)i2cscfg;
|
||||
int status = 0;
|
||||
status = i2cp->id_i2c->SR1;
|
||||
|
@ -27,7 +27,7 @@ static void i2c_tmp75_error_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
|||
}
|
||||
|
||||
/* This callback raise up when transfer finished */
|
||||
static void i2c_tmp75_cb(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg){
|
||||
static void i2c_tmp75_cb(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg){
|
||||
(void)*i2cp;
|
||||
/* store temperature value */
|
||||
temperature = (i2cscfg->rxbuf[0] << 8) + i2cscfg->rxbuf[1];
|
||||
|
|
Loading…
Reference in New Issue