diff --git a/samples/zephyr/c_interop/platforms/stm32f4_disco.def b/samples/zephyr/c_interop/platforms/stm32f4_disco.def index 1eb0decf5d6..461af256e6f 100644 --- a/samples/zephyr/c_interop/platforms/stm32f4_disco.def +++ b/samples/zephyr/c_interop/platforms/stm32f4_disco.def @@ -18,13 +18,3 @@ headers = autoconf.h zephyr.h board.h device.h gpio.h compilerOpts = -DKERNEL -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -ffreestanding -std=c99 -nostdinc ---- - -// cinterop doesn't support `#define FOO "string"` constructs as of yet. -// so we provide this accessor for now. Because the port names -// are resolved to string literals. - -extern const char* led0_gpio_port(void) { - return LED0_GPIO_PORT; -} - diff --git a/samples/zephyr/src/main.kt b/samples/zephyr/src/main.kt index f335cdf5ac8..5a21aa74141 100644 --- a/samples/zephyr/src/main.kt +++ b/samples/zephyr/src/main.kt @@ -19,8 +19,7 @@ import kotlinx.cinterop.* fun blinky(value: Int) { - // See the .def file for details of led0_gpio_port() - val port = led0_gpio_port()!!.toKString() + val port = LED0_GPIO_PORT val led = LED0_GPIO_PIN var toggler = false val dev = device_get_binding(port)