zephyr/drivers/i2c
Michael Scott d39d5881c3 drivers: i2c: fix build break for nrfx_twi* with newlib
When running sanitycheck for reel_board which selects
CONFIG_NRFX_TWIM it fails the following tests:
tests/misc/test_build/test_newlib
tests/kernel/errno/kernel.common.errno.newlib
tests/lib/mem_alloc/libraries.libc.newlib

/zephyr/drivers/i2c/i2c_nrfx_twim.c:144:3: error: expected declaration
specifiers or '...' before '(' token
   (bitrate == I2C_BITRATE_STANDARD ? NRF_TWIM_FREQ_100K         \
   ^
/zephyr/drivers/i2c/i2c_nrfx_twim.c:151:3: note: in expansion of macro
'I2C_NRFX_TWIM_FREQUENCY'
   I2C_NRFX_TWIM_FREQUENCY(           \
   ^~~~~~~~~~~~~~~~~~~~~~~
/zephyr/drivers/i2c/i2c_nrfx_twim.c:184:1: note: in expansion of macro
'I2C_NRFX_TWIM_DEVICE'
 I2C_NRFX_TWIM_DEVICE(0);
 ^~~~~~~~~~~~~~~~~~~~
/zephyr/drivers/i2c/i2c_nrfx_twim.c:154:3: error: expected declaration
specifiers or '...' before string constant
   "Wrong I2C " #idx " frequency setting in dts");         \
   ^
/zephyr/drivers/i2c/i2c_nrfx_twim.c:184:1: note: in expansion of macro
'I2C_NRFX_TWIM_DEVICE'
 I2C_NRFX_TWIM_DEVICE(0);
 ^~~~~~~~~~~~~~~~~~~~
zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/build.make:62: recipe
for target
'zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj'
failed

To fix this, let's replace the use of static_assert() with a more
generic macro: BUILD_ASSERT_MSG()  This should work across minimal
libc, newlibc and c++.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-12-01 18:35:21 +01:00
..
slave logging: Fix errors in log usage 2018-11-10 12:38:29 -05:00
CMakeLists.txt drivers: Introduce Silabs i2c shim driver 2018-10-31 09:00:38 -05:00
i2c_atmel_sam3.c dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI 2018-11-16 13:57:02 -05:00
i2c_bitbang.c
i2c_bitbang.h
i2c_cc32xx.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c_dw_registers.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
i2c_dw.c dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI 2018-11-16 13:57:02 -05:00
i2c_dw.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
i2c_esp32.c
i2c_gecko.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c_gpio.c
i2c_handlers.c
i2c_imx.c drivers: i2c: enable logging for drivers loading i2c-priv.h 2018-10-10 13:26:58 -04:00
i2c_ll_stm32_v1.c drivers: Remove redundant semicolon 2018-11-07 10:34:06 -05:00
i2c_ll_stm32_v2.c drivers: Remove board.h include 2018-11-01 13:21:11 -04:00
i2c_ll_stm32.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c_ll_stm32.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
i2c_mcux.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c_nios2.c drivers: i2c: move to new logger 2018-10-08 17:49:12 -04:00
i2c_nrfx_twi.c drivers: i2c: fix build break for nrfx_twi* with newlib 2018-12-01 18:35:21 +01:00
i2c_nrfx_twim.c drivers: i2c: fix build break for nrfx_twi* with newlib 2018-12-01 18:35:21 +01:00
i2c_qmsi_ss.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c_qmsi.c dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI 2018-11-16 13:57:02 -05:00
i2c_sam_twi.c dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI 2018-11-16 13:57:02 -05:00
i2c_sam_twihs.c dts: i2c: cleanup CONFIG_I2C_x_IRQ_PRI 2018-11-16 13:57:02 -05:00
i2c_sbcon.c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c-priv.h drivers: i2c: move to new logger 2018-10-08 17:49:12 -04:00
Kconfig drivers: i2c: move to new logger 2018-10-08 17:49:12 -04:00
Kconfig.dw kconfig: Hide the DesignWare I2C driver on unsupported platforms 2018-10-25 07:32:05 +01:00
Kconfig.esp32
Kconfig.gpio
Kconfig.nrfx
Kconfig.qmsi drivers: i2c: Select HAS_DTS_I2C in designware and qmsi drivers 2018-09-27 05:54:54 +05:30
Kconfig.sbcon
Kconfig.stm32