comparison Small_CPU/Src/i2c.c @ 185:1bb24fd3fc92

Merged in Ideenmodellierer/ostc4/Cleanup_Compass_Wireless (pull request #4) Cleanup Compass Wireless
author heinrichsweikamp <bitbucket@heinrichsweikamp.com>
date Fri, 15 Mar 2019 08:22:16 +0000
parents 7e749084f347
children a9d798e8c11f
comparison
equal deleted inserted replaced
178:d36596281501 185:1bb24fd3fc92
103 if(global.I2C_SystemStatus != HAL_OK) 103 if(global.I2C_SystemStatus != HAL_OK)
104 return (HAL_StatusTypeDef)global.I2C_SystemStatus; 104 return (HAL_StatusTypeDef)global.I2C_SystemStatus;
105 105
106 global.dataSendToSlaveStopEval = 1; 106 global.dataSendToSlaveStopEval = 1;
107 107
108 global.I2C_SystemStatus = HAL_I2C_Master_Transmit(&I2cHandle, DevAddress, pData, Size, 100 /*FIXME , 0*/); 108 global.I2C_SystemStatus = HAL_I2C_Master_Transmit(&I2cHandle, DevAddress, pData, Size, 0);
109 if(global.I2C_SystemStatus != HAL_OK) 109 if(global.I2C_SystemStatus != HAL_OK)
110 { 110 {
111 I2C_Error_count(); 111 I2C_Error_count();
112 } 112 }
113 global.dataSendToSlaveStopEval = 0; 113 global.dataSendToSlaveStopEval = 0;
126 return (HAL_StatusTypeDef)(global.I2C_SystemStatus & 0x03); 126 return (HAL_StatusTypeDef)(global.I2C_SystemStatus & 0x03);
127 127
128 128
129 global.dataSendToSlaveStopEval = 1; 129 global.dataSendToSlaveStopEval = 1;
130 130
131 global.I2C_SystemStatus = HAL_I2C_Master_Transmit(&I2cHandle, DevAddress, pData, Size,100 /*FIXME , 1*/); 131 global.I2C_SystemStatus = HAL_I2C_Master_Transmit(&I2cHandle, DevAddress, pData, Size, 2);
132 if(global.I2C_SystemStatus != HAL_OK) 132 if(global.I2C_SystemStatus != HAL_OK)
133 { 133 {
134 I2C_Error_count(); 134 I2C_Error_count();
135 } 135 }
136 136