From a17d1793d37ab60bad9de14f4fd2f1b9ece20df8 Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Fri, 7 Jun 2024 11:30:54 -0400 Subject: [PATCH] apis: organize into folders --- Cargo.toml | 72 +++++++++---------- apis/{ => interface}/buttons/Cargo.toml | 4 +- apis/{ => interface}/buttons/src/lib.rs | 0 apis/{ => interface}/buttons/src/tests.rs | 0 apis/{ => interface}/buzzer/Cargo.toml | 4 +- apis/{ => interface}/buzzer/src/lib.rs | 0 apis/{ => interface}/buzzer/src/tests.rs | 0 apis/{ => interface}/console/Cargo.toml | 4 +- apis/{ => interface}/console/src/lib.rs | 0 apis/{ => interface}/console/src/tests.rs | 0 apis/{ => interface}/leds/Cargo.toml | 4 +- apis/{ => interface}/leds/src/lib.rs | 0 apis/{ => interface}/leds/src/tests.rs | 0 apis/{ => kernel}/low_level_debug/Cargo.toml | 4 +- apis/{ => kernel}/low_level_debug/src/lib.rs | 0 .../{ => kernel}/low_level_debug/src/tests.rs | 0 apis/{ => peripherals}/adc/Cargo.toml | 4 +- apis/{ => peripherals}/adc/src/lib.rs | 0 apis/{ => peripherals}/adc/src/tests.rs | 0 apis/{ => peripherals}/alarm/Cargo.toml | 4 +- apis/{ => peripherals}/alarm/src/lib.rs | 0 apis/{ => peripherals}/alarm/src/tests.rs | 0 apis/{ => peripherals}/gpio/Cargo.toml | 4 +- apis/{ => peripherals}/gpio/src/lib.rs | 0 apis/{ => peripherals}/gpio/src/tests.rs | 0 apis/{ => peripherals}/i2c_master/Cargo.toml | 2 +- apis/{ => peripherals}/i2c_master/src/lib.rs | 0 .../i2c_master_slave/Cargo.toml | 2 +- .../i2c_master_slave/src/lib.rs | 0 apis/{ => peripherals}/rng/Cargo.toml | 4 +- apis/{ => peripherals}/rng/src/lib.rs | 0 .../spi_controller/Cargo.toml | 2 +- .../spi_controller/src/lib.rs | 0 apis/{ => sensors}/air_quality/Cargo.toml | 4 +- apis/{ => sensors}/air_quality/src/lib.rs | 0 apis/{ => sensors}/air_quality/src/tests.rs | 0 apis/{ => sensors}/ambient_light/Cargo.toml | 4 +- apis/{ => sensors}/ambient_light/src/lib.rs | 0 apis/{ => sensors}/ambient_light/src/tests.rs | 0 apis/{ => sensors}/ninedof/Cargo.toml | 4 +- apis/{ => sensors}/ninedof/src/lib.rs | 0 apis/{ => sensors}/ninedof/src/tests.rs | 0 apis/{ => sensors}/proximity/Cargo.toml | 4 +- apis/{ => sensors}/proximity/src/lib.rs | 0 apis/{ => sensors}/proximity/src/tests.rs | 0 apis/{ => sensors}/sound_pressure/Cargo.toml | 4 +- apis/{ => sensors}/sound_pressure/src/lib.rs | 0 .../{ => sensors}/sound_pressure/src/tests.rs | 0 apis/{ => sensors}/temperature/Cargo.toml | 4 +- apis/{ => sensors}/temperature/src/lib.rs | 0 apis/{ => sensors}/temperature/src/tests.rs | 0 apis/{ => storage}/key_value/Cargo.toml | 4 +- apis/{ => storage}/key_value/src/lib.rs | 0 apis/{ => storage}/key_value/src/tests.rs | 0 panic_handlers/debug_panic/Cargo.toml | 4 +- panic_handlers/small_panic/Cargo.toml | 2 +- 56 files changed, 74 insertions(+), 74 deletions(-) rename apis/{ => interface}/buttons/Cargo.toml (76%) rename apis/{ => interface}/buttons/src/lib.rs (100%) rename apis/{ => interface}/buttons/src/tests.rs (100%) rename apis/{ => interface}/buzzer/Cargo.toml (76%) rename apis/{ => interface}/buzzer/src/lib.rs (100%) rename apis/{ => interface}/buzzer/src/tests.rs (100%) rename apis/{ => interface}/console/Cargo.toml (79%) rename apis/{ => interface}/console/src/lib.rs (100%) rename apis/{ => interface}/console/src/tests.rs (100%) rename apis/{ => interface}/leds/Cargo.toml (76%) rename apis/{ => interface}/leds/src/lib.rs (100%) rename apis/{ => interface}/leds/src/tests.rs (100%) rename apis/{ => kernel}/low_level_debug/Cargo.toml (77%) rename apis/{ => kernel}/low_level_debug/src/lib.rs (100%) rename apis/{ => kernel}/low_level_debug/src/tests.rs (100%) rename apis/{ => peripherals}/adc/Cargo.toml (76%) rename apis/{ => peripherals}/adc/src/lib.rs (100%) rename apis/{ => peripherals}/adc/src/tests.rs (100%) rename apis/{ => peripherals}/alarm/Cargo.toml (78%) rename apis/{ => peripherals}/alarm/src/lib.rs (100%) rename apis/{ => peripherals}/alarm/src/tests.rs (100%) rename apis/{ => peripherals}/gpio/Cargo.toml (80%) rename apis/{ => peripherals}/gpio/src/lib.rs (100%) rename apis/{ => peripherals}/gpio/src/tests.rs (100%) rename apis/{ => peripherals}/i2c_master/Cargo.toml (88%) rename apis/{ => peripherals}/i2c_master/src/lib.rs (100%) rename apis/{ => peripherals}/i2c_master_slave/Cargo.toml (88%) rename apis/{ => peripherals}/i2c_master_slave/src/lib.rs (100%) rename apis/{ => peripherals}/rng/Cargo.toml (79%) rename apis/{ => peripherals}/rng/src/lib.rs (100%) rename apis/{ => peripherals}/spi_controller/Cargo.toml (88%) rename apis/{ => peripherals}/spi_controller/src/lib.rs (100%) rename apis/{ => sensors}/air_quality/Cargo.toml (76%) rename apis/{ => sensors}/air_quality/src/lib.rs (100%) rename apis/{ => sensors}/air_quality/src/tests.rs (100%) rename apis/{ => sensors}/ambient_light/Cargo.toml (77%) rename apis/{ => sensors}/ambient_light/src/lib.rs (100%) rename apis/{ => sensors}/ambient_light/src/tests.rs (100%) rename apis/{ => sensors}/ninedof/Cargo.toml (78%) rename apis/{ => sensors}/ninedof/src/lib.rs (100%) rename apis/{ => sensors}/ninedof/src/tests.rs (100%) rename apis/{ => sensors}/proximity/Cargo.toml (76%) rename apis/{ => sensors}/proximity/src/lib.rs (100%) rename apis/{ => sensors}/proximity/src/tests.rs (100%) rename apis/{ => sensors}/sound_pressure/Cargo.toml (77%) rename apis/{ => sensors}/sound_pressure/src/lib.rs (100%) rename apis/{ => sensors}/sound_pressure/src/tests.rs (100%) rename apis/{ => sensors}/temperature/Cargo.toml (76%) rename apis/{ => sensors}/temperature/src/lib.rs (100%) rename apis/{ => sensors}/temperature/src/tests.rs (100%) rename apis/{ => storage}/key_value/Cargo.toml (75%) rename apis/{ => storage}/key_value/src/lib.rs (100%) rename apis/{ => storage}/key_value/src/tests.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 04d5f6b0..1abdb4aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,28 +23,28 @@ rust_embedded = [ ] [dependencies] -libtock_adc = { path = "apis/adc" } -libtock_air_quality = { path = "apis/air_quality" } -libtock_alarm = { path = "apis/alarm" } -libtock_ambient_light = { path = "apis/ambient_light" } -libtock_buttons = { path = "apis/buttons" } -libtock_buzzer = { path = "apis/buzzer" } -libtock_console = { path = "apis/console" } +libtock_adc = { path = "apis/peripherals/adc" } +libtock_air_quality = { path = "apis/sensors/air_quality" } +libtock_alarm = { path = "apis/peripherals/alarm" } +libtock_ambient_light = { path = "apis/sensors/ambient_light" } +libtock_buttons = { path = "apis/interface/buttons" } +libtock_buzzer = { path = "apis/interface/buzzer" } +libtock_console = { path = "apis/interface/console" } libtock_debug_panic = { path = "panic_handlers/debug_panic" } -libtock_gpio = { path = "apis/gpio" } -libtock_i2c_master = { path = "apis/i2c_master" } -libtock_i2c_master_slave = { path = "apis/i2c_master_slave" } -libtock_key_value = { path = "apis/key_value" } -libtock_leds = { path = "apis/leds" } -libtock_low_level_debug = { path = "apis/low_level_debug" } -libtock_ninedof = { path = "apis/ninedof" } +libtock_gpio = { path = "apis/peripherals/gpio" } +libtock_i2c_master = { path = "apis/peripherals/i2c_master" } +libtock_i2c_master_slave = { path = "apis/peripherals/i2c_master_slave" } +libtock_key_value = { path = "apis/storage/key_value" } +libtock_leds = { path = "apis/interface/leds" } +libtock_low_level_debug = { path = "apis/kernel/low_level_debug" } +libtock_ninedof = { path = "apis/sensors/ninedof" } libtock_platform = { path = "platform" } -libtock_proximity = { path = "apis/proximity" } -libtock_rng = { path = "apis/rng" } +libtock_proximity = { path = "apis/sensors/proximity" } +libtock_rng = { path = "apis/peripherals/rng" } libtock_runtime = { path = "runtime" } -libtock_sound_pressure = { path = "apis/sound_pressure" } -libtock_spi_controller = { path = "apis/spi_controller" } -libtock_temperature = { path = "apis/temperature" } +libtock_sound_pressure = { path = "apis/sensors/sound_pressure" } +libtock_spi_controller = { path = "apis/peripherals/spi_controller" } +libtock_temperature = { path = "apis/sensors/temperature" } embedded-hal = { version = "1.0", optional = true } @@ -64,23 +64,23 @@ panic = "abort" [workspace] exclude = ["tock"] members = [ - "apis/adc", - "apis/air_quality", - "apis/alarm", - "apis/ambient_light", - "apis/buttons", - "apis/buzzer", - "apis/console", - "apis/gpio", - "apis/i2c_master", - "apis/i2c_master_slave", - "apis/key_value", - "apis/leds", - "apis/low_level_debug", - "apis/ninedof", - "apis/proximity", - "apis/rng", - "apis/temperature", + "apis/interface/buttons", + "apis/interface/buzzer", + "apis/interface/console", + "apis/interface/leds", + "apis/kernel/low_level_debug", + "apis/peripherals/adc", + "apis/peripherals/alarm", + "apis/peripherals/gpio", + "apis/peripherals/i2c_master", + "apis/peripherals/i2c_master_slave", + "apis/peripherals/rng", + "apis/sensors/air_quality", + "apis/sensors/ambient_light", + "apis/sensors/ninedof", + "apis/sensors/proximity", + "apis/sensors/temperature", + "apis/storage/key_value", "panic_handlers/debug_panic", "panic_handlers/small_panic", "platform", diff --git a/apis/buttons/Cargo.toml b/apis/interface/buttons/Cargo.toml similarity index 76% rename from apis/buttons/Cargo.toml rename to apis/interface/buttons/Cargo.toml index 4f52c59f..2729a801 100644 --- a/apis/buttons/Cargo.toml +++ b/apis/interface/buttons/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock buttons driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/buttons/src/lib.rs b/apis/interface/buttons/src/lib.rs similarity index 100% rename from apis/buttons/src/lib.rs rename to apis/interface/buttons/src/lib.rs diff --git a/apis/buttons/src/tests.rs b/apis/interface/buttons/src/tests.rs similarity index 100% rename from apis/buttons/src/tests.rs rename to apis/interface/buttons/src/tests.rs diff --git a/apis/buzzer/Cargo.toml b/apis/interface/buzzer/Cargo.toml similarity index 76% rename from apis/buzzer/Cargo.toml rename to apis/interface/buzzer/Cargo.toml index 47d05074..f2ed6182 100644 --- a/apis/buzzer/Cargo.toml +++ b/apis/interface/buzzer/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock buzzer driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/buzzer/src/lib.rs b/apis/interface/buzzer/src/lib.rs similarity index 100% rename from apis/buzzer/src/lib.rs rename to apis/interface/buzzer/src/lib.rs diff --git a/apis/buzzer/src/tests.rs b/apis/interface/buzzer/src/tests.rs similarity index 100% rename from apis/buzzer/src/tests.rs rename to apis/interface/buzzer/src/tests.rs diff --git a/apis/console/Cargo.toml b/apis/interface/console/Cargo.toml similarity index 79% rename from apis/console/Cargo.toml rename to apis/interface/console/Cargo.toml index 2251778c..b23ed898 100644 --- a/apis/console/Cargo.toml +++ b/apis/interface/console/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true description = "libtock console driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/console/src/lib.rs b/apis/interface/console/src/lib.rs similarity index 100% rename from apis/console/src/lib.rs rename to apis/interface/console/src/lib.rs diff --git a/apis/console/src/tests.rs b/apis/interface/console/src/tests.rs similarity index 100% rename from apis/console/src/tests.rs rename to apis/interface/console/src/tests.rs diff --git a/apis/leds/Cargo.toml b/apis/interface/leds/Cargo.toml similarity index 76% rename from apis/leds/Cargo.toml rename to apis/interface/leds/Cargo.toml index 2b7afbbc..a21f77f5 100644 --- a/apis/leds/Cargo.toml +++ b/apis/interface/leds/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock leds driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/leds/src/lib.rs b/apis/interface/leds/src/lib.rs similarity index 100% rename from apis/leds/src/lib.rs rename to apis/interface/leds/src/lib.rs diff --git a/apis/leds/src/tests.rs b/apis/interface/leds/src/tests.rs similarity index 100% rename from apis/leds/src/tests.rs rename to apis/interface/leds/src/tests.rs diff --git a/apis/low_level_debug/Cargo.toml b/apis/kernel/low_level_debug/Cargo.toml similarity index 77% rename from apis/low_level_debug/Cargo.toml rename to apis/kernel/low_level_debug/Cargo.toml index 90917bee..74be309d 100644 --- a/apis/low_level_debug/Cargo.toml +++ b/apis/kernel/low_level_debug/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock low-level debug drivers" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/low_level_debug/src/lib.rs b/apis/kernel/low_level_debug/src/lib.rs similarity index 100% rename from apis/low_level_debug/src/lib.rs rename to apis/kernel/low_level_debug/src/lib.rs diff --git a/apis/low_level_debug/src/tests.rs b/apis/kernel/low_level_debug/src/tests.rs similarity index 100% rename from apis/low_level_debug/src/tests.rs rename to apis/kernel/low_level_debug/src/tests.rs diff --git a/apis/adc/Cargo.toml b/apis/peripherals/adc/Cargo.toml similarity index 76% rename from apis/adc/Cargo.toml rename to apis/peripherals/adc/Cargo.toml index cc4064f7..af48d08d 100644 --- a/apis/adc/Cargo.toml +++ b/apis/peripherals/adc/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock adc driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/adc/src/lib.rs b/apis/peripherals/adc/src/lib.rs similarity index 100% rename from apis/adc/src/lib.rs rename to apis/peripherals/adc/src/lib.rs diff --git a/apis/adc/src/tests.rs b/apis/peripherals/adc/src/tests.rs similarity index 100% rename from apis/adc/src/tests.rs rename to apis/peripherals/adc/src/tests.rs diff --git a/apis/alarm/Cargo.toml b/apis/peripherals/alarm/Cargo.toml similarity index 78% rename from apis/alarm/Cargo.toml rename to apis/peripherals/alarm/Cargo.toml index c4577a2a..a218ef68 100644 --- a/apis/alarm/Cargo.toml +++ b/apis/peripherals/alarm/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true description = "libtock alarm driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/alarm/src/lib.rs b/apis/peripherals/alarm/src/lib.rs similarity index 100% rename from apis/alarm/src/lib.rs rename to apis/peripherals/alarm/src/lib.rs diff --git a/apis/alarm/src/tests.rs b/apis/peripherals/alarm/src/tests.rs similarity index 100% rename from apis/alarm/src/tests.rs rename to apis/peripherals/alarm/src/tests.rs diff --git a/apis/gpio/Cargo.toml b/apis/peripherals/gpio/Cargo.toml similarity index 80% rename from apis/gpio/Cargo.toml rename to apis/peripherals/gpio/Cargo.toml index d32da173..c7bcecc3 100644 --- a/apis/gpio/Cargo.toml +++ b/apis/peripherals/gpio/Cargo.toml @@ -12,8 +12,8 @@ description = "libtock gpio driver" rust_embedded = ["embedded-hal"] [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } embedded-hal = { version = "1.0", optional = true } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/gpio/src/lib.rs b/apis/peripherals/gpio/src/lib.rs similarity index 100% rename from apis/gpio/src/lib.rs rename to apis/peripherals/gpio/src/lib.rs diff --git a/apis/gpio/src/tests.rs b/apis/peripherals/gpio/src/tests.rs similarity index 100% rename from apis/gpio/src/tests.rs rename to apis/peripherals/gpio/src/tests.rs diff --git a/apis/i2c_master/Cargo.toml b/apis/peripherals/i2c_master/Cargo.toml similarity index 88% rename from apis/i2c_master/Cargo.toml rename to apis/peripherals/i2c_master/Cargo.toml index 9b22245d..c963196b 100644 --- a/apis/i2c_master/Cargo.toml +++ b/apis/peripherals/i2c_master/Cargo.toml @@ -12,5 +12,5 @@ rust-version.workspace = true description = "libtock I2C master driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } diff --git a/apis/i2c_master/src/lib.rs b/apis/peripherals/i2c_master/src/lib.rs similarity index 100% rename from apis/i2c_master/src/lib.rs rename to apis/peripherals/i2c_master/src/lib.rs diff --git a/apis/i2c_master_slave/Cargo.toml b/apis/peripherals/i2c_master_slave/Cargo.toml similarity index 88% rename from apis/i2c_master_slave/Cargo.toml rename to apis/peripherals/i2c_master_slave/Cargo.toml index e2333f84..162785a4 100644 --- a/apis/i2c_master_slave/Cargo.toml +++ b/apis/peripherals/i2c_master_slave/Cargo.toml @@ -12,5 +12,5 @@ rust-version.workspace = true description = "libtock I2C master-slave driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } diff --git a/apis/i2c_master_slave/src/lib.rs b/apis/peripherals/i2c_master_slave/src/lib.rs similarity index 100% rename from apis/i2c_master_slave/src/lib.rs rename to apis/peripherals/i2c_master_slave/src/lib.rs diff --git a/apis/rng/Cargo.toml b/apis/peripherals/rng/Cargo.toml similarity index 79% rename from apis/rng/Cargo.toml rename to apis/peripherals/rng/Cargo.toml index e5a2a22a..1adbd13d 100644 --- a/apis/rng/Cargo.toml +++ b/apis/peripherals/rng/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true description = "libtock rng driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/rng/src/lib.rs b/apis/peripherals/rng/src/lib.rs similarity index 100% rename from apis/rng/src/lib.rs rename to apis/peripherals/rng/src/lib.rs diff --git a/apis/spi_controller/Cargo.toml b/apis/peripherals/spi_controller/Cargo.toml similarity index 88% rename from apis/spi_controller/Cargo.toml rename to apis/peripherals/spi_controller/Cargo.toml index d68a6d6d..02812f49 100644 --- a/apis/spi_controller/Cargo.toml +++ b/apis/peripherals/spi_controller/Cargo.toml @@ -12,4 +12,4 @@ rust-version.workspace = true description = "libtock SPI controller driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } diff --git a/apis/spi_controller/src/lib.rs b/apis/peripherals/spi_controller/src/lib.rs similarity index 100% rename from apis/spi_controller/src/lib.rs rename to apis/peripherals/spi_controller/src/lib.rs diff --git a/apis/air_quality/Cargo.toml b/apis/sensors/air_quality/Cargo.toml similarity index 76% rename from apis/air_quality/Cargo.toml rename to apis/sensors/air_quality/Cargo.toml index c5ae29cd..742d6966 100644 --- a/apis/air_quality/Cargo.toml +++ b/apis/sensors/air_quality/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock air quality driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/air_quality/src/lib.rs b/apis/sensors/air_quality/src/lib.rs similarity index 100% rename from apis/air_quality/src/lib.rs rename to apis/sensors/air_quality/src/lib.rs diff --git a/apis/air_quality/src/tests.rs b/apis/sensors/air_quality/src/tests.rs similarity index 100% rename from apis/air_quality/src/tests.rs rename to apis/sensors/air_quality/src/tests.rs diff --git a/apis/ambient_light/Cargo.toml b/apis/sensors/ambient_light/Cargo.toml similarity index 77% rename from apis/ambient_light/Cargo.toml rename to apis/sensors/ambient_light/Cargo.toml index 42a43979..adc1c479 100644 --- a/apis/ambient_light/Cargo.toml +++ b/apis/sensors/ambient_light/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock ambient light driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/ambient_light/src/lib.rs b/apis/sensors/ambient_light/src/lib.rs similarity index 100% rename from apis/ambient_light/src/lib.rs rename to apis/sensors/ambient_light/src/lib.rs diff --git a/apis/ambient_light/src/tests.rs b/apis/sensors/ambient_light/src/tests.rs similarity index 100% rename from apis/ambient_light/src/tests.rs rename to apis/sensors/ambient_light/src/tests.rs diff --git a/apis/ninedof/Cargo.toml b/apis/sensors/ninedof/Cargo.toml similarity index 78% rename from apis/ninedof/Cargo.toml rename to apis/sensors/ninedof/Cargo.toml index 98a69110..2fe87828 100644 --- a/apis/ninedof/Cargo.toml +++ b/apis/sensors/ninedof/Cargo.toml @@ -9,8 +9,8 @@ rust-version.workspace = true description = "libtock nine degrees of freedom driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } libm = "0.2.7" [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/ninedof/src/lib.rs b/apis/sensors/ninedof/src/lib.rs similarity index 100% rename from apis/ninedof/src/lib.rs rename to apis/sensors/ninedof/src/lib.rs diff --git a/apis/ninedof/src/tests.rs b/apis/sensors/ninedof/src/tests.rs similarity index 100% rename from apis/ninedof/src/tests.rs rename to apis/sensors/ninedof/src/tests.rs diff --git a/apis/proximity/Cargo.toml b/apis/sensors/proximity/Cargo.toml similarity index 76% rename from apis/proximity/Cargo.toml rename to apis/sensors/proximity/Cargo.toml index c1820350..290bf860 100644 --- a/apis/proximity/Cargo.toml +++ b/apis/sensors/proximity/Cargo.toml @@ -9,8 +9,8 @@ rust-version.workspace = true description = "libtock proximity driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/proximity/src/lib.rs b/apis/sensors/proximity/src/lib.rs similarity index 100% rename from apis/proximity/src/lib.rs rename to apis/sensors/proximity/src/lib.rs diff --git a/apis/proximity/src/tests.rs b/apis/sensors/proximity/src/tests.rs similarity index 100% rename from apis/proximity/src/tests.rs rename to apis/sensors/proximity/src/tests.rs diff --git a/apis/sound_pressure/Cargo.toml b/apis/sensors/sound_pressure/Cargo.toml similarity index 77% rename from apis/sound_pressure/Cargo.toml rename to apis/sensors/sound_pressure/Cargo.toml index 6a786a13..8fbac30b 100644 --- a/apis/sound_pressure/Cargo.toml +++ b/apis/sensors/sound_pressure/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock sound pressure driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/sound_pressure/src/lib.rs b/apis/sensors/sound_pressure/src/lib.rs similarity index 100% rename from apis/sound_pressure/src/lib.rs rename to apis/sensors/sound_pressure/src/lib.rs diff --git a/apis/sound_pressure/src/tests.rs b/apis/sensors/sound_pressure/src/tests.rs similarity index 100% rename from apis/sound_pressure/src/tests.rs rename to apis/sensors/sound_pressure/src/tests.rs diff --git a/apis/temperature/Cargo.toml b/apis/sensors/temperature/Cargo.toml similarity index 76% rename from apis/temperature/Cargo.toml rename to apis/sensors/temperature/Cargo.toml index f32f056d..2582128c 100644 --- a/apis/temperature/Cargo.toml +++ b/apis/sensors/temperature/Cargo.toml @@ -9,7 +9,7 @@ rust-version.workspace = true description = "libtock temperature driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/temperature/src/lib.rs b/apis/sensors/temperature/src/lib.rs similarity index 100% rename from apis/temperature/src/lib.rs rename to apis/sensors/temperature/src/lib.rs diff --git a/apis/temperature/src/tests.rs b/apis/sensors/temperature/src/tests.rs similarity index 100% rename from apis/temperature/src/tests.rs rename to apis/sensors/temperature/src/tests.rs diff --git a/apis/key_value/Cargo.toml b/apis/storage/key_value/Cargo.toml similarity index 75% rename from apis/key_value/Cargo.toml rename to apis/storage/key_value/Cargo.toml index b2b4b729..ca456398 100644 --- a/apis/key_value/Cargo.toml +++ b/apis/storage/key_value/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://www.github.com/tock/libtock-rs" description = "libtock key-value driver" [dependencies] -libtock_platform = { path = "../../platform" } +libtock_platform = { path = "../../../platform" } [dev-dependencies] -libtock_unittest = { path = "../../unittest" } +libtock_unittest = { path = "../../../unittest" } diff --git a/apis/key_value/src/lib.rs b/apis/storage/key_value/src/lib.rs similarity index 100% rename from apis/key_value/src/lib.rs rename to apis/storage/key_value/src/lib.rs diff --git a/apis/key_value/src/tests.rs b/apis/storage/key_value/src/tests.rs similarity index 100% rename from apis/key_value/src/tests.rs rename to apis/storage/key_value/src/tests.rs diff --git a/panic_handlers/debug_panic/Cargo.toml b/panic_handlers/debug_panic/Cargo.toml index e99c0df8..1bad17ed 100644 --- a/panic_handlers/debug_panic/Cargo.toml +++ b/panic_handlers/debug_panic/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://www.github.com/tock/libtock-rs" rust-version.workspace = true [dependencies] -libtock_console = { path = "../../apis/console" } -libtock_low_level_debug = { path = "../../apis/low_level_debug" } +libtock_console = { path = "../../apis/interface/console" } +libtock_low_level_debug = { path = "../../apis/kernel/low_level_debug" } libtock_platform = { path = "../../platform" } libtock_runtime = { path = "../../runtime" } diff --git a/panic_handlers/small_panic/Cargo.toml b/panic_handlers/small_panic/Cargo.toml index d29ca6b2..f6b9c6b5 100644 --- a/panic_handlers/small_panic/Cargo.toml +++ b/panic_handlers/small_panic/Cargo.toml @@ -9,6 +9,6 @@ repository = "https://www.github.com/tock/libtock-rs" rust-version.workspace = true [dependencies] -libtock_low_level_debug = { path = "../../apis/low_level_debug" } +libtock_low_level_debug = { path = "../../apis/kernel/low_level_debug" } libtock_platform = { path = "../../platform" } libtock_runtime = { path = "../../runtime" }