zephyr/include
Alexander Polleti f568673e1b c++: Fix compilation of C++ file that includes i2c.h
Within a C++ file I include i2c.h and got 6 of the following errors:

zephyr/include/i2c.h:199:42: error: invalid conversion from
	‘const void*’ to ‘const i2c_driver_api*’ [-fpermissive]
  const struct i2c_driver_api *api = dev->driver_api;
                                     ~~~~~^~~~~~~~~~

I fixed it with a c style conversion for each instance, so
const struct i2c_driver_api *api = dev->driver_api;
becomes

const struct i2c_driver_api *api =
	(const struct i2c_driver_api *)dev->driver_api;

I handled the instances for i2c_slave_driver_api alike.

I tested this with a one of my own boards and communication with a
I2C sensor.

Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
2018-09-21 18:49:52 -04:00
..
app_memory subsys: app_memory: Fixed the size calculation for power of 2 MPUs 2018-09-20 11:25:53 -04:00
arch include: arm: CMSIS header redefining MPU_PRESENT. 2018-09-20 20:35:25 -04:00
audio
bluetooth Bluetooth: Controller: Add support for setting public address 2018-09-21 12:40:10 +02:00
cmsis_rtos_v1
crypto
debug
dfu
display
drivers
dt-bindings clock_control: Add support for lpspi clock in mcux ccm driver 2018-09-19 09:15:29 -04:00
fs
linker shell: Shell subsystem reimplementation 2018-09-19 09:30:29 -04:00
logging logging: Add shell commands 2018-09-19 09:30:29 -04:00
mgmt
misc sys: dlist: Add sys_dlist_peek_prev_no_check and sys_dlist_peek_prev 2018-09-19 09:30:29 -04:00
net
nvs
posix
random
settings
shell shell: Extend shell as a log backend 2018-09-19 09:30:29 -04:00
toolchain
usb
zephyr
adc.h
aio_comparator.h
atomic.h
base64.h
cache.h
can.h
clock_control.h
console.h
counter.h
crc8.h
crc16.h
crc32.h
device.h
disk_access.h
dma.h
entropy.h
exc_handle.h
fcb.h
flash_map.h
flash.h
fs.h
gpio.h gpio: enable callback to specify pin in addition to pin_mask 2018-09-19 21:36:16 -04:00
i2c.h c++: Fix compilation of C++ file that includes i2c.h 2018-09-21 18:49:52 -04:00
i2s.h
init.h
ipm.h
irq_nextlevel.h
irq_offload.h
irq.h
json.h
kernel_includes.h
kernel_version.h
kernel.h kernel: remove deprecate k_call_stacks_analyze 2018-09-21 10:33:05 -04:00
led_strip.h
led.h
pinmux.h
power.h
ptp_clock.h
pwm.h
ring_buffer.h
rtc.h
sched_priq.h
sensor.h
shared_irq.h
spi.h
spinlock.h
stats.h
sw_isr_table.h
sys_clock.h
sys_io.h
syscall.h
toolchain.h
tracing.h
uart.h
watchdog.h
zephyr.h