File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,8 +184,12 @@ static unsigned char swI2CReadSDA(void)
184184 return 0 ;
185185}
186186
187+ #ifdef __clang__
188+ #pragma clang optimize off
189+ #else
187190#pragma GCC push_options
188191#pragma GCC optimize("O0")
192+ #endif
189193
190194/*
191195 * This function sends ACK signal
@@ -336,7 +340,12 @@ static unsigned char swI2CReadByte(unsigned char ack)
336340
337341 return data ;
338342}
343+
344+ #ifdef __clang__
345+ #pragma clang optimize on
346+ #else
339347#pragma GCC pop_options
348+ #endif
340349
341350/*
342351 * This function initializes the i2c attributes and bus
Original file line number Diff line number Diff line change @@ -258,8 +258,12 @@ static void ddk768_swI2CSCL(unsigned char value)
258258 pokeRegisterDWord (g_i2cClkGPIODataDirReg , ulGPIODirection );
259259 }
260260}
261+ #ifdef __clang__
262+ #pragma clang optimize off
263+ #else
261264#pragma GCC push_options
262265#pragma GCC optimize("O0")
266+ #endif
263267/*
264268 * This function sends ACK signal
265269 */
@@ -390,7 +394,11 @@ static long ddk768_swI2CWriteByte(unsigned char data)
390394 return (-1 );
391395}
392396
397+ #ifdef __clang__
398+ #pragma clang optimize on
399+ #else
393400#pragma GCC pop_options
401+ #endif
394402
395403static long ddk768_swI2CSetGPIO (
396404 unsigned char i2cClkGPIO ,
You can’t perform that action at this time.
0 commit comments