From 95eed578e32b2ef16382b3374f16ee1d4caff37f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 18 Sep 2023 13:47:27 +0200 Subject: [PATCH 001/198] Update to version 3.0.0 for local dev --- README.md | 2 +- engine/core/src/luos_engine.c | 2 +- examples/apps/alarm_controller/library.json | 4 ++-- examples/apps/biometric-security/library.json | 4 ++-- examples/apps/start_controller/library.json | 4 ++-- .../projects/Arduino/bldc_simple_foc/lib/motor/library.json | 4 ++-- examples/projects/Arduino/bldc_simple_foc/platformio.ini | 2 +- examples/projects/Arduino/button/lib/button/library.json | 4 ++-- examples/projects/Arduino/button/platformio.ini | 2 +- .../Arduino/fingerprint/lib/Fingerprint/library.json | 4 ++-- examples/projects/Arduino/fingerprint/platformio.ini | 2 +- examples/projects/Arduino/gate_serialcom/platformio.ini | 2 +- .../projects/Arduino/inspector_serialcom/platformio.ini | 2 +- examples/projects/Arduino/lcd/lib/Lcd/library.json | 4 ++-- examples/projects/Arduino/lcd/platformio.ini | 2 +- examples/projects/Arduino/led/lib/led/library.json | 4 ++-- examples/projects/Arduino/led/platformio.ini | 2 +- .../Arduino/servo_motor/lib/Servo_motor/library.json | 4 ++-- examples/projects/Arduino/servo_motor/platformio.ini | 2 +- .../Arduino/stepper_simple_foc/lib/motor/library.json | 4 ++-- examples/projects/Arduino/stepper_simple_foc/platformio.ini | 2 +- examples/projects/ESP32/button/lib/button/library.json | 4 ++-- examples/projects/ESP32/button/platformio.ini | 2 +- .../projects/ESP32/button_arduino/lib/button/library.json | 4 ++-- examples/projects/ESP32/button_arduino/platformio.ini | 2 +- examples/projects/ESP32/gate_serialcom/platformio.ini | 2 +- .../projects/ESP32/gate_serialcom_arduino/platformio.ini | 2 +- examples/projects/ESP32/led/lib/led/library.json | 4 ++-- examples/projects/ESP32/led/platformio.ini | 2 +- .../NUCLEO-F072RB/barometer/lib/barometer/library.json | 4 ++-- examples/projects/NUCLEO-F072RB/barometer/platformio.ini | 2 +- examples/projects/NUCLEO-F072RB/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-F072RB/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-F072RB/button/platformio.ini | 2 +- .../NUCLEO-F072RB/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini | 2 +- .../projects/NUCLEO-F072RB/gate_serialcom/platformio.ini | 2 +- .../NUCLEO-F072RB/inspector_serialcom/platformio.ini | 2 +- .../potentiometer/lib/Potentiometer/library.json | 4 ++-- .../projects/NUCLEO-F072RB/potentiometer/platformio.ini | 2 +- examples/projects/NUCLEO-F401RE/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-F401RE/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-F401RE/button/platformio.ini | 2 +- .../NUCLEO-F401RE/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini | 2 +- .../projects/NUCLEO-F401RE/gate_serialcom/platformio.ini | 2 +- .../NUCLEO-F401RE/inspector_serialcom/platformio.ini | 2 +- examples/projects/NUCLEO-F401RE/led/lib/Led/library.json | 4 ++-- .../projects/NUCLEO-F401RE/led/lib/alias_save/library.json | 4 ++-- examples/projects/NUCLEO-F401RE/led/platformio.ini | 2 +- .../potentiometer/lib/Potentiometer/library.json | 4 ++-- .../projects/NUCLEO-F401RE/potentiometer/platformio.ini | 2 +- examples/projects/NUCLEO-F410RB/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-F410RB/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-F410RB/button/platformio.ini | 2 +- .../NUCLEO-F410RB/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini | 2 +- .../projects/NUCLEO-F410RB/gate_serialcom/platformio.ini | 2 +- .../NUCLEO-F410RB/inspector_serialcom/platformio.ini | 2 +- examples/projects/NUCLEO-F410RB/led/lib/Led/library.json | 4 ++-- examples/projects/NUCLEO-F410RB/led/platformio.ini | 2 +- .../potentiometer/lib/Potentiometer/library.json | 4 ++-- .../projects/NUCLEO-F410RB/potentiometer/platformio.ini | 2 +- examples/projects/NUCLEO-G431KB/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-G431KB/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-G431KB/button/platformio.ini | 2 +- .../NUCLEO-G431KB/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini | 2 +- .../projects/NUCLEO-G431KB/gate_serialcom/platformio.ini | 2 +- .../NUCLEO-G431KB/inspector_serialcom/platformio.ini | 2 +- .../potentiometer/lib/Potentiometer/library.json | 4 ++-- .../projects/NUCLEO-G431KB/potentiometer/platformio.ini | 2 +- examples/projects/NUCLEO-G474RE/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-G474RE/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-G474RE/button/platformio.ini | 4 ++-- .../projects/NUCLEO-G474RE/gate_serialcom/platformio.ini | 2 +- .../NUCLEO-G474RE/inspector_serialcom/platformio.ini | 2 +- examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini | 2 +- .../projects/NUCLEO-L073RZ/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-L073RZ/button/platformio.ini | 2 +- .../projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini | 2 +- examples/projects/NUCLEO-L432KC/bootloader/platformio.ini | 4 ++-- .../projects/NUCLEO-L432KC/button/lib/Button/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/button/platformio.ini | 2 +- .../NUCLEO-L432KC/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini | 2 +- .../NUCLEO-L432KC/fingerprint/lib/Fingerprint/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini | 2 +- .../projects/NUCLEO-L432KC/gate_serialcom/platformio.ini | 2 +- .../projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/gpio/platformio.ini | 2 +- .../NUCLEO-L432KC/inspector_serialcom/platformio.ini | 2 +- examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/lcd/platformio.ini | 2 +- examples/projects/NUCLEO-L432KC/led/lib/Led/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/led/platformio.ini | 2 +- .../potentiometer/lib/Potentiometer/library.json | 4 ++-- .../projects/NUCLEO-L432KC/potentiometer/platformio.ini | 2 +- .../projects/NUCLEO-L432KC/servo/lib/Servo/library.json | 4 ++-- examples/projects/NUCLEO-L432KC/servo/platformio.ini | 2 +- .../projects/SAMD21XPLAINED/button/lib/button/library.json | 4 ++-- examples/projects/SAMD21XPLAINED/button/platformio.ini | 2 +- .../projects/STM32F4-discovery/bootloader/platformio.ini | 2 +- .../STM32F4-discovery/button/lib/Button/library.json | 4 ++-- examples/projects/STM32F4-discovery/button/platformio.ini | 4 ++-- .../STM32F4-discovery/gate_serialcom/platformio.ini | 4 ++-- .../STM32F4-discovery/inspector_serialcom/platformio.ini | 4 ++-- .../projects/STM32L4S5_discovery/bootloader/platformio.ini | 2 +- .../STM32L4S5_discovery/button/lib/Button/library.json | 4 ++-- examples/projects/STM32L4S5_discovery/button/platformio.ini | 2 +- .../STM32L4S5_discovery/gate_serialcom/platformio.ini | 2 +- .../bike_alarm/alarm_controller/lib/Led_Fader/library.json | 4 ++-- .../projects/l0/bike_alarm/alarm_controller/platformio.ini | 2 +- .../l0/bike_alarm/start_controller/lib/Button/library.json | 4 ++-- .../projects/l0/bike_alarm/start_controller/platformio.ini | 2 +- examples/projects/l0/bootloader/platformio.ini | 2 +- examples/projects/l0/button/lib/Button/library.json | 4 ++-- examples/projects/l0/button/platformio.ini | 2 +- .../projects/l0/button_freertos/lib/Button/library.json | 4 ++-- examples/projects/l0/button_freertos/lib/Led/library.json | 4 ++-- examples/projects/l0/button_freertos/platformio.ini | 2 +- .../l0/controller_motor/lib/Controller_motor/library.json | 4 ++-- examples/projects/l0/controller_motor/platformio.ini | 2 +- examples/projects/l0/dc_motor/lib/DC_motor/library.json | 4 ++-- examples/projects/l0/dc_motor/platformio.ini | 2 +- .../l0/demo/detection_button/lib/Button/library.json | 4 ++-- .../demo/detection_button/lib/Detection_Button/library.json | 4 ++-- examples/projects/l0/demo/detection_button/platformio.ini | 2 +- .../ledstrip_position/lib/LedStrip_Position/library.json | 4 ++-- examples/projects/l0/demo/ledstrip_position/platformio.ini | 2 +- .../l0/demo/motor_copy_app/lib/motor_copy/library.json | 4 ++-- examples/projects/l0/demo/motor_copy_app/platformio.ini | 2 +- .../l0/demo/motor_demo_app/lib/run_motor/library.json | 4 ++-- examples/projects/l0/demo/motor_demo_app/platformio.ini | 2 +- examples/projects/l0/distance/lib/Distance/library.json | 4 ++-- examples/projects/l0/distance/platformio.ini | 2 +- examples/projects/l0/dxl/lib/Dxl/library.json | 4 ++-- examples/projects/l0/dxl/platformio.ini | 2 +- .../projects/l0/fingerprint/lib/Fingerprint/library.json | 4 ++-- examples/projects/l0/fingerprint/platformio.ini | 2 +- examples/projects/l0/gate_serialcom/platformio.ini | 2 +- examples/projects/l0/gpio/lib/Gpio_dev/library.json | 4 ++-- examples/projects/l0/gpio/platformio.ini | 2 +- examples/projects/l0/imu/lib/Imu/library.json | 4 ++-- examples/projects/l0/imu/platformio.ini | 2 +- examples/projects/l0/inspector_serialcom/platformio.ini | 2 +- examples/projects/l0/lcd/lib/Lcd/library.json | 4 ++-- examples/projects/l0/lcd/platformio.ini | 2 +- examples/projects/l0/led/lib/Led/library.json | 4 ++-- examples/projects/l0/led/platformio.ini | 2 +- examples/projects/l0/led_fader/lib/Led_Fader/library.json | 4 ++-- examples/projects/l0/led_fader/platformio.ini | 2 +- examples/projects/l0/led_strip/lib/Led_strip/library.json | 4 ++-- examples/projects/l0/led_strip/platformio.ini | 2 +- .../projects/l0/light_sensor/lib/Light_sensor/library.json | 4 ++-- examples/projects/l0/light_sensor/platformio.ini | 2 +- examples/projects/l0/load/lib/Load/library.json | 4 ++-- examples/projects/l0/load/platformio.ini | 2 +- .../l0/potentiometer/lib/Potentiometer/library.json | 4 ++-- examples/projects/l0/potentiometer/platformio.ini | 2 +- .../projects/l0/power_switch/lib/Power_switch/library.json | 4 ++-- examples/projects/l0/power_switch/platformio.ini | 2 +- examples/projects/l0/servo/lib/Servo/library.json | 4 ++-- examples/projects/l0/servo/platformio.ini | 2 +- examples/projects/l0/stepper/lib/Stepper/library.json | 4 ++-- examples/projects/l0/stepper/platformio.ini | 2 +- examples/projects/native/button/lib/Button/library.json | 4 ++-- examples/projects/native/gate_wscom/platformio.ini | 2 +- examples/projects/native/led/lib/Led/library.json | 4 ++-- .../projects/native/ping_pong/lib/PingPong/library.json | 4 ++-- library.json | 4 ++-- tool_services/gate/library.json | 6 +++--- tool_services/inspector/library.json | 6 +++--- tool_services/pipe/library.json | 6 +++--- 174 files changed, 258 insertions(+), 258 deletions(-) diff --git a/README.md b/README.md index 9485b00f9..93f1e731f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![](https://img.shields.io/discord/902486791658041364?label=Discord&logo=discord&style=social)](http://bit.ly/JoinLuosDiscord) [![](https://img.shields.io/reddit/subreddit-subscribers/Luos?style=social)](https://www.reddit.com/r/Luos) -Version: 2.9.2 +Version: 3.0.0 # Luos Technology ## The most for the developer​ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index ee626b333..32e77cc72 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -27,7 +27,7 @@ typedef enum /******************************************************************************* * Variables ******************************************************************************/ -revision_t luos_version = {.major = 2, .minor = 9, .build = 2}; +revision_t luos_version = {.major = 3, .minor = 0, .build = 0}; package_t package_table[MAX_SERVICE_NUMBER]; uint16_t package_number = 0; service_t service_table[MAX_SERVICE_NUMBER]; diff --git a/examples/apps/alarm_controller/library.json b/examples/apps/alarm_controller/library.json index 798d2436e..fc383c0ea 100644 --- a/examples/apps/alarm_controller/library.json +++ b/examples/apps/alarm_controller/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/apps/biometric-security/library.json b/examples/apps/biometric-security/library.json index 2ca846c6a..94e122f0e 100644 --- a/examples/apps/biometric-security/library.json +++ b/examples/apps/biometric-security/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/apps/start_controller/library.json b/examples/apps/start_controller/library.json index 2706ea686..ca5f144b8 100644 --- a/examples/apps/start_controller/library.json +++ b/examples/apps/start_controller/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/bldc_simple_foc/lib/motor/library.json b/examples/projects/Arduino/bldc_simple_foc/lib/motor/library.json index d782e22f0..0ca601aac 100644 --- a/examples/projects/Arduino/bldc_simple_foc/lib/motor/library.json +++ b/examples/projects/Arduino/bldc_simple_foc/lib/motor/library.json @@ -11,6 +11,6 @@ "build": {}, "dependencies": { "askuric/Simple FOC": "^2.2.1", - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/bldc_simple_foc/platformio.ini b/examples/projects/Arduino/bldc_simple_foc/platformio.ini index 120e34aa0..de67301e1 100644 --- a/examples/projects/Arduino/bldc_simple_foc/platformio.ini +++ b/examples/projects/Arduino/bldc_simple_foc/platformio.ini @@ -21,6 +21,6 @@ build_flags = -include node_config.h -DLUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 SimpleFOC_Motor askuric/Simple FOC@^2.2.1 diff --git a/examples/projects/Arduino/button/lib/button/library.json b/examples/projects/Arduino/button/lib/button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/Arduino/button/lib/button/library.json +++ b/examples/projects/Arduino/button/lib/button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/button/platformio.ini b/examples/projects/Arduino/button/platformio.ini index 08b849006..908bf67b0 100644 --- a/examples/projects/Arduino/button/platformio.ini +++ b/examples/projects/Arduino/button/platformio.ini @@ -34,7 +34,7 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/library.json b/examples/projects/Arduino/fingerprint/lib/Fingerprint/library.json index 7381575f5..053b61bf7 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/library.json +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/library.json @@ -5,7 +5,7 @@ "version": "1.0.0", "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2", + "luos_engine": "^3.0.0", "adafruit/Adafruit Fingerprint Sensor Library": "*" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/fingerprint/platformio.ini b/examples/projects/Arduino/fingerprint/platformio.ini index 151c8f6a3..781fdf74d 100644 --- a/examples/projects/Arduino/fingerprint/platformio.ini +++ b/examples/projects/Arduino/fingerprint/platformio.ini @@ -21,6 +21,6 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Fingerprint adafruit/Adafruit Fingerprint Sensor Library diff --git a/examples/projects/Arduino/gate_serialcom/platformio.ini b/examples/projects/Arduino/gate_serialcom/platformio.ini index 8a5fa0a9c..37f3e59b3 100644 --- a/examples/projects/Arduino/gate_serialcom/platformio.ini +++ b/examples/projects/Arduino/gate_serialcom/platformio.ini @@ -39,7 +39,7 @@ build_flags = -D PIPEMODE=SERIAL -D PIPEHAL=ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe diff --git a/examples/projects/Arduino/inspector_serialcom/platformio.ini b/examples/projects/Arduino/inspector_serialcom/platformio.ini index 2d63db7bf..582c60117 100644 --- a/examples/projects/Arduino/inspector_serialcom/platformio.ini +++ b/examples/projects/Arduino/inspector_serialcom/platformio.ini @@ -40,7 +40,7 @@ build_flags = -D PIPEMODE=SERIAL -D PIPEHAL=ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe diff --git a/examples/projects/Arduino/lcd/lib/Lcd/library.json b/examples/projects/Arduino/lcd/lib/Lcd/library.json index 4125367fd..f012dbd08 100644 --- a/examples/projects/Arduino/lcd/lib/Lcd/library.json +++ b/examples/projects/Arduino/lcd/lib/Lcd/library.json @@ -5,7 +5,7 @@ "version": "1.0.0", "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2", + "luos_engine": "^3.0.0", "arduino-libraries/LiquidCrystal": "*" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/lcd/platformio.ini b/examples/projects/Arduino/lcd/platformio.ini index 2963b5c25..7fc829f52 100644 --- a/examples/projects/Arduino/lcd/platformio.ini +++ b/examples/projects/Arduino/lcd/platformio.ini @@ -21,6 +21,6 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Lcd arduino-libraries/LiquidCrystal diff --git a/examples/projects/Arduino/led/lib/led/library.json b/examples/projects/Arduino/led/lib/led/library.json index 246644f5a..aaa50cc19 100644 --- a/examples/projects/Arduino/led/lib/led/library.json +++ b/examples/projects/Arduino/led/lib/led/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/led/platformio.ini b/examples/projects/Arduino/led/platformio.ini index 6e30734be..6d0df747a 100644 --- a/examples/projects/Arduino/led/platformio.ini +++ b/examples/projects/Arduino/led/platformio.ini @@ -34,7 +34,7 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led diff --git a/examples/projects/Arduino/servo_motor/lib/Servo_motor/library.json b/examples/projects/Arduino/servo_motor/lib/Servo_motor/library.json index 25036da79..85fa0bc51 100644 --- a/examples/projects/Arduino/servo_motor/lib/Servo_motor/library.json +++ b/examples/projects/Arduino/servo_motor/lib/Servo_motor/library.json @@ -6,6 +6,6 @@ "licence": "MIT", "dependencies": { "arduino-libraries/servo": "^1.1.8", - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/servo_motor/platformio.ini b/examples/projects/Arduino/servo_motor/platformio.ini index 33436fb13..1cff8c025 100644 --- a/examples/projects/Arduino/servo_motor/platformio.ini +++ b/examples/projects/Arduino/servo_motor/platformio.ini @@ -34,7 +34,7 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 arduino-libraries/Servo@^1.1.8 servo_motor diff --git a/examples/projects/Arduino/stepper_simple_foc/lib/motor/library.json b/examples/projects/Arduino/stepper_simple_foc/lib/motor/library.json index d4bbaa1f3..63e58ad69 100644 --- a/examples/projects/Arduino/stepper_simple_foc/lib/motor/library.json +++ b/examples/projects/Arduino/stepper_simple_foc/lib/motor/library.json @@ -11,8 +11,8 @@ "build": {}, "dependencies": { "askuric/Simple FOC": "^2.2.1", - "luos/luos_engine": "^2.9.2", + "luos_engine": "^3.0.0", "Wire": "*", "SPI": "*" } -} +} \ No newline at end of file diff --git a/examples/projects/Arduino/stepper_simple_foc/platformio.ini b/examples/projects/Arduino/stepper_simple_foc/platformio.ini index 57528b131..552cc4a09 100644 --- a/examples/projects/Arduino/stepper_simple_foc/platformio.ini +++ b/examples/projects/Arduino/stepper_simple_foc/platformio.ini @@ -21,6 +21,6 @@ build_flags = -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 SimpleFOC_Stepper askuric/Simple FOC@^2.2.1 diff --git a/examples/projects/ESP32/button/lib/button/library.json b/examples/projects/ESP32/button/lib/button/library.json index a1304ea09..fe4d5cebd 100644 --- a/examples/projects/ESP32/button/lib/button/library.json +++ b/examples/projects/ESP32/button/lib/button/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/ESP32/button/platformio.ini b/examples/projects/ESP32/button/platformio.ini index 74a43b88d..7cb793ba9 100644 --- a/examples/projects/ESP32/button/platformio.ini +++ b/examples/projects/ESP32/button/platformio.ini @@ -22,7 +22,7 @@ build_flags = -DLUOSHAL=ESP32 -O1 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 button [env:esp32dev] diff --git a/examples/projects/ESP32/button_arduino/lib/button/library.json b/examples/projects/ESP32/button_arduino/lib/button/library.json index a1304ea09..fe4d5cebd 100644 --- a/examples/projects/ESP32/button_arduino/lib/button/library.json +++ b/examples/projects/ESP32/button_arduino/lib/button/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/ESP32/button_arduino/platformio.ini b/examples/projects/ESP32/button_arduino/platformio.ini index 507b95eac..68640c929 100644 --- a/examples/projects/ESP32/button_arduino/platformio.ini +++ b/examples/projects/ESP32/button_arduino/platformio.ini @@ -22,7 +22,7 @@ build_flags = -DLUOSHAL=ESP32 -O1 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 button [env:esp32dev] diff --git a/examples/projects/ESP32/gate_serialcom/platformio.ini b/examples/projects/ESP32/gate_serialcom/platformio.ini index ef6f500ae..8f63cc0dc 100644 --- a/examples/projects/ESP32/gate_serialcom/platformio.ini +++ b/examples/projects/ESP32/gate_serialcom/platformio.ini @@ -27,7 +27,7 @@ build_flags = -DPIPEHAL=ESP32_IDF -O1 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe diff --git a/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini b/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini index 237a97ee6..6e9f1a8b8 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini +++ b/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini @@ -27,7 +27,7 @@ build_flags = -DPIPEHAL=ARDUINO -O1 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe diff --git a/examples/projects/ESP32/led/lib/led/library.json b/examples/projects/ESP32/led/lib/led/library.json index 20ce754a1..07172f636 100644 --- a/examples/projects/ESP32/led/lib/led/library.json +++ b/examples/projects/ESP32/led/lib/led/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/ESP32/led/platformio.ini b/examples/projects/ESP32/led/platformio.ini index 24d50590f..3dc151cd2 100644 --- a/examples/projects/ESP32/led/platformio.ini +++ b/examples/projects/ESP32/led/platformio.ini @@ -22,7 +22,7 @@ build_flags = -DLUOSHAL=ESP32 -O1 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 led [env:esp32dev] diff --git a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/library.json b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/library.json index f345b8ec7..55a033cfd 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/library.json +++ b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F072RB/barometer/platformio.ini b/examples/projects/NUCLEO-F072RB/barometer/platformio.ini index bd43f67dc..89766d243 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/barometer/platformio.ini @@ -24,7 +24,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F0 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 barometer lib_extra_dirs = diff --git a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini index 40328b37e..97f0ff483 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_f072rb lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:nucleo_f072rb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F072RB/button/lib/Button/library.json b/examples/projects/NUCLEO-F072RB/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-F072RB/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-F072RB/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F072RB/button/platformio.ini b/examples/projects/NUCLEO-F072RB/button/platformio.ini index 330336054..d3d17ca6e 100644 --- a/examples/projects/NUCLEO-F072RB/button/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/button/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/library.json b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini b/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini index d153632bd..9fa4ce4fb 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini index 8f58afd99..6b4a847b4 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini @@ -20,7 +20,7 @@ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Pipe Gate debug_tool = stlink diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini index 988dbf1e0..771c3d9e4 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/library.json b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini b/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini index 4d259de99..ce51dbf59 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini index 010a099b0..47514092f 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_f401re lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:nucleo_f401re] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F401RE/button/lib/Button/library.json b/examples/projects/NUCLEO-F401RE/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-F401RE/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-F401RE/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F401RE/button/platformio.ini b/examples/projects/NUCLEO-F401RE/button/platformio.ini index 4cd883d3c..3c207d496 100644 --- a/examples/projects/NUCLEO-F401RE/button/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/library.json b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini b/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini index 5f7770c75..937296bfa 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini index 6e9f89577..a027f30fd 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini index 2668ef47f..a398009b6 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/led/lib/Led/library.json b/examples/projects/NUCLEO-F401RE/led/lib/Led/library.json index b7abdf38d..380d8bf7b 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/Led/library.json +++ b/examples/projects/NUCLEO-F401RE/led/lib/Led/library.json @@ -8,8 +8,8 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2", + "luos_engine": "^3.0.0", "alias_save": "^1.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/library.json b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/library.json index 9b61d2242..50449f7e2 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/library.json +++ b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F401RE/led/platformio.ini b/examples/projects/NUCLEO-F401RE/led/platformio.ini index 94d1ace97..70a224174 100644 --- a/examples/projects/NUCLEO-F401RE/led/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/led/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/library.json b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini b/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini index e35ef26f1..df9c27d63 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini index 439a769fa..7efc94d10 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_f410rb framework = stm32cube lib_extra_dirs = $PROJECT_DIR/../../../../../ lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:nucleo_f410rb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F410RB/button/lib/Button/library.json b/examples/projects/NUCLEO-F410RB/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-F410RB/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-F410RB/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F410RB/button/platformio.ini b/examples/projects/NUCLEO-F410RB/button/platformio.ini index f5be5348b..ab21b2b1c 100644 --- a/examples/projects/NUCLEO-F410RB/button/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/library.json b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini b/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini index 5f7770c75..937296bfa 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini index 16e57fbc5..3c6e9e32d 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini index 53b65b009..73da22e43 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/led/lib/Led/library.json b/examples/projects/NUCLEO-F410RB/led/lib/Led/library.json index 0d77e1344..dbbcb4e1d 100644 --- a/examples/projects/NUCLEO-F410RB/led/lib/Led/library.json +++ b/examples/projects/NUCLEO-F410RB/led/lib/Led/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F410RB/led/platformio.ini b/examples/projects/NUCLEO-F410RB/led/platformio.ini index 721a1f1a7..56e116a0a 100644 --- a/examples/projects/NUCLEO-F410RB/led/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/led/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/library.json b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini b/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini index e35ef26f1..df9c27d63 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink diff --git a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini index c719d7ed4..621573734 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_g431kb lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:nucleo_g431kb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-G431KB/button/lib/Button/library.json b/examples/projects/NUCLEO-G431KB/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-G431KB/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-G431KB/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-G431KB/button/platformio.ini b/examples/projects/NUCLEO-G431KB/button/platformio.ini index c954e486b..1fb02c21e 100644 --- a/examples/projects/NUCLEO-G431KB/button/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/library.json b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini b/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini index 29dacc330..0dfe7e8f0 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini index 487962839..808e26baf 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini index fced5c6b0..e647a2e45 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/library.json b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini b/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini index 029a0addf..26406429e 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini index 37a0e6647..51d0f955a 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_g474re lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G474RE/button/lib/Button/library.json b/examples/projects/NUCLEO-G474RE/button/lib/Button/library.json index 161580770..ed8aa4526 100644 --- a/examples/projects/NUCLEO-G474RE/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-G474RE/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-G474RE/button/platformio.ini b/examples/projects/NUCLEO-G474RE/button/platformio.ini index ba0891e69..246e734a1 100644 --- a/examples/projects/NUCLEO-G474RE/button/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/button/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink @@ -45,4 +45,4 @@ build_flags = upload_protocol = custom upload_flags = -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE +upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE \ No newline at end of file diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini index 11fa29738..f755a2de4 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini index 9c667c44a..653ea9b7b 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini index cb4762a9c..bb890a482 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = nucleo_l073rz lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:nucleo_l073rz] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-L073RZ/button/lib/Button/library.json b/examples/projects/NUCLEO-L073RZ/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-L073RZ/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-L073RZ/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L073RZ/button/platformio.ini b/examples/projects/NUCLEO-L073RZ/button/platformio.ini index e81ce8d07..ef6b5e13f 100644 --- a/examples/projects/NUCLEO-L073RZ/button/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/button/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_l073rz framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini index cd15a5183..aadcc8373 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini @@ -20,7 +20,7 @@ platform = ststm32 board = nucleo_l073rz framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Pipe Gate debug_tool = stlink diff --git a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini index 9a818a4a5..9564fa0bb 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini @@ -28,7 +28,7 @@ build_flags = -DLUOSHAL=STM32L4 -DBOOTLOADER lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 debug_tool = stlink upload_protocol = stlink @@ -44,7 +44,7 @@ build_flags = -DBOOTLOADER -DBOOTLOADER_UPDATER lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 upload_protocol = custom upload_flags = -t2 diff --git a/examples/projects/NUCLEO-L432KC/button/lib/Button/library.json b/examples/projects/NUCLEO-L432KC/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/NUCLEO-L432KC/button/lib/Button/library.json +++ b/examples/projects/NUCLEO-L432KC/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/button/platformio.ini b/examples/projects/NUCLEO-L432KC/button/platformio.ini index 3d25a5c38..b07142bb5 100644 --- a/examples/projects/NUCLEO-L432KC/button/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/library.json b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini b/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini index 418d8817d..a17e8232a 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/library.json b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/library.json index a0dfad847..b47465cc2 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/library.json +++ b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/library.json @@ -5,6 +5,6 @@ "version": "1.0.0", "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini b/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini index a81fab9a3..51be7125b 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Fingerprint debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini index 4ad48db2b..28ed9c0dc 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/library.json b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/library.json index a7ff07d6b..d3cf8eadb 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/library.json +++ b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/gpio/platformio.ini b/examples/projects/NUCLEO-L432KC/gpio/platformio.ini index 5439f4dfb..64e20c7fe 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/gpio/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gpio_dev debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini index 11a07b53a..6f6f5d923 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/library.json b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/library.json index 8ab1ae94e..b3f771864 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/library.json +++ b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/library.json @@ -5,6 +5,6 @@ "version": "1.0.0", "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/lcd/platformio.ini b/examples/projects/NUCLEO-L432KC/lcd/platformio.ini index 61a88cb40..5f7e275b6 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/lcd/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Lcd debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/led/lib/Led/library.json b/examples/projects/NUCLEO-L432KC/led/lib/Led/library.json index 0d77e1344..dbbcb4e1d 100644 --- a/examples/projects/NUCLEO-L432KC/led/lib/Led/library.json +++ b/examples/projects/NUCLEO-L432KC/led/lib/Led/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/led/platformio.ini b/examples/projects/NUCLEO-L432KC/led/platformio.ini index f3a054765..6acd49743 100644 --- a/examples/projects/NUCLEO-L432KC/led/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/led/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/library.json b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini b/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini index b54b243bd..876357195 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/library.json b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/library.json index 133583d05..6fbd5d2dd 100644 --- a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/library.json +++ b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/library.json @@ -5,6 +5,6 @@ "version": "1.0.0", "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/NUCLEO-L432KC/servo/platformio.ini b/examples/projects/NUCLEO-L432KC/servo/platformio.ini index 3eae0a479..daf1b5cae 100644 --- a/examples/projects/NUCLEO-L432KC/servo/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/servo/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Servo debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/SAMD21XPLAINED/button/lib/button/library.json b/examples/projects/SAMD21XPLAINED/button/lib/button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/SAMD21XPLAINED/button/lib/button/library.json +++ b/examples/projects/SAMD21XPLAINED/button/lib/button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/SAMD21XPLAINED/button/platformio.ini b/examples/projects/SAMD21XPLAINED/button/platformio.ini index 52fc65aed..d3e27c72b 100644 --- a/examples/projects/SAMD21XPLAINED/button/platformio.ini +++ b/examples/projects/SAMD21XPLAINED/button/platformio.ini @@ -22,5 +22,5 @@ build_flags = -DLUOSHAL=ATSAMD21_MBED -D__SAMD21J18A__ lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button diff --git a/examples/projects/STM32F4-discovery/bootloader/platformio.ini b/examples/projects/STM32F4-discovery/bootloader/platformio.ini index 01f6dd223..bc6f7dbb7 100644 --- a/examples/projects/STM32F4-discovery/bootloader/platformio.ini +++ b/examples/projects/STM32F4-discovery/bootloader/platformio.ini @@ -16,7 +16,7 @@ lib_extra_dirs = $PROJECT_DIR/../../../../../ board = disco_f407vg framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:STM32F4-discovery] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/STM32F4-discovery/button/lib/Button/library.json b/examples/projects/STM32F4-discovery/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/STM32F4-discovery/button/lib/Button/library.json +++ b/examples/projects/STM32F4-discovery/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/STM32F4-discovery/button/platformio.ini b/examples/projects/STM32F4-discovery/button/platformio.ini index 2feb1dbf4..773dc370f 100644 --- a/examples/projects/STM32F4-discovery/button/platformio.ini +++ b/examples/projects/STM32F4-discovery/button/platformio.ini @@ -24,7 +24,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F4 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink @@ -44,7 +44,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F4 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button upload_protocol = custom upload_flags = diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini index 86f711588..34925cbf4 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini +++ b/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini @@ -29,7 +29,7 @@ lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink @@ -55,7 +55,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F4 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe upload_protocol = custom diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini index 90ce6caf7..10c65087b 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini @@ -28,7 +28,7 @@ build_flags = lib_extra_dirs = $PROJECT_DIR/../../../../../ lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe debug_tool = stlink @@ -53,7 +53,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F4 lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Inspector Pipe upload_protocol = custom diff --git a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini index 9a2c5dde0..8014d75d4 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini @@ -16,7 +16,7 @@ board = disco_l4s5i_iot01a lib_extra_dirs = $PROJECT_DIR/../../../../../ framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:disco_l4s5i_iot01a] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/STM32L4S5_discovery/button/lib/Button/library.json b/examples/projects/STM32L4S5_discovery/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/STM32L4S5_discovery/button/lib/Button/library.json +++ b/examples/projects/STM32L4S5_discovery/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/STM32L4S5_discovery/button/platformio.ini b/examples/projects/STM32L4S5_discovery/button/platformio.ini index 24bb64bc2..83004b65f 100644 --- a/examples/projects/STM32L4S5_discovery/button/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = disco_l4s5i_iot01a framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini b/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini index 336ae061a..3aa58bb3a 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = disco_l4s5i_iot01a framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gate Pipe debug_tool = stlink diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/library.json b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/library.json index d37112a71..fa61b6f32 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/library.json +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini b/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini index b7593b257..04b86b349 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini +++ b/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 alarm_controller Led_Fader debug_tool = stlink diff --git a/examples/projects/l0/bike_alarm/start_controller/lib/Button/library.json b/examples/projects/l0/bike_alarm/start_controller/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/l0/bike_alarm/start_controller/lib/Button/library.json +++ b/examples/projects/l0/bike_alarm/start_controller/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/bike_alarm/start_controller/platformio.ini b/examples/projects/l0/bike_alarm/start_controller/platformio.ini index 8da399b2f..d3d1ab48e 100644 --- a/examples/projects/l0/bike_alarm/start_controller/platformio.ini +++ b/examples/projects/l0/bike_alarm/start_controller/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button start_controller debug_tool = stlink diff --git a/examples/projects/l0/bootloader/platformio.ini b/examples/projects/l0/bootloader/platformio.ini index 00b7ca2f5..1240d9adb 100644 --- a/examples/projects/l0/bootloader/platformio.ini +++ b/examples/projects/l0/bootloader/platformio.ini @@ -17,7 +17,7 @@ board = l0 framework = stm32cube lib_extra_dirs = $PROJECT_DIR/../../../../../ lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 [env:l0] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/l0/button/lib/Button/library.json b/examples/projects/l0/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/l0/button/lib/Button/library.json +++ b/examples/projects/l0/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/button/platformio.ini b/examples/projects/l0/button/platformio.ini index 3faeb71d1..77798e51c 100644 --- a/examples/projects/l0/button/platformio.ini +++ b/examples/projects/l0/button/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button debug_tool = stlink diff --git a/examples/projects/l0/button_freertos/lib/Button/library.json b/examples/projects/l0/button_freertos/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/l0/button_freertos/lib/Button/library.json +++ b/examples/projects/l0/button_freertos/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/button_freertos/lib/Led/library.json b/examples/projects/l0/button_freertos/lib/Led/library.json index 5c208c50b..a41675767 100644 --- a/examples/projects/l0/button_freertos/lib/Led/library.json +++ b/examples/projects/l0/button_freertos/lib/Led/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/button_freertos/platformio.ini b/examples/projects/l0/button_freertos/platformio.ini index a2ded4d7c..c07be097a 100644 --- a/examples/projects/l0/button_freertos/platformio.ini +++ b/examples/projects/l0/button_freertos/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Button CMSIS_RTOS_V2 bojit/PlatformIO-FreeRTOS diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/library.json b/examples/projects/l0/controller_motor/lib/Controller_motor/library.json index 7c6203b12..c09d49638 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/library.json +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/controller_motor/platformio.ini b/examples/projects/l0/controller_motor/platformio.ini index 2d2970e95..deeab9b3e 100644 --- a/examples/projects/l0/controller_motor/platformio.ini +++ b/examples/projects/l0/controller_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Controller_motor debug_tool = stlink diff --git a/examples/projects/l0/dc_motor/lib/DC_motor/library.json b/examples/projects/l0/dc_motor/lib/DC_motor/library.json index 1aecb7362..ea1ed13fa 100644 --- a/examples/projects/l0/dc_motor/lib/DC_motor/library.json +++ b/examples/projects/l0/dc_motor/lib/DC_motor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/dc_motor/platformio.ini b/examples/projects/l0/dc_motor/platformio.ini index 0f846b2b1..36fa0eebc 100644 --- a/examples/projects/l0/dc_motor/platformio.ini +++ b/examples/projects/l0/dc_motor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 DC_motor debug_tool = stlink diff --git a/examples/projects/l0/demo/detection_button/lib/Button/library.json b/examples/projects/l0/demo/detection_button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/l0/demo/detection_button/lib/Button/library.json +++ b/examples/projects/l0/demo/detection_button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/demo/detection_button/lib/Detection_Button/library.json b/examples/projects/l0/demo/detection_button/lib/Detection_Button/library.json index e56af6b89..8690f3410 100644 --- a/examples/projects/l0/demo/detection_button/lib/Detection_Button/library.json +++ b/examples/projects/l0/demo/detection_button/lib/Detection_Button/library.json @@ -8,7 +8,7 @@ "url": "https://www.luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/demo/detection_button/platformio.ini b/examples/projects/l0/demo/detection_button/platformio.ini index fcb2ce5ac..db86e74c6 100644 --- a/examples/projects/l0/demo/detection_button/platformio.ini +++ b/examples/projects/l0/demo/detection_button/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 detection_button Button debug_tool = stlink diff --git a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/library.json b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/library.json index 1f0ce7b9b..e82ff7715 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/library.json +++ b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/library.json @@ -8,7 +8,7 @@ "url": "https://www.luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/demo/ledstrip_position/platformio.ini b/examples/projects/l0/demo/ledstrip_position/platformio.ini index a34b0f194..5b2b36243 100644 --- a/examples/projects/l0/demo/ledstrip_position/platformio.ini +++ b/examples/projects/l0/demo/ledstrip_position/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 ledstrip_position distance debug_tool = stlink diff --git a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/library.json b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/library.json index 5a3475ea9..cd71cc29e 100644 --- a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/library.json +++ b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/library.json @@ -8,7 +8,7 @@ "url": "https://www.luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/demo/motor_copy_app/platformio.ini b/examples/projects/l0/demo/motor_copy_app/platformio.ini index 1c3a76599..419cbdea5 100644 --- a/examples/projects/l0/demo/motor_copy_app/platformio.ini +++ b/examples/projects/l0/demo/motor_copy_app/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 motor_copy debug_tool = stlink diff --git a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/library.json b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/library.json index 208a0ad16..c67a8e691 100644 --- a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/library.json +++ b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/library.json @@ -8,7 +8,7 @@ "url": "https://www.luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/demo/motor_demo_app/platformio.ini b/examples/projects/l0/demo/motor_demo_app/platformio.ini index bee0009e1..fe8738469 100644 --- a/examples/projects/l0/demo/motor_demo_app/platformio.ini +++ b/examples/projects/l0/demo/motor_demo_app/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 run_motor debug_tool = stlink diff --git a/examples/projects/l0/distance/lib/Distance/library.json b/examples/projects/l0/distance/lib/Distance/library.json index 6399a75f6..d83674435 100644 --- a/examples/projects/l0/distance/lib/Distance/library.json +++ b/examples/projects/l0/distance/lib/Distance/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT", "build": { @@ -21,4 +21,4 @@ "+" ] } -} +} \ No newline at end of file diff --git a/examples/projects/l0/distance/platformio.ini b/examples/projects/l0/distance/platformio.ini index 2f06df536..24e83b80b 100644 --- a/examples/projects/l0/distance/platformio.ini +++ b/examples/projects/l0/distance/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Distance debug_tool = stlink diff --git a/examples/projects/l0/dxl/lib/Dxl/library.json b/examples/projects/l0/dxl/lib/Dxl/library.json index d9fb7d397..1f9f74afa 100644 --- a/examples/projects/l0/dxl/lib/Dxl/library.json +++ b/examples/projects/l0/dxl/lib/Dxl/library.json @@ -9,7 +9,7 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "build": { "flags": [ @@ -19,4 +19,4 @@ "+" ] } -} +} \ No newline at end of file diff --git a/examples/projects/l0/dxl/platformio.ini b/examples/projects/l0/dxl/platformio.ini index 54c715263..d0f1b6431 100644 --- a/examples/projects/l0/dxl/platformio.ini +++ b/examples/projects/l0/dxl/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Dxl debug_tool = stlink diff --git a/examples/projects/l0/fingerprint/lib/Fingerprint/library.json b/examples/projects/l0/fingerprint/lib/Fingerprint/library.json index e7c6df108..15c2ae066 100644 --- a/examples/projects/l0/fingerprint/lib/Fingerprint/library.json +++ b/examples/projects/l0/fingerprint/lib/Fingerprint/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/l0/fingerprint/platformio.ini b/examples/projects/l0/fingerprint/platformio.ini index 51da87376..bfc2b5814 100644 --- a/examples/projects/l0/fingerprint/platformio.ini +++ b/examples/projects/l0/fingerprint/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Fingerprint debug_tool = stlink diff --git a/examples/projects/l0/gate_serialcom/platformio.ini b/examples/projects/l0/gate_serialcom/platformio.ini index 98ea2899c..848c22558 100644 --- a/examples/projects/l0/gate_serialcom/platformio.ini +++ b/examples/projects/l0/gate_serialcom/platformio.ini @@ -19,7 +19,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Pipe Gate debug_tool = stlink diff --git a/examples/projects/l0/gpio/lib/Gpio_dev/library.json b/examples/projects/l0/gpio/lib/Gpio_dev/library.json index a7ff07d6b..d3cf8eadb 100644 --- a/examples/projects/l0/gpio/lib/Gpio_dev/library.json +++ b/examples/projects/l0/gpio/lib/Gpio_dev/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/gpio/platformio.ini b/examples/projects/l0/gpio/platformio.ini index 4e6161680..796611b68 100644 --- a/examples/projects/l0/gpio/platformio.ini +++ b/examples/projects/l0/gpio/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Gpio_dev debug_tool = stlink diff --git a/examples/projects/l0/imu/lib/Imu/library.json b/examples/projects/l0/imu/lib/Imu/library.json index e99c616c8..4d133ecda 100644 --- a/examples/projects/l0/imu/lib/Imu/library.json +++ b/examples/projects/l0/imu/lib/Imu/library.json @@ -9,7 +9,7 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "build": { "flags": [ @@ -34,4 +34,4 @@ "+<../src/*>" ] } -} +} \ No newline at end of file diff --git a/examples/projects/l0/imu/platformio.ini b/examples/projects/l0/imu/platformio.ini index eb574decc..294442d8d 100644 --- a/examples/projects/l0/imu/platformio.ini +++ b/examples/projects/l0/imu/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Imu debug_tool = stlink diff --git a/examples/projects/l0/inspector_serialcom/platformio.ini b/examples/projects/l0/inspector_serialcom/platformio.ini index 9a873ce2d..ace691e37 100644 --- a/examples/projects/l0/inspector_serialcom/platformio.ini +++ b/examples/projects/l0/inspector_serialcom/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Pipe Inspector debug_tool = stlink diff --git a/examples/projects/l0/lcd/lib/Lcd/library.json b/examples/projects/l0/lcd/lib/Lcd/library.json index 813bcbc6b..0079f3e62 100644 --- a/examples/projects/l0/lcd/lib/Lcd/library.json +++ b/examples/projects/l0/lcd/lib/Lcd/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/l0/lcd/platformio.ini b/examples/projects/l0/lcd/platformio.ini index 60fd1b2b7..4f3b2a79e 100644 --- a/examples/projects/l0/lcd/platformio.ini +++ b/examples/projects/l0/lcd/platformio.ini @@ -18,7 +18,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Lcd debug_tool = stlink diff --git a/examples/projects/l0/led/lib/Led/library.json b/examples/projects/l0/led/lib/Led/library.json index 0d77e1344..dbbcb4e1d 100644 --- a/examples/projects/l0/led/lib/Led/library.json +++ b/examples/projects/l0/led/lib/Led/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/led/platformio.ini b/examples/projects/l0/led/platformio.ini index 74d58e00e..9910d533e 100644 --- a/examples/projects/l0/led/platformio.ini +++ b/examples/projects/l0/led/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led debug_tool = stlink diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/library.json b/examples/projects/l0/led_fader/lib/Led_Fader/library.json index d37112a71..fa61b6f32 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/library.json +++ b/examples/projects/l0/led_fader/lib/Led_Fader/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/led_fader/platformio.ini b/examples/projects/l0/led_fader/platformio.ini index 284ac16bb..3a4930d6b 100644 --- a/examples/projects/l0/led_fader/platformio.ini +++ b/examples/projects/l0/led_fader/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led_Fader debug_tool = stlink diff --git a/examples/projects/l0/led_strip/lib/Led_strip/library.json b/examples/projects/l0/led_strip/lib/Led_strip/library.json index 44af8eb61..9f42c7ce4 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/library.json +++ b/examples/projects/l0/led_strip/lib/Led_strip/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/led_strip/platformio.ini b/examples/projects/l0/led_strip/platformio.ini index 626640ac8..44cdd5196 100644 --- a/examples/projects/l0/led_strip/platformio.ini +++ b/examples/projects/l0/led_strip/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Led_strip debug_tool = stlink diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/library.json b/examples/projects/l0/light_sensor/lib/Light_sensor/library.json index 163845464..6d5782e71 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/library.json +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/light_sensor/platformio.ini b/examples/projects/l0/light_sensor/platformio.ini index 0e51521b4..13a47da13 100644 --- a/examples/projects/l0/light_sensor/platformio.ini +++ b/examples/projects/l0/light_sensor/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Light_sensor debug_tool = stlink diff --git a/examples/projects/l0/load/lib/Load/library.json b/examples/projects/l0/load/lib/Load/library.json index 2224337bf..69ab5702c 100644 --- a/examples/projects/l0/load/lib/Load/library.json +++ b/examples/projects/l0/load/lib/Load/library.json @@ -9,7 +9,7 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "build": { "flags": [ @@ -19,4 +19,4 @@ "+" ] } -} +} \ No newline at end of file diff --git a/examples/projects/l0/load/platformio.ini b/examples/projects/l0/load/platformio.ini index eb9130a32..6244dff3e 100644 --- a/examples/projects/l0/load/platformio.ini +++ b/examples/projects/l0/load/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Load debug_tool = stlink diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/library.json b/examples/projects/l0/potentiometer/lib/Potentiometer/library.json index 747026c05..c462b0714 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/library.json +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/potentiometer/platformio.ini b/examples/projects/l0/potentiometer/platformio.ini index 9513118aa..63583470a 100644 --- a/examples/projects/l0/potentiometer/platformio.ini +++ b/examples/projects/l0/potentiometer/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Potentiometer debug_tool = stlink diff --git a/examples/projects/l0/power_switch/lib/Power_switch/library.json b/examples/projects/l0/power_switch/lib/Power_switch/library.json index e431cc5c7..7e1430091 100644 --- a/examples/projects/l0/power_switch/lib/Power_switch/library.json +++ b/examples/projects/l0/power_switch/lib/Power_switch/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/power_switch/platformio.ini b/examples/projects/l0/power_switch/platformio.ini index 71c93a745..011402c5a 100644 --- a/examples/projects/l0/power_switch/platformio.ini +++ b/examples/projects/l0/power_switch/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Power_switch debug_tool = stlink diff --git a/examples/projects/l0/servo/lib/Servo/library.json b/examples/projects/l0/servo/lib/Servo/library.json index 1142d3a28..1003437e4 100644 --- a/examples/projects/l0/servo/lib/Servo/library.json +++ b/examples/projects/l0/servo/lib/Servo/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/servo/platformio.ini b/examples/projects/l0/servo/platformio.ini index a05e35475..facff1a76 100644 --- a/examples/projects/l0/servo/platformio.ini +++ b/examples/projects/l0/servo/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Servo debug_tool = stlink diff --git a/examples/projects/l0/stepper/lib/Stepper/library.json b/examples/projects/l0/stepper/lib/Stepper/library.json index bf3153e3d..bbe6e219c 100644 --- a/examples/projects/l0/stepper/lib/Stepper/library.json +++ b/examples/projects/l0/stepper/lib/Stepper/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/l0/stepper/platformio.ini b/examples/projects/l0/stepper/platformio.ini index 6e489427f..cd3939b60 100644 --- a/examples/projects/l0/stepper/platformio.ini +++ b/examples/projects/l0/stepper/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 board = l0 framework = stm32cube lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Stepper debug_tool = stlink diff --git a/examples/projects/native/button/lib/Button/library.json b/examples/projects/native/button/lib/Button/library.json index 572b8dc12..9d7ba1b2c 100644 --- a/examples/projects/native/button/lib/Button/library.json +++ b/examples/projects/native/button/lib/Button/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/examples/projects/native/gate_wscom/platformio.ini b/examples/projects/native/gate_wscom/platformio.ini index 1ee935904..1faeb2286 100644 --- a/examples/projects/native/gate_wscom/platformio.ini +++ b/examples/projects/native/gate_wscom/platformio.ini @@ -17,7 +17,7 @@ lib_extra_dirs = $PROJECT_DIR/../../../../../ platform = native lib_deps = - luos_engine@^2.9.2 + luos_engine@^3.0.0 Pipe Gate build_unflags = -Os diff --git a/examples/projects/native/led/lib/Led/library.json b/examples/projects/native/led/lib/Led/library.json index 60ef507ec..0aafee6be 100644 --- a/examples/projects/native/led/lib/Led/library.json +++ b/examples/projects/native/led/lib/Led/library.json @@ -9,6 +9,6 @@ }, "licence": "MIT", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" } -} +} \ No newline at end of file diff --git a/examples/projects/native/ping_pong/lib/PingPong/library.json b/examples/projects/native/ping_pong/lib/PingPong/library.json index 10ed893f9..b2a974863 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/library.json +++ b/examples/projects/native/ping_pong/lib/PingPong/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} +} \ No newline at end of file diff --git a/library.json b/library.json index 56984ced7..965273a6b 100644 --- a/library.json +++ b/library.json @@ -2,7 +2,7 @@ "name": "luos_engine", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,luos engine", "description": "Luos engine turns your embedded system into services like microservices architecture does it in software.", - "version": "2.9.2", + "version":"3.0.0", "authors": { "name": "Luos", "url": "https://luos.io" @@ -49,4 +49,4 @@ "README.md" ] } -} +} \ No newline at end of file diff --git a/tool_services/gate/library.json b/tool_services/gate/library.json index 1d338bebd..578bf4abb 100644 --- a/tool_services/gate/library.json +++ b/tool_services/gate/library.json @@ -2,7 +2,7 @@ "name": "Gate", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,cJSON", "description": "A translation Luos app service allowing you to easily connect your computer to your hardware product.", - "version": "1.7.1", + "version": "2.0.0", "authors": { "name": "Luos", "url": "https://luos.io" @@ -14,10 +14,10 @@ "extraScript": "select_format_script.py" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "repository": { "type": "git", "url": "https://github.com/Luos-io/luos_engine" } -} +} \ No newline at end of file diff --git a/tool_services/inspector/library.json b/tool_services/inspector/library.json index 488782210..f61744ca9 100644 --- a/tool_services/inspector/library.json +++ b/tool_services/inspector/library.json @@ -2,7 +2,7 @@ "name": "Inspector", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,cJSON", "description": "A Luos service application allowing a computer to inspect a product.", - "version": "1.6.1", + "version": "2.0.0", "authors": { "name": "Luos", "url": "https://luos.io" @@ -11,10 +11,10 @@ "licence": "MIT", "headers": "inspector.h", "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "repository": { "type": "git", "url": "https://github.com/Luos-io/luos_engine" } -} +} \ No newline at end of file diff --git a/tool_services/pipe/library.json b/tool_services/pipe/library.json index 773422a97..447b8653f 100644 --- a/tool_services/pipe/library.json +++ b/tool_services/pipe/library.json @@ -2,7 +2,7 @@ "name": "Pipe", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,cJSON", "description": "A driver to communicate with the outside world.", - "version": "1.5.1", + "version": "2.0.0", "authors": { "name": "Luos", "url": "https://luos.io" @@ -14,10 +14,10 @@ "extraScript": "select_hal_script.py" }, "dependencies": { - "luos/luos_engine": "^2.9.2" + "luos_engine": "^3.0.0" }, "repository": { "type": "git", "url": "https://github.com/Luos-io/luos_engine" } -} +} \ No newline at end of file From edcda1322b932fdbdcf64003b0171639286ec023 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 3 Apr 2023 13:14:21 +0200 Subject: [PATCH 002/198] Add the IO folder and source compilation. --- library.json | 3 ++- source_filter_script.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/library.json b/library.json index 965273a6b..092bc2d2a 100644 --- a/library.json +++ b/library.json @@ -2,7 +2,7 @@ "name": "luos_engine", "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,luos engine", "description": "Luos engine turns your embedded system into services like microservices architecture does it in software.", - "version":"3.0.0", + "version": "3.0.0", "authors": { "name": "Luos", "url": "https://luos.io" @@ -17,6 +17,7 @@ "-I network/robus/selftest", "-I engine/OD", "-I engine/core/inc", + "-I engine/IO/inc", "-I engine/profiles/state", "-I engine/profiles/motor", "-I engine/profiles/servo_motor", diff --git a/source_filter_script.py b/source_filter_script.py index a9d3ace60..629f4e5a9 100644 --- a/source_filter_script.py +++ b/source_filter_script.py @@ -54,6 +54,7 @@ sources = ["+<*.c>", "+<../../../network/robus/src/*.c>", + "+<../../IO/src/*.c>", "+<../../../network/robus/selftest/*.c>", "+<../../profiles/state/*.c>", "+<../../profiles/motor/*.c>", From c03ace3a280c35020631e78140e0d63d88febe76 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 10:25:53 +0100 Subject: [PATCH 003/198] Move msg_alloc from Robus to IO --- {network/robus => engine/IO}/inc/msg_alloc.h | 0 {network/robus => engine/IO}/src/msg_alloc.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {network/robus => engine/IO}/inc/msg_alloc.h (100%) rename {network/robus => engine/IO}/src/msg_alloc.c (100%) diff --git a/network/robus/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h similarity index 100% rename from network/robus/inc/msg_alloc.h rename to engine/IO/inc/msg_alloc.h diff --git a/network/robus/src/msg_alloc.c b/engine/IO/src/msg_alloc.c similarity index 100% rename from network/robus/src/msg_alloc.c rename to engine/IO/src/msg_alloc.c From 090de1aa014edcdf7655366ed55e8f55adeaf785 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 10:28:08 +0100 Subject: [PATCH 004/198] Move topic pub/sub management from Robus to IO --- {network/robus => engine/IO}/inc/topic.h | 0 {network/robus => engine/IO}/src/topic.c | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {network/robus => engine/IO}/inc/topic.h (100%) rename {network/robus => engine/IO}/src/topic.c (100%) diff --git a/network/robus/inc/topic.h b/engine/IO/inc/topic.h similarity index 100% rename from network/robus/inc/topic.h rename to engine/IO/inc/topic.h diff --git a/network/robus/src/topic.c b/engine/IO/src/topic.c similarity index 100% rename from network/robus/src/topic.c rename to engine/IO/src/topic.c From 525651c5b9719198a9602588689993903db32b56 Mon Sep 17 00:00:00 2001 From: Salem_Luos Date: Thu, 5 Jan 2023 10:22:20 +0100 Subject: [PATCH 005/198] Create filter and luos_io files --- engine/IO/inc/filter.h | 27 +++++++++++++++++++++++++++ engine/IO/inc/luos_io.h | 27 +++++++++++++++++++++++++++ engine/IO/src/filter.c | 32 ++++++++++++++++++++++++++++++++ engine/IO/src/luos_io.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 engine/IO/inc/filter.h create mode 100644 engine/IO/inc/luos_io.h create mode 100644 engine/IO/src/filter.c create mode 100644 engine/IO/src/luos_io.c diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h new file mode 100644 index 000000000..f08a36caf --- /dev/null +++ b/engine/IO/inc/filter.h @@ -0,0 +1,27 @@ +/****************************************************************************** + * @file filter.c + * @brief Calculate filter for Phy and compare filter + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _FILTER_H_ +#define _FILTER_H_ + + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + +// generic functions +void Filter_Init(void); + + +#endif /* _FILTER_H_ */ diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h new file mode 100644 index 000000000..9765d6a17 --- /dev/null +++ b/engine/IO/inc/luos_io.h @@ -0,0 +1,27 @@ +/****************************************************************************** + * @file luos_io.c + * @brief Interface file between Luos and a physical layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _LUOSIO_H_ +#define _LUOSIO_H_ + + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + +// generic functions +void LuosIO_Init(void); + + +#endif /* _LUOSIO_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c new file mode 100644 index 000000000..81bca316d --- /dev/null +++ b/engine/IO/src/filter.c @@ -0,0 +1,32 @@ +/****************************************************************************** + * @file filter.c + * @brief Calculate filter for Phy and compare filter + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include + + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + + +/****************************************************************************** + * @brief Init the interface file. + * @param None + * @return None + ******************************************************************************/ +void Filter_Init(void) +{ + +} diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c new file mode 100644 index 000000000..143464d3c --- /dev/null +++ b/engine/IO/src/luos_io.c @@ -0,0 +1,32 @@ +/****************************************************************************** + * @file luos_io.c + * @brief Interface file between Luos and a physical layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include + + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + + +/****************************************************************************** + * @brief Init the interface file. + * @param None + * @return None + ******************************************************************************/ +void LuosIO_Init(void) +{ + +} From 7496508694bdd635e3edf20aeb33e047cef38b82 Mon Sep 17 00:00:00 2001 From: Salem_Luos Date: Thu, 5 Jan 2023 10:35:17 +0100 Subject: [PATCH 006/198] Add an engine level configuration file --- engine/engine_config.h | 22 ++++++++++++++++++++++ library.json | 1 + 2 files changed, 23 insertions(+) create mode 100644 engine/engine_config.h diff --git a/engine/engine_config.h b/engine/engine_config.h new file mode 100644 index 000000000..9868c3334 --- /dev/null +++ b/engine/engine_config.h @@ -0,0 +1,22 @@ +/****************************************************************************** + * @file config + * @brief config for luos library ans robus protocole + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _ENGINE_CONFIG_H_ +#define _ENGINE_CONFIG_H_ + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Function + ******************************************************************************/ + +#endif /* _ENGINE_CONFIG_H_ */ diff --git a/library.json b/library.json index 092bc2d2a..3ec4a1462 100644 --- a/library.json +++ b/library.json @@ -15,6 +15,7 @@ "flags": [ "-I network/robus/inc", "-I network/robus/selftest", + "-I engine", "-I engine/OD", "-I engine/core/inc", "-I engine/IO/inc", From f5fcbc251c876390122707b364347c8c4db38e7b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 10:42:23 +0100 Subject: [PATCH 007/198] Rename and move the robus `config.h` file into `robus_config.h` --- engine/IO/src/msg_alloc.c | 2 +- library.json | 1 + network/robus/HAL/ESP32/robus_hal.h | 2 +- network/robus/inc/context.h | 2 +- network/robus/inc/robus_struct.h | 2 +- network/robus/{inc/config.h => robus_config.h} | 10 +++++----- 6 files changed, 10 insertions(+), 9 deletions(-) rename network/robus/{inc/config.h => robus_config.h} (92%) diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 1e892b079..0e443e515 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -45,7 +45,7 @@ #include #include #include -#include "config.h" +#include "robus_config.h" #include "msg_alloc.h" #include "luos_hal.h" #include "luos_utils.h" diff --git a/library.json b/library.json index 3ec4a1462..3bacb32ea 100644 --- a/library.json +++ b/library.json @@ -13,6 +13,7 @@ "build": { "srcDir": "engine/core/src", "flags": [ + "-I network/robus", "-I network/robus/inc", "-I network/robus/selftest", "-I engine", diff --git a/network/robus/HAL/ESP32/robus_hal.h b/network/robus/HAL/ESP32/robus_hal.h index 436bcfe58..33e440abf 100644 --- a/network/robus/HAL/ESP32/robus_hal.h +++ b/network/robus/HAL/ESP32/robus_hal.h @@ -10,7 +10,7 @@ #include #include -#include "config.h" +#include "robus_config.h" #include "robus_hal_config.h" /******************************************************************************* diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index 9efc78ce0..970133660 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -8,7 +8,7 @@ #define _CONTEXT_H_ #include -#include "config.h" +#include "robus_config.h" #include "port_manager.h" #include "reception.h" #include "transmission.h" diff --git a/network/robus/inc/robus_struct.h b/network/robus/inc/robus_struct.h index 17147af7c..2a71a4f9e 100644 --- a/network/robus/inc/robus_struct.h +++ b/network/robus/inc/robus_struct.h @@ -8,7 +8,7 @@ #define _ROBUS_STRUCT_H_ #include "stdint.h" -#include "config.h" +#include "robus_config.h" /******************************************************************************* * Definitions diff --git a/network/robus/inc/config.h b/network/robus/robus_config.h similarity index 92% rename from network/robus/inc/config.h rename to network/robus/robus_config.h index 594bd2d4d..4a72acbcf 100644 --- a/network/robus/inc/config.h +++ b/network/robus/robus_config.h @@ -1,11 +1,11 @@ /****************************************************************************** - * @file config - * @brief config for luos library ans robus protocole + * @file robus_config config + * @brief config of the Robus protocol * @author Luos * @version 0.0.0 ******************************************************************************/ -#ifndef _CONFIG_H_ -#define _CONFIG_H_ +#ifndef _ROBUS_CONFIG_H_ +#define _ROBUS_CONFIG_H_ /******************************************************************************* * Definitions @@ -65,4 +65,4 @@ * Function ******************************************************************************/ -#endif /* _CONFIG_H_ */ +#endif /* _ROBUS_CONFIG_H_ */ From 5ee14599a4a15d178df4a50082f00637f5b19390 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 11:38:57 +0100 Subject: [PATCH 008/198] Move struct and configurations from Robus to IO --- .../IO/inc/io_struct.h | 2 +- engine/IO/inc/msg_alloc.h | 2 +- engine/OD/od_linear.h | 2 +- engine/bootloader/bootloader_core.h | 2 +- engine/engine_config.h | 46 +++++++++++++++---- network/robus/inc/robus.h | 2 +- network/robus/inc/transmission.h | 2 +- network/robus/robus_config.h | 46 +------------------ test/_resources/Unity/unit_test.h | 2 +- tool_services/gate/TinyJSON/bootloader_ex.h | 2 +- 10 files changed, 47 insertions(+), 61 deletions(-) rename network/robus/inc/robus_struct.h => engine/IO/inc/io_struct.h (99%) diff --git a/network/robus/inc/robus_struct.h b/engine/IO/inc/io_struct.h similarity index 99% rename from network/robus/inc/robus_struct.h rename to engine/IO/inc/io_struct.h index 2a71a4f9e..b246b8250 100644 --- a/network/robus/inc/robus_struct.h +++ b/engine/IO/inc/io_struct.h @@ -8,7 +8,7 @@ #define _ROBUS_STRUCT_H_ #include "stdint.h" -#include "robus_config.h" +#include "engine_config.h" /******************************************************************************* * Definitions diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index cc78281eb..e1c30d636 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -7,7 +7,7 @@ #ifndef _MSGALLOC_H_ #define _MSGALLOC_H_ -#include "robus_struct.h" +#include "io_struct.h" #include "stdint.h" /******************************************************************************* diff --git a/engine/OD/od_linear.h b/engine/OD/od_linear.h index 233409f46..95752f7a4 100644 --- a/engine/OD/od_linear.h +++ b/engine/OD/od_linear.h @@ -7,7 +7,7 @@ #ifndef OD_OD_LINEAR_H_ #define OD_OD_LINEAR_H_ -#include "robus_struct.h" +#include "io_struct.h" #include "string.h" /******************************************************************************* diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/bootloader_core.h index 16dee1a76..d15fc0fc1 100644 --- a/engine/bootloader/bootloader_core.h +++ b/engine/bootloader/bootloader_core.h @@ -7,7 +7,7 @@ #ifndef BOOTLOADER_H #define BOOTLOADER_H -#include "robus_struct.h" +#include "io_struct.h" /******************************************************************************* * Definitions diff --git a/engine/engine_config.h b/engine/engine_config.h index 9868c3334..dc8f8eb42 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -1,6 +1,6 @@ /****************************************************************************** - * @file config - * @brief config for luos library ans robus protocole + * @file engine_config + * @brief config for luos_engine library * @author Luos * @version 0.0.0 ******************************************************************************/ @@ -10,13 +10,43 @@ /******************************************************************************* * Definitions ******************************************************************************/ +#define DEFAULTID 0x00 +#define PROTOCOL_REVISION 0 +#define BROADCAST_VAL 0x0FFF -/******************************************************************************* - * Variables - ******************************************************************************/ +#define MAX_ALIAS_SIZE 16 +#define MAX_DATA_MSG_SIZE 128 -/******************************************************************************* - * Function - ******************************************************************************/ +#ifndef MAX_SERVICE_NUMBER + #define MAX_SERVICE_NUMBER 5 +#endif + +#ifdef MAX_CONTAINER_NUMBER + #error 'MAX_CONTAINER_NUMBER' is deprecated since luos_engine@2.0.0, replace it by 'MAX_SERVICE_NUMBER', see: www.github.com/Luos-io/luos_engine/releases/tag/2.0.0 for more information. +#endif + +#ifndef MAX_PROFILE_NUMBER + #define MAX_PROFILE_NUMBER MAX_SERVICE_NUMBER +#endif + +#ifndef MSG_BUFFER_SIZE + #define MSG_BUFFER_SIZE 3 * sizeof(msg_t) +#endif + +#ifndef MAX_MSG_NB + #define MAX_MSG_NB 2 * MAX_SERVICE_NUMBER +#endif + +#ifndef NBR_PORT + #define NBR_PORT 2 +#endif + +#ifndef LAST_TOPIC + #define LAST_TOPIC 20 +#endif + +// Tab of byte. + 2 for overlap ID because aligned to byte +#define ID_MASK_SIZE ((MAX_SERVICE_NUMBER / 8) + 2) +#define TOPIC_MASK_SIZE ((LAST_TOPIC / 8) + 2) #endif /* _ENGINE_CONFIG_H_ */ diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 4bf93bc6e..7179f2e27 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -9,7 +9,7 @@ #include #include -#include "robus_struct.h" +#include "io_struct.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/network/robus/inc/transmission.h b/network/robus/inc/transmission.h index cd65fa610..0fb37070f 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus/inc/transmission.h @@ -7,7 +7,7 @@ #ifndef _TRANSMISSION_H_ #define _TRANSMISSION_H_ -#include "robus_struct.h" +#include "io_struct.h" #include /******************************************************************************* * Definitions diff --git a/network/robus/robus_config.h b/network/robus/robus_config.h index 4a72acbcf..f3b57aa85 100644 --- a/network/robus/robus_config.h +++ b/network/robus/robus_config.h @@ -10,13 +10,8 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define DEFAULTID 0x00 -#define PROTOCOL_REVISION 0 -#define BROADCAST_VAL 0x0FFF -#define TIMEOUT_VAL 2 -#define MAX_ALIAS_SIZE 16 -#define MAX_DATA_MSG_SIZE 128 +#define TIMEOUT_VAL 2 #ifndef DEFAULTBAUDRATE #define DEFAULTBAUDRATE 1000000 @@ -26,43 +21,4 @@ #define NBR_RETRY 10 #endif -#ifndef MAX_SERVICE_NUMBER - #define MAX_SERVICE_NUMBER 5 -#endif - -#ifdef MAX_CONTAINER_NUMBER - #error 'MAX_CONTAINER_NUMBER' is deprecated since luos_engine@2.0.0, replace it by 'MAX_SERVICE_NUMBER', see: www.github.com/Luos-io/luos_engine/releases/tag/2.0.0 for more information. -#endif - -#ifndef MAX_PROFILE_NUMBER - #define MAX_PROFILE_NUMBER MAX_SERVICE_NUMBER -#endif - -#ifndef MSG_BUFFER_SIZE - #define MSG_BUFFER_SIZE 3 * sizeof(msg_t) -#endif - -#ifndef MAX_MSG_NB - #define MAX_MSG_NB 2 * MAX_SERVICE_NUMBER -#endif - -#ifndef NBR_PORT - #define NBR_PORT 2 -#endif - -#ifndef LAST_TOPIC - #define LAST_TOPIC 20 -#endif - -// Tab of byte. + 2 for overlap ID because aligned to byte -#define ID_MASK_SIZE ((MAX_SERVICE_NUMBER / 8) + 2) -#define TOPIC_MASK_SIZE ((LAST_TOPIC / 8) + 2) -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ - #endif /* _ROBUS_CONFIG_H_ */ diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index a238faccc..e2ef0f48c 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -9,7 +9,7 @@ #include "robus_hal.h" #include "luos_engine.h" #include "luos_utils.h" -#include "robus_struct.h" +#include "io_struct.h" #include /******************************************************************************* diff --git a/tool_services/gate/TinyJSON/bootloader_ex.h b/tool_services/gate/TinyJSON/bootloader_ex.h index e4d387611..ad95d9a59 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.h +++ b/tool_services/gate/TinyJSON/bootloader_ex.h @@ -7,7 +7,7 @@ #ifndef BOOTLOADER_EX_H #define BOOTLOADER_EX_H -#include "robus_struct.h" +#include "io_struct.h" #include "luos_engine.h" #include "tiny-json.h" /******************************************************************************* From a1ebc8cecce42d575ae982ab880ce0d7be90726e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 30 Mar 2023 11:06:02 +0200 Subject: [PATCH 009/198] Move public timestamp functions into public Luos_engine.h --- engine/core/inc/_timestamp.h | 6 +---- engine/core/inc/luos_engine.h | 9 +++---- engine/core/inc/timestamp.h | 24 ------------------- engine/core/src/timestamp.c | 12 +++++----- .../Arduino/button/lib/button/button.c | 2 +- .../ESP32/button_arduino/lib/button/button.c | 2 +- .../lib/Potentiometer/potentiometer.c | 3 +-- .../lib/Potentiometer/potentiometer.c | 3 +-- .../lib/Potentiometer/potentiometer.c | 3 +-- .../lib/Potentiometer/potentiometer.c | 3 +-- .../lib/Potentiometer/potentiometer.c | 3 +-- ...uos_bootloader_samd21j18a.X.production.map | 6 ++--- .../SAMD21XPLAINED/button/lib/button/button.c | 2 +- .../l0/distance/lib/Distance/distance.c | 3 +-- .../lib/Light_sensor/light_sensor.c | 3 +-- .../lib/Potentiometer/potentiometer.c | 3 +-- network/robus/src/reception.c | 4 ++-- network/robus/src/robus.c | 4 ++-- network/robus/src/transmission.c | 4 ++-- test/test_timestamp/main.c | 8 +++---- 20 files changed, 36 insertions(+), 71 deletions(-) delete mode 100644 engine/core/inc/timestamp.h diff --git a/engine/core/inc/_timestamp.h b/engine/core/inc/_timestamp.h index 8025c6aa1..d07d87211 100644 --- a/engine/core/inc/_timestamp.h +++ b/engine/core/inc/_timestamp.h @@ -7,11 +7,7 @@ #ifndef __TIMESTAMP_H_ #define __TIMESTAMP_H_ -#include "service_structs.h" -#include "luos_list.h" -#include "luos_utils.h" -#include "od_time.h" -#include "timestamp.h" +#include "luos_engine.h" /******************************************************************************* * Function diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 1185b8660..ebb954e8e 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -12,7 +12,6 @@ #include "routing_table.h" #include "luos_od.h" #include "streaming.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -39,9 +38,6 @@ typedef struct __attribute__((__packed__)) uint8_t unmap[sizeof(luos_stats_t) + sizeof(service_stats_t)]; /*!< streamable form. */ }; } general_stats_t; -/******************************************************************************* - * Variables - ******************************************************************************/ /******************************************************************************* * Function @@ -68,6 +64,11 @@ void Luos_ServicesClear(void); // ***************** Messaging management ***************** void Luos_Flush(void); +// *** Timestamping +time_luos_t Luos_Timestamp(void); +bool Luos_IsMsgTimstamped(msg_t *msg); +time_luos_t Luos_GetMsgTimestamp(msg_t *msg); + // *** Send error_return_t Luos_SendMsg(service_t *service, msg_t *msg); error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); diff --git a/engine/core/inc/timestamp.h b/engine/core/inc/timestamp.h deleted file mode 100644 index bbbcfaf51..000000000 --- a/engine/core/inc/timestamp.h +++ /dev/null @@ -1,24 +0,0 @@ -/****************************************************************************** - * @file timestamp feature - * @brief time stamp data - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _TIMESTAMP_H_ -#define _TIMESTAMP_H_ - -#include "stdbool.h" -#include "luos_list.h" -#include "service_structs.h" -#include "string.h" -#include "od_time.h" - -/******************************************************************************* - * Function - ******************************************************************************/ - -time_luos_t Timestamp_now(void); -bool Timestamp_IsTimestampMsg(msg_t *msg); -time_luos_t Timestamp_GetTimestamp(msg_t *msg); - -#endif /* _TIMESTAMP_H_ */ diff --git a/engine/core/src/timestamp.c b/engine/core/src/timestamp.c index 75185cba6..a9ae6fb11 100644 --- a/engine/core/src/timestamp.c +++ b/engine/core/src/timestamp.c @@ -12,7 +12,7 @@ * * Timestamp is a mechanism which enables to track events in the system. To use it users have to get and save a timestamp in * a time_luos_t variable. - * You can get a timestamp by calling the Timestamp_now() function. Then you can deal with the returned value as you want, allowing + * You can get a timestamp by calling the Luos_Timestamp() function. Then you can deal with the returned value as you want, allowing * you to tag a date in the past or in the future. * * Then you can send a message with a data and it's associated timestamp, luos can handle this by slighly modifiyng its @@ -58,7 +58,7 @@ * @param msg None * @return time_luos_t ******************************************************************************/ -time_luos_t Timestamp_now(void) +time_luos_t Luos_Timestamp(void) { return TimeOD_TimeFrom_ns((double)LuosHAL_GetTimestamp()); } @@ -67,7 +67,7 @@ time_luos_t Timestamp_now(void) * @param msg : Message to check * @return boolean it "True" if message is timestamped ******************************************************************************/ -_CRITICAL inline bool Timestamp_IsTimestampMsg(msg_t *msg) +_CRITICAL inline bool Luos_IsMsgTimstamped(msg_t *msg) { return (msg->header.config == TIMESTAMP_PROTOCOL); } @@ -76,10 +76,10 @@ _CRITICAL inline bool Timestamp_IsTimestampMsg(msg_t *msg) * @param msg : Message to get the timestamp from * @return time_luos_t ******************************************************************************/ -time_luos_t Timestamp_GetTimestamp(msg_t *msg) +time_luos_t Luos_GetMsgTimestamp(msg_t *msg) { time_luos_t timestamp = {0.0f}; - if (Timestamp_IsTimestampMsg(msg)) + if (Luos_IsMsgTimstamped(msg)) { // Timestamp is at the end of the message memcpy(×tamp, (msg->data + msg->header.size), sizeof(time_luos_t)); @@ -120,7 +120,7 @@ _CRITICAL void Timestamp_ConvertToLatency(msg_t *msg) last_msg = msg; } // Compute the latency from date - time_luos_t latency = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(timestamp_date) - TimeOD_TimeTo_s(Timestamp_now())); + time_luos_t latency = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(timestamp_date) - TimeOD_TimeTo_s(Luos_Timestamp())); // Write latency on the message memcpy(&msg->data[msg->header.size], &latency, sizeof(time_luos_t)); } diff --git a/examples/projects/Arduino/button/lib/button/button.c b/examples/projects/Arduino/button/lib/button/button.c index a88d70701..c465b37a8 100644 --- a/examples/projects/Arduino/button/lib/button/button.c +++ b/examples/projects/Arduino/button/lib/button/button.c @@ -55,7 +55,7 @@ static void Button_MsgHandler(service_t *service, msg_t *msg) pub_msg.header.target = msg->header.source; pub_msg.header.size = sizeof(char); pub_msg.data[0] = digitalRead(BTN_PIN); - time_luos_t timestamp = Timestamp_now(); + time_luos_t timestamp = Luos_Timestamp(); Luos_SendTimestampMsg(service, &pub_msg, timestamp); return; diff --git a/examples/projects/ESP32/button_arduino/lib/button/button.c b/examples/projects/ESP32/button_arduino/lib/button/button.c index 2d6d04f83..6ceab3928 100644 --- a/examples/projects/ESP32/button_arduino/lib/button/button.c +++ b/examples/projects/ESP32/button_arduino/lib/button/button.c @@ -55,7 +55,7 @@ static void Button_MsgHandler(service_t *service, msg_t *msg) pub_msg.header.target = msg->header.source; pub_msg.header.size = sizeof(char); pub_msg.data[0] = digitalRead(BTN_PIN); - time_luos_t timestamp = Timestamp_now(); + time_luos_t timestamp = Luos_Timestamp(); Luos_SendTimestampMsg(service, &pub_msg, timestamp); return; diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c index 9da6353a1..bb4784c93 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c index fb3c17e44..d14040dce 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c index 9da6353a1..bb4784c93 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c index 9da6353a1..bb4784c93 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c index 9da6353a1..bb4784c93 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map index 8f2de01c8..c9eca9790 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map @@ -3642,11 +3642,11 @@ LOAD data_init 0x000086fc 0xc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o 0x000086fc MsgAlloc_UsedMsgEnd -.text.Timestamp_IsTimestampMsg%271 +.text.Luos_IsMsgTimstamped%271 0x00008708 0xc - .text.Timestamp_IsTimestampMsg + .text.Luos_IsMsgTimstamped 0x00008708 0xc build/luos_bootloader/production/_ext/1000620745/timestamp.o - 0x00008708 Timestamp_IsTimestampMsg + 0x00008708 Luos_IsMsgTimstamped .text.__sclose%272 0x00008714 0xc diff --git a/examples/projects/SAMD21XPLAINED/button/lib/button/button.c b/examples/projects/SAMD21XPLAINED/button/lib/button/button.c index c14a2bd16..af99840e4 100644 --- a/examples/projects/SAMD21XPLAINED/button/lib/button/button.c +++ b/examples/projects/SAMD21XPLAINED/button/lib/button/button.c @@ -55,7 +55,7 @@ static void Button_MsgHandler(service_t *service, msg_t *msg) pub_msg.header.target = msg->header.source; pub_msg.header.size = sizeof(char); pub_msg.data[0] = (((PORT->Group[BTN_PORT].IN.reg >> BTN_PIN)) & 0x01); - time_luos_t timestamp = Timestamp_now(); + time_luos_t timestamp = Luos_Timestamp(); Luos_SendTimestampMsg(service, &pub_msg, timestamp); return; diff --git a/examples/projects/l0/distance/lib/Distance/distance.c b/examples/projects/l0/distance/lib/Distance/distance.c index 366fa6fca..b408d013c 100644 --- a/examples/projects/l0/distance/lib/Distance/distance.c +++ b/examples/projects/l0/distance/lib/Distance/distance.c @@ -7,7 +7,6 @@ #include "vl53l0x_drv.h" #include "distance.h" -#include "timestamp.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -48,7 +47,7 @@ void Distance_Loop(void) if (vl53l0x_DrvRead(&dist) == SUCCEED) { new_data_ready = true; - distance_timestamp = Timestamp_now(); + distance_timestamp = Luos_Timestamp(); } } /****************************************************************************** diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c index 4042e2c08..56fd8a18a 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c @@ -7,7 +7,6 @@ #include "main.h" #include "light_sensor.h" #include "string.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void LightSensor_Loop(void) { // read and store the value that captured by the sensor lux = LightSensorDrv_Read(); - lux_timestamp = Timestamp_now(); + lux_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c index 9da6353a1..bb4784c93 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c @@ -6,7 +6,6 @@ ******************************************************************************/ #include "main.h" #include "potentiometer.h" -#include "timestamp.h" /******************************************************************************* * Definitions @@ -46,7 +45,7 @@ void Potentiometer_Loop(void) { // read and save the angular position value angle = PotentiometerDrv_Read(); - angle_timestamp = Timestamp_now(); + angle_timestamp = Luos_Timestamp(); } /****************************************************************************** * @brief Msg Handler call back when a msg receive for this service diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 968339b0e..d031ee0c6 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -150,7 +150,7 @@ _CRITICAL void Recep_GetHeader(volatile uint8_t *data) { data_size = current_msg->header.size; // we need to check if we have a timestamped message and increase the data size if yes - if (Timestamp_IsTimestampMsg((msg_t *)current_msg) == true) + if (Luos_IsMsgTimstamped((msg_t *)current_msg) == true) { data_size += sizeof(time_luos_t); } @@ -201,7 +201,7 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) } MsgAlloc_ValidDataIntegrity(); // If message is timestamped, convert the latency to date - if (Timestamp_IsTimestampMsg((msg_t *)current_msg)) + if (Luos_IsMsgTimstamped((msg_t *)current_msg)) { // This conversion also remove the timestamp from the message size. Timestamp_ConvertToDate((msg_t *)current_msg, ll_rx_timestamp); diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 371f26639..2f4d5e70a 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -17,7 +17,7 @@ #include "luos_hal.h" #include "msg_alloc.h" #include "luos_utils.h" -#include "timestamp.h" +#include "luos_engine.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -213,7 +213,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) uint16_t crc_max_index = full_size; - if (Timestamp_IsTimestampMsg(msg) == true) + if (Luos_IsMsgTimstamped(msg) == true) { full_size += sizeof(time_luos_t); } diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index c8561093a..8ac2b80d4 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -51,7 +51,7 @@ #include "reception.h" #include "msg_alloc.h" #include "_timestamp.h" -#include "timestamp.h" +#include "luos_engine.h" /******************************************************************************* * Definitions @@ -166,7 +166,7 @@ _CRITICAL void Transmit_Process() ctx.tx.data = data; // Put timestamping on data here - if (Timestamp_IsTimestampMsg((msg_t *)data) && (!nbrRetry)) + if (Luos_IsMsgTimstamped((msg_t *)data) && (!nbrRetry)) { // Convert date to latency Timestamp_ConvertToLatency((msg_t *)data); diff --git a/test/test_timestamp/main.c b/test/test_timestamp/main.c index 8abdb03de..8059e9e2c 100644 --- a/test/test_timestamp/main.c +++ b/test/test_timestamp/main.c @@ -28,13 +28,13 @@ void unittest_Timestamp() time_luos_t event_b_timestamp; // Save event A - event_a_timestamp = Timestamp_now(); + event_a_timestamp = Luos_Timestamp(); // wait for 1.2 seconds uint32_t start_timer = Luos_GetSystick(); while (Luos_GetSystick() - start_timer < 1200) ; // Save event B - event_b_timestamp = Timestamp_now(); + event_b_timestamp = Luos_Timestamp(); // check the time elapsed between the two events time_luos_t time_elapsed = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(event_b_timestamp) - TimeOD_TimeTo_s(event_a_timestamp)); @@ -64,7 +64,7 @@ void unittest_Timestamp() rx_msg = &default_sc.App_2.last_rx_msg; uint64_t low_level_rx_timestamp; // Get back the 1st timestamp - time_luos_t rx_event_a_timestamp = Timestamp_GetTimestamp(rx_msg); + time_luos_t rx_event_a_timestamp = Luos_GetMsgTimestamp(rx_msg); // Send the 2nd message to receiver with both the 2nd timestamp msg.header.size = 1; TEST_ASSERT_EQUAL(SUCCEED, Luos_SendTimestampMsg(default_sc.App_1.app, &msg, event_b_timestamp)); @@ -73,7 +73,7 @@ void unittest_Timestamp() // Get the message received rx_msg = &default_sc.App_2.last_rx_msg; // Get back the 2nd timestamp - time_luos_t rx_event_b_timestamp = Timestamp_GetTimestamp(rx_msg); + time_luos_t rx_event_b_timestamp = Luos_GetMsgTimestamp(rx_msg); // check the time elapsed between the two events time_elapsed = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(rx_event_b_timestamp) - TimeOD_TimeTo_s(rx_event_a_timestamp)); From 48d530e31c9473a76c991c63c9fa7bc41d414b7d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 12:22:33 +0100 Subject: [PATCH 010/198] Add an error in case of inclusion of luos.h --- engine/core/inc/luos.h | 2 ++ examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp | 2 +- examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/core/inc/luos.h b/engine/core/inc/luos.h index 683e3f4ea..427043d01 100644 --- a/engine/core/inc/luos.h +++ b/engine/core/inc/luos.h @@ -3,4 +3,6 @@ * @brief Retrocompatibility file to include luos_engine.h instead of luos.h * @author Luos ******************************************************************************/ + +#error 'luos.h' inclusion is deprecated since luos_engine@2.3.1, replace it by '#include "luos_engine.h"', see: www.github.com/Luos-io/luos_engine/commit/d3cc1618956907fc5a657ef07535ad9d5caa4f57 for more information. #include "luos_engine.h" \ No newline at end of file diff --git a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp index f1c84099f..eb520f68d 100644 --- a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp @@ -6,7 +6,7 @@ extern "C" { #endif -#include +#include "luos_engine.h" #ifdef __cplusplus } diff --git a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp index eab956aee..7b99ffea7 100644 --- a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp @@ -8,7 +8,7 @@ extern "C" { #endif -#include +#include "luos_engine.h" #ifdef __cplusplus } From f752b60becf508c741f7a40f9bc36ff69404fc07 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 23 Mar 2023 12:37:20 +0100 Subject: [PATCH 011/198] Clean luos_engine.h and remove unused `Luos_SetExternId` --- engine/core/inc/luos_engine.h | 35 ++++++++++++++------------------- engine/core/inc/routing_table.h | 6 ------ engine/core/src/luos_engine.c | 20 ------------------- engine/engine_config.h | 4 ++++ 4 files changed, 19 insertions(+), 46 deletions(-) diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index ebb954e8e..06383aadd 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -64,37 +64,32 @@ void Luos_ServicesClear(void); // ***************** Messaging management ***************** void Luos_Flush(void); -// *** Timestamping +// *** Timestamping management *** time_luos_t Luos_Timestamp(void); bool Luos_IsMsgTimstamped(msg_t *msg); time_luos_t Luos_GetMsgTimestamp(msg_t *msg); - -// *** Send -error_return_t Luos_SendMsg(service_t *service, msg_t *msg); error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); + +// *** Big data management *** void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); +int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); + +// *** Streaming management *** void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); -error_return_t Luos_TxComplete(void); +error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); + +// *** Pub/Sub management *** +error_return_t Luos_TopicSubscribe(service_t *service, uint16_t topic); +error_return_t Luos_TopicUnsubscribe(service_t *service, uint16_t topic); -void Luos_SetExternId(service_t *service, target_mode_t target_mode, uint16_t target, uint16_t newid); +// *** Basic transmission management *** +error_return_t Luos_SendMsg(service_t *service, msg_t *msg); +error_return_t Luos_TxComplete(void); -// *** Receive +// *** Polling reception management *** error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg); error_return_t Luos_ReadFromService(service_t *service, int16_t id, msg_t **returned_msg); -int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); -error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); uint16_t Luos_NbrAvailableMsg(void); -uint32_t Luos_GetSystick(void); -error_return_t Luos_TxComplete(void); -void Luos_ResetStatistic(void); -bool Luos_IsNodeDetected(void); -void Luos_AddPackage(void (*Init)(void), void (*Loop)(void)); -void Luos_SetVerboseMode(uint8_t mode); -void Luos_SetFilterState(uint8_t state, service_t *service); -error_return_t Luos_TopicSubscribe(service_t *service, uint16_t topic); -error_return_t Luos_TopicUnsubscribe(service_t *service, uint16_t topic); -void Luos_Run(void); -void Luos_Detect(service_t *service); #endif /* LUOS_ENGINE_H */ diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index deb902e2b..4ab6d0f2b 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -11,9 +11,6 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#ifndef MAX_RTB_ENTRY - #define MAX_RTB_ENTRY 40 -#endif typedef enum { @@ -21,9 +18,6 @@ typedef enum SERVICE, // Contain a service informations NODE, // Contain a node informations } entry_mode_t; -/******************************************************************************* - * Variables - ******************************************************************************/ /* This structure is used to receive or send messages between services in slave * and master mode. diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 32e77cc72..25da44762 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -995,26 +995,6 @@ error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t memcpy(service->alias, clean_alias, MAX_ALIAS_SIZE); return SUCCEED; } -/****************************************************************************** - * @brief Set Id of a service trough the network - * @param service : Service sending request - * @param target_mode - * @param target - * @param newid : The new Id of service(s) - * @return None - ******************************************************************************/ -void Luos_SetExternId(service_t *service, target_mode_t target_mode, uint16_t target, uint16_t newid) -{ - msg_t msg; - msg.header.config = BASE_PROTOCOL; - msg.header.target = target; - msg.header.target_mode = target_mode; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = 2; - msg.data[1] = newid; - msg.data[0] = (newid << 8); - Robus_SendMsg(service->ll_service, &msg); -} /****************************************************************************** * @brief Return the number of messages available * @param None diff --git a/engine/engine_config.h b/engine/engine_config.h index dc8f8eb42..ca21ef937 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -21,6 +21,10 @@ #define MAX_SERVICE_NUMBER 5 #endif +#ifndef MAX_RTB_ENTRY + #define MAX_RTB_ENTRY 40 +#endif + #ifdef MAX_CONTAINER_NUMBER #error 'MAX_CONTAINER_NUMBER' is deprecated since luos_engine@2.0.0, replace it by 'MAX_SERVICE_NUMBER', see: www.github.com/Luos-io/luos_engine/releases/tag/2.0.0 for more information. #endif From be861f95b32e1d6e57530273f67474b034addeb5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 28 Mar 2023 16:24:07 +0200 Subject: [PATCH 012/198] Group all topic things on a pub_sub.c file on engine/core --- engine/IO/inc/topic.h | 27 ------ engine/bootloader/bootloader_core.c | 4 +- engine/core/inc/luos_engine.h | 10 ++- engine/core/inc/pub_sub.h | 17 ++++ engine/core/src/luos_engine.c | 28 ------- engine/{IO/src/topic.c => core/src/pub_sub.c} | 81 +++++++++++++----- .../native/ping_pong/lib/PingPong/scoring.c | 2 +- network/robus/inc/robus.h | 2 - network/robus/src/reception.c | 6 +- network/robus/src/robus.c | 54 ------------ test/test_robus/main.c | 82 +++++++++---------- test/test_topic/main.c | 68 +++++++-------- 12 files changed, 164 insertions(+), 217 deletions(-) delete mode 100644 engine/IO/inc/topic.h create mode 100644 engine/core/inc/pub_sub.h rename engine/{IO/src/topic.c => core/src/pub_sub.c} (53%) diff --git a/engine/IO/inc/topic.h b/engine/IO/inc/topic.h deleted file mode 100644 index ca69fe6ca..000000000 --- a/engine/IO/inc/topic.h +++ /dev/null @@ -1,27 +0,0 @@ -/****************************************************************************** - * @file topic - * @brief multicast protocole description - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _TOPIC_H_ -#define _TOPIC_H_ - -#include "context.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ -uint8_t Topic_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id); -error_return_t Topic_Subscribe(ll_service_t *ll_service, uint16_t topic_id); -error_return_t Topic_Unsubscribe(ll_service_t *ll_service, uint16_t topic_id); - -#endif /* _TARGET_H_ */ diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/bootloader_core.c index 5cfb8d703..0e2949b03 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/bootloader_core.c @@ -385,7 +385,7 @@ void LuosBootloader_MsgHandler(msg_t *input) case BOOTLOADER_READY: source_id = input->header.source; bootloader_data_size = input->header.size - 2 * sizeof(char); - Luos_TopicSubscribe(0, (uint16_t)input->data[1]); + Luos_Subscribe(0, (uint16_t)input->data[1]); memcpy(bootloader_data, &(input->data[2]), bootloader_data_size); LuosHAL_SetMode((uint8_t)BOOT_MODE); @@ -445,7 +445,7 @@ void LuosBootloader_MsgHandler(msg_t *input) case BOOTLOADER_APP_SAVED: // set load flag load_flag = true; - Luos_TopicUnsubscribe(0, input->header.target); + Luos_Unsubscribe(0, input->header.target); break; case BOOTLOADER_STOP: diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 06383aadd..d1978f5ab 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -70,6 +70,10 @@ bool Luos_IsMsgTimstamped(msg_t *msg); time_luos_t Luos_GetMsgTimestamp(msg_t *msg); error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); +// *** Pub/Sub management (in file `pub_sub.c`)*** +error_return_t Luos_Subscribe(service_t *service, uint16_t topic); +error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); + // *** Big data management *** void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); @@ -79,9 +83,9 @@ void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *str void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); -// *** Pub/Sub management *** -error_return_t Luos_TopicSubscribe(service_t *service, uint16_t topic); -error_return_t Luos_TopicUnsubscribe(service_t *service, uint16_t topic); +// *** Pub/Sub management (in file `pub_sub.c`)*** +error_return_t PubSub_Subscribe(service_t *service, uint16_t topic); +error_return_t PubSub_Unsubscribe(service_t *service, uint16_t topic); // *** Basic transmission management *** error_return_t Luos_SendMsg(service_t *service, msg_t *msg); diff --git a/engine/core/inc/pub_sub.h b/engine/core/inc/pub_sub.h new file mode 100644 index 000000000..5da77ece1 --- /dev/null +++ b/engine/core/inc/pub_sub.h @@ -0,0 +1,17 @@ +/****************************************************************************** + * @file pub_sub.h + * @brief multicast referencing description + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _PUB_SUB_H_ +#define _PUB_SUB_H_ + +#include "context.h" + +/******************************************************************************* + * Function + ******************************************************************************/ +uint8_t PubSub_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id); + +#endif /* _PUB_SUB_H_ */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 25da44762..3a91ec320 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -1203,31 +1203,3 @@ void Luos_Detect(service_t *service) Luos_SendMsg(service, &detect_msg); } } -/****************************************************************************** - * @brief Subscribe to a new topic - * @param service - * @param topic - * @return None - ******************************************************************************/ -error_return_t Luos_TopicSubscribe(service_t *service, uint16_t topic) -{ - if (service == 0) - { - return Robus_TopicSubscribe(0, topic); - } - return Robus_TopicSubscribe(service->ll_service, topic); -} -/****************************************************************************** - * @brief Unsubscribe from a topic - * @param service - * @param topic - * @return None - ******************************************************************************/ -error_return_t Luos_TopicUnsubscribe(service_t *service, uint16_t topic) -{ - if (service == 0) - { - return Robus_TopicUnsubscribe(0, topic); - } - return Robus_TopicUnsubscribe(service->ll_service, topic); -} diff --git a/engine/IO/src/topic.c b/engine/core/src/pub_sub.c similarity index 53% rename from engine/IO/src/topic.c rename to engine/core/src/pub_sub.c index aa0d5b487..b513bac49 100644 --- a/engine/IO/src/topic.c +++ b/engine/core/src/pub_sub.c @@ -4,8 +4,9 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include "topic.h" -#include "stdbool.h" +#include "pub_sub.h" +#include "luos_engine.h" +#include #include /******************************************************************************* * Definitions @@ -16,7 +17,7 @@ ******************************************************************************/ /******************************************************************************* - * Function + * Functions ******************************************************************************/ /****************************************************************************** @@ -25,7 +26,7 @@ * @param multicast bank * @return Error ******************************************************************************/ -uint8_t Topic_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id) +uint8_t PubSub_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id) { unsigned char i; for (i = 0; i < ll_service->last_topic_position; i++) @@ -35,18 +36,32 @@ uint8_t Topic_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id) } return false; } + /****************************************************************************** - * @brief add a topic to the list - * @param service in multicast - * @param topic_add to add - * @return Error + * @brief Subscribe to a new topic + * @param service + * @param topic + * @return None ******************************************************************************/ -error_return_t Topic_Subscribe(ll_service_t *ll_service, uint16_t topic_id) +error_return_t Luos_Subscribe(service_t *service, uint16_t topic) { - // check if target exists or if we reached the maximum topics number - if ((Topic_IsTopicSubscribed(ll_service, topic_id) == false) && (ll_service->last_topic_position < LAST_TOPIC)) + // Assert if we add a topic that is greater than the max topic value + LUOS_ASSERT(topic <= LAST_TOPIC); + + // Add 1 to the bit corresponding to the topic in multicast mask + ctx.TopicMask[(topic / 8)] |= 1 << (topic - ((int)(topic / 8)) * 8); + + // add multicast this topic to the service + ll_service_t *ll_service = (ll_service_t *)&ctx.ll_service_table[0]; + if (service != 0) { - ll_service->topic_list[ll_service->last_topic_position] = topic_id; + ll_service = service->ll_service; + } + + // Check if target exists or if we reached the maximum topics number + if ((PubSub_IsTopicSubscribed(ll_service, topic) == false) && (ll_service->last_topic_position < LAST_TOPIC)) + { + ll_service->topic_list[ll_service->last_topic_position] = topic; ll_service->last_topic_position++; return SUCCEED; } @@ -54,26 +69,48 @@ error_return_t Topic_Subscribe(ll_service_t *ll_service, uint16_t topic_id) } /****************************************************************************** - * @brief remove a topic from the service list - * @param service in multicast - * @param topic_id to remove - * @return Error + * @brief Unsubscribe from a topic + * @param service + * @param topic + * @return None ******************************************************************************/ -error_return_t Topic_Unsubscribe(ll_service_t *ll_service, uint16_t topic_id) +error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { + error_return_t err = FAILED; + ll_service_t *ll_service = (ll_service_t *)&ctx.ll_service_table[0]; unsigned char i; + if (service != 0) + { + ll_service = service->ll_service; + } + // Delete topic from service list for (i = 0; i < ll_service->last_topic_position; i++) { - if (ll_service->topic_list[i] == topic_id) + if (ll_service->topic_list[i] == topic) { if (ll_service->last_topic_position >= LAST_TOPIC) { - return FAILED; + break; } memcpy(&ll_service->topic_list[i], &ll_service->topic_list[i + 1], ll_service->last_topic_position - i); ll_service->last_topic_position--; - return SUCCEED; + err = SUCCEED; + break; } } - return FAILED; -} + + // Recompute multicast mask if needed + if (err == SUCCEED) + { + for (uint16_t i = 0; i < ctx.ll_service_number; i++) + { + if (PubSub_IsTopicSubscribed((ll_service_t *)(&ctx.ll_service_table[i]), topic) == true) + { + return err; + } + } + // calculate mask after topic deletion + ctx.TopicMask[(topic / 8)] -= 1 << (topic - ((int)(topic / 8)) * 8); + } + return err; +} \ No newline at end of file diff --git a/examples/projects/native/ping_pong/lib/PingPong/scoring.c b/examples/projects/native/ping_pong/lib/PingPong/scoring.c index db8241302..1412e402b 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/scoring.c +++ b/examples/projects/native/ping_pong/lib/PingPong/scoring.c @@ -14,7 +14,7 @@ score_table_t score_table; void score_init(service_t *player, search_result_t *player_list) { - Luos_TopicSubscribe(player, SCORE_TOPIC); + Luos_Subscribe(player, SCORE_TOPIC); memset(scores, 0, sizeof(scores)); score_table.player_nb = player_list->result_nbr; score_table.scores = scores; diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 7179f2e27..fa0312d06 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -42,7 +42,5 @@ network_state_t Robus_IsNodeDetected(void); void Robus_SetFilterState(uint8_t state, ll_service_t *service); void Robus_SetVerboseMode(uint8_t mode); void Robus_MaskInit(void); -error_return_t Robus_TopicSubscribe(ll_service_t *ll_service, uint16_t topic_id); -error_return_t Robus_TopicUnsubscribe(ll_service_t *ll_service, uint16_t topic_id); #endif /* _ROBUS_H_ */ diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index d031ee0c6..b125d9d2d 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -46,7 +46,7 @@ #include #include "robus_hal.h" #include "luos_hal.h" -#include "topic.h" +#include "pub_sub.h" #include "transmission.h" #include "msg_alloc.h" #include "luos_utils.h" @@ -579,7 +579,7 @@ static inline void Recep_DoubleAlloc(msg_t *msg) } break; case (TOPIC): - if (Topic_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[idx], msg->header.target) == false) + if (PubSub_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[idx], msg->header.target) == false) { // store the message if it is not so that we dont have double messages in memory MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[idx], msg); @@ -640,7 +640,7 @@ void Recep_InterpretMsgProtocol(msg_t *msg) case TOPIC: for (i = 0; i < ctx.ll_service_number; i++) { - if (Topic_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[i], msg->header.target)) + if (PubSub_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[i], msg->header.target)) { // TODO manage multiple slave concerned MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 2f4d5e70a..bdda80c00 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -12,7 +12,6 @@ #include "reception.h" #include "port_manager.h" #include "context.h" -#include "topic.h" #include "robus_hal.h" #include "luos_hal.h" #include "msg_alloc.h" @@ -610,56 +609,3 @@ _CRITICAL void Robus_SetVerboseMode(uint8_t mode) // verbose is localhost or multihost ctx.verbose = mode + 1; } -/****************************************************************************** - * @brief Add new mutlicast topic to service bank and node mask - * @param ll_service - * @param topic - * @return Error - ******************************************************************************/ -error_return_t Robus_TopicSubscribe(ll_service_t *ll_service, uint16_t topic_id) -{ - // assert if we add a topic that is greater than the max topic value - LUOS_ASSERT(topic_id <= LAST_TOPIC); - // add 1 to the bit corresponding to the topic in multicast mask - ctx.TopicMask[(topic_id / 8)] |= 1 << (topic_id - ((int)(topic_id / 8)) * 8); - // add multicast topic to service - if (ll_service == 0) - { - return Topic_Subscribe((ll_service_t *)(&ctx.ll_service_table[0]), topic_id); - } - return Topic_Subscribe(ll_service, topic_id); -} -/****************************************************************************** - * @brief Remove mutlicast topic to service bank and node mask - * @param ll_service - * @param topic - * @return Error - ******************************************************************************/ -error_return_t Robus_TopicUnsubscribe(ll_service_t *ll_service, uint16_t topic_id) -{ - error_return_t err; - - // delete topic from service list - if (ll_service == 0) - { - err = Topic_Unsubscribe((ll_service_t *)(&ctx.ll_service_table[0]), topic_id); - } - else - { - err = Topic_Unsubscribe(ll_service, topic_id); - } - - if (err == SUCCEED) - { - for (uint16_t i = 0; i < ctx.ll_service_number; i++) - { - if (Topic_IsTopicSubscribed((ll_service_t *)(&ctx.ll_service_table[i]), topic_id) == true) - { - return err; - } - } - // calculate mask after topic deletion - ctx.TopicMask[(topic_id / 8)] -= 1 << (topic_id - ((int)(topic_id / 8)) * 8); - } - return err; -} diff --git a/test/test_robus/main.c b/test/test_robus/main.c index 4c9862a7c..df6dc34bc 100644 --- a/test/test_robus/main.c +++ b/test/test_robus/main.c @@ -63,20 +63,20 @@ void unittest_Robus_IDMaskCalculation() } } -void unittest_Robus_TopicSubscribe(void) +void unittest_Luos_Subscribe(void) { NEW_TEST_CASE("Normal Add to node topic list"); { // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 0); + Luos_Subscribe(default_sc.App_1.app, 0); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 4); + Luos_Subscribe(default_sc.App_1.app, 4); TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 6); + Luos_Subscribe(default_sc.App_1.app, 6); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 18); + Luos_Subscribe(default_sc.App_1.app, 18); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); @@ -88,12 +88,12 @@ void unittest_Robus_TopicSubscribe(void) RESET_ASSERT(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, LAST_TOPIC); + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); TEST_ASSERT_FALSE(IS_ASSERT()); TRY { - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, LAST_TOPIC + 1); + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC + 1); } TEST_ASSERT_TRUE(IS_ASSERT()); } @@ -102,18 +102,18 @@ void unittest_Robus_TopicSubscribe(void) // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 0); + Luos_Subscribe(default_sc.App_1.app, 0); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 0); + Luos_Subscribe(default_sc.App_2.app, 0); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_3.app->ll_service, 0); + Luos_Subscribe(default_sc.App_3.app, 0); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 4); + Luos_Subscribe(default_sc.App_1.app, 4); TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 4); + Luos_Subscribe(default_sc.App_2.app, 4); TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); - Robus_TopicSubscribe(default_sc.App_3.app->ll_service, 4); + Luos_Subscribe(default_sc.App_3.app, 4); TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); } } @@ -125,7 +125,7 @@ void unittest_Robus_TopicUnsubscribe(void) // Init default scenario context Init_Context(); - error_return_t err = Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 3); + error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, 3); TEST_ASSERT_EQUAL(FAILED, err); } NEW_TEST_CASE("Normal Remove from topic list"); @@ -133,27 +133,27 @@ void unittest_Robus_TopicUnsubscribe(void) // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 0); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 4); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 6); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 18); + Luos_Subscribe(default_sc.App_1.app, 0); + Luos_Subscribe(default_sc.App_1.app, 4); + Luos_Subscribe(default_sc.App_1.app, 6); + Luos_Subscribe(default_sc.App_1.app, 18); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 4); + Luos_Unsubscribe(default_sc.App_1.app, 4); TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 0); + Luos_Unsubscribe(default_sc.App_1.app, 0); TEST_ASSERT_EQUAL(0x40, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 6); + Luos_Unsubscribe(default_sc.App_1.app, 6); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 18); + Luos_Unsubscribe(default_sc.App_1.app, 18); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); @@ -162,56 +162,56 @@ void unittest_Robus_TopicUnsubscribe(void) { // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, LAST_TOPIC - 1); + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x08, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, LAST_TOPIC - 1); + Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); - error_return_t err = Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, LAST_TOPIC); + error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC); TEST_ASSERT_EQUAL(err, FAILED); } NEW_TEST_CASE("Remove multiple times same topic"); { // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 0); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 4); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 4); - Robus_TopicSubscribe(default_sc.App_3.app->ll_service, 4); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 6); - Robus_TopicSubscribe(default_sc.App_3.app->ll_service, 6); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 18); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 18); + Luos_Subscribe(default_sc.App_1.app, 0); + Luos_Subscribe(default_sc.App_1.app, 4); + Luos_Subscribe(default_sc.App_2.app, 4); + Luos_Subscribe(default_sc.App_3.app, 4); + Luos_Subscribe(default_sc.App_2.app, 6); + Luos_Subscribe(default_sc.App_3.app, 6); + Luos_Subscribe(default_sc.App_1.app, 18); + Luos_Subscribe(default_sc.App_2.app, 18); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 4); + Luos_Unsubscribe(default_sc.App_1.app, 4); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_2.app->ll_service, 4); + Luos_Unsubscribe(default_sc.App_2.app, 4); TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_3.app->ll_service, 4); + Luos_Unsubscribe(default_sc.App_3.app, 4); TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_2.app->ll_service, 6); + Luos_Unsubscribe(default_sc.App_2.app, 6); TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_3.app->ll_service, 6); + Luos_Unsubscribe(default_sc.App_3.app, 6); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_1.app->ll_service, 18); + Luos_Unsubscribe(default_sc.App_1.app, 18); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); - Robus_TopicUnsubscribe(default_sc.App_2.app->ll_service, 18); + Luos_Unsubscribe(default_sc.App_2.app, 18); TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); @@ -224,7 +224,7 @@ int main(int argc, char **argv) // Big data reception UNIT_TEST_RUN(unittest_Robus_IDMaskCalculation); - UNIT_TEST_RUN(unittest_Robus_TopicSubscribe); + UNIT_TEST_RUN(unittest_Luos_Subscribe); UNIT_TEST_RUN(unittest_Robus_TopicUnsubscribe); UNITY_END(); diff --git a/test/test_topic/main.c b/test/test_topic/main.c index 746df66b4..f8bb378b5 100644 --- a/test/test_topic/main.c +++ b/test/test_topic/main.c @@ -1,39 +1,39 @@ #include "main.h" #include "robus.h" #include "context.h" -#include "topic.h" +#include "pub_sub.h" #include #include extern default_scenario_t default_sc; -void unittest_Topic_IsTopicSubscribed(void) +void unittest_PubSub_IsTopicSubscribed(void) { NEW_TEST_CASE("Search Topics"); { // Init default scenario context Init_Context(); - Robus_TopicSubscribe(default_sc.App_1.app->ll_service, 1); - Robus_TopicSubscribe(default_sc.App_2.app->ll_service, 18); + Luos_Subscribe(default_sc.App_1.app, 1); + Luos_Subscribe(default_sc.App_2.app, 18); - TEST_ASSERT_TRUE(Topic_IsTopicSubscribed(default_sc.App_1.app->ll_service, 1)); - TEST_ASSERT_FALSE(Topic_IsTopicSubscribed(default_sc.App_2.app->ll_service, 1)); - TEST_ASSERT_FALSE(Topic_IsTopicSubscribed(default_sc.App_1.app->ll_service, 18)); - TEST_ASSERT_TRUE(Topic_IsTopicSubscribed(default_sc.App_2.app->ll_service, 18)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_2.app->ll_service, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, 18)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_2.app->ll_service, 18)); } } -void unittest_Topic_Subscribe(void) +void unittest_Luos_Subscribe(void) { NEW_TEST_CASE("Add random Topics"); { // Init default scenario context Init_Context(); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Subscribe(default_sc.App_1.app->ll_service, 1)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 1)); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Subscribe(default_sc.App_1.app->ll_service, 18)); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Subscribe(default_sc.App_1.app->ll_service, 27)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 18)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 27)); TEST_ASSERT_EQUAL(3, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->topic_list[0]); TEST_ASSERT_EQUAL(18, default_sc.App_1.app->ll_service->topic_list[1]); @@ -46,47 +46,47 @@ void unittest_Topic_Subscribe(void) for (uint8_t i = 0; i < LAST_TOPIC; i++) { - TEST_ASSERT_EQUAL(SUCCEED, Topic_Subscribe(default_sc.App_1.app->ll_service, i)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, i)); TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->ll_service->last_topic_position); } - TEST_ASSERT_EQUAL(FAILED, Topic_Subscribe(default_sc.App_1.app->ll_service, LAST_TOPIC)); + TEST_ASSERT_EQUAL(FAILED, Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC)); TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_FALSE(Topic_IsTopicSubscribed(default_sc.App_1.app->ll_service, LAST_TOPIC)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, LAST_TOPIC)); } } -void unittest_Topic_Unsubscribe(void) +void unittest_Luos_Unsubscribe(void) { NEW_TEST_CASE("Remove random topics"); { // Init default scenario context Init_Context(); - Topic_Subscribe(default_sc.App_1.app->ll_service, 2); - Topic_Subscribe(default_sc.App_1.app->ll_service, 7); - Topic_Subscribe(default_sc.App_1.app->ll_service, 17); + Luos_Subscribe(default_sc.App_1.app, 2); + Luos_Subscribe(default_sc.App_1.app, 7); + Luos_Subscribe(default_sc.App_1.app, 17); TEST_ASSERT_EQUAL(3, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); TEST_ASSERT_EQUAL(7, default_sc.App_1.app->ll_service->topic_list[1]); TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[2]); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 7)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 7)); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[1]); - TEST_ASSERT_EQUAL(FAILED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 18)); + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 18)); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[1]); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 17)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 17)); TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 2)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); TEST_ASSERT_EQUAL(0, default_sc.App_1.app->ll_service->last_topic_position); } NEW_TEST_CASE("Remove same topic"); @@ -94,14 +94,14 @@ void unittest_Topic_Unsubscribe(void) // Init default scenario context Init_Context(); - Topic_Subscribe(default_sc.App_1.app->ll_service, 2); - Topic_Subscribe(default_sc.App_1.app->ll_service, 17); + Luos_Subscribe(default_sc.App_1.app, 2); + Luos_Subscribe(default_sc.App_1.app, 17); - TEST_ASSERT_EQUAL(SUCCEED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 2)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(FAILED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 2)); + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[0]); } @@ -111,22 +111,22 @@ void unittest_Topic_Unsubscribe(void) // Init default scenario context Init_Context(); - Topic_Subscribe(default_sc.App_1.app->ll_service, 2); + Luos_Subscribe(default_sc.App_1.app, 2); default_sc.App_1.app->ll_service->last_topic_position = LAST_TOPIC - 1; - TEST_ASSERT_EQUAL(SUCCEED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 2)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - Topic_Subscribe(default_sc.App_1.app->ll_service, 2); + Luos_Subscribe(default_sc.App_1.app, 2); default_sc.App_1.app->ll_service->last_topic_position = LAST_TOPIC; - TEST_ASSERT_EQUAL(FAILED, Topic_Unsubscribe(default_sc.App_1.app->ll_service, 2)); + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); } } int main(int argc, char **argv) { UNITY_BEGIN(); - UNIT_TEST_RUN(unittest_Topic_IsTopicSubscribed); - UNIT_TEST_RUN(unittest_Topic_Subscribe); - UNIT_TEST_RUN(unittest_Topic_Unsubscribe); + UNIT_TEST_RUN(unittest_PubSub_IsTopicSubscribed); + UNIT_TEST_RUN(unittest_Luos_Subscribe); + UNIT_TEST_RUN(unittest_Luos_Unsubscribe); UNITY_END(); } \ No newline at end of file From fbba385b1c9058a792187bb38650691374d12035 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 20:04:22 +0200 Subject: [PATCH 013/198] Group all streaming functions on streaming.c/.h --- engine/core/inc/luos_engine.h | 12 +- engine/core/inc/streaming.h | 17 +- engine/core/src/luos_engine.c | 101 ---- engine/core/src/streaming.c | 133 ++++- .../bldc_simple_foc/lib/motor/motor.cpp | 14 +- .../stepper_simple_foc/lib/motor/motor.cpp | 14 +- ...uos_bootloader_samd21j18a.X.production.map | 22 +- .../lib/Controller_motor/controller_motor.c | 14 +- examples/projects/l0/dxl/lib/Dxl/dxl.c | 12 +- .../core/driver/eMPL/dmpKey.h | 531 +++++++++--------- test/test_luos/main.c | 56 +- test/test_luos/main.h | 2 +- tool_services/gate/pipe_link.c | 2 +- tool_services/inspector/pipe_link.c | 2 +- .../pipe/SERIAL/ARDUINO/pipe_com.cpp | 4 +- .../pipe/SERIAL/ESP32_IDF/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-F0/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-F4/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-G431/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-G474/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-L0/pipe_com.c | 4 +- .../pipe/SERIAL/NUCLEO-L4/pipe_com.c | 4 +- tool_services/pipe/SERIAL/l0/pipe_com.c | 4 +- tool_services/pipe/SERIAL/serial_protocol.h | 22 +- tool_services/pipe/WS/ARDUINO/pipe_com.cpp | 12 +- tool_services/pipe/WS/ESP32_IDF/pipe_com.c | 12 +- tool_services/pipe/WS/native/pipe_com.c | 12 +- tool_services/pipe/pipe.c | 6 +- 28 files changed, 516 insertions(+), 516 deletions(-) diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index d1978f5ab..8a51c9386 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -11,7 +11,6 @@ #include "service_structs.h" #include "routing_table.h" #include "luos_od.h" -#include "streaming.h" /******************************************************************************* * Definitions @@ -62,6 +61,12 @@ void Luos_Detect(service_t *service); void Luos_ServicesClear(void); // ***************** Messaging management ***************** +// *** Streaming management *** +#include "streaming.h" +void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); +void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); +error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); + void Luos_Flush(void); // *** Timestamping management *** @@ -78,11 +83,6 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); -// *** Streaming management *** -void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); -void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); -error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); - // *** Pub/Sub management (in file `pub_sub.c`)*** error_return_t PubSub_Subscribe(service_t *service, uint16_t topic); error_return_t PubSub_Unsubscribe(service_t *service, uint16_t topic); diff --git a/engine/core/inc/streaming.h b/engine/core/inc/streaming.h index 5c145aaa7..fc47cf9cc 100644 --- a/engine/core/inc/streaming.h +++ b/engine/core/inc/streaming.h @@ -15,6 +15,7 @@ ******************************************************************************/ #ifndef STREAMING_H #define STREAMING_H +#include "service_structs.h" #include /******************************************************************************* @@ -35,13 +36,13 @@ typedef struct /******************************************************************************* * Function ******************************************************************************/ -streaming_channel_t Stream_CreateStreamingChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size); -void Stream_ResetStreamingChannel(streaming_channel_t *stream); -uint16_t Stream_PutSample(streaming_channel_t *stream, const void *data, uint16_t size); -uint16_t Stream_GetSample(streaming_channel_t *stream, void *data, uint16_t size); -uint16_t Stream_GetAvailableSampleNB(streaming_channel_t *stream); -uint16_t Stream_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream); -uint16_t Stream_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size); -uint16_t Stream_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size); +streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size); +void Streaming_ResetChannel(streaming_channel_t *stream); +uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size); +uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size); +uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream); +uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream); +uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size); +uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size); #endif /* LUOS_H */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 3a91ec320..05c02cb96 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -843,107 +843,6 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) } return 0; } -/****************************************************************************** - * @brief Send datas of a streaming channel - * @param Service : Who send - * @param msg : Message to send - * @param stram: Streaming channel pointer - * @return None - ******************************************************************************/ -void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream) -{ - // Compute number of message needed to send available datas on ring buffer - Luos_SendStreamingSize(service, msg, stream, Stream_GetAvailableSampleNB(stream)); -} -/****************************************************************************** - * @brief Send a number of datas of a streaming channel - * @param service : Who send - * @param msg : Message to send - * @param stream : Streaming channel pointer - * @param max_size : Maximum sample to send - * @return None - ******************************************************************************/ -void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size) -{ - // Compute number of message needed to send available datas on ring buffer - int msg_number = 1; - int data_size = Stream_GetAvailableSampleNB(stream); - if (data_size > max_size) - { - data_size = max_size; - } - const int max_data_msg_size = (MAX_DATA_MSG_SIZE / stream->data_size); - if (data_size > max_data_msg_size) - { - msg_number = (data_size / max_data_msg_size); - msg_number += ((msg_number * max_data_msg_size) < data_size); - } - - // Send messages one by one - for (volatile uint16_t chunk = 0; chunk < msg_number; chunk++) - { - // compute chunk size - uint16_t chunk_size = 0; - if (data_size > max_data_msg_size) - { - chunk_size = max_data_msg_size; - } - else - { - chunk_size = data_size; - } - - // Copy data into message - Stream_GetSample(stream, msg->data, chunk_size); - msg->header.size = data_size; - - // Send message - uint32_t tickstart = Luos_GetSystick(); - while (Luos_SendMsg(service, msg) == FAILED) - { - // No more memory space available - // 500ms of timeout after start trying to load our data in memory. Perhaps the buffer is full of RX messages try to increate the buffer size. - LUOS_ASSERT(((volatile uint32_t)Luos_GetSystick() - tickstart) < 500); - } - - // check end of data - if (data_size > max_data_msg_size) - { - data_size -= max_data_msg_size; - } - else - { - data_size = 0; - } - } -} -/****************************************************************************** - * @brief Receive a streaming channel datas - * @param service : Who send - * @param msg : Message to send - * @param stream : Streaming channel pointer - * @return error - ******************************************************************************/ -error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream) -{ - // Get chunk size - unsigned short chunk_size = 0; - if (msg->header.size > MAX_DATA_MSG_SIZE) - chunk_size = MAX_DATA_MSG_SIZE; - else - chunk_size = msg->header.size; - - // Copy data into buffer - Stream_PutSample(stream, msg->data, (chunk_size / stream->data_size)); - - // Check end of data - if ((msg->header.size <= MAX_DATA_MSG_SIZE)) - { - // Chunk collection finished - return SUCCEED; - } - return FAILED; -} /****************************************************************************** * @brief Store alias name service in flash * @param service : Service to store diff --git a/engine/core/src/streaming.c b/engine/core/src/streaming.c index 3bf037b75..ef7eeaa9d 100644 --- a/engine/core/src/streaming.c +++ b/engine/core/src/streaming.c @@ -5,6 +5,7 @@ * @version 0.0.0 ******************************************************************************/ #include +#include "luos_engine.h" #include "streaming.h" #include "luos_utils.h" /******************************************************************************* @@ -26,7 +27,7 @@ * @param data_size : Values size. * @return Streaming channel ******************************************************************************/ -streaming_channel_t Stream_CreateStreamingChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size) +streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size) { streaming_channel_t stream; LUOS_ASSERT((ring_buffer != NULL) || (ring_buffer_size > 0) || (data_size > 0)); @@ -45,7 +46,7 @@ streaming_channel_t Stream_CreateStreamingChannel(const void *ring_buffer, uint1 * @param stream : Streaming channel pointer * @return None ******************************************************************************/ -void Stream_ResetStreamingChannel(streaming_channel_t *stream) +void Streaming_ResetChannel(streaming_channel_t *stream) { stream->data_ptr = stream->ring_buffer; stream->sample_ptr = stream->ring_buffer; @@ -57,10 +58,10 @@ void Stream_ResetStreamingChannel(streaming_channel_t *stream) * @param size : The number of data to copy * @return Number of samples to put in buffer ******************************************************************************/ -uint16_t Stream_PutSample(streaming_channel_t *stream, const void *data, uint16_t size) +uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size) { // check if we exceed ring buffer capacity - LUOS_ASSERT((Stream_GetAvailableSampleNB(stream) + size) <= (stream->end_ring_buffer - stream->ring_buffer)); + LUOS_ASSERT((Streaming_GetAvailableSampleNB(stream) + size) <= (stream->end_ring_buffer - stream->ring_buffer)); if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) { // our data exceeds ring buffer end, cut it and copy. @@ -79,7 +80,7 @@ uint16_t Stream_PutSample(streaming_channel_t *stream, const void *data, uint16_ // Set the new data pointer stream->data_ptr = stream->data_ptr + (size * stream->data_size); } - return Stream_GetAvailableSampleNB(stream); + return Streaming_GetAvailableSampleNB(stream); } /****************************************************************************** * @brief Copy a sample from ring buffer to a data. @@ -88,9 +89,9 @@ uint16_t Stream_PutSample(streaming_channel_t *stream, const void *data, uint16_ * @param size : data size * @return None ******************************************************************************/ -uint16_t Stream_GetSample(streaming_channel_t *stream, void *data, uint16_t size) +uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size) { - uint16_t nb_available_samples = Stream_GetAvailableSampleNB(stream); + uint16_t nb_available_samples = Streaming_GetAvailableSampleNB(stream); if (nb_available_samples >= size) { // check if we need to loop in ring buffer @@ -125,7 +126,7 @@ uint16_t Stream_GetSample(streaming_channel_t *stream, void *data, uint16_t size * @param stream : Streaming channel pointer * @return Number of availabled samples ******************************************************************************/ -uint16_t Stream_GetAvailableSampleNB(streaming_channel_t *stream) +uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) { int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; if (nb_available_sample < 0) @@ -141,7 +142,7 @@ uint16_t Stream_GetAvailableSampleNB(streaming_channel_t *stream) * @param stream : Streaming channel pointer * @return Number of available samples ******************************************************************************/ -uint16_t Stream_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) +uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) { int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; if (nb_available_sample < 0) @@ -158,9 +159,9 @@ uint16_t Stream_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) * @param size : The number of data to copy * @return Number of samples to add to channel ******************************************************************************/ -uint16_t Stream_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) +uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) { - LUOS_ASSERT((uint32_t)(Stream_GetAvailableSampleNB(stream) + size) < (uint32_t)(stream->end_ring_buffer - stream->ring_buffer)); + LUOS_ASSERT((uint32_t)(Streaming_GetAvailableSampleNB(stream) + size) < (uint32_t)(stream->end_ring_buffer - stream->ring_buffer)); if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) { uint16_t chunk1 = stream->end_ring_buffer - stream->data_ptr; @@ -171,7 +172,7 @@ uint16_t Stream_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) { stream->data_ptr = stream->data_ptr + (size * stream->data_size); } - return Stream_GetAvailableSampleNB(stream); + return Streaming_GetAvailableSampleNB(stream); } /****************************************************************************** * @brief Remove a specific number of samples in buffer @@ -179,9 +180,9 @@ uint16_t Stream_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) * @param size : The number of data to remove * @return Number of availabled samples ******************************************************************************/ -uint16_t Stream_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size) +uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size) { - LUOS_ASSERT(Stream_GetAvailableSampleNB(stream) >= size); + LUOS_ASSERT(Streaming_GetAvailableSampleNB(stream) >= size); // Check if we exceed ring buffer capacity if (((size * stream->data_size) + stream->sample_ptr) > stream->end_ring_buffer) { @@ -199,5 +200,107 @@ uint16_t Stream_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size) stream->sample_ptr = stream->ring_buffer; } } - return Stream_GetAvailableSampleNB(stream); + return Streaming_GetAvailableSampleNB(stream); } + +/****************************************************************************** + * @brief Send datas of a streaming channel + * @param Service : Who send + * @param msg : Message to send + * @param stram: Streaming channel pointer + * @return None + ******************************************************************************/ +void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream) +{ + // Compute number of message needed to send available datas on ring buffer + Luos_SendStreamingSize(service, msg, stream, Streaming_GetAvailableSampleNB(stream)); +} +/****************************************************************************** + * @brief Send a number of datas of a streaming channel + * @param service : Who send + * @param msg : Message to send + * @param stream : Streaming channel pointer + * @param max_size : Maximum sample to send + * @return None + ******************************************************************************/ +void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size) +{ + // Compute number of message needed to send available datas on ring buffer + int msg_number = 1; + int data_size = Streaming_GetAvailableSampleNB(stream); + if (data_size > max_size) + { + data_size = max_size; + } + const int max_data_msg_size = (MAX_DATA_MSG_SIZE / stream->data_size); + if (data_size > max_data_msg_size) + { + msg_number = (data_size / max_data_msg_size); + msg_number += ((msg_number * max_data_msg_size) < data_size); + } + + // Send messages one by one + for (volatile uint16_t chunk = 0; chunk < msg_number; chunk++) + { + // compute chunk size + uint16_t chunk_size = 0; + if (data_size > max_data_msg_size) + { + chunk_size = max_data_msg_size; + } + else + { + chunk_size = data_size; + } + + // Copy data into message + Streaming_GetSample(stream, msg->data, chunk_size); + msg->header.size = data_size; + + // Send message + uint32_t tickstart = Luos_GetSystick(); + while (Luos_SendMsg(service, msg) == FAILED) + { + // No more memory space available + // 500ms of timeout after start trying to load our data in memory. Perhaps the buffer is full of RX messages try to increate the buffer size. + LUOS_ASSERT(((volatile uint32_t)Luos_GetSystick() - tickstart) < 500); + } + + // check end of data + if (data_size > max_data_msg_size) + { + data_size -= max_data_msg_size; + } + else + { + data_size = 0; + } + } +} +/****************************************************************************** + * @brief Receive a streaming channel datas + * @param service : Who send + * @param msg : Message to send + * @param stream : Streaming channel pointer + * @return error + ******************************************************************************/ +error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream) +{ + // Get chunk size + unsigned short chunk_size = 0; + if (msg->header.size > MAX_DATA_MSG_SIZE) + chunk_size = MAX_DATA_MSG_SIZE; + else + chunk_size = msg->header.size; + + // Copy data into buffer + Streaming_PutSample(stream, msg->data, (chunk_size / stream->data_size)); + + // Check end of data + if ((msg->header.size <= MAX_DATA_MSG_SIZE)) + { + // Chunk collection finished + return SUCCEED; + } + return FAILED; +} \ No newline at end of file diff --git a/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp b/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp index ec9930066..6591e809e 100644 --- a/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp +++ b/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp @@ -114,8 +114,8 @@ void Motor_Init(void) // Streaming control channels servo_motor.control.unmap = 0; // PLAY and no REC servo_motor.sampling_period = TimeOD_TimeFrom_ms(SAMPLING_PERIOD_MS); - servo_motor.trajectory = Stream_CreateStreamingChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); - servo_motor.measurement = Stream_CreateStreamingChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.trajectory = Streaming_CreateChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.measurement = Streaming_CreateChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); // initialize tick variable tickstart = millis(); @@ -267,26 +267,26 @@ void Motor_TrajectoryCallback(void) if (servo_motor.control.rec && ((Luos_GetSystick() - last_rec_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period))) { // We have to save a sample of current position - Stream_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); + Streaming_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); last_rec_systick = Luos_GetSystick(); } // ****** trajectory management ********* static uint32_t last_systick = 0; if (servo_motor.control.flux == STOP) { - Stream_ResetStreamingChannel(&servo_motor.trajectory); + Streaming_ResetChannel(&servo_motor.trajectory); } - if ((Stream_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) + if ((Streaming_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) { if (servo_motor.mode.mode_linear_position == 1) { linear_position_t linear_position_tmp; - Stream_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); + Streaming_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); servo_motor.target_angular_position = AngularOD_PositionFrom_deg(LinearOD_PositionTo_m(linear_position_tmp) * 360.0 / (3.141592653589793 * LinearOD_PositionTo_m(servo_motor.wheel_diameter))); } else { - Stream_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); + Streaming_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); } last_systick = Luos_GetSystick(); } diff --git a/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp b/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp index 256ef66e5..a809743a5 100644 --- a/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp +++ b/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp @@ -104,8 +104,8 @@ void Motor_Init(void) // Streaming control channels servo_motor.control.unmap = 0; // PLAY and no REC servo_motor.sampling_period = TimeOD_TimeFrom_ms(SAMPLING_PERIOD_MS); - servo_motor.trajectory = Stream_CreateStreamingChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); - servo_motor.measurement = Stream_CreateStreamingChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.trajectory = Streaming_CreateChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.measurement = Streaming_CreateChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); // simple foc pwm driver initialization driver.pwm_frequency = NOT_SET; @@ -231,26 +231,26 @@ void Motor_TrajectoryCallback(void) if (servo_motor.control.rec && ((Luos_GetSystick() - last_rec_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period))) { // We have to save a sample of current position - Stream_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); + Streaming_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); last_rec_systick = Luos_GetSystick(); } // ****** trajectory management ********* static uint32_t last_systick = 0; if (servo_motor.control.flux == STOP) { - Stream_ResetStreamingChannel(&servo_motor.trajectory); + Streaming_ResetChannel(&servo_motor.trajectory); } - if ((Stream_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) + if ((Streaming_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) { if (servo_motor.mode.mode_linear_position == 1) { linear_position_t linear_position_tmp; - Stream_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); + Streaming_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); servo_motor.target_angular_position = AngularOD_PositionFrom_deg(LinearOD_PositionTo_m(linear_position_tmp) * 360.0 / (3.141592653589793 * LinearOD_PositionTo_m(servo_motor.wheel_diameter))); } else { - Stream_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); + Streaming_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); } last_systick = Luos_GetSystick(); } diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map index c9eca9790..e31b62a1e 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map @@ -587,7 +587,7 @@ Discarded input sections .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_ServicesClear 0x00000000 0x14 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_ReceiveStreaming + .text.Streaming_Receive 0x00000000 0x3c build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_SendBaudrate 0x00000000 0x5a build/luos_bootloader/production/_ext/1555399743/luos_engine.o @@ -601,9 +601,9 @@ Discarded input sections 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_Flush 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SendStreamingSize + .text.Streaming_SendSize 0x00000000 0xb8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SendStreaming + .text.Streaming_Send 0x00000000 0x1c build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_ReadMsg 0x00000000 0x44 build/luos_bootloader/production/_ext/1555399743/luos_engine.o @@ -689,21 +689,21 @@ Discarded input sections .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_CreateStreamingChannel + .text.Streaming_CreateChannel 0x00000000 0x38 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_ResetStreamingChannel + .text.Streaming_ResetChannel 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_GetAvailableSampleNB + .text.Streaming_GetAvailableSampleNB 0x00000000 0x48 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_PutSample + .text.Streaming_PutSample 0x00000000 0x8c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_GetSample + .text.Streaming_GetSample 0x00000000 0x70 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_GetAvailableSampleNBUntilEndBuffer + .text.Streaming_GetAvailableSampleNBUntilEndBuffer 0x00000000 0x3c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_AddAvailableSampleNB + .text.Streaming_AddAvailableSampleNB 0x00000000 0x4c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Stream_RmvAvailableSampleNB + .text.Streaming_RmvAvailableSampleNB 0x00000000 0x34 build/luos_bootloader/production/_ext/1555399743/streaming.o .rodata 0x00000000 0x30 build/luos_bootloader/production/_ext/1555399743/streaming.o .debug_info 0x00000000 0x15eb build/luos_bootloader/production/_ext/1555399743/streaming.o diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c index 35005185d..30667ecba 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c @@ -106,8 +106,8 @@ void ControllerMotor_Init(void) servo_motor.control.unmap = 0; // PLAY and no REC // Init streaming channels - servo_motor.trajectory = Stream_CreateStreamingChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); - servo_motor.measurement = Stream_CreateStreamingChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.trajectory = Streaming_CreateChannel((float *)trajectory_buf, BUFFER_SIZE, sizeof(float)); + servo_motor.measurement = Streaming_CreateChannel((float *)measurement_buf, BUFFER_SIZE, sizeof(float)); last_position = AngularOD_PositionFrom_deg(0.0); @@ -312,26 +312,26 @@ void HAL_SYSTICK_Motor_Callback(void) if (servo_motor.control.rec && ((Luos_GetSystick() - last_rec_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period))) { // We have to save a sample of current position - Stream_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); + Streaming_PutSample(&servo_motor.measurement, (angular_position_t *)&servo_motor.angular_position, 1); last_rec_systick = Luos_GetSystick(); } // ****** trajectory management ********* static uint32_t last_systick = 0; if (servo_motor.control.flux == STOP) { - Stream_ResetStreamingChannel(&servo_motor.trajectory); + Streaming_ResetChannel(&servo_motor.trajectory); } - if ((Stream_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) + if ((Streaming_GetAvailableSampleNB(&servo_motor.trajectory) > 0) && ((Luos_GetSystick() - last_systick) >= TimeOD_TimeTo_ms(servo_motor.sampling_period)) && (servo_motor.control.flux == PLAY)) { if (servo_motor.mode.mode_linear_position == 1) { linear_position_t linear_position_tmp; - Stream_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); + Streaming_GetSample(&servo_motor.trajectory, &linear_position_tmp, 1); servo_motor.target_angular_position = AngularOD_PositionFrom_deg((LinearOD_PositionTo_m(linear_position_tmp) * 360.0) / (3.141592653589793 * LinearOD_PositionTo_m(servo_motor.wheel_diameter))); } else { - Stream_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); + Streaming_GetSample(&servo_motor.trajectory, (angular_position_t *)&servo_motor.target_angular_position, 1); } last_systick = Luos_GetSystick(); } diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 4cbf98a2a..16a8952dc 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -96,19 +96,19 @@ void Dxl_Loop(void) // ****** trajectory management ********* if (dxl[index].dxl_motor.control.flux == STOP) { - Stream_ResetStreamingChannel(&dxl[index].dxl_motor.trajectory); + Streaming_ResetChannel(&dxl[index].dxl_motor.trajectory); } - if ((Stream_GetAvailableSampleNB(&dxl[index].dxl_motor.trajectory) > 0) && ((Luos_GetSystick() - last_sample[index]) >= TimeOD_TimeTo_ms(dxl[index].dxl_motor.sampling_period)) && (dxl[index].dxl_motor.control.flux == PLAY)) + if ((Streaming_GetAvailableSampleNB(&dxl[index].dxl_motor.trajectory) > 0) && ((Luos_GetSystick() - last_sample[index]) >= TimeOD_TimeTo_ms(dxl[index].dxl_motor.sampling_period)) && (dxl[index].dxl_motor.control.flux == PLAY)) { if (dxl[index].dxl_motor.mode.mode_linear_position == 1) { linear_position_t linear_position_tmp; - Stream_GetSample(&dxl[index].dxl_motor.trajectory, &linear_position_tmp, 1); + Streaming_GetSample(&dxl[index].dxl_motor.trajectory, &linear_position_tmp, 1); dxl[index].dxl_motor.target_angular_position = AngularOD_PositionFrom_deg((LinearOD_PositionTo_m(linear_position_tmp) * 360.0) / (3.141592653589793 * LinearOD_PositionTo_m(dxl[index].dxl_motor.wheel_diameter))); } else { - Stream_GetSample(&dxl[index].dxl_motor.trajectory, (angular_position_t *)&dxl[index].dxl_motor.target_angular_position, 1); + Streaming_GetSample(&dxl[index].dxl_motor.trajectory, (angular_position_t *)&dxl[index].dxl_motor.target_angular_position, 1); } last_sample[index] = Luos_GetSystick(); @@ -475,8 +475,8 @@ static void discover_dxl(void) uint32_t nb_samples_in_frame = ceil(BUFFER_SIZE / dxl_index); for (int i = 0; i < dxl_index; i++) { - dxl[i].dxl_motor.trajectory = Stream_CreateStreamingChannel((float *)&trajectory_buf[nb_samples_in_frame * i], nb_samples_in_frame, sizeof(float)); - dxl[i].dxl_motor.measurement = Stream_CreateStreamingChannel((float *)&measurement_buf[nb_samples_in_frame * i], nb_samples_in_frame, sizeof(float)); + dxl[i].dxl_motor.trajectory = Streaming_CreateChannel((float *)&trajectory_buf[nb_samples_in_frame * i], nb_samples_in_frame, sizeof(float)); + dxl[i].dxl_motor.measurement = Streaming_CreateChannel((float *)&measurement_buf[nb_samples_in_frame * i], nb_samples_in_frame, sizeof(float)); } HAL_NVIC_DisableIRQ(USART3_4_IRQn); diff --git a/examples/projects/l0/imu/lib/Imu/motion_driver_6.12/core/driver/eMPL/dmpKey.h b/examples/projects/l0/imu/lib/Imu/motion_driver_6.12/core/driver/eMPL/dmpKey.h index c8f62a2af..baad4ffaf 100644 --- a/examples/projects/l0/imu/lib/Imu/motion_driver_6.12/core/driver/eMPL/dmpKey.h +++ b/examples/projects/l0/imu/lib/Imu/motion_driver_6.12/core/driver/eMPL/dmpKey.h @@ -6,285 +6,286 @@ #ifndef DMPKEY_H__ #define DMPKEY_H__ -#define KEY_CFG_25 (0) -#define KEY_CFG_24 (KEY_CFG_25 + 1) -#define KEY_CFG_26 (KEY_CFG_24 + 1) -#define KEY_CFG_27 (KEY_CFG_26 + 1) -#define KEY_CFG_21 (KEY_CFG_27 + 1) -#define KEY_CFG_20 (KEY_CFG_21 + 1) -#define KEY_CFG_TAP4 (KEY_CFG_20 + 1) -#define KEY_CFG_TAP5 (KEY_CFG_TAP4 + 1) -#define KEY_CFG_TAP6 (KEY_CFG_TAP5 + 1) -#define KEY_CFG_TAP7 (KEY_CFG_TAP6 + 1) -#define KEY_CFG_TAP0 (KEY_CFG_TAP7 + 1) -#define KEY_CFG_TAP1 (KEY_CFG_TAP0 + 1) -#define KEY_CFG_TAP2 (KEY_CFG_TAP1 + 1) -#define KEY_CFG_TAP3 (KEY_CFG_TAP2 + 1) -#define KEY_CFG_TAP_QUANTIZE (KEY_CFG_TAP3 + 1) -#define KEY_CFG_TAP_JERK (KEY_CFG_TAP_QUANTIZE + 1) -#define KEY_CFG_DR_INT (KEY_CFG_TAP_JERK + 1) -#define KEY_CFG_AUTH (KEY_CFG_DR_INT + 1) -#define KEY_CFG_TAP_SAVE_ACCB (KEY_CFG_AUTH + 1) -#define KEY_CFG_TAP_CLEAR_STICKY (KEY_CFG_TAP_SAVE_ACCB + 1) -#define KEY_CFG_FIFO_ON_EVENT (KEY_CFG_TAP_CLEAR_STICKY + 1) -#define KEY_FCFG_ACCEL_INPUT (KEY_CFG_FIFO_ON_EVENT + 1) -#define KEY_FCFG_ACCEL_INIT (KEY_FCFG_ACCEL_INPUT + 1) -#define KEY_CFG_23 (KEY_FCFG_ACCEL_INIT + 1) -#define KEY_FCFG_1 (KEY_CFG_23 + 1) -#define KEY_FCFG_3 (KEY_FCFG_1 + 1) -#define KEY_FCFG_2 (KEY_FCFG_3 + 1) -#define KEY_CFG_3D (KEY_FCFG_2 + 1) -#define KEY_CFG_3B (KEY_CFG_3D + 1) -#define KEY_CFG_3C (KEY_CFG_3B + 1) -#define KEY_FCFG_5 (KEY_CFG_3C + 1) -#define KEY_FCFG_4 (KEY_FCFG_5 + 1) -#define KEY_FCFG_7 (KEY_FCFG_4 + 1) -#define KEY_FCFG_FSCALE (KEY_FCFG_7 + 1) -#define KEY_FCFG_AZ (KEY_FCFG_FSCALE + 1) -#define KEY_FCFG_6 (KEY_FCFG_AZ + 1) -#define KEY_FCFG_LSB4 (KEY_FCFG_6 + 1) -#define KEY_CFG_12 (KEY_FCFG_LSB4 + 1) -#define KEY_CFG_14 (KEY_CFG_12 + 1) -#define KEY_CFG_15 (KEY_CFG_14 + 1) -#define KEY_CFG_16 (KEY_CFG_15 + 1) -#define KEY_CFG_18 (KEY_CFG_16 + 1) -#define KEY_CFG_6 (KEY_CFG_18 + 1) -#define KEY_CFG_7 (KEY_CFG_6 + 1) -#define KEY_CFG_4 (KEY_CFG_7 + 1) -#define KEY_CFG_5 (KEY_CFG_4 + 1) -#define KEY_CFG_2 (KEY_CFG_5 + 1) -#define KEY_CFG_3 (KEY_CFG_2 + 1) -#define KEY_CFG_1 (KEY_CFG_3 + 1) -#define KEY_CFG_EXTERNAL (KEY_CFG_1 + 1) -#define KEY_CFG_8 (KEY_CFG_EXTERNAL + 1) -#define KEY_CFG_9 (KEY_CFG_8 + 1) -#define KEY_CFG_ORIENT_3 (KEY_CFG_9 + 1) -#define KEY_CFG_ORIENT_2 (KEY_CFG_ORIENT_3 + 1) -#define KEY_CFG_ORIENT_1 (KEY_CFG_ORIENT_2 + 1) -#define KEY_CFG_GYRO_SOURCE (KEY_CFG_ORIENT_1 + 1) -#define KEY_CFG_ORIENT_IRQ_1 (KEY_CFG_GYRO_SOURCE + 1) -#define KEY_CFG_ORIENT_IRQ_2 (KEY_CFG_ORIENT_IRQ_1 + 1) -#define KEY_CFG_ORIENT_IRQ_3 (KEY_CFG_ORIENT_IRQ_2 + 1) -#define KEY_FCFG_MAG_VAL (KEY_CFG_ORIENT_IRQ_3 + 1) -#define KEY_FCFG_MAG_MOV (KEY_FCFG_MAG_VAL + 1) -#define KEY_CFG_LP_QUAT (KEY_FCFG_MAG_MOV + 1) +#define KEY_CFG_25 (0) +#define KEY_CFG_24 (KEY_CFG_25 + 1) +#define KEY_CFG_26 (KEY_CFG_24 + 1) +#define KEY_CFG_27 (KEY_CFG_26 + 1) +#define KEY_CFG_21 (KEY_CFG_27 + 1) +#define KEY_CFG_20 (KEY_CFG_21 + 1) +#define KEY_CFG_TAP4 (KEY_CFG_20 + 1) +#define KEY_CFG_TAP5 (KEY_CFG_TAP4 + 1) +#define KEY_CFG_TAP6 (KEY_CFG_TAP5 + 1) +#define KEY_CFG_TAP7 (KEY_CFG_TAP6 + 1) +#define KEY_CFG_TAP0 (KEY_CFG_TAP7 + 1) +#define KEY_CFG_TAP1 (KEY_CFG_TAP0 + 1) +#define KEY_CFG_TAP2 (KEY_CFG_TAP1 + 1) +#define KEY_CFG_TAP3 (KEY_CFG_TAP2 + 1) +#define KEY_CFG_TAP_QUANTIZE (KEY_CFG_TAP3 + 1) +#define KEY_CFG_TAP_JERK (KEY_CFG_TAP_QUANTIZE + 1) +#define KEY_CFG_DR_INT (KEY_CFG_TAP_JERK + 1) +#define KEY_CFG_AUTH (KEY_CFG_DR_INT + 1) +#define KEY_CFG_TAP_SAVE_ACCB (KEY_CFG_AUTH + 1) +#define KEY_CFG_TAP_CLEAR_STICKY (KEY_CFG_TAP_SAVE_ACCB + 1) +#define KEY_CFG_FIFO_ON_EVENT (KEY_CFG_TAP_CLEAR_STICKY + 1) +#define KEY_FCFG_ACCEL_INPUT (KEY_CFG_FIFO_ON_EVENT + 1) +#define KEY_FCFG_ACCEL_INIT (KEY_FCFG_ACCEL_INPUT + 1) +#define KEY_CFG_23 (KEY_FCFG_ACCEL_INIT + 1) +#define KEY_FCFG_1 (KEY_CFG_23 + 1) +#define KEY_FCFG_3 (KEY_FCFG_1 + 1) +#define KEY_FCFG_2 (KEY_FCFG_3 + 1) +#define KEY_CFG_3D (KEY_FCFG_2 + 1) +#define KEY_CFG_3B (KEY_CFG_3D + 1) +#define KEY_CFG_3C (KEY_CFG_3B + 1) +#define KEY_FCFG_5 (KEY_CFG_3C + 1) +#define KEY_FCFG_4 (KEY_FCFG_5 + 1) +#define KEY_FCFG_7 (KEY_FCFG_4 + 1) +#define KEY_FCFG_FSCALE (KEY_FCFG_7 + 1) +#define KEY_FCFG_AZ (KEY_FCFG_FSCALE + 1) +#define KEY_FCFG_6 (KEY_FCFG_AZ + 1) +#define KEY_FCFG_LSB4 (KEY_FCFG_6 + 1) +#define KEY_CFG_12 (KEY_FCFG_LSB4 + 1) +#define KEY_CFG_14 (KEY_CFG_12 + 1) +#define KEY_CFG_15 (KEY_CFG_14 + 1) +#define KEY_CFG_16 (KEY_CFG_15 + 1) +#define KEY_CFG_18 (KEY_CFG_16 + 1) +#define KEY_CFG_6 (KEY_CFG_18 + 1) +#define KEY_CFG_7 (KEY_CFG_6 + 1) +#define KEY_CFG_4 (KEY_CFG_7 + 1) +#define KEY_CFG_5 (KEY_CFG_4 + 1) +#define KEY_CFG_2 (KEY_CFG_5 + 1) +#define KEY_CFG_3 (KEY_CFG_2 + 1) +#define KEY_CFG_1 (KEY_CFG_3 + 1) +#define KEY_CFG_EXTERNAL (KEY_CFG_1 + 1) +#define KEY_CFG_8 (KEY_CFG_EXTERNAL + 1) +#define KEY_CFG_9 (KEY_CFG_8 + 1) +#define KEY_CFG_ORIENT_3 (KEY_CFG_9 + 1) +#define KEY_CFG_ORIENT_2 (KEY_CFG_ORIENT_3 + 1) +#define KEY_CFG_ORIENT_1 (KEY_CFG_ORIENT_2 + 1) +#define KEY_CFG_GYRO_SOURCE (KEY_CFG_ORIENT_1 + 1) +#define KEY_CFG_ORIENT_IRQ_1 (KEY_CFG_GYRO_SOURCE + 1) +#define KEY_CFG_ORIENT_IRQ_2 (KEY_CFG_ORIENT_IRQ_1 + 1) +#define KEY_CFG_ORIENT_IRQ_3 (KEY_CFG_ORIENT_IRQ_2 + 1) +#define KEY_FCFG_MAG_VAL (KEY_CFG_ORIENT_IRQ_3 + 1) +#define KEY_FCFG_MAG_MOV (KEY_FCFG_MAG_VAL + 1) +#define KEY_CFG_LP_QUAT (KEY_FCFG_MAG_MOV + 1) /* MPU6050 keys */ -#define KEY_CFG_ACCEL_FILTER (KEY_CFG_LP_QUAT + 1) -#define KEY_CFG_MOTION_BIAS (KEY_CFG_ACCEL_FILTER + 1) -#define KEY_TEMPLABEL (KEY_CFG_MOTION_BIAS + 1) - -#define KEY_D_0_22 (KEY_TEMPLABEL + 1) -#define KEY_D_0_24 (KEY_D_0_22 + 1) -#define KEY_D_0_36 (KEY_D_0_24 + 1) -#define KEY_D_0_52 (KEY_D_0_36 + 1) -#define KEY_D_0_96 (KEY_D_0_52 + 1) -#define KEY_D_0_104 (KEY_D_0_96 + 1) -#define KEY_D_0_108 (KEY_D_0_104 + 1) -#define KEY_D_0_163 (KEY_D_0_108 + 1) -#define KEY_D_0_188 (KEY_D_0_163 + 1) -#define KEY_D_0_192 (KEY_D_0_188 + 1) -#define KEY_D_0_224 (KEY_D_0_192 + 1) -#define KEY_D_0_228 (KEY_D_0_224 + 1) -#define KEY_D_0_232 (KEY_D_0_228 + 1) -#define KEY_D_0_236 (KEY_D_0_232 + 1) - -#define KEY_DMP_PREVPTAT (KEY_D_0_236 + 1) -#define KEY_D_1_2 (KEY_DMP_PREVPTAT + 1) -#define KEY_D_1_4 (KEY_D_1_2 + 1) -#define KEY_D_1_8 (KEY_D_1_4 + 1) -#define KEY_D_1_10 (KEY_D_1_8 + 1) -#define KEY_D_1_24 (KEY_D_1_10 + 1) -#define KEY_D_1_28 (KEY_D_1_24 + 1) -#define KEY_D_1_36 (KEY_D_1_28 + 1) -#define KEY_D_1_40 (KEY_D_1_36 + 1) -#define KEY_D_1_44 (KEY_D_1_40 + 1) -#define KEY_D_1_72 (KEY_D_1_44 + 1) -#define KEY_D_1_74 (KEY_D_1_72 + 1) -#define KEY_D_1_79 (KEY_D_1_74 + 1) -#define KEY_D_1_88 (KEY_D_1_79 + 1) -#define KEY_D_1_90 (KEY_D_1_88 + 1) -#define KEY_D_1_92 (KEY_D_1_90 + 1) -#define KEY_D_1_96 (KEY_D_1_92 + 1) -#define KEY_D_1_98 (KEY_D_1_96 + 1) -#define KEY_D_1_100 (KEY_D_1_98 + 1) -#define KEY_D_1_106 (KEY_D_1_100 + 1) -#define KEY_D_1_108 (KEY_D_1_106 + 1) -#define KEY_D_1_112 (KEY_D_1_108 + 1) -#define KEY_D_1_128 (KEY_D_1_112 + 1) -#define KEY_D_1_152 (KEY_D_1_128 + 1) -#define KEY_D_1_160 (KEY_D_1_152 + 1) -#define KEY_D_1_168 (KEY_D_1_160 + 1) -#define KEY_D_1_175 (KEY_D_1_168 + 1) -#define KEY_D_1_176 (KEY_D_1_175 + 1) -#define KEY_D_1_178 (KEY_D_1_176 + 1) -#define KEY_D_1_179 (KEY_D_1_178 + 1) -#define KEY_D_1_218 (KEY_D_1_179 + 1) -#define KEY_D_1_232 (KEY_D_1_218 + 1) -#define KEY_D_1_236 (KEY_D_1_232 + 1) -#define KEY_D_1_240 (KEY_D_1_236 + 1) -#define KEY_D_1_244 (KEY_D_1_240 + 1) -#define KEY_D_1_250 (KEY_D_1_244 + 1) -#define KEY_D_1_252 (KEY_D_1_250 + 1) -#define KEY_D_2_12 (KEY_D_1_252 + 1) -#define KEY_D_2_96 (KEY_D_2_12 + 1) -#define KEY_D_2_108 (KEY_D_2_96 + 1) -#define KEY_D_2_208 (KEY_D_2_108 + 1) -#define KEY_FLICK_MSG (KEY_D_2_208 + 1) -#define KEY_FLICK_COUNTER (KEY_FLICK_MSG + 1) -#define KEY_FLICK_LOWER (KEY_FLICK_COUNTER + 1) -#define KEY_CFG_FLICK_IN (KEY_FLICK_LOWER + 1) -#define KEY_FLICK_UPPER (KEY_CFG_FLICK_IN + 1) -#define KEY_CGNOTICE_INTR (KEY_FLICK_UPPER + 1) -#define KEY_D_2_224 (KEY_CGNOTICE_INTR + 1) -#define KEY_D_2_244 (KEY_D_2_224 + 1) -#define KEY_D_2_248 (KEY_D_2_244 + 1) -#define KEY_D_2_252 (KEY_D_2_248 + 1) - -#define KEY_D_GYRO_BIAS_X (KEY_D_2_252 + 1) -#define KEY_D_GYRO_BIAS_Y (KEY_D_GYRO_BIAS_X + 1) -#define KEY_D_GYRO_BIAS_Z (KEY_D_GYRO_BIAS_Y + 1) -#define KEY_D_ACC_BIAS_X (KEY_D_GYRO_BIAS_Z + 1) -#define KEY_D_ACC_BIAS_Y (KEY_D_ACC_BIAS_X + 1) -#define KEY_D_ACC_BIAS_Z (KEY_D_ACC_BIAS_Y + 1) -#define KEY_D_GYRO_ENABLE (KEY_D_ACC_BIAS_Z + 1) -#define KEY_D_ACCEL_ENABLE (KEY_D_GYRO_ENABLE + 1) -#define KEY_D_QUAT_ENABLE (KEY_D_ACCEL_ENABLE +1) -#define KEY_D_OUTPUT_ENABLE (KEY_D_QUAT_ENABLE + 1) -#define KEY_D_CR_TIME_G (KEY_D_OUTPUT_ENABLE + 1) -#define KEY_D_CR_TIME_A (KEY_D_CR_TIME_G + 1) -#define KEY_D_CR_TIME_Q (KEY_D_CR_TIME_A + 1) -#define KEY_D_CS_TAX (KEY_D_CR_TIME_Q + 1) -#define KEY_D_CS_TAY (KEY_D_CS_TAX + 1) -#define KEY_D_CS_TAZ (KEY_D_CS_TAY + 1) -#define KEY_D_CS_TGX (KEY_D_CS_TAZ + 1) -#define KEY_D_CS_TGY (KEY_D_CS_TGX + 1) -#define KEY_D_CS_TGZ (KEY_D_CS_TGY + 1) -#define KEY_D_CS_TQ0 (KEY_D_CS_TGZ + 1) -#define KEY_D_CS_TQ1 (KEY_D_CS_TQ0 + 1) -#define KEY_D_CS_TQ2 (KEY_D_CS_TQ1 + 1) -#define KEY_D_CS_TQ3 (KEY_D_CS_TQ2 + 1) +#define KEY_CFG_ACCEL_FILTER (KEY_CFG_LP_QUAT + 1) +#define KEY_CFG_MOTION_BIAS (KEY_CFG_ACCEL_FILTER + 1) +#define KEY_TEMPLABEL (KEY_CFG_MOTION_BIAS + 1) + +#define KEY_D_0_22 (KEY_TEMPLABEL + 1) +#define KEY_D_0_24 (KEY_D_0_22 + 1) +#define KEY_D_0_36 (KEY_D_0_24 + 1) +#define KEY_D_0_52 (KEY_D_0_36 + 1) +#define KEY_D_0_96 (KEY_D_0_52 + 1) +#define KEY_D_0_104 (KEY_D_0_96 + 1) +#define KEY_D_0_108 (KEY_D_0_104 + 1) +#define KEY_D_0_163 (KEY_D_0_108 + 1) +#define KEY_D_0_188 (KEY_D_0_163 + 1) +#define KEY_D_0_192 (KEY_D_0_188 + 1) +#define KEY_D_0_224 (KEY_D_0_192 + 1) +#define KEY_D_0_228 (KEY_D_0_224 + 1) +#define KEY_D_0_232 (KEY_D_0_228 + 1) +#define KEY_D_0_236 (KEY_D_0_232 + 1) + +#define KEY_DMP_PREVPTAT (KEY_D_0_236 + 1) +#define KEY_D_1_2 (KEY_DMP_PREVPTAT + 1) +#define KEY_D_1_4 (KEY_D_1_2 + 1) +#define KEY_D_1_8 (KEY_D_1_4 + 1) +#define KEY_D_1_10 (KEY_D_1_8 + 1) +#define KEY_D_1_24 (KEY_D_1_10 + 1) +#define KEY_D_1_28 (KEY_D_1_24 + 1) +#define KEY_D_1_36 (KEY_D_1_28 + 1) +#define KEY_D_1_40 (KEY_D_1_36 + 1) +#define KEY_D_1_44 (KEY_D_1_40 + 1) +#define KEY_D_1_72 (KEY_D_1_44 + 1) +#define KEY_D_1_74 (KEY_D_1_72 + 1) +#define KEY_D_1_79 (KEY_D_1_74 + 1) +#define KEY_D_1_88 (KEY_D_1_79 + 1) +#define KEY_D_1_90 (KEY_D_1_88 + 1) +#define KEY_D_1_92 (KEY_D_1_90 + 1) +#define KEY_D_1_96 (KEY_D_1_92 + 1) +#define KEY_D_1_98 (KEY_D_1_96 + 1) +#define KEY_D_1_100 (KEY_D_1_98 + 1) +#define KEY_D_1_106 (KEY_D_1_100 + 1) +#define KEY_D_1_108 (KEY_D_1_106 + 1) +#define KEY_D_1_112 (KEY_D_1_108 + 1) +#define KEY_D_1_128 (KEY_D_1_112 + 1) +#define KEY_D_1_152 (KEY_D_1_128 + 1) +#define KEY_D_1_160 (KEY_D_1_152 + 1) +#define KEY_D_1_168 (KEY_D_1_160 + 1) +#define KEY_D_1_175 (KEY_D_1_168 + 1) +#define KEY_D_1_176 (KEY_D_1_175 + 1) +#define KEY_D_1_178 (KEY_D_1_176 + 1) +#define KEY_D_1_179 (KEY_D_1_178 + 1) +#define KEY_D_1_218 (KEY_D_1_179 + 1) +#define KEY_D_1_232 (KEY_D_1_218 + 1) +#define KEY_D_1_236 (KEY_D_1_232 + 1) +#define KEY_D_1_240 (KEY_D_1_236 + 1) +#define KEY_D_1_244 (KEY_D_1_240 + 1) +#define KEY_D_1_250 (KEY_D_1_244 + 1) +#define KEY_D_1_252 (KEY_D_1_250 + 1) +#define KEY_D_2_12 (KEY_D_1_252 + 1) +#define KEY_D_2_96 (KEY_D_2_12 + 1) +#define KEY_D_2_108 (KEY_D_2_96 + 1) +#define KEY_D_2_208 (KEY_D_2_108 + 1) +#define KEY_FLICK_MSG (KEY_D_2_208 + 1) +#define KEY_FLICK_COUNTER (KEY_FLICK_MSG + 1) +#define KEY_FLICK_LOWER (KEY_FLICK_COUNTER + 1) +#define KEY_CFG_FLICK_IN (KEY_FLICK_LOWER + 1) +#define KEY_FLICK_UPPER (KEY_CFG_FLICK_IN + 1) +#define KEY_CGNOTICE_INTR (KEY_FLICK_UPPER + 1) +#define KEY_D_2_224 (KEY_CGNOTICE_INTR + 1) +#define KEY_D_2_244 (KEY_D_2_224 + 1) +#define KEY_D_2_248 (KEY_D_2_244 + 1) +#define KEY_D_2_252 (KEY_D_2_248 + 1) + +#define KEY_D_GYRO_BIAS_X (KEY_D_2_252 + 1) +#define KEY_D_GYRO_BIAS_Y (KEY_D_GYRO_BIAS_X + 1) +#define KEY_D_GYRO_BIAS_Z (KEY_D_GYRO_BIAS_Y + 1) +#define KEY_D_ACC_BIAS_X (KEY_D_GYRO_BIAS_Z + 1) +#define KEY_D_ACC_BIAS_Y (KEY_D_ACC_BIAS_X + 1) +#define KEY_D_ACC_BIAS_Z (KEY_D_ACC_BIAS_Y + 1) +#define KEY_D_GYRO_ENABLE (KEY_D_ACC_BIAS_Z + 1) +#define KEY_D_ACCEL_ENABLE (KEY_D_GYRO_ENABLE + 1) +#define KEY_D_QUAT_ENABLE (KEY_D_ACCEL_ENABLE + 1) +#define KEY_D_OUTPUT_ENABLE (KEY_D_QUAT_ENABLE + 1) +#define KEY_D_CR_TIME_G (KEY_D_OUTPUT_ENABLE + 1) +#define KEY_D_CR_TIME_A (KEY_D_CR_TIME_G + 1) +#define KEY_D_CR_TIME_Q (KEY_D_CR_TIME_A + 1) +#define KEY_D_CS_TAX (KEY_D_CR_TIME_Q + 1) +#define KEY_D_CS_TAY (KEY_D_CS_TAX + 1) +#define KEY_D_CS_TAZ (KEY_D_CS_TAY + 1) +#define KEY_D_CS_TGX (KEY_D_CS_TAZ + 1) +#define KEY_D_CS_TGY (KEY_D_CS_TGX + 1) +#define KEY_D_CS_TGZ (KEY_D_CS_TGY + 1) +#define KEY_D_CS_TQ0 (KEY_D_CS_TGZ + 1) +#define KEY_D_CS_TQ1 (KEY_D_CS_TQ0 + 1) +#define KEY_D_CS_TQ2 (KEY_D_CS_TQ1 + 1) +#define KEY_D_CS_TQ3 (KEY_D_CS_TQ2 + 1) /* Compass keys */ -#define KEY_CPASS_BIAS_X (KEY_D_CS_TQ3 + 1) -#define KEY_CPASS_BIAS_Y (KEY_CPASS_BIAS_X + 1) -#define KEY_CPASS_BIAS_Z (KEY_CPASS_BIAS_Y + 1) -#define KEY_CPASS_MTX_00 (KEY_CPASS_BIAS_Z + 1) -#define KEY_CPASS_MTX_01 (KEY_CPASS_MTX_00 + 1) -#define KEY_CPASS_MTX_02 (KEY_CPASS_MTX_01 + 1) -#define KEY_CPASS_MTX_10 (KEY_CPASS_MTX_02 + 1) -#define KEY_CPASS_MTX_11 (KEY_CPASS_MTX_10 + 1) -#define KEY_CPASS_MTX_12 (KEY_CPASS_MTX_11 + 1) -#define KEY_CPASS_MTX_20 (KEY_CPASS_MTX_12 + 1) -#define KEY_CPASS_MTX_21 (KEY_CPASS_MTX_20 + 1) -#define KEY_CPASS_MTX_22 (KEY_CPASS_MTX_21 + 1) +#define KEY_CPASS_BIAS_X (KEY_D_CS_TQ3 + 1) +#define KEY_CPASS_BIAS_Y (KEY_CPASS_BIAS_X + 1) +#define KEY_CPASS_BIAS_Z (KEY_CPASS_BIAS_Y + 1) +#define KEY_CPASS_MTX_00 (KEY_CPASS_BIAS_Z + 1) +#define KEY_CPASS_MTX_01 (KEY_CPASS_MTX_00 + 1) +#define KEY_CPASS_MTX_02 (KEY_CPASS_MTX_01 + 1) +#define KEY_CPASS_MTX_10 (KEY_CPASS_MTX_02 + 1) +#define KEY_CPASS_MTX_11 (KEY_CPASS_MTX_10 + 1) +#define KEY_CPASS_MTX_12 (KEY_CPASS_MTX_11 + 1) +#define KEY_CPASS_MTX_20 (KEY_CPASS_MTX_12 + 1) +#define KEY_CPASS_MTX_21 (KEY_CPASS_MTX_20 + 1) +#define KEY_CPASS_MTX_22 (KEY_CPASS_MTX_21 + 1) /* Gesture Keys */ -#define KEY_DMP_TAPW_MIN (KEY_CPASS_MTX_22 + 1) -#define KEY_DMP_TAP_THR_X (KEY_DMP_TAPW_MIN + 1) -#define KEY_DMP_TAP_THR_Y (KEY_DMP_TAP_THR_X + 1) -#define KEY_DMP_TAP_THR_Z (KEY_DMP_TAP_THR_Y + 1) -#define KEY_DMP_SH_TH_Y (KEY_DMP_TAP_THR_Z + 1) -#define KEY_DMP_SH_TH_X (KEY_DMP_SH_TH_Y + 1) -#define KEY_DMP_SH_TH_Z (KEY_DMP_SH_TH_X + 1) -#define KEY_DMP_ORIENT (KEY_DMP_SH_TH_Z + 1) -#define KEY_D_ACT0 (KEY_DMP_ORIENT + 1) -#define KEY_D_ACSX (KEY_D_ACT0 + 1) -#define KEY_D_ACSY (KEY_D_ACSX + 1) -#define KEY_D_ACSZ (KEY_D_ACSY + 1) - -#define KEY_X_GRT_Y_TMP (KEY_D_ACSZ + 1) -#define KEY_SKIP_X_GRT_Y_TMP (KEY_X_GRT_Y_TMP + 1) -#define KEY_SKIP_END_COMPARE (KEY_SKIP_X_GRT_Y_TMP + 1) -#define KEY_END_COMPARE_Y_X_TMP2 (KEY_SKIP_END_COMPARE + 1) -#define KEY_CFG_ANDROID_ORIENT_INT (KEY_END_COMPARE_Y_X_TMP2 + 1) -#define KEY_NO_ORIENT_INTERRUPT (KEY_CFG_ANDROID_ORIENT_INT + 1) -#define KEY_END_COMPARE_Y_X_TMP (KEY_NO_ORIENT_INTERRUPT + 1) -#define KEY_END_ORIENT_1 (KEY_END_COMPARE_Y_X_TMP + 1) -#define KEY_END_COMPARE_Y_X (KEY_END_ORIENT_1 + 1) -#define KEY_END_ORIENT (KEY_END_COMPARE_Y_X + 1) -#define KEY_X_GRT_Y (KEY_END_ORIENT + 1) -#define KEY_NOT_TIME_MINUS_1 (KEY_X_GRT_Y + 1) -#define KEY_END_COMPARE_Y_X_TMP3 (KEY_NOT_TIME_MINUS_1 + 1) -#define KEY_X_GRT_Y_TMP2 (KEY_END_COMPARE_Y_X_TMP3 + 1) +#define KEY_DMP_TAPW_MIN (KEY_CPASS_MTX_22 + 1) +#define KEY_DMP_TAP_THR_X (KEY_DMP_TAPW_MIN + 1) +#define KEY_DMP_TAP_THR_Y (KEY_DMP_TAP_THR_X + 1) +#define KEY_DMP_TAP_THR_Z (KEY_DMP_TAP_THR_Y + 1) +#define KEY_DMP_SH_TH_Y (KEY_DMP_TAP_THR_Z + 1) +#define KEY_DMP_SH_TH_X (KEY_DMP_SH_TH_Y + 1) +#define KEY_DMP_SH_TH_Z (KEY_DMP_SH_TH_X + 1) +#define KEY_DMP_ORIENT (KEY_DMP_SH_TH_Z + 1) +#define KEY_D_ACT0 (KEY_DMP_ORIENT + 1) +#define KEY_D_ACSX (KEY_D_ACT0 + 1) +#define KEY_D_ACSY (KEY_D_ACSX + 1) +#define KEY_D_ACSZ (KEY_D_ACSY + 1) + +#define KEY_X_GRT_Y_TMP (KEY_D_ACSZ + 1) +#define KEY_SKIP_X_GRT_Y_TMP (KEY_X_GRT_Y_TMP + 1) +#define KEY_SKIP_END_COMPARE (KEY_SKIP_X_GRT_Y_TMP + 1) +#define KEY_END_COMPARE_Y_X_TMP2 (KEY_SKIP_END_COMPARE + 1) +#define KEY_CFG_ANDROID_ORIENT_INT (KEY_END_COMPARE_Y_X_TMP2 + 1) +#define KEY_NO_ORIENT_INTERRUPT (KEY_CFG_ANDROID_ORIENT_INT + 1) +#define KEY_END_COMPARE_Y_X_TMP (KEY_NO_ORIENT_INTERRUPT + 1) +#define KEY_END_ORIENT_1 (KEY_END_COMPARE_Y_X_TMP + 1) +#define KEY_END_COMPARE_Y_X (KEY_END_ORIENT_1 + 1) +#define KEY_END_ORIENT (KEY_END_COMPARE_Y_X + 1) +#define KEY_X_GRT_Y (KEY_END_ORIENT + 1) +#define KEY_NOT_TIME_MINUS_1 (KEY_X_GRT_Y + 1) +#define KEY_END_COMPARE_Y_X_TMP3 (KEY_NOT_TIME_MINUS_1 + 1) +#define KEY_X_GRT_Y_TMP2 (KEY_END_COMPARE_Y_X_TMP3 + 1) /* Authenticate Keys */ -#define KEY_D_AUTH_OUT (KEY_X_GRT_Y_TMP2 + 1) -#define KEY_D_AUTH_IN (KEY_D_AUTH_OUT + 1) -#define KEY_D_AUTH_A (KEY_D_AUTH_IN + 1) -#define KEY_D_AUTH_B (KEY_D_AUTH_A + 1) +#define KEY_D_AUTH_OUT (KEY_X_GRT_Y_TMP2 + 1) +#define KEY_D_AUTH_IN (KEY_D_AUTH_OUT + 1) +#define KEY_D_AUTH_A (KEY_D_AUTH_IN + 1) +#define KEY_D_AUTH_B (KEY_D_AUTH_A + 1) /* Pedometer standalone only keys */ -#define KEY_D_PEDSTD_BP_B (KEY_D_AUTH_B + 1) -#define KEY_D_PEDSTD_HP_A (KEY_D_PEDSTD_BP_B + 1) -#define KEY_D_PEDSTD_HP_B (KEY_D_PEDSTD_HP_A + 1) -#define KEY_D_PEDSTD_BP_A4 (KEY_D_PEDSTD_HP_B + 1) -#define KEY_D_PEDSTD_BP_A3 (KEY_D_PEDSTD_BP_A4 + 1) -#define KEY_D_PEDSTD_BP_A2 (KEY_D_PEDSTD_BP_A3 + 1) -#define KEY_D_PEDSTD_BP_A1 (KEY_D_PEDSTD_BP_A2 + 1) -#define KEY_D_PEDSTD_INT_THRSH (KEY_D_PEDSTD_BP_A1 + 1) -#define KEY_D_PEDSTD_CLIP (KEY_D_PEDSTD_INT_THRSH + 1) -#define KEY_D_PEDSTD_SB (KEY_D_PEDSTD_CLIP + 1) -#define KEY_D_PEDSTD_SB_TIME (KEY_D_PEDSTD_SB + 1) -#define KEY_D_PEDSTD_PEAKTHRSH (KEY_D_PEDSTD_SB_TIME + 1) -#define KEY_D_PEDSTD_TIML (KEY_D_PEDSTD_PEAKTHRSH + 1) -#define KEY_D_PEDSTD_TIMH (KEY_D_PEDSTD_TIML + 1) -#define KEY_D_PEDSTD_PEAK (KEY_D_PEDSTD_TIMH + 1) -#define KEY_D_PEDSTD_TIMECTR (KEY_D_PEDSTD_PEAK + 1) -#define KEY_D_PEDSTD_STEPCTR (KEY_D_PEDSTD_TIMECTR + 1) -#define KEY_D_PEDSTD_WALKTIME (KEY_D_PEDSTD_STEPCTR + 1) -#define KEY_D_PEDSTD_DECI (KEY_D_PEDSTD_WALKTIME + 1) +#define KEY_D_PEDSTD_BP_B (KEY_D_AUTH_B + 1) +#define KEY_D_PEDSTD_HP_A (KEY_D_PEDSTD_BP_B + 1) +#define KEY_D_PEDSTD_HP_B (KEY_D_PEDSTD_HP_A + 1) +#define KEY_D_PEDSTD_BP_A4 (KEY_D_PEDSTD_HP_B + 1) +#define KEY_D_PEDSTD_BP_A3 (KEY_D_PEDSTD_BP_A4 + 1) +#define KEY_D_PEDSTD_BP_A2 (KEY_D_PEDSTD_BP_A3 + 1) +#define KEY_D_PEDSTD_BP_A1 (KEY_D_PEDSTD_BP_A2 + 1) +#define KEY_D_PEDSTD_INT_THRSH (KEY_D_PEDSTD_BP_A1 + 1) +#define KEY_D_PEDSTD_CLIP (KEY_D_PEDSTD_INT_THRSH + 1) +#define KEY_D_PEDSTD_SB (KEY_D_PEDSTD_CLIP + 1) +#define KEY_D_PEDSTD_SB_TIME (KEY_D_PEDSTD_SB + 1) +#define KEY_D_PEDSTD_PEAKTHRSH (KEY_D_PEDSTD_SB_TIME + 1) +#define KEY_D_PEDSTD_TIML (KEY_D_PEDSTD_PEAKTHRSH + 1) +#define KEY_D_PEDSTD_TIMH (KEY_D_PEDSTD_TIML + 1) +#define KEY_D_PEDSTD_PEAK (KEY_D_PEDSTD_TIMH + 1) +#define KEY_D_PEDSTD_TIMECTR (KEY_D_PEDSTD_PEAK + 1) +#define KEY_D_PEDSTD_STEPCTR (KEY_D_PEDSTD_TIMECTR + 1) +#define KEY_D_PEDSTD_WALKTIME (KEY_D_PEDSTD_STEPCTR + 1) +#define KEY_D_PEDSTD_DECI (KEY_D_PEDSTD_WALKTIME + 1) /*Host Based No Motion*/ -#define KEY_D_HOST_NO_MOT (KEY_D_PEDSTD_DECI + 1) +#define KEY_D_HOST_NO_MOT (KEY_D_PEDSTD_DECI + 1) /* EIS keys */ -#define KEY_P_EIS_FIFO_FOOTER (KEY_D_HOST_NO_MOT + 1) -#define KEY_P_EIS_FIFO_YSHIFT (KEY_P_EIS_FIFO_FOOTER + 1) -#define KEY_P_EIS_DATA_RATE (KEY_P_EIS_FIFO_YSHIFT + 1) -#define KEY_P_EIS_FIFO_XSHIFT (KEY_P_EIS_DATA_RATE + 1) -#define KEY_P_EIS_FIFO_SYNC (KEY_P_EIS_FIFO_XSHIFT + 1) -#define KEY_P_EIS_FIFO_ZSHIFT (KEY_P_EIS_FIFO_SYNC + 1) -#define KEY_P_EIS_FIFO_READY (KEY_P_EIS_FIFO_ZSHIFT + 1) -#define KEY_DMP_FOOTER (KEY_P_EIS_FIFO_READY + 1) -#define KEY_DMP_INTX_HC (KEY_DMP_FOOTER + 1) -#define KEY_DMP_INTX_PH (KEY_DMP_INTX_HC + 1) -#define KEY_DMP_INTX_SH (KEY_DMP_INTX_PH + 1) -#define KEY_DMP_AINV_SH (KEY_DMP_INTX_SH + 1) -#define KEY_DMP_A_INV_XH (KEY_DMP_AINV_SH + 1) -#define KEY_DMP_AINV_PH (KEY_DMP_A_INV_XH + 1) -#define KEY_DMP_CTHX_H (KEY_DMP_AINV_PH + 1) -#define KEY_DMP_CTHY_H (KEY_DMP_CTHX_H + 1) -#define KEY_DMP_CTHZ_H (KEY_DMP_CTHY_H + 1) -#define KEY_DMP_NCTHX_H (KEY_DMP_CTHZ_H + 1) -#define KEY_DMP_NCTHY_H (KEY_DMP_NCTHX_H + 1) -#define KEY_DMP_NCTHZ_H (KEY_DMP_NCTHY_H + 1) -#define KEY_DMP_CTSQ_XH (KEY_DMP_NCTHZ_H + 1) -#define KEY_DMP_CTSQ_YH (KEY_DMP_CTSQ_XH + 1) -#define KEY_DMP_CTSQ_ZH (KEY_DMP_CTSQ_YH + 1) -#define KEY_DMP_INTX_H (KEY_DMP_CTSQ_ZH + 1) -#define KEY_DMP_INTY_H (KEY_DMP_INTX_H + 1) -#define KEY_DMP_INTZ_H (KEY_DMP_INTY_H + 1) -//#define KEY_DMP_HPX_H (KEY_DMP_INTZ_H + 1) -//#define KEY_DMP_HPY_H (KEY_DMP_HPX_H + 1) -//#define KEY_DMP_HPZ_H (KEY_DMP_HPY_H + 1) +#define KEY_P_EIS_FIFO_FOOTER (KEY_D_HOST_NO_MOT + 1) +#define KEY_P_EIS_FIFO_YSHIFT (KEY_P_EIS_FIFO_FOOTER + 1) +#define KEY_P_EIS_DATA_RATE (KEY_P_EIS_FIFO_YSHIFT + 1) +#define KEY_P_EIS_FIFO_XSHIFT (KEY_P_EIS_DATA_RATE + 1) +#define KEY_P_EIS_FIFO_SYNC (KEY_P_EIS_FIFO_XSHIFT + 1) +#define KEY_P_EIS_FIFO_ZSHIFT (KEY_P_EIS_FIFO_SYNC + 1) +#define KEY_P_EIS_FIFO_READY (KEY_P_EIS_FIFO_ZSHIFT + 1) +#define KEY_DMP_FOOTER (KEY_P_EIS_FIFO_READY + 1) +#define KEY_DMP_INTX_HC (KEY_DMP_FOOTER + 1) +#define KEY_DMP_INTX_PH (KEY_DMP_INTX_HC + 1) +#define KEY_DMP_INTX_SH (KEY_DMP_INTX_PH + 1) +#define KEY_DMP_AINV_SH (KEY_DMP_INTX_SH + 1) +#define KEY_DMP_A_INV_XH (KEY_DMP_AINV_SH + 1) +#define KEY_DMP_AINV_PH (KEY_DMP_A_INV_XH + 1) +#define KEY_DMP_CTHX_H (KEY_DMP_AINV_PH + 1) +#define KEY_DMP_CTHY_H (KEY_DMP_CTHX_H + 1) +#define KEY_DMP_CTHZ_H (KEY_DMP_CTHY_H + 1) +#define KEY_DMP_NCTHX_H (KEY_DMP_CTHZ_H + 1) +#define KEY_DMP_NCTHY_H (KEY_DMP_NCTHX_H + 1) +#define KEY_DMP_NCTHZ_H (KEY_DMP_NCTHY_H + 1) +#define KEY_DMP_CTSQ_XH (KEY_DMP_NCTHZ_H + 1) +#define KEY_DMP_CTSQ_YH (KEY_DMP_CTSQ_XH + 1) +#define KEY_DMP_CTSQ_ZH (KEY_DMP_CTSQ_YH + 1) +#define KEY_DMP_INTX_H (KEY_DMP_CTSQ_ZH + 1) +#define KEY_DMP_INTY_H (KEY_DMP_INTX_H + 1) +#define KEY_DMP_INTZ_H (KEY_DMP_INTY_H + 1) +// #define KEY_DMP_HPX_H (KEY_DMP_INTZ_H + 1) +// #define KEY_DMP_HPY_H (KEY_DMP_HPX_H + 1) +// #define KEY_DMP_HPZ_H (KEY_DMP_HPY_H + 1) /* Stream keys */ -#define KEY_STREAM_P_GYRO_Z (KEY_DMP_INTZ_H + 1) -#define KEY_STREAM_P_GYRO_Y (KEY_STREAM_P_GYRO_Z + 1) -#define KEY_STREAM_P_GYRO_X (KEY_STREAM_P_GYRO_Y + 1) -#define KEY_STREAM_P_TEMP (KEY_STREAM_P_GYRO_X + 1) -#define KEY_STREAM_P_AUX_Y (KEY_STREAM_P_TEMP + 1) -#define KEY_STREAM_P_AUX_X (KEY_STREAM_P_AUX_Y + 1) -#define KEY_STREAM_P_AUX_Z (KEY_STREAM_P_AUX_X + 1) -#define KEY_STREAM_P_ACCEL_Y (KEY_STREAM_P_AUX_Z + 1) -#define KEY_STREAM_P_ACCEL_X (KEY_STREAM_P_ACCEL_Y + 1) -#define KEY_STREAM_P_FOOTER (KEY_STREAM_P_ACCEL_X + 1) -#define KEY_STREAM_P_ACCEL_Z (KEY_STREAM_P_FOOTER + 1) - -#define NUM_KEYS (KEY_STREAM_P_ACCEL_Z + 1) - -typedef struct { +#define KEY_Streaming_P_GYRO_Z (KEY_DMP_INTZ_H + 1) +#define KEY_Streaming_P_GYRO_Y (KEY_Streaming_P_GYRO_Z + 1) +#define KEY_Streaming_P_GYRO_X (KEY_Streaming_P_GYRO_Y + 1) +#define KEY_Streaming_P_TEMP (KEY_Streaming_P_GYRO_X + 1) +#define KEY_Streaming_P_AUX_Y (KEY_Streaming_P_TEMP + 1) +#define KEY_Streaming_P_AUX_X (KEY_Streaming_P_AUX_Y + 1) +#define KEY_Streaming_P_AUX_Z (KEY_Streaming_P_AUX_X + 1) +#define KEY_Streaming_P_ACCEL_Y (KEY_Streaming_P_AUX_Z + 1) +#define KEY_Streaming_P_ACCEL_X (KEY_Streaming_P_ACCEL_Y + 1) +#define KEY_Streaming_P_FOOTER (KEY_Streaming_P_ACCEL_X + 1) +#define KEY_Streaming_P_ACCEL_Z (KEY_Streaming_P_FOOTER + 1) + +#define NUM_KEYS (KEY_Streaming_P_ACCEL_Z + 1) + +typedef struct +{ unsigned short key; unsigned short addr; } tKeyLabel; @@ -389,7 +390,6 @@ typedef struct { #define DINAB6 0xb6 #define DINAB4 0xb4 - #define DINC00 0x00 #define DINC01 0x01 #define DINC02 0x02 @@ -460,7 +460,6 @@ typedef struct { #define DIND40 0x40 - #define DINA80 0x80 #define DINA90 0x90 #define DINAA0 0xa0 @@ -489,6 +488,4 @@ typedef struct { #define DINBC4 0xc4 #define DINBC6 0xc6 - - #endif // DMPKEY_H__ diff --git a/test/test_luos/main.c b/test/test_luos/main.c index f778a8522..d6b56a3f5 100644 --- a/test/test_luos/main.c +++ b/test/test_luos/main.c @@ -1,28 +1,28 @@ #include "main.h" #include #include -#define STREAM_BUFFER_SIZE 1024 +#define Streaming_BUFFER_SIZE 1024 extern default_scenario_t default_sc; -void unittest_Streaming_SendStreamingSize() +void unittest_Luos_SendStreamingStreamingSize() { NEW_TEST_CASE("Sample size sent to streaming < Available samples"); { uint32_t ExpectedMaxSize; msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t stream_Buffer[STREAM_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Stream_CreateStreamingChannel(stream_Buffer, STREAM_BUFFER_SIZE, 1); + tx_msg.header.target = 2; + tx_msg.header.target_mode = SERVICEIDACK; + tx_msg.header.cmd = DEFAULT_CMD; + uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; + streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); // Init default scenario context Init_Context(); // Init variable ExpectedMaxSize = 1; // Add samples - Stream_AddAvailableSampleNB(&streamChannel, 2); + Streaming_AddAvailableSampleNB(&streamChannel, 2); NEW_STEP("Verify 1 byte is received when stream channels size is 2"); Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 1); @@ -35,18 +35,18 @@ void unittest_Streaming_SendStreamingSize() { uint32_t ExpectedMaxSize; msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t stream_Buffer[STREAM_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Stream_CreateStreamingChannel(stream_Buffer, STREAM_BUFFER_SIZE, 1); + tx_msg.header.target = 2; + tx_msg.header.target_mode = SERVICEIDACK; + tx_msg.header.cmd = DEFAULT_CMD; + uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; + streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); // Init default scenario context Init_Context(); // Init variable ExpectedMaxSize = 2; // Add samples - Stream_AddAvailableSampleNB(&streamChannel, 2); + Streaming_AddAvailableSampleNB(&streamChannel, 2); NEW_STEP("Verify 2 byte are received when stream channels size is 2"); Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 2); @@ -59,11 +59,11 @@ void unittest_Streaming_SendStreamingSize() { uint32_t ExpectedMaxSize; msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t stream_Buffer[STREAM_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Stream_CreateStreamingChannel(stream_Buffer, STREAM_BUFFER_SIZE, 1); + tx_msg.header.target = 2; + tx_msg.header.target_mode = SERVICEIDACK; + tx_msg.header.cmd = DEFAULT_CMD; + uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; + streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); // Init default scenario context Init_Context(); @@ -73,7 +73,7 @@ void unittest_Streaming_SendStreamingSize() NEW_STEP("Verify 2 byte are received when we try to send 3 bytes"); // Add samples - Stream_AddAvailableSampleNB(&streamChannel, 2); + Streaming_AddAvailableSampleNB(&streamChannel, 2); Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 3); Luos_Loop(); // Verify @@ -84,11 +84,11 @@ void unittest_Streaming_SendStreamingSize() { uint32_t ExpectedMaxSize; msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t stream_Buffer[STREAM_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Stream_CreateStreamingChannel(stream_Buffer, STREAM_BUFFER_SIZE, 1); + tx_msg.header.target = 2; + tx_msg.header.target_mode = SERVICEIDACK; + tx_msg.header.cmd = DEFAULT_CMD; + uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; + streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); // Init default scenario context Init_Context(); @@ -102,7 +102,7 @@ void unittest_Streaming_SendStreamingSize() tx_msg.header.target = 3; // Add samples - Stream_AddAvailableSampleNB(&streamChannel, 2); + Streaming_AddAvailableSampleNB(&streamChannel, 2); Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 0); Luos_Loop(); // Verify @@ -115,7 +115,7 @@ void unittest_Streaming_SendStreamingSize() tx_msg.header.target = 2; // Add samples - Stream_AddAvailableSampleNB(&streamChannel, 128); + Streaming_AddAvailableSampleNB(&streamChannel, 128); Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 128); Luos_Loop(); // Verify @@ -219,7 +219,7 @@ int main(int argc, char **argv) // Big data reception UNIT_TEST_RUN(unittest_Luos_ReceiveData); // Streaming functions - UNIT_TEST_RUN(unittest_Streaming_SendStreamingSize); + UNIT_TEST_RUN(unittest_Luos_SendStreamingStreamingSize); UNITY_END(); } diff --git a/test/test_luos/main.h b/test/test_luos/main.h index ee37ebd19..486ae2f27 100644 --- a/test/test_luos/main.h +++ b/test/test_luos/main.h @@ -2,6 +2,6 @@ #define MAIN_H // Sreaming functions -void unittest_Streaming_SendStreamingSize(void); +void unittest_Luos_SendStreamingStreamingSize(void); #endif //MAIN_H \ No newline at end of file diff --git a/tool_services/gate/pipe_link.c b/tool_services/gate/pipe_link.c index 1c37ff1aa..f3ea1b525 100644 --- a/tool_services/gate/pipe_link.c +++ b/tool_services/gate/pipe_link.c @@ -40,7 +40,7 @@ void PipeLink_Send(service_t *service, void *data, uint32_t size) { // We have a localhost pipe // Copy the data directly into the local streaming channel without passing by Luos. - Stream_PutSample(PipeDirectPutSample, data, size); + Streaming_PutSample(PipeDirectPutSample, data, size); // Send a void set_cmd to strat data transmission on pipe. msg.header.size = 0; Luos_SendMsg(service, &msg); diff --git a/tool_services/inspector/pipe_link.c b/tool_services/inspector/pipe_link.c index 84a71e38f..117082880 100644 --- a/tool_services/inspector/pipe_link.c +++ b/tool_services/inspector/pipe_link.c @@ -41,7 +41,7 @@ void PipeLink_Send(service_t *service, void *data, uint32_t size) msg.header.config = BASE_PROTOCOL; // We have a localhost pipe // Copy the data directly into the local streaming channel without passing by Luos. - Stream_PutSample(PipeDirectPutSample, data, size); + Streaming_PutSample(PipeDirectPutSample, data, size); // Send a void set_cmd to strat data transmission on pipe. msg.header.size = 0; Luos_SendMsg(service, &msg); diff --git a/tool_services/pipe/SERIAL/ARDUINO/pipe_com.cpp b/tool_services/pipe/SERIAL/ARDUINO/pipe_com.cpp index bb6b0b378..8e36d876a 100644 --- a/tool_services/pipe/SERIAL/ARDUINO/pipe_com.cpp +++ b/tool_services/pipe/SERIAL/ARDUINO/pipe_com.cpp @@ -51,7 +51,7 @@ void PipeCom_Loop(void) while (Serial.available() > 0) { data = Serial.read(); - Stream_PutSample(Pipe_GetRxStreamChannel(), &data, 1); + Streaming_PutSample(Pipe_GetRxStreamChannel(), &data, 1); } } /****************************************************************************** @@ -75,7 +75,7 @@ void PipeCom_Send(void) while (size > 0) { Serial.write(SerialProtocol_GetDataToSend(), size); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); size = SerialProtocol_GetSizeToSend(); } } diff --git a/tool_services/pipe/SERIAL/ESP32_IDF/pipe_com.c b/tool_services/pipe/SERIAL/ESP32_IDF/pipe_com.c index 950003979..7c3ee18b3 100644 --- a/tool_services/pipe/SERIAL/ESP32_IDF/pipe_com.c +++ b/tool_services/pipe/SERIAL/ESP32_IDF/pipe_com.c @@ -49,7 +49,7 @@ void PipeCom_Loop(void) { uart_hal_read_rxfifo(&uart_hal_context_log, &data[0], &size); uart_hal_rxfifo_rst(&uart_hal_context_log); - Stream_PutSample(Pipe_GetRxStreamChannel(), &data[0], size); + Streaming_PutSample(Pipe_GetRxStreamChannel(), &data[0], size); } } /****************************************************************************** @@ -75,7 +75,7 @@ void PipeCom_Send(void) while (size > 0) { uart_hal_write_txfifo(&uart_hal_context_log, (uint8_t *)SerialProtocol_GetDataToSend(), size, &wr_size); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), wr_size); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), wr_size); size = SerialProtocol_GetSizeToSend(); } } diff --git a/tool_services/pipe/SERIAL/NUCLEO-F0/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-F0/pipe_com.c index b4899b8d5..5378d96ca 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-F0/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-F0/pipe_com.c @@ -211,7 +211,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -228,7 +228,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/NUCLEO-F4/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-F4/pipe_com.c index b8a82c0b6..5e05427fe 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-F4/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-F4/pipe_com.c @@ -212,7 +212,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -229,7 +229,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.c index 2e1327b0a..c2f24ef58 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.c @@ -212,7 +212,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -229,7 +229,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.c index 0e168caf7..e650cd091 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.c @@ -211,7 +211,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = P2L_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -228,7 +228,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/NUCLEO-L0/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-L0/pipe_com.c index 0f0bd946a..5357f5691 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-L0/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-L0/pipe_com.c @@ -211,7 +211,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -228,7 +228,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/NUCLEO-L4/pipe_com.c b/tool_services/pipe/SERIAL/NUCLEO-L4/pipe_com.c index e764981f1..5f3f62056 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-L4/pipe_com.c +++ b/tool_services/pipe/SERIAL/NUCLEO-L4/pipe_com.c @@ -211,7 +211,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -229,7 +229,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/l0/pipe_com.c b/tool_services/pipe/SERIAL/l0/pipe_com.c index e7f55e599..afa06f143 100644 --- a/tool_services/pipe/SERIAL/l0/pipe_com.c +++ b/tool_services/pipe/SERIAL/l0/pipe_com.c @@ -208,7 +208,7 @@ void PIPE_COM_IRQHANDLER() RX_PrevPointerPosition = RX_PointerPosition; if (size != 0) { - Stream_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); + Streaming_AddAvailableSampleNB(Pipe_GetRxStreamChannel(), size); } } } @@ -225,7 +225,7 @@ void PIPE_TX_DMA_IRQHANDLER() { PIPE_TX_DMA_CLEAR_TC(PIPE_TX_DMA); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size_to_send); size = SerialProtocol_GetSizeToSend(); is_sending = false; if (size > 0) diff --git a/tool_services/pipe/SERIAL/serial_protocol.h b/tool_services/pipe/SERIAL/serial_protocol.h index f093336ac..17633d721 100644 --- a/tool_services/pipe/SERIAL/serial_protocol.h +++ b/tool_services/pipe/SERIAL/serial_protocol.h @@ -41,7 +41,7 @@ static inline void SerialProtocol_Init(void) SERIAL_HEADER, 0, }; - Stream_PutSample(serialTx_StreamChannel, &SerialHeader, sizeof(SerialHeader_t)); + Streaming_PutSample(serialTx_StreamChannel, &SerialHeader, sizeof(SerialHeader_t)); // Keep size to update, size are the last 2 bytes of the StreamChannel size_to_update = (uint8_t *)((int)serialTx_StreamChannel->data_ptr - 2); // Now we are ready to get data @@ -50,7 +50,7 @@ static inline void SerialProtocol_Init(void) static inline void SerialProtocol_CreateTxMsg(void) { // Evaluate size - uint16_t size = (Stream_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t)); + uint16_t size = (Streaming_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t)); // Update size if ((size_to_update + 2) > (uint8_t *)((int)serialTx_StreamChannel->end_ring_buffer)) { @@ -72,7 +72,7 @@ static inline void SerialProtocol_CreateTxMsg(void) {SERIAL_HEADER, 0} // Size will be updated on the next call of SerialProtocol_CreateTxMsg() }; - Stream_PutSample(serialTx_StreamChannel, &SerialProtocol, sizeof(SerialProtocol_t)); + Streaming_PutSample(serialTx_StreamChannel, &SerialProtocol, sizeof(SerialProtocol_t)); // Keep size to update, size are the last 2 bytes of the StreamChannel if (serialTx_StreamChannel->data_ptr == serialTx_StreamChannel->ring_buffer) @@ -91,13 +91,13 @@ static inline void SerialProtocol_CreateTxMsg(void) static inline uint16_t SerialProtocol_GetSizeToSend(void) { - if ((Stream_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t)) > Stream_GetAvailableSampleNBUntilEndBuffer(serialTx_StreamChannel)) + if ((Streaming_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t)) > Streaming_GetAvailableSampleNBUntilEndBuffer(serialTx_StreamChannel)) { - return Stream_GetAvailableSampleNBUntilEndBuffer(serialTx_StreamChannel); + return Streaming_GetAvailableSampleNBUntilEndBuffer(serialTx_StreamChannel); } else { - return Stream_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t); + return Streaming_GetAvailableSampleNB(serialTx_StreamChannel) - sizeof(SerialHeader_t); } } @@ -109,7 +109,7 @@ static inline char *SerialProtocol_GetDataToSend(void) static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) { streaming_channel_t *serialRx_StreamChannel = Pipe_GetRxStreamChannel(); - uint16_t TotalSize = Stream_GetAvailableSampleNB(serialRx_StreamChannel); + uint16_t TotalSize = Streaming_GetAvailableSampleNB(serialRx_StreamChannel); uint16_t SizeUntilEnd = 0; if (TotalSize > 4) @@ -123,7 +123,7 @@ static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) // Make TotalSize fit the size of remaining datas. TotalSize = TotalSize - i; i = 0; - SizeUntilEnd = Stream_GetAvailableSampleNBUntilEndBuffer(serialRx_StreamChannel); + SizeUntilEnd = Streaming_GetAvailableSampleNBUntilEndBuffer(serialRx_StreamChannel); // Make size pointer point to the size data (1 byte after the SERIAL_HEADER 16bits length) if (SizeUntilEnd > 1) { @@ -152,7 +152,7 @@ static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) if (*((uint8_t *)((int)serialRx_StreamChannel->sample_ptr + (*size + 3))) == SERIAL_FOOTER) { // This is a good message remove the header and size from the available sample keeping only the data - Stream_RmvAvailableSampleNB(serialRx_StreamChannel, 3); + Streaming_RmvAvailableSampleNB(serialRx_StreamChannel, 3); return true; } // Else this is not really a massage begin, so we have to remove the fake SERIAL_HEADER byte an dcontinue looking for it. @@ -163,7 +163,7 @@ static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) if (*((uint8_t *)((int)serialRx_StreamChannel->ring_buffer + ((*size + 3) - SizeUntilEnd))) == SERIAL_FOOTER) { // This is a good message remove the header and size from the available sample keeping only the data - Stream_RmvAvailableSampleNB(serialRx_StreamChannel, 3); + Streaming_RmvAvailableSampleNB(serialRx_StreamChannel, 3); return true; } // Else this is not really a massage begin, so we have to remove the fake SERIAL_HEADER byte an dcontinue looking for it. @@ -181,7 +181,7 @@ static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) } } // The first byte is not a good header remove the byte - Stream_RmvAvailableSampleNB(serialRx_StreamChannel, 1); + Streaming_RmvAvailableSampleNB(serialRx_StreamChannel, 1); } } return false; diff --git a/tool_services/pipe/WS/ARDUINO/pipe_com.cpp b/tool_services/pipe/WS/ARDUINO/pipe_com.cpp index f5dde1831..69be579e6 100644 --- a/tool_services/pipe/WS/ARDUINO/pipe_com.cpp +++ b/tool_services/pipe/WS/ARDUINO/pipe_com.cpp @@ -73,7 +73,7 @@ void onWebSocketEvent(uint8_t num, WStype_t type, uint8_t *payload, size_t lengt case WStype_TEXT: case WStype_BIN: Serial.printf("[%u] Text: %s\n", num, payload); - Stream_PutSample(Pipe_GetRxStreamChannel(), payload, length); + Streaming_PutSample(Pipe_GetRxStreamChannel(), payload, length); break; // For everything else: do nothing @@ -134,11 +134,11 @@ void PipeCom_Init(void) ******************************************************************************/ uint16_t PipeCom_GetSizeToSend(void) { - if ((Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) + if ((Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) { - return Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); } - return Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); } /****************************************************************************** * @brief We need to send something @@ -153,7 +153,7 @@ void PipeCom_Send(void) while (size != 0) { webSocket.sendBIN(ws_cli, (uint8_t *)Pipe_GetTxStreamChannel()->sample_ptr, size); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); size = PipeCom_GetSizeToSend(); } } @@ -165,7 +165,7 @@ void PipeCom_Send(void) ******************************************************************************/ uint8_t PipeCom_Receive(uint16_t *size) { - *size = Stream_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); + *size = Streaming_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); return (*size > 0); } /****************************************************************************** diff --git a/tool_services/pipe/WS/ESP32_IDF/pipe_com.c b/tool_services/pipe/WS/ESP32_IDF/pipe_com.c index 06c937897..a02518d5c 100644 --- a/tool_services/pipe/WS/ESP32_IDF/pipe_com.c +++ b/tool_services/pipe/WS/ESP32_IDF/pipe_com.c @@ -92,7 +92,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { // Got websocket frame. Received data is wm->data. save it into the Pipe streaming channel struct mg_ws_message *wm = (struct mg_ws_message *)ev_data; - Stream_PutSample(Pipe_GetRxStreamChannel(), wm->data.ptr, wm->data.len); + Streaming_PutSample(Pipe_GetRxStreamChannel(), wm->data.ptr, wm->data.len); } else if (ev == MG_EV_ERROR) { @@ -256,11 +256,11 @@ void PipeCom_Init(void) ******************************************************************************/ uint16_t PipeCom_GetSizeToSend(void) { - if ((Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) + if ((Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) { - return Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); } - return Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); } /****************************************************************************** @@ -276,7 +276,7 @@ void PipeCom_Send(void) while (size != 0) { mg_ws_send(ws_connection, (const char *)Pipe_GetTxStreamChannel()->sample_ptr, size, WEBSOCKET_OP_BINARY); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); size = PipeCom_GetSizeToSend(); } } @@ -288,7 +288,7 @@ void PipeCom_Send(void) ******************************************************************************/ uint8_t PipeCom_Receive(uint16_t *size) { - *size = Stream_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); + *size = Streaming_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); return (*size > 0); } diff --git a/tool_services/pipe/WS/native/pipe_com.c b/tool_services/pipe/WS/native/pipe_com.c index 7b905f201..e0e651d56 100644 --- a/tool_services/pipe/WS/native/pipe_com.c +++ b/tool_services/pipe/WS/native/pipe_com.c @@ -62,7 +62,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { // Got websocket frame. Received data is wm->data. save it into the Pipe streaming channel struct mg_ws_message *wm = (struct mg_ws_message *)ev_data; - Stream_PutSample(Pipe_GetRxStreamChannel(), wm->data.ptr, wm->data.len); + Streaming_PutSample(Pipe_GetRxStreamChannel(), wm->data.ptr, wm->data.len); } else if (ev == MG_EV_CLOSE) { @@ -96,11 +96,11 @@ void PipeCom_Init(void) ******************************************************************************/ uint16_t PipeCom_GetSizeToSend(void) { - if ((Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) + if ((Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel())) > Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel())) { - return Stream_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNBUntilEndBuffer(Pipe_GetTxStreamChannel()); } - return Stream_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); + return Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel()); } /****************************************************************************** @@ -117,7 +117,7 @@ void PipeCom_Send(void) while (size != 0) { mg_ws_send(ws_connection, (const char *)Pipe_GetTxStreamChannel()->sample_ptr, size, WEBSOCKET_OP_BINARY); - Stream_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), size); size = PipeCom_GetSizeToSend(); start_tick = Luos_GetSystick(); while (Luos_GetSystick() - start_tick < 2) @@ -133,7 +133,7 @@ void PipeCom_Send(void) ******************************************************************************/ uint8_t PipeCom_Receive(uint16_t *size) { - *size = Stream_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); + *size = Streaming_GetAvailableSampleNB(Pipe_GetRxStreamChannel()); return (*size > 0); } diff --git a/tool_services/pipe/pipe.c b/tool_services/pipe/pipe.c index 16b937e53..db64d92f9 100644 --- a/tool_services/pipe/pipe.c +++ b/tool_services/pipe/pipe.c @@ -32,8 +32,8 @@ static void Pipe_MsgHandler(service_t *service, msg_t *msg); ******************************************************************************/ void Pipe_Init(void) { - rx_StreamChannel = Stream_CreateStreamingChannel(rx_Buffer, PIPE_RX_BUFFER_SIZE, 1); - tx_StreamChannel = Stream_CreateStreamingChannel(tx_Buffer, PIPE_TX_BUFFER_SIZE, 1); + rx_StreamChannel = Streaming_CreateChannel(rx_Buffer, PIPE_RX_BUFFER_SIZE, 1); + tx_StreamChannel = Streaming_CreateChannel(tx_Buffer, PIPE_TX_BUFFER_SIZE, 1); PipeCom_Init(); revision_t revision = {.major = 1, .minor = 0, .build = 0}; Luos_CreateService(Pipe_MsgHandler, PIPE_TYPE, "Pipe", revision); @@ -113,7 +113,7 @@ void node_assert(char *file, uint32_t line) // manage self crashing scenario char json[512]; sprintf(json, "{\"assert\":{\"node_id\":1,\"file\":\"%s\",\"line\":%d}}\n", file, (unsigned int)line); - Stream_PutSample(&tx_StreamChannel, json, strlen(json)); + Streaming_PutSample(&tx_StreamChannel, json, strlen(json)); // Send the message PipeCom_Send(); From 35ab1618f97236ba7a12c3be18e13462086c5483 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 30 Mar 2023 12:28:46 +0200 Subject: [PATCH 014/198] Update Timestamp functions API --- engine/core/inc/luos_engine.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 8a51c9386..8861c1f83 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -61,15 +61,16 @@ void Luos_Detect(service_t *service); void Luos_ServicesClear(void); // ***************** Messaging management ***************** + +void Luos_Flush(void); + // *** Streaming management *** #include "streaming.h" void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); -void Luos_Flush(void); - -// *** Timestamping management *** +// *** Timestamping management (in file `timestamp.c`)*** time_luos_t Luos_Timestamp(void); bool Luos_IsMsgTimstamped(msg_t *msg); time_luos_t Luos_GetMsgTimestamp(msg_t *msg); @@ -83,10 +84,6 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); -// *** Pub/Sub management (in file `pub_sub.c`)*** -error_return_t PubSub_Subscribe(service_t *service, uint16_t topic); -error_return_t PubSub_Unsubscribe(service_t *service, uint16_t topic); - // *** Basic transmission management *** error_return_t Luos_SendMsg(service_t *service, msg_t *msg); error_return_t Luos_TxComplete(void); From 31b3cdda739d1bee36065458d04d5c2511cd8c30 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 28 Mar 2023 17:23:06 +0200 Subject: [PATCH 015/198] Move general_stats_t from luos_engine.h to service_structs.h --- engine/core/inc/luos_engine.h | 17 -------- engine/core/inc/luos_list.h | 8 ---- engine/core/inc/profile_core.h | 4 -- engine/core/inc/service_structs.h | 69 ++++++++++++++++++++----------- engine/core/inc/streaming.h | 3 -- 5 files changed, 45 insertions(+), 56 deletions(-) diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 8861c1f83..dcae03651 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -21,23 +21,6 @@ #define LUOS_RUN() Luos_Run(); -/****************************************************************************** - * @struct general_stats_t - * @brief format all datas to be sent trough msg - ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - luos_stats_t node_stat; - service_stats_t service_stat; - }; - uint8_t unmap[sizeof(luos_stats_t) + sizeof(service_stats_t)]; /*!< streamable form. */ - }; -} general_stats_t; - /******************************************************************************* * Function ******************************************************************************/ diff --git a/engine/core/inc/luos_list.h b/engine/core/inc/luos_list.h index 7fdaf7826..579794d84 100644 --- a/engine/core/inc/luos_list.h +++ b/engine/core/inc/luos_list.h @@ -101,12 +101,4 @@ typedef enum LUOS_LAST_STD_CMD = 128 } luos_cmd_t; -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ - #endif /* LUOS_LIST_H */ diff --git a/engine/core/inc/profile_core.h b/engine/core/inc/profile_core.h index 7be82fbc4..03c5378b1 100644 --- a/engine/core/inc/profile_core.h +++ b/engine/core/inc/profile_core.h @@ -39,10 +39,6 @@ enum CONNECT_PROFILE }; -/******************************************************************************* - * Variables - ******************************************************************************/ - /******************************************************************************* * Function ******************************************************************************/ diff --git a/engine/core/inc/service_structs.h b/engine/core/inc/service_structs.h index fbc5c1933..66c0efb90 100644 --- a/engine/core/inc/service_structs.h +++ b/engine/core/inc/service_structs.h @@ -1,6 +1,6 @@ /****************************************************************************** - * @file services structure - * @brief describs all the + * @file services structures + * @brief describe all the service related structures * @author Luos * @version 0.0.0 ******************************************************************************/ @@ -13,9 +13,11 @@ /******************************************************************************* * Definitions ******************************************************************************/ -/* store informations about luos stats + +/****************************************************************************** + * store informations about luos stats * please refer to the documentation - */ + ******************************************************************************/ typedef struct __attribute__((__packed__)) { union @@ -28,9 +30,10 @@ typedef struct __attribute__((__packed__)) uint8_t unmap[sizeof(memory_stats_t) + 1]; /*!< streamable form. */ }; } luos_stats_t; -/* This structure is used to create services version +/****************************************************************************** + * This structure is used to create services version * please refer to the documentation - */ + ******************************************************************************/ typedef struct __attribute__((__packed__)) { union @@ -44,9 +47,10 @@ typedef struct __attribute__((__packed__)) uint8_t unmap[3]; /*!< streamable form. */ }; } revision_t; -/* This structure is used to manage services statistic +/****************************************************************************** + * This structure is used to manage services statistic * please refer to the documentation - */ + ******************************************************************************/ typedef struct __attribute__((__packed__)) service_stats_t { union @@ -59,9 +63,27 @@ typedef struct __attribute__((__packed__)) service_stats_t }; } service_stats_t; -/* This structure is used to manage services timed auto update +/****************************************************************************** + * @struct general_stats_t + * @brief format all datas to be sent trough msg + ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + luos_stats_t node_stat; + service_stats_t service_stat; + }; + uint8_t unmap[sizeof(luos_stats_t) + sizeof(service_stats_t)]; /*!< streamable form. */ + }; +} general_stats_t; + +/****************************************************************************** + * This structure is used to manage services timed auto update * please refer to the documentation - */ + ******************************************************************************/ typedef struct __attribute__((__packed__)) timed_update_t { uint32_t last_update; @@ -69,9 +91,10 @@ typedef struct __attribute__((__packed__)) timed_update_t uint16_t target; } timed_update_t; -/* This structure is used to manage read or write access +/****************************************************************************** + * This structure is used to manage read or write access * please refer to the documentation - */ + ******************************************************************************/ typedef enum { READ_WRITE_ACCESS, @@ -80,18 +103,20 @@ typedef enum NO_ACCESS } access_t; -/* This structure is used to manage packages +/****************************************************************************** + * This structure is used to manage packages * please refer to the documentation - */ + ******************************************************************************/ typedef struct { void (*Init)(void); void (*Loop)(void); } package_t; -/* This structure is used to manage services +/****************************************************************************** + * This structure is used to manage services * please refer to the documentation - */ + ******************************************************************************/ typedef struct __attribute__((__packed__)) service_t { ll_service_t *ll_service; @@ -110,6 +135,10 @@ typedef struct __attribute__((__packed__)) service_t typedef void (*SERVICE_CB)(service_t *service, msg_t *msg); +/****************************************************************************** + * This enum list all CMD reserved to Luos + * please refer to the documentation + ******************************************************************************/ typedef enum { // Luos specific registers @@ -135,12 +164,4 @@ typedef enum LUOS_LAST_RESERVED_CMD = 42 } reserved_luos_cmd_t; -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ - #endif /*__SERVICE_STRUCT_H */ diff --git a/engine/core/inc/streaming.h b/engine/core/inc/streaming.h index fc47cf9cc..03c503f01 100644 --- a/engine/core/inc/streaming.h +++ b/engine/core/inc/streaming.h @@ -29,9 +29,6 @@ typedef struct void *data_ptr; // Current pointer of data uint8_t data_size; // Size granularity of the data contained on the ring buffer } streaming_channel_t; -/******************************************************************************* - * Variables - ******************************************************************************/ /******************************************************************************* * Function From 7704b7a83de4ec03afb99b85d4fb9ad1c8673c53 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 28 Mar 2023 17:33:42 +0200 Subject: [PATCH 016/198] Remove useless node_state_t struct --- engine/core/inc/luos_utils.h | 3 --- engine/core/src/luos_engine.c | 42 +++++++++++------------------------ engine/engine_config.h | 1 + 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/engine/core/inc/luos_utils.h b/engine/core/inc/luos_utils.h index 24401a66f..3b147a9cf 100644 --- a/engine/core/inc/luos_utils.h +++ b/engine/core/inc/luos_utils.h @@ -37,9 +37,6 @@ typedef struct __attribute__((__packed__)) }; } luos_assert_t; -/******************************************************************************* - * Variables - ******************************************************************************/ /******************************************************************************* * Function diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 05c02cb96..34af06561 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -13,17 +13,6 @@ #include "bootloader_core.h" #include "_timestamp.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#define BOOT_TIMEOUT 1000 - -typedef enum -{ - NODE_INIT, - NODE_RUN -} node_state_t; - /******************************************************************************* * Variables ******************************************************************************/ @@ -1038,32 +1027,27 @@ void Luos_PackageLoop(void) ******************************************************************************/ void Luos_Run(void) { - static node_state_t node_state = NODE_INIT; + static bool node_run = false; - switch (node_state) + if (!node_run) { - case NODE_INIT: - Luos_Init(); + Luos_Init(); #ifdef BOOTLOADER - LuosBootloader_Init(); + LuosBootloader_Init(); #else - Luos_PackageInit(); + Luos_PackageInit(); #endif - // go to run state after initialization - node_state = NODE_RUN; - break; - case NODE_RUN: - Luos_Loop(); + // go to run state after initialization + node_run = true; + } + else + { + Luos_Loop(); #ifdef BOOTLOADER - LuosBootloader_Loop(); + LuosBootloader_Loop(); #else - Luos_PackageLoop(); + Luos_PackageLoop(); #endif - break; - default: - Luos_Loop(); - Luos_PackageLoop(); - break; } } /****************************************************************************** diff --git a/engine/engine_config.h b/engine/engine_config.h index ca21ef937..2b371a111 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -10,6 +10,7 @@ /******************************************************************************* * Definitions ******************************************************************************/ +#define BOOT_TIMEOUT 1000 #define DEFAULTID 0x00 #define PROTOCOL_REVISION 0 #define BROADCAST_VAL 0x0FFF From 2b3338cfcf028afeeb23879caf1fa577d107c819 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 28 Mar 2023 17:37:47 +0200 Subject: [PATCH 017/198] Remove dynamic baudrate management --- engine/IO/inc/io_struct.h | 1 - engine/core/src/luos_engine.c | 1 - network/robus/src/robus.c | 9 --------- 3 files changed, 11 deletions(-) diff --git a/engine/IO/inc/io_struct.h b/engine/IO/inc/io_struct.h index b246b8250..7501b2d09 100644 --- a/engine/IO/inc/io_struct.h +++ b/engine/IO/inc/io_struct.h @@ -154,7 +154,6 @@ typedef enum WRITE_NODE_ID, /*!< Get and save a new given node ID. */ START_DETECTION, /*!< Start a detection*/ END_DETECTION, /*!< Detect the end of a detection*/ - SET_BAUDRATE, /*!< Set Robus baudrate*/ ASSERT, /*!< Node Assert message (only broadcast with a source as a node */ /*!< Compatibility area*/ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 34af06561..828f5a949 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -188,7 +188,6 @@ static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t { case WRITE_NODE_ID: case START_DETECTION: - case SET_BAUDRATE: // ERROR LUOS_ASSERT(0); break; diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index bdda80c00..43f7747f7 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -420,7 +420,6 @@ static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service) ******************************************************************************/ static error_return_t Robus_MsgHandler(msg_t *input) { - uint32_t baudrate; msg_t output_msg; node_bootstrap_t node_bootstrap; ll_service_t *ll_service = Recep_GetConcernedLLService(&input->header); @@ -484,14 +483,6 @@ static error_return_t Robus_MsgHandler(msg_t *input) Robus_SetNodeDetected(DETECTION_OK); return FAILED; break; - case SET_BAUDRATE: - // We have to wait the end of transmission of all the messages we have to transmit - while (MsgAlloc_TxAllComplete() == FAILED) - ; - memcpy(&baudrate, input->data, sizeof(uint32_t)); - RobusHAL_ComInit(baudrate); - return SUCCEED; - break; default: return FAILED; break; From 0053566ae1acd32a2f1113bc24152e6d164fba5c Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 20:07:47 +0200 Subject: [PATCH 018/198] Group all node functions on a node.c.h --- engine/IO/inc/io_struct.h | 22 --- engine/IO/src/msg_alloc.c | 5 +- engine/bootloader/bootloader_core.c | 8 +- engine/core/inc/luos_engine.h | 5 +- engine/core/inc/node.h | 51 ++++++ engine/core/inc/routing_table.h | 1 + engine/core/src/luos_engine.c | 79 ++------- engine/core/src/node.c | 154 ++++++++++++++++++ engine/core/src/routing_table.c | 4 +- engine/engine_config.h | 9 +- .../apps/alarm_controller/alarm_controller.c | 2 +- .../biometric-security/biometric_security.c | 2 +- .../apps/start_controller/start_controller.c | 2 +- ...uos_bootloader_samd21j18a.X.production.map | 22 +-- .../lib/Detection_Button/detection_button.c | 2 +- .../lib/LedStrip_Position/ledstrip_position.c | 2 +- .../lib/motor_copy/motor_copy.c | 2 +- .../motor_demo_app/lib/run_motor/run_motor.c | 2 +- .../native/ping_pong/lib/PingPong/ping_pong.c | 12 +- network/robus/inc/context.h | 11 -- network/robus/inc/robus.h | 14 -- network/robus/src/port_manager.c | 13 +- network/robus/src/reception.c | 8 +- network/robus/src/robus.c | 122 +++----------- network/robus/src/transmission.c | 2 +- test/_resources/Scenarios/default_scenario.c | 2 +- test/test_routing_table/main.c | 4 +- tool_services/gate/gate.c | 2 +- tool_services/inspector/inspector.c | 2 +- 29 files changed, 304 insertions(+), 262 deletions(-) create mode 100644 engine/core/inc/node.h create mode 100644 engine/core/src/node.c diff --git a/engine/IO/inc/io_struct.h b/engine/IO/inc/io_struct.h index 7501b2d09..078633862 100644 --- a/engine/IO/inc/io_struct.h +++ b/engine/IO/inc/io_struct.h @@ -126,28 +126,6 @@ typedef enum FAILED = 0xFF /*!< function fail. */ } error_return_t; -/****************************************************************************** - * @struct node_t - * @brief node informations structure - ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - struct __attribute__((__packed__)) - { - uint16_t node_id : 12; /*!< Node id */ - uint16_t certified : 4; /*!< True if the node have a certificate */ - uint8_t node_info; - }; - uint16_t port_table[NBR_PORT]; /*!< Phisical port connections */ - }; - uint8_t unmap[NBR_PORT + 3]; /*!< Uncmaped form. */ - }; -} node_t; - typedef enum { // protocol level command diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 0e443e515..f7bcd57eb 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -49,6 +49,7 @@ #include "msg_alloc.h" #include "luos_hal.h" #include "luos_utils.h" +#include "node.h" #include "context.h" @@ -703,9 +704,9 @@ error_return_t MsgAlloc_IsReseted(void) // Check if we need to reset everything due to detection reset if (reset_needed) { - if (ctx.node.node_id != 0) + if (Node_Get()->node_id != 0) { - ctx.node.node_id = 0; + Node_Get()->node_id = 0; // We need to reset MsgAlloc MsgAlloc_Init(NULL); } diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/bootloader_core.c index 0e2949b03..609e3c95c 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/bootloader_core.c @@ -72,7 +72,7 @@ void LuosBootloader_JumpToBootloader(void) LuosHAL_SetMode((uint8_t)APP_RELOAD_MODE); // Save node id in flash - node_t *node = Robus_GetNode(); + node_t *node = Node_Get(); uint16_t node_id = node->node_id; LuosHAL_SaveNodeID(node_id); @@ -155,7 +155,7 @@ void LuosBootloader_JumpToApp(void) void LuosBootloader_SetNodeID(void) { uint16_t node_id = LuosHAL_GetNodeID(); - node_t *node = Robus_GetNode(); + node_t *node = Node_Get(); node->node_id = node_id; } @@ -324,7 +324,7 @@ void LuosBootloader_SendCrc(bootloader_cmd_t response, uint8_t data) ready_msg.header.size = 2 * sizeof(uint8_t); ready_msg.data[0] = response; ready_msg.data[1] = data; - node_t *node = Robus_GetNode(); + node_t *node = Node_Get(); uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) ; @@ -344,7 +344,7 @@ void LuosBootloader_SendResponse(bootloader_cmd_t response) ready_msg.header.target = source_id; ready_msg.header.size = sizeof(uint8_t); ready_msg.data[0] = response; - node_t *node = Robus_GetNode(); + node_t *node = Node_Get(); uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) ; diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index dcae03651..668676d34 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -26,10 +26,11 @@ ******************************************************************************/ void Luos_Init(void); void Luos_Loop(void); +void Luos_ResetStatistic(void); // ***************** Node management ***************** -void Luos_ResetStatistic(void); -bool Luos_IsNodeDetected(void); +uint32_t Luos_GetSystick(void); +bool Luos_IsDetected(void); void Luos_SetVerboseMode(uint8_t mode); void Luos_SetFilterState(uint8_t state, service_t *service); diff --git a/engine/core/inc/node.h b/engine/core/inc/node.h new file mode 100644 index 000000000..60549ac06 --- /dev/null +++ b/engine/core/inc/node.h @@ -0,0 +1,51 @@ +/****************************************************************************** + * @file node management + * @brief time stamp data + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef __NODE_H_ +#define __NODE_H_ +/******************************************************************************* + * Definitions + ******************************************************************************/ +typedef enum +{ + NO_DETECTION, + DETECTION_OK, + LOCAL_DETECTION, + EXTERNAL_DETECTION, +} node_state_t; + +/****************************************************************************** + * @struct node_t + * @brief node informations structure + ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + struct __attribute__((__packed__)) + { + uint16_t node_id : 12; /*!< Node id */ + uint16_t certified : 4; /*!< True if the node have a certificate */ + uint8_t node_info; + }; + uint16_t port_table[NBR_PORT]; /*!< Phisical port connections */ + }; + uint8_t unmap[NBR_PORT + 3]; /*!< Uncmaped form. */ + }; +} node_t; + +/******************************************************************************* + * Function + ******************************************************************************/ +void Node_Init(void); +void Node_Loop(void); +node_t *Node_Get(void); +node_state_t Node_GetState(void); +void Node_SetState(node_state_t); + +#endif /* __NODE_H_ */ \ No newline at end of file diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index 4ab6d0f2b..e912eb260 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -8,6 +8,7 @@ #define TABLE #include "luos_engine.h" +#include "node.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 828f5a949..adfe8f031 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -175,6 +175,19 @@ void Luos_Loop(void) Flag_DetectServices = 0; } } +/****************************************************************************** + * @brief Luos clear statistic + * @param None + * @return None + ******************************************************************************/ +void Luos_ResetStatistic(void) +{ + memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); + for (uint16_t i = 0; i < service_number; i++) + { + service_table[i].statistics.max_retry = 0; + } +} /****************************************************************************** * @brief Check if this command concern luos * @param service : Pointer to the service @@ -344,7 +357,7 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) case ASK_DETECTION: if (input->header.size == 0) { - if (Robus_IsNodeDetected() < LOCAL_DETECTION) + if (Node_GetState() < LOCAL_DETECTION) { Flag_DetectServices = 1; } @@ -439,7 +452,7 @@ static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_ms routing_table_t local_routing_table[service_number + 1]; // start by saving node entry - RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Robus_GetNode()); + RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Node_Get()); entry_nb++; // save services entry for (uint16_t i = 0; i < service_number; i++) @@ -495,7 +508,7 @@ static void Luos_AutoUpdateManager(void) } else { - if (Robus_IsNodeDetected() == DETECTION_OK) + if (Node_GetState() == DETECTION_OK) { // directly transmit the message in Localhost Robus_SetTxTask(service_table[i].ll_service, &updt_msg); @@ -891,15 +904,6 @@ uint16_t Luos_NbrAvailableMsg(void) { return MsgAlloc_LuosTasksNbr(); } -/****************************************************************************** - * @brief Get tick number - * @param None - * @return Tick - ******************************************************************************/ -uint32_t Luos_GetSystick(void) -{ - return LuosHAL_GetSystick(); -} /****************************************************************************** * @brief Check if all Tx message are complete * @param None @@ -909,55 +913,6 @@ error_return_t Luos_TxComplete(void) { return MsgAlloc_TxAllComplete(); } -/****************************************************************************** - * @brief Luos clear statistic - * @param None - * @return None - ******************************************************************************/ -void Luos_ResetStatistic(void) -{ - memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); - for (uint16_t i = 0; i < service_number; i++) - { - service_table[i].statistics.max_retry = 0; - } -} -/****************************************************************************** - * @brief Check if the node is connected to the network - * @param None - * @return TRUE if the node is connected to the network - ******************************************************************************/ -bool Luos_IsNodeDetected(void) -{ - if (Robus_IsNodeDetected() == DETECTION_OK) - { - return true; - } - else - { - return false; - } -} - -/****************************************************************************** - * @brief Function that changes the filter value - * @param state : Put to "1" if we want to disable the filter , "0" to enable - * @param service - * @return None - ******************************************************************************/ -void Luos_SetFilterState(uint8_t state, service_t *service) -{ - Robus_SetFilterState(state, service->ll_service); -} -/****************************************************************************** - * @brief Function that changes the verbose mode - * @param mode : Put to "1" if we want to enable the verbose mode, "0" to disable - * @return None - ******************************************************************************/ -void Luos_SetVerboseMode(uint8_t mode) -{ - Robus_SetVerboseMode(mode); -} /****************************************************************************** * @brief Register a new package * @param Init : Init function name @@ -1072,7 +1027,7 @@ void Luos_Detect(service_t *service) { msg_t detect_msg; - if (Robus_IsNodeDetected() < LOCAL_DETECTION) + if (Node_GetState() < LOCAL_DETECTION) { // set the detection launcher id to 1 Luos_SetID(service, 1); diff --git a/engine/core/src/node.c b/engine/core/src/node.c new file mode 100644 index 000000000..0525c8459 --- /dev/null +++ b/engine/core/src/node.c @@ -0,0 +1,154 @@ +/****************************************************************************** + * @file node + * @brief node level functions + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#include "luos_engine.h" +#include "luos_hal.h" +#include "node.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +typedef struct +{ + node_t info; + node_state_t state; + bool timeout_run; + uint32_t timeout; +} node_ctx_t; + +/******************************************************************************* + * Variables + ******************************************************************************/ +node_ctx_t node_ctx; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief get node structure + * @param None + * @return Node pointer + ******************************************************************************/ +node_t *Node_Get(void) +{ + return (node_t *)&node_ctx.info; +} + +/****************************************************************************** + * @brief get network_state value + * @param None + * @return state + ******************************************************************************/ +node_state_t Node_GetState(void) +{ + return node_ctx.state; +} + +/****************************************************************************** + * @brief Node initialization + * @param None + * @return None + ******************************************************************************/ +void Node_Init(void) +{ + // Set default service id. This id is a void id used if no service is created. + node_ctx.info.node_id = DEFAULTID; + // By default node are not certified. + node_ctx.info.certified = false; + // set node_info value + node_ctx.info.node_info = 0; +#ifdef NO_RTB + node_ctx.node_info |= 1 << 0; +#endif +} + +/****************************************************************************** + * @brief Node loop management, specially for timeout purpose + * @param None + * @return None + ******************************************************************************/ +void Node_Loop(void) +{ + if (node_ctx.timeout_run) + { + // if timeout is reached, go back to link-down state + if (Luos_GetSystick() - node_ctx.timeout > DETECTION_TIMEOUT_MS) + { + node_ctx.state = NO_DETECTION; + } + } +} + +/****************************************************************************** + * @brief set network_state value + * @param state + * @return None + * _CRITICAL function call in IRQ + ******************************************************************************/ +_CRITICAL inline void Node_SetState(node_state_t state) +{ + switch (state) + { + case NO_DETECTION: + node_ctx.timeout_run = false; + node_ctx.timeout = 0; + break; + case LOCAL_DETECTION: + case EXTERNAL_DETECTION: + node_ctx.timeout_run = true; + node_ctx.timeout = Luos_GetSystick(); + break; + case DETECTION_OK: + node_ctx.timeout_run = false; + node_ctx.timeout = 0; + break; + default: + break; + } + node_ctx.state = state; +} + +/****************************************************************************** + * @brief Get tick number + * @param None + * @return Tick + ******************************************************************************/ +uint32_t Luos_GetSystick(void) +{ + return LuosHAL_GetSystick(); +} + +/****************************************************************************** + * @brief Check if the node is connected to the network + * @param None + * @return TRUE if the node is connected to the network + ******************************************************************************/ +bool Luos_IsDetected(void) +{ + return (node_ctx.state == DETECTION_OK); +} + +/****************************************************************************** + * @brief Function that changes the filter value + * @param state : Put to "1" if we want to disable the filter , "0" to enable + * @param service + * @return None + ******************************************************************************/ +void Luos_SetFilterState(uint8_t state, service_t *service) +{ + Robus_SetFilterState(state, service->ll_service); +} + +/****************************************************************************** + * @brief Function that changes the verbose mode + * @param mode : Put to "1" if we want to enable the verbose mode, "0" to disable + * @return None + ******************************************************************************/ +void Luos_SetVerboseMode(uint8_t mode) +{ + Robus_SetVerboseMode(mode); +} \ No newline at end of file diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 44384c18b..e1ceeb7a4 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -302,7 +302,7 @@ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) static void RoutingTB_Share(service_t *service, uint16_t nb_node) { // Make sure that the detection is not interrupted - if (Robus_IsNodeDetected() == EXTERNAL_DETECTION) + if (Node_GetState() == EXTERNAL_DETECTION) { return; } @@ -339,7 +339,7 @@ static void RoutingTB_Share(service_t *service, uint16_t nb_node) void RoutingTB_SendEndDetection(service_t *service) { // Make sure that the detection is not interrupted - if (Robus_IsNodeDetected() == EXTERNAL_DETECTION) + if (Node_GetState() == EXTERNAL_DETECTION) { return; } diff --git a/engine/engine_config.h b/engine/engine_config.h index 2b371a111..2287bf457 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -10,10 +10,11 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define BOOT_TIMEOUT 1000 -#define DEFAULTID 0x00 -#define PROTOCOL_REVISION 0 -#define BROADCAST_VAL 0x0FFF +#define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection +#define BOOT_TIMEOUT 1000 +#define DEFAULTID 0x00 +#define PROTOCOL_REVISION 0 +#define BROADCAST_VAL 0x0FFF #define MAX_ALIAS_SIZE 16 #define MAX_DATA_MSG_SIZE 128 diff --git a/examples/apps/alarm_controller/alarm_controller.c b/examples/apps/alarm_controller/alarm_controller.c index 37c04cae6..66a3ee03b 100644 --- a/examples/apps/alarm_controller/alarm_controller.c +++ b/examples/apps/alarm_controller/alarm_controller.c @@ -51,7 +51,7 @@ void AlarmController_Loop(void) // ********** hot plug management ************ // Check if we have done the first init or if service Id have changed - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { if (end_detection) { diff --git a/examples/apps/biometric-security/biometric_security.c b/examples/apps/biometric-security/biometric_security.c index 3d48b6078..d14830467 100644 --- a/examples/apps/biometric-security/biometric_security.c +++ b/examples/apps/biometric-security/biometric_security.c @@ -70,7 +70,7 @@ void BiometricSecurity_Loop(void) static uint8_t system_init = 0; search_result_t result; - if (Luos_IsNodeDetected() && !system_init) + if (Luos_IsDetected() && !system_init) { RTFilter_Alias(RTFilter_Reset(&result), "btn_"); diff --git a/examples/apps/start_controller/start_controller.c b/examples/apps/start_controller/start_controller.c index 0a4a86989..0ff313568 100644 --- a/examples/apps/start_controller/start_controller.c +++ b/examples/apps/start_controller/start_controller.c @@ -61,7 +61,7 @@ void StartController_Loop(void) search_result_t result; // ********** hot plug management ************ // Check if we have done the first init or if service Id have changed - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { // Make services configurations if (end_detection) diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map index e31b62a1e..204138e17 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map @@ -360,7 +360,7 @@ section address length [bytes] (dec) Description .text.Luos_SetVerboseMo 0x8740 0x8 8 .text.RoutingTB_Get 0x8748 0x8 8 .text.LuosHAL_GetMode 0x8750 0x8 8 -.text.Robus_GetNode 0x8758 0x8 8 +.text.Node_Get 0x8758 0x8 8 .text._close 0x8760 0x8 8 .text._fstat 0x8768 0x8 8 .text._isatty 0x8770 0x8 8 @@ -609,7 +609,7 @@ Discarded input sections 0x00000000 0x44 build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_ReadFromService 0x00000000 0xa0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_IsNodeDetected + .text.Luos_IsDetected 0x00000000 0x10 build/luos_bootloader/production/_ext/1555399743/luos_engine.o .text.Luos_SetFilterState 0x00000000 0x1c build/luos_bootloader/production/_ext/1555399743/luos_engine.o @@ -3127,11 +3127,11 @@ LOAD data_init 0x000078c0 0x44 build/luos_bootloader/production/_ext/1857845632/robus_hal.o 0x000078c0 RobusHAL_ResetTimeout -.text.Robus_SetNodeDetected%176 +.text.Node_SetState%176 0x00007904 0x44 - .text.Robus_SetNodeDetected + .text.Node_SetState 0x00007904 0x44 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00007904 Robus_SetNodeDetected + 0x00007904 Node_SetState .text._fwalk_reent%177 0x00007948 0x42 @@ -3569,11 +3569,11 @@ LOAD data_init 0x00008644 0x10 build/luos_bootloader/production/_ext/1234256160/luos_hal.o 0x00008644 LuosHAL_FlashReadLuosMemoryInfo -.text.Robus_IsNodeDetected%258 +.text.Node_GetState%258 0x00008654 0x10 - .text.Robus_IsNodeDetected + .text.Node_GetState 0x00008654 0x10 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008654 Robus_IsNodeDetected + 0x00008654 Node_GetState .text.Robus_SetVerboseMode%259 0x00008664 0x10 @@ -3686,11 +3686,11 @@ LOAD data_init 0x00008750 0x8 build/luos_bootloader/production/_ext/1234256160/luos_hal.o 0x00008750 LuosHAL_GetMode -.text.Robus_GetNode%279 +.text.Node_Get%279 0x00008758 0x8 - .text.Robus_GetNode + .text.Node_Get 0x00008758 0x8 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008758 Robus_GetNode + 0x00008758 Node_Get .text._close%280 0x00008760 0x8 diff --git a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c index 334e9e6d8..32810d513 100644 --- a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c +++ b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c @@ -48,7 +48,7 @@ void DetectionButton_Loop(void) // ********** hot plug management ************ // Check if we have done the first init or if service Id have changed - if (Luos_IsNodeDetected() == false) + if (Luos_IsDetected() == false) { // We don't have any ID, meaning no detection occure or detection is occuring. if (previous_id == -1) diff --git a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c index 8f95e5bb4..51a05a83c 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c +++ b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c @@ -78,7 +78,7 @@ void LedStripPosition_Loop(void) static uint32_t lastframe_time_ms = 0; search_result_t result; // Check if we have done the first init or if service Id have changed - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { if (end_detection) { diff --git a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c index 2c52c16f3..06b68e633 100644 --- a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c +++ b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c @@ -53,7 +53,7 @@ void MotorCopy_Loop(void) { // Check if we have done the first init or if service Id have changed - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { if (end_detection) { diff --git a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c index 5ffaf5db2..9ffa9013f 100644 --- a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c +++ b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c @@ -72,7 +72,7 @@ void RunMotor_Init(void) void RunMotor_Loop(void) { // Check if we the node is detected - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { // check if we need to change the selected motor // if new target has been received, update selected motor diff --git a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c index 535395c7a..7ae9fe70a 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c +++ b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c @@ -208,7 +208,7 @@ void game_service() return; } } - if (!Luos_IsNodeDetected()) + if (!Luos_IsDetected()) { // Someone relaunch a detection game_state = game_loading; @@ -222,7 +222,7 @@ void game_over() char c; score_increase(player, last_id); set_screen_to(gameOver_view); - while (Luos_IsNodeDetected()) + while (Luos_IsDetected()) { if ((kbhit())) { @@ -241,7 +241,7 @@ void game_start() char c; set_screen_to(start_view); // Game is not running - while (!Luos_IsNodeDetected()) + while (!Luos_IsDetected()) { // This is the initialization if ((kbhit())) @@ -282,7 +282,7 @@ void game_alone() get_service = true; game_state = game_loading; update_alone = true; - while (Luos_IsNodeDetected()) + while (Luos_IsDetected()) { } return; @@ -293,7 +293,7 @@ void game_alone() void game_loading() { set_screen_to(wait_view); - while (!Luos_IsNodeDetected()) + while (!Luos_IsDetected()) { } if (get_service) @@ -311,7 +311,7 @@ void game_running() static ball_t last_ball = LEFT; static uint32_t empty_date; uint8_t c; - if (!Luos_IsNodeDetected()) + if (!Luos_IsDetected()) { // Someone relaunch a detection game_state = game_loading; diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index 970133660..fd2cb968a 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -16,18 +16,10 @@ * Definitions ******************************************************************************/ -typedef struct -{ - network_state_t state; - bool timeout_run; - uint32_t timeout; -} network_lock_t; - typedef struct { // Variables - node_t node; /*!< Node informations. */ RxCom_t rx; /*!< Receiver informations. */ TxCom_t tx; /*!< Transmitter informations. */ PortMng_t port; /*!< Port informations. */ @@ -38,9 +30,6 @@ typedef struct uint8_t IDMask[ID_MASK_SIZE]; uint16_t IDShiftMask; - // network management - network_lock_t node_connected; - uint8_t filter_state; uint16_t filter_id; uint8_t verbose; diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index fa0312d06..f86316ebc 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -10,17 +10,6 @@ #include #include #include "io_struct.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef enum -{ - NO_DETECTION, - DETECTION_OK, - LOCAL_DETECTION, - EXTERNAL_DETECTION, -} network_state_t; - /******************************************************************************* * Variables ******************************************************************************/ @@ -35,10 +24,7 @@ void Robus_ServicesClear(void); error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg); error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg); uint16_t Robus_TopologyDetection(ll_service_t *ll_service); -node_t *Robus_GetNode(void); void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number); -void Robus_SetNodeDetected(network_state_t); -network_state_t Robus_IsNodeDetected(void); void Robus_SetFilterState(uint8_t state, ll_service_t *service); void Robus_SetVerboseMode(uint8_t mode); void Robus_MaskInit(void); diff --git a/network/robus/src/port_manager.c b/network/robus/src/port_manager.c index b467e7f8f..dd034ef77 100644 --- a/network/robus/src/port_manager.c +++ b/network/robus/src/port_manager.c @@ -39,6 +39,7 @@ #include "context.h" #include "robus_hal.h" #include "luos_hal.h" +#include "node.h" /******************************************************************************* * Definitions @@ -67,7 +68,7 @@ _CRITICAL void PortMng_Init(void) // Reinit port table for (uint8_t port = 0; port < NBR_PORT; port++) { - ctx.node.port_table[port] = 0; + Node_Get()->port_table[port] = 0; } } /****************************************************************************** @@ -85,7 +86,7 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) // Check if every line have been poked and poke it if not for (uint8_t port = 0; port < NBR_PORT; port++) { - if (ctx.node.port_table[port] == 0) + if (Node_Get()->port_table[port] == 0) { return; } @@ -117,7 +118,7 @@ uint8_t PortMng_PokePort(uint8_t PortNbr) while (LuosHAL_GetSystick() - start_tick < 3) ; // Save port as empty by default - ctx.node.port_table[PortNbr] = 0xFFFF; + Node_Get()->port_table[PortNbr] = 0xFFFF; // read the line state if (RobusHAL_GetPTPState(PortNbr)) { @@ -139,11 +140,11 @@ uint8_t PortMng_PokePort(uint8_t PortNbr) ******************************************************************************/ error_return_t PortMng_PokeNextPort(void) { - if ((ctx.port.activ != NBR_PORT) || (ctx.node.node_id == 1)) + if ((ctx.port.activ != NBR_PORT) || (Node_Get()->node_id == 1)) { for (uint8_t port = 0; port < NBR_PORT; port++) { - if (ctx.node.port_table[port] == 0) + if (Node_Get()->port_table[port] == 0) { // this port have not been poked if (PortMng_PokePort(port)) @@ -153,7 +154,7 @@ error_return_t PortMng_PokeNextPort(void) else { // nobody is here - ctx.node.port_table[port] = 0xFFFF; + Node_Get()->port_table[port] = 0xFFFF; } } } diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index b125d9d2d..1b6511b65 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -219,7 +219,7 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) { MsgAlloc_Reset(); ctx.tx.status = TX_DISABLE; - Robus_SetNodeDetected(EXTERNAL_DETECTION); + Node_SetState(EXTERNAL_DETECTION); Robus_SetVerboseMode(false); PortMng_Init(); } @@ -522,7 +522,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) } else { - if ((header->target == ctx.node.node_id) && ((header->target != 0))) + if ((header->target == Node_Get()->node_id) && ((header->target != 0))) { return ctx.verbose; } @@ -658,7 +658,7 @@ void Recep_InterpretMsgProtocol(msg_t *msg) return; } // check if the message is really for the node or it is a service that has no filter - if (msg->header.target == ctx.node.node_id) + if (msg->header.target == Node_Get()->node_id) { for (i = 0; i < ctx.ll_service_number; i++) { @@ -687,7 +687,7 @@ _CRITICAL static inline uint8_t Recep_IsAckNeeded(void) // when it is a serviceidack and this message is destined to the node send an ack return 1; } - else if ((current_msg->header.target_mode == NODEIDACK) && (ctx.node.node_id == current_msg->header.target)) + else if ((current_msg->header.target_mode == NODEIDACK) && (Node_Get()->node_id == current_msg->header.target)) { // when it is nodeidack and this message is destined to the node send an ack return 1; diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 43f7747f7..e7c3b07d6 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -34,12 +34,9 @@ typedef struct __attribute__((__packed__)) }; } node_bootstrap_t; -#define NETWORK_TIMEOUT 10000 // timeout to detect a failed detection - static error_return_t Robus_MsgHandler(msg_t *input); static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service); static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service); -static void Robus_RunNetworkTimeout(void); /******************************************************************************* * Variables ******************************************************************************/ @@ -61,15 +58,7 @@ void Robus_Init(memory_stats_t *memory_stats) { // Init the number of created virtual service. ctx.ll_service_number = 0; - // Set default service id. This id is a void id used if no service is created. - ctx.node.node_id = DEFAULTID; - // By default node are not certified. - ctx.node.certified = false; - // set node_info value - ctx.node.node_info = 0; -#ifdef NO_RTB - ctx.node.node_info |= 1 << 0; -#endif + Node_Init(); // no transmission lock ctx.tx.lock = false; // Init collision state @@ -103,7 +92,7 @@ void Robus_Init(memory_stats_t *memory_stats) ctx.rx.status.unmap = 0; ctx.rx.status.identifier = 0xF; - Robus_SetNodeDetected(NO_DETECTION); + Node_SetState(NO_DETECTION); } /****************************************************************************** * @brief Reset Masks @@ -126,7 +115,7 @@ void Robus_MaskInit(void) void Robus_Loop(void) { // Network timeout management - Robus_RunNetworkTimeout(); + Node_Loop(); // Execute message allocation tasks MsgAlloc_loop(); // Interpreat received messages and create luos task for it. @@ -193,7 +182,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) // *************************************************** // don't send luos messages if network is down // *************************************************** - if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Robus_IsNodeDetected() != DETECTION_OK)) + if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Node_GetState() != DETECTION_OK)) { return PROHIBITED; } @@ -260,7 +249,7 @@ error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg) } else { - msg->header.source = ctx.node.node_id; + msg->header.source = Node_Get()->node_id; } if (Robus_SetTxTask(ll_service, msg) == FAILED) { @@ -280,7 +269,7 @@ uint16_t Robus_TopologyDetection(ll_service_t *ll_service) // if a detection is in progress, // Don't do an another detection and return 0 - if (Robus_IsNodeDetected() >= LOCAL_DETECTION) + if (Node_GetState() >= LOCAL_DETECTION) { return 0; } @@ -292,13 +281,13 @@ uint16_t Robus_TopologyDetection(ll_service_t *ll_service) // Reset all detection state of services on the network Robus_ResetNetworkDetection(ll_service); // Make sure that the detection is not interrupted - if (Robus_IsNodeDetected() == EXTERNAL_DETECTION) + if (Node_GetState() == EXTERNAL_DETECTION) { return 0; } // setup local node - ctx.node.node_id = 1; - last_node = 1; + Node_Get()->node_id = 1; + last_node = 1; // setup sending ll_service ll_service->id = 1; @@ -334,7 +323,7 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) { // if a detection is in progress, // Don't do an another detection and return 0 - if (Robus_IsNodeDetected() >= LOCAL_DETECTION) + if (Node_GetState() >= LOCAL_DETECTION) { return 0; } @@ -353,11 +342,11 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) try_nbr++; } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); - ctx.node.node_id = 0; + Node_Get()->node_id = 0; PortMng_Init(); if (try_nbr < 5) { - Robus_SetNodeDetected(LOCAL_DETECTION); + Node_SetState(LOCAL_DETECTION); return SUCCEED; } @@ -392,9 +381,9 @@ static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service) { // Message transmission failure // Consider this port unconnected - ctx.node.port_table[ctx.port.activ] = 0xFFFF; - ctx.port.activ = NBR_PORT; - ctx.port.keepLine = false; + Node_Get()->port_table[ctx.port.activ] = 0xFFFF; + ctx.port.activ = NBR_PORT; + ctx.port.keepLine = false; continue; } @@ -404,7 +393,7 @@ static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service) while (ctx.port.keepLine) { Robus_Loop(); - if (LuosHAL_GetSystick() - start_tick > NETWORK_TIMEOUT) + if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) { // topology detection is too long, we should abort it and restart return FAILED; @@ -446,10 +435,10 @@ static error_return_t Robus_MsgHandler(msg_t *input) // This is a reply to our request to generate the next node id. // This node_id is the one after the currently poked branch. // We need to save this ID as a connection on a port - memcpy((void *)&ctx.node.port_table[ctx.port.activ], (void *)&input->data[0], sizeof(uint16_t)); + memcpy((void *)&Node_Get()->port_table[ctx.port.activ], (void *)&input->data[0], sizeof(uint16_t)); // Now we can send it to the next node memcpy((void *)&node_bootstrap.nodeid, (void *)&input->data[0], sizeof(uint16_t)); - node_bootstrap.prev_nodeid = ctx.node.node_id; + node_bootstrap.prev_nodeid = Node_Get()->node_id; output_msg.header.config = BASE_PROTOCOL; output_msg.header.cmd = WRITE_NODE_ID; output_msg.header.size = sizeof(node_bootstrap_t); @@ -459,15 +448,15 @@ static error_return_t Robus_MsgHandler(msg_t *input) Robus_SendMsg(ll_service, &output_msg); break; case sizeof(node_bootstrap_t): - if (ctx.node.node_id != 0) + if (Node_Get()->node_id != 0) { - ctx.node.node_id = 0; + Node_Get()->node_id = 0; MsgAlloc_Init(NULL); } // This is a node bootstrap information. memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); - ctx.node.node_id = node_bootstrap.nodeid; - ctx.node.port_table[ctx.port.activ] = node_bootstrap.prev_nodeid; + Node_Get()->node_id = node_bootstrap.nodeid; + Node_Get()->port_table[ctx.port.activ] = node_bootstrap.prev_nodeid; // Continue the topology detection on our other ports. Robus_DetectNextNodes(ll_service); default: @@ -480,7 +469,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) break; case END_DETECTION: // Detect end of detection - Robus_SetNodeDetected(DETECTION_OK); + Node_SetState(DETECTION_OK); return FAILED; break; default: @@ -489,15 +478,6 @@ static error_return_t Robus_MsgHandler(msg_t *input) } return FAILED; } -/****************************************************************************** - * @brief get node structure - * @param None - * @return Node pointer - ******************************************************************************/ -node_t *Robus_GetNode(void) -{ - return (node_t *)&ctx.node; -} /****************************************************************************** * @brief ID Mask calculation * @param ID and Number of service @@ -523,62 +503,6 @@ void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number) } } -/****************************************************************************** - * @brief set node_connected variable - * @param state - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL inline void Robus_SetNodeDetected(network_state_t state) -{ - switch (state) - { - case NO_DETECTION: - ctx.node_connected.timeout_run = false; - ctx.node_connected.timeout = 0; - break; - case LOCAL_DETECTION: - case EXTERNAL_DETECTION: - ctx.node_connected.timeout_run = true; - ctx.node_connected.timeout = LuosHAL_GetSystick(); - break; - case DETECTION_OK: - ctx.node_connected.timeout_run = false; - ctx.node_connected.timeout = 0; - break; - default: - break; - } - ctx.node_connected.state = state; -} - -/****************************************************************************** - * @brief manage network timeout - * @param None - * @return None - ******************************************************************************/ -void Robus_RunNetworkTimeout(void) -{ - if (ctx.node_connected.timeout_run) - { - // if timeout is reached, go back to link-down state - if (LuosHAL_GetSystick() - ctx.node_connected.timeout > NETWORK_TIMEOUT) - { - Robus_SetNodeDetected(NO_DETECTION); - } - } -} - -/****************************************************************************** - * @brief get node_connected value - * @param None - * @return state - ******************************************************************************/ -network_state_t Robus_IsNodeDetected(void) -{ - return ctx.node_connected.state; -} - /****************************************************************************** * @brief Function that changes the filter value * @param uint8_t value, 1 if we want to disable, 0 to enable diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 8ac2b80d4..c6cdb66ff 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -228,7 +228,7 @@ _CRITICAL void Transmit_End(void) // A tx_task failed nbrRetry++; // compute a delay before retry - RobusHAL_ResetTimeout(20 * nbrRetry * (ctx.node.node_id + 1)); + RobusHAL_ResetTimeout(20 * nbrRetry * (Node_Get()->node_id + 1)); // Lock the trasmission to be sure no one can send something from this node. ctx.tx.lock = true; ctx.tx.status = TX_DISABLE; diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index 0a7aa9824..aa895d96d 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -72,7 +72,7 @@ static void Detection(service_t *service) do { Luos_Loop(); - } while (!Luos_IsNodeDetected()); + } while (!Luos_IsDetected()); RTFilter_Reset(&result); printf("[INFO] %d services are active\n", result.result_nbr); diff --git a/test/test_routing_table/main.c b/test/test_routing_table/main.c index 65a44e627..fda93c220 100644 --- a/test/test_routing_table/main.c +++ b/test/test_routing_table/main.c @@ -109,7 +109,7 @@ void unittest_RTFilter_Type(void) do { Luos_Loop(); - } while (!Luos_IsNodeDetected()); + } while (!Luos_IsDetected()); // Init variables search_result_t result; @@ -234,7 +234,7 @@ void unittest_RTFilter_Alias() do { Luos_Loop(); - } while (!Luos_IsNodeDetected()); + } while (!Luos_IsDetected()); // Init variables ExpectedServiceNB = 3; search_result_t result; diff --git a/tool_services/gate/gate.c b/tool_services/gate/gate.c index 3bc1eb3d7..0aac929a3 100644 --- a/tool_services/gate/gate.c +++ b/tool_services/gate/gate.c @@ -56,7 +56,7 @@ void Gate_Loop(void) static uint32_t last_time = 0; // Check the detection status. - if (Luos_IsNodeDetected() == false) + if (Luos_IsDetected() == false) { #ifndef GATE_POLLING update_time = TimeOD_TimeFrom_s(GATE_REFRESH_TIME_S); diff --git a/tool_services/inspector/inspector.c b/tool_services/inspector/inspector.c index 83ba51049..8183b2303 100644 --- a/tool_services/inspector/inspector.c +++ b/tool_services/inspector/inspector.c @@ -44,7 +44,7 @@ void Inspector_Init(void) void Inspector_Loop(void) { // check if the network is detected - if (Luos_IsNodeDetected()) + if (Luos_IsDetected()) { if (Luos_NbrAvailableMsg() > 0) { From c6bf09cc5eaacca8316e42ee3baab301740fc9ef Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 11:55:38 +0200 Subject: [PATCH 019/198] Create a script to compile all examples as fast as possible --- test/example_build.py | 115 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 test/example_build.py diff --git a/test/example_build.py b/test/example_build.py new file mode 100755 index 000000000..4cb1d20f6 --- /dev/null +++ b/test/example_build.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python +from os.path import join, realpath, exists +import os +import subprocess +import click +import multiprocessing as mp +import sys +import time +import argparse + + +exampledir = 'examples/projects' + +# Compute the number of examples +nb_example = 0 +compiled_example = None +examples_success = None +examples_failed = None + +for target in os.listdir(exampledir): + examples_path = join(realpath(exampledir), target) + if os.path.isdir(examples_path): + for example in os.listdir(os.path.join(exampledir, target)): + example_path = join(realpath(exampledir), target, example) + if (exists(join(example_path, "platformio.ini"))): + # This is a valid example, count it + nb_example += 1 + + +def init(compiled, success, failed): + ''' store the counter for later use ''' + global compiled_example + global examples_success + global examples_failed + compiled_example = compiled + examples_success = success + examples_failed = failed + + +# Example compilation task +OKGREEN = '\r\033[92m' +FAIL = '\r\033[91m' +ENDC = '\033[0m' + + +def compile_example(cmd, target, example, clean): + global compiled_example + if clean: + subprocess.call(cmd + " --target clean", shell=True, + stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')) + print("done") + if subprocess.call(cmd, shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')): + with compiled_example.get_lock(): + compiled_example.value += 1 + value = FAIL+"FAILED " + str(join(target, example) + ENDC) + print(value, flush=True) + with examples_failed.get_lock(): + examples_failed.value += 1 + else: + with compiled_example.get_lock(): + compiled_example.value += 1 + value = OKGREEN + "SUCCESS " + \ + str(join(target, example)) + ENDC + print(value, flush=True) + with examples_success.get_lock(): + examples_success.value += 1 + return True + + +if __name__ == '__main__': + + ## Parse arguments ## + parser = argparse.ArgumentParser(description='A command to build them all as fast as possible!\n', + formatter_class=argparse.RawTextHelpFormatter) + + # General arguments + parser.add_argument("--clean", action="store_true", + help="Clean all examples before building them") + args = parser.parse_args() + + start = time.time() + # Create all example compilation tasks + compiled_example = mp.Value('i', 0) + examples_success = mp.Value('i', 0) + examples_failed = mp.Value('i', 0) + pool = mp.Pool(nb_example, initializer=init, initargs=(compiled_example, + examples_success, + examples_failed,)) + click.secho( + "\nbuild result Project name\n------------ ------------") + for target in os.listdir(exampledir): + examples_path = join(realpath(exampledir), target) + if os.path.isdir(examples_path): + for example in os.listdir(os.path.join(exampledir, target)): + example_path = join(exampledir, target, example) + cmd = "platformio run -d " + example_path + if (exists(join(example_path, "platformio.ini"))): + pool.apply_async( + compile_example, args=(cmd, target, example, args.clean)) + + pool.close() + while compiled_example.value < nb_example: + # Print a nice loading bar + chars = "/—\|" + for char in chars: + sys.stdout.write( + '\r'+'Building ' + char + ' (' + str(compiled_example.value) + "/" + str(nb_example) + ")") + time.sleep(.1) + sys.stdout.flush() + + pool.join() + print("\r--------------------------------------------\nBuild summary\n--------------------------------------------") + print("\t- Success\t\t\t" + str(examples_success.value) + "/" + str(nb_example)) + print("\t- Failed\t\t\t" + str(examples_failed.value) + "/" + str(nb_example)) + print("\t- Total compilation time\t" + str(time.time() - start) + "s") From f44d0bc79822b9c9fa4260418c189ad390c5bbbe Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 12:01:07 +0200 Subject: [PATCH 020/198] Make inspector use local Pipe during compilation --- examples/projects/Arduino/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini | 1 + .../projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini | 1 + .../STM32F4-discovery/inspector_serialcom/platformio.ini | 1 + examples/projects/l0/inspector_serialcom/platformio.ini | 1 + 9 files changed, 9 insertions(+) diff --git a/examples/projects/Arduino/inspector_serialcom/platformio.ini b/examples/projects/Arduino/inspector_serialcom/platformio.ini index 582c60117..df7796fda 100644 --- a/examples/projects/Arduino/inspector_serialcom/platformio.ini +++ b/examples/projects/Arduino/inspector_serialcom/platformio.ini @@ -27,6 +27,7 @@ default_envs = zero [env] lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ lib_ldf_mode =off platform = atmelsam diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini index 771c3d9e4..a9f2ccdc1 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini @@ -14,6 +14,7 @@ default_envs = nucleo_f072rb [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_f072rb diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini index a398009b6..76b198b3c 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_f401re diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini index 73da22e43..af9a65d6c 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = nucleo_f410rb [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_f410rb diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini index e647a2e45..6db1297eb 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = nucleo_g431kb [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_g431kb diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini index 653ea9b7b..df83df4c6 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = nucleo_g474re [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_g474re diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini index 6f6f5d923..3e89293a8 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = nucleo_l432kc diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini index 10c65087b..311d7613c 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini @@ -26,6 +26,7 @@ build_flags = -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32F4 lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ lib_deps = luos_engine@^3.0.0 diff --git a/examples/projects/l0/inspector_serialcom/platformio.ini b/examples/projects/l0/inspector_serialcom/platformio.ini index ace691e37..a7deab40d 100644 --- a/examples/projects/l0/inspector_serialcom/platformio.ini +++ b/examples/projects/l0/inspector_serialcom/platformio.ini @@ -13,6 +13,7 @@ default_envs = l0 [env] lib_ldf_mode =off lib_extra_dirs = + $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ platform = ststm32 board = l0 From b45d472003da5921b3538036e5a0de1e114effbe Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 17:40:23 +0200 Subject: [PATCH 021/198] Remove filters disableabilty and verbose mode. We will have to completely redesign them and they represent complexity when it come to move things. --- engine/IO/src/msg_alloc.c | 5 --- engine/core/src/node.c | 6 ++- network/robus/inc/context.h | 5 +-- network/robus/inc/robus.h | 2 - network/robus/src/reception.c | 85 ++--------------------------------- network/robus/src/robus.c | 24 +--------- 6 files changed, 10 insertions(+), 117 deletions(-) diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index f7bcd57eb..6dab31109 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -166,11 +166,6 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) mem_stat = memory_stats; } Robus_MaskInit(); // Mask filter for service ID - // Filter State - ctx.filter_id = 0; - ctx.filter_state = true; - // Verbose - ctx.verbose = LOCALHOST; // Reset have been made reset_needed = false; } diff --git a/engine/core/src/node.c b/engine/core/src/node.c index 0525c8459..e031b575f 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -140,7 +140,8 @@ bool Luos_IsDetected(void) ******************************************************************************/ void Luos_SetFilterState(uint8_t state, service_t *service) { - Robus_SetFilterState(state, service->ll_service); + // Enable or disable the filter for a given service + // This function have been disabled since 3.0.0 } /****************************************************************************** @@ -150,5 +151,6 @@ void Luos_SetFilterState(uint8_t state, service_t *service) ******************************************************************************/ void Luos_SetVerboseMode(uint8_t mode) { - Robus_SetVerboseMode(mode); + // Enable or disable the verbose mode + // This function have been disabled since 3.0.0 } \ No newline at end of file diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index fd2cb968a..0cf06303f 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -27,12 +27,9 @@ typedef struct // Low level service management ll_service_t ll_service_table[MAX_SERVICE_NUMBER]; /*!< Low level Service table. */ uint16_t ll_service_number; /*!< Low level Service number. */ + uint8_t IDMask[ID_MASK_SIZE]; uint16_t IDShiftMask; - - uint8_t filter_state; - uint16_t filter_id; - uint8_t verbose; uint8_t TopicMask[TOPIC_MASK_SIZE]; /*!< multicast target bank. */ } context_t; diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index f86316ebc..7b11fbcda 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -25,8 +25,6 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg); error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg); uint16_t Robus_TopologyDetection(ll_service_t *ll_service); void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number); -void Robus_SetFilterState(uint8_t state, ll_service_t *service); -void Robus_SetVerboseMode(uint8_t mode); void Robus_MaskInit(void); #endif /* _ROBUS_H_ */ diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 1b6511b65..239db4e3e 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -220,7 +220,6 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) MsgAlloc_Reset(); ctx.tx.status = TX_DISABLE; Node_SetState(EXTERNAL_DETECTION); - Robus_SetVerboseMode(false); PortMng_Init(); } else @@ -476,16 +475,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) // Check all ll_service id if (Recep_ServiceIDCompare(header->target) == SUCCEED) { - return ctx.verbose; - } - if (ctx.filter_state == false) - { - // check if it is message comes from service that demanded the filter desactivation - if (ctx.filter_id != header->source) - { - // if there is a service that deactivated the filtering occupy the message - return MULTIHOST; - } + return LOCALHOST; } break; case TYPE: @@ -497,15 +487,6 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) return MULTIHOST; } } - if (ctx.filter_state == false) - { - // check if it is message comes from service that demanded the filter desactivation - if (ctx.filter_id != header->source) - { - // if there is a service that deactivated the filtering occupy the message - return MULTIHOST; - } - } break; case BROADCAST: if (header->target == BROADCAST_VAL) @@ -518,27 +499,18 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) case NODEID: if ((header->target == 0) && (ctx.port.activ != NBR_PORT) && (ctx.port.keepLine == false)) { - return ctx.verbose; // discard message if ID = 0 and no Port activ + return LOCALHOST; // discard message if ID = 0 and no Port activ } else { if ((header->target == Node_Get()->node_id) && ((header->target != 0))) { - return ctx.verbose; - } - else if (ctx.filter_state == false) - { - // check if it is message comes from service that demanded the filter desactivation - if (ctx.filter_id != header->source) - { - // if there is a service that deactivated the filtering occupy the message - return MULTIHOST; - } + return LOCALHOST; } } break; case TOPIC: - if ((Recep_TopicCompare(header->target) == SUCCEED) || (ctx.filter_state == false)) + if (Recep_TopicCompare(header->target) == SUCCEED) { return MULTIHOST; } @@ -549,47 +521,6 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) } return EXTERNALHOST; } -/****************************************************************************** - * @brief Double Allocate msg_task in case of desactivated filter - * @param msg pointer - * @return None - ******************************************************************************/ -static inline void Recep_DoubleAlloc(msg_t *msg) -{ - // if there is a service that deactivated the filter we also allocate a message for it - if (ctx.filter_state == false) - { - // find the position of this service in the node - uint16_t idx = Recep_CtxIndexFromID(ctx.filter_id); - // check if it is message for the same service that demanded the filter desactivation - switch (msg->header.target_mode) - { - case (SERVICEID): - if (ctx.filter_id != msg->header.target) - { - // store the message if it is not so that we dont have double messages in memory - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[idx], msg); - } - break; - case (TYPE): - if (ctx.ll_service_table[idx].type != msg->header.target) - { - // store the message if it is not so that we dont have double messages in memory - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[idx], msg); - } - break; - case (TOPIC): - if (PubSub_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[idx], msg->header.target) == false) - { - // store the message if it is not so that we dont have double messages in memory - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[idx], msg); - } - break; - default: - break; - } - } -} /****************************************************************************** * @brief Parse msg to find all services concerned and create * @param msg pointer @@ -613,8 +544,6 @@ void Recep_InterpretMsgProtocol(msg_t *msg) break; } } - // check if we need to double allocate msg_task - Recep_DoubleAlloc(msg); return; break; case TYPE: @@ -626,8 +555,6 @@ void Recep_InterpretMsgProtocol(msg_t *msg) MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); } } - // check if we need to double allocate msg_task - Recep_DoubleAlloc(msg); return; break; case BROADCAST: @@ -646,8 +573,6 @@ void Recep_InterpretMsgProtocol(msg_t *msg) MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); } } - // check if we need to double allocate msg_task - Recep_DoubleAlloc(msg); return; break; case NODEIDACK: @@ -665,8 +590,6 @@ void Recep_InterpretMsgProtocol(msg_t *msg) MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); } } - // check if we need to double allocate msg_task - Recep_DoubleAlloc(msg); return; break; default: diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index e7c3b07d6..7ff1ea9c7 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -211,7 +211,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) // Check the localhost situation luos_localhost_t localhost = Recep_NodeConcerned(&msg->header); // Check if ACK needed - if (((msg->header.target_mode == SERVICEIDACK) || (msg->header.target_mode == NODEIDACK)) && ((localhost && (msg->header.target != DEFAULTID)) || (ctx.verbose == MULTIHOST))) + if (((msg->header.target_mode == SERVICEIDACK) || (msg->header.target_mode == NODEIDACK)) && ((localhost && (msg->header.target != DEFAULTID)))) { // This is a localhost message and we need to transmit a ack. Add it at the end of the data to transmit ack = ctx.rx.status.unmap; @@ -502,25 +502,3 @@ void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number) ctx.IDMask[tempo / 8] |= 1 << ((tempo) % 8); } } - -/****************************************************************************** - * @brief Function that changes the filter value - * @param uint8_t value, 1 if we want to disable, 0 to enable - * @return None - ******************************************************************************/ -void Robus_SetFilterState(uint8_t state, ll_service_t *service) -{ - ctx.filter_state = state; - ctx.filter_id = service->id; -} -/****************************************************************************** - * @brief Set verbose mode - * @param mode true or false - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void Robus_SetVerboseMode(uint8_t mode) -{ - // verbose is localhost or multihost - ctx.verbose = mode + 1; -} From 938eb48df1442eee5f6f500553c9216ecd58f75f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 31 Mar 2023 17:53:37 +0200 Subject: [PATCH 022/198] Group all filter functions in a filter file --- engine/IO/inc/filter.h | 11 +- engine/IO/src/filter.c | 131 +++++++++++++++++++++- engine/IO/src/msg_alloc.c | 3 +- engine/core/src/luos_engine.c | 9 +- engine/core/src/pub_sub.c | 9 +- network/robus/inc/context.h | 4 - network/robus/inc/robus.h | 2 - network/robus/src/reception.c | 56 +--------- network/robus/src/robus.c | 49 +------- test/test_robus/main.c | 205 +++++++++++++++++++--------------- 10 files changed, 269 insertions(+), 210 deletions(-) diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index f08a36caf..272dbe0a6 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -7,6 +7,8 @@ #ifndef _FILTER_H_ #define _FILTER_H_ +#include "io_struct.h" +#include /******************************************************************************* * Definitions @@ -21,7 +23,12 @@ ******************************************************************************/ // generic functions -void Filter_Init(void); - +void Filter_IdInit(void); +void Filter_TopicInit(void); +void Filter_AddServiceId(uint16_t service_id, uint16_t service_number); +void Filter_AddTopic(uint16_t topic_id); +void Filter_RmTopic(uint16_t topic_id); +bool Filter_ServiceID(uint16_t service_id); +bool Filter_Topic(uint16_t topic_id); #endif /* _FILTER_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 81bca316d..b028e1882 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -5,28 +5,149 @@ * @version 0.0.0 ******************************************************************************/ -#include - +#include "filter.h" +#include "luos_utils.h" +#include "luos_hal.h" /******************************************************************************* * Definitions ******************************************************************************/ +typedef struct +{ + uint8_t IDMask[ID_MASK_SIZE]; + uint16_t IDShiftMask; + uint8_t TopicMask[TOPIC_MASK_SIZE]; /*!< multicast target bank. */ +} filter_ctx_t; /******************************************************************************* * Variables ******************************************************************************/ +filter_ctx_t filter_ctx; /******************************************************************************* * Functions ******************************************************************************/ - /****************************************************************************** - * @brief Init the interface file. + * @brief Reset Masks * @param None * @return None ******************************************************************************/ -void Filter_Init(void) +void Filter_IdInit(void) +{ + // Id mask init + filter_ctx.IDShiftMask = 0; + for (uint16_t i = 0; i < ID_MASK_SIZE; i++) + { + filter_ctx.IDMask[i] = 0; + } +} + +void Filter_TopicInit(void) +{ + // Multicast mask init + for (uint16_t i = 0; i < TOPIC_MASK_SIZE; i++) + { + filter_ctx.TopicMask[i] = 0; + } +} + +/****************************************************************************** + * @brief ID Mask calculation + * @param service_id ID of the first service + * @param service_number Number of the services on the node + * @return None + ******************************************************************************/ +void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) +{ + // 4096 bit address 512 byte possible + // Create a mask of only possibility in the node + //--------------------------->|__________| + // Shift byte byte Mask of bit address + + LUOS_ASSERT(service_id > 0); + LUOS_ASSERT(service_id <= 4096 - MAX_SERVICE_NUMBER); + Filter_IdInit(); + uint16_t tempo = 0; + filter_ctx.IDShiftMask = (service_id - 1) / 8; // aligned to byte + + // Create a mask of bit corresponding to ID number in the node + for (uint16_t i = 0; i < service_number; i++) + { + tempo = (((service_id - 1) + i) - (8 * filter_ctx.IDShiftMask)); + filter_ctx.IDMask[tempo / 8] |= 1 << ((tempo) % 8); + } +} + +/****************************************************************************** + * @brief Add a Topic on the Mask + * @param topic_id + * @return None + ******************************************************************************/ +void Filter_AddTopic(uint16_t topic_id) { + // Add 1 to the bit corresponding to the topic in multicast mask + filter_ctx.TopicMask[(topic_id / 8)] |= 1 << (topic_id - ((int)(topic_id / 8)) * 8); +} +/****************************************************************************** + * @brief Remove a Topic on the Mask + * @param topic_id + * @return None + ******************************************************************************/ +void Filter_RmTopic(uint16_t topic_id) +{ + // Remove 1 to the bit corresponding to the topic in multicast mask + filter_ctx.TopicMask[(topic_id / 8)] &= ~(1 << (topic_id - ((int)(topic_id / 8)) * 8)); } + +/****************************************************************************** + * @brief Parse msg to find a service concerne + * @param header of message + * @return None + * _CRITICAL function call in IRQ + ******************************************************************************/ +_CRITICAL bool Filter_ServiceID(uint16_t service_id) +{ + //--------------------------->|__________| + // Shift byte byte Mask of bit address + // In an node, service ID are consecutive + // MaskID is byte field wich have the size of MAX_SERVICE_NUMBER + // Shift depend od ID of first service in Node (shift = NodeID/8) + + uint16_t compare = 0; + + if ((service_id > (8 * filter_ctx.IDShiftMask))) // IDMask aligned byte + { + // Calcul ID mask for ID receive + compare = ((service_id - 1) - ((8 * filter_ctx.IDShiftMask))); + // Check if compare and internal mask match + if ((filter_ctx.IDMask[compare / 8] & (1 << (compare % 8))) != 0) + { + return true; + } + } + return false; +} + +/****************************************************************************** + * @brief Parse multicast mask to find if target exists + * @param target of message + * @return None + * _CRITICAL function call in IRQ + ******************************************************************************/ +_CRITICAL bool Filter_Topic(uint16_t topic_id) +{ + uint8_t compare = 0; + // Make sure there is a topic that can be received by the node + if (topic_id <= LAST_TOPIC) + { + compare = topic_id - ((topic_id / 8) * 8); + // Search if topic exists in mask + if ((filter_ctx.TopicMask[(topic_id / 8)] & (1 << compare)) != 0) + { + return true; + } + } + return false; +} \ No newline at end of file diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 6dab31109..95c0f6b63 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -50,6 +50,7 @@ #include "luos_hal.h" #include "luos_utils.h" #include "node.h" +#include "filter.h" #include "context.h" @@ -165,7 +166,7 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) { mem_stat = memory_stats; } - Robus_MaskInit(); // Mask filter for service ID + Filter_IdInit(); // Mask filter for service ID // Reset have been made reset_needed = false; } diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index adfe8f031..0376a5481 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -12,6 +12,7 @@ #include "luos_hal.h" #include "bootloader_core.h" #include "_timestamp.h" +#include "filter.h" /******************************************************************************* * Variables @@ -295,7 +296,7 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) index++; } } - Robus_IDMaskCalculation(1, service_number); + Filter_AddServiceId(1, service_number); } else { @@ -304,7 +305,7 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) { service_table[i].ll_service->id = base_id + i; } - Robus_IDMaskCalculation(base_id, service_number); + Filter_AddServiceId(base_id, service_number); } case 0: // send back a local routing table @@ -1012,11 +1013,11 @@ void Luos_Run(void) ******************************************************************************/ void Luos_SetID(service_t *service, uint16_t id) { - Robus_MaskInit(); + Filter_IdInit(); // set id service->ll_service->id = 1; // change filter mask - Robus_IDMaskCalculation(id, service_number); + Filter_AddServiceId(id, service_number); } /****************************************************************************** * @brief Demand a detection diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index b513bac49..c56639a08 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -8,6 +8,7 @@ #include "luos_engine.h" #include #include +#include "filter.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -48,8 +49,8 @@ error_return_t Luos_Subscribe(service_t *service, uint16_t topic) // Assert if we add a topic that is greater than the max topic value LUOS_ASSERT(topic <= LAST_TOPIC); - // Add 1 to the bit corresponding to the topic in multicast mask - ctx.TopicMask[(topic / 8)] |= 1 << (topic - ((int)(topic / 8)) * 8); + // Put this topic in the multicast bank + Filter_AddTopic(topic); // add multicast this topic to the service ll_service_t *ll_service = (ll_service_t *)&ctx.ll_service_table[0]; @@ -109,8 +110,8 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) return err; } } - // calculate mask after topic deletion - ctx.TopicMask[(topic / 8)] -= 1 << (topic - ((int)(topic / 8)) * 8); + // Remove topic from multicast mask + Filter_RmTopic(topic); } return err; } \ No newline at end of file diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index 0cf06303f..baf07b5d7 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -28,10 +28,6 @@ typedef struct ll_service_t ll_service_table[MAX_SERVICE_NUMBER]; /*!< Low level Service table. */ uint16_t ll_service_number; /*!< Low level Service number. */ - uint8_t IDMask[ID_MASK_SIZE]; - uint16_t IDShiftMask; - uint8_t TopicMask[TOPIC_MASK_SIZE]; /*!< multicast target bank. */ - } context_t; /******************************************************************************* diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 7b11fbcda..b20521033 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -24,7 +24,5 @@ void Robus_ServicesClear(void); error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg); error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg); uint16_t Robus_TopologyDetection(ll_service_t *ll_service); -void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number); -void Robus_MaskInit(void); #endif /* _ROBUS_H_ */ diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 239db4e3e..1eb753dc3 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -53,6 +53,7 @@ #include "_timestamp.h" #include "robus.h" #include "bootloader_core.h" +#include "filter.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -404,55 +405,6 @@ ll_service_t *Recep_GetConcernedLLService(header_t *header) } return NULL; } -/****************************************************************************** - * @brief Parse msg to find a service concerne - * @param header of message - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline error_return_t Recep_ServiceIDCompare(uint16_t service_id) -{ - //--------------------------->|__________| - // Shift byte byte Mask of bit address - // In an node, service ID are consecutive - // MaskID is byte field wich have the size of MAX_SERVICE_NUMBER - // Shift depend od ID of first service in Node (shift = NodeID/8) - - uint16_t compare = 0; - - if ((service_id > (8 * ctx.IDShiftMask))) // IDMask aligned byte - { - // Calcul ID mask for ID receive - compare = ((service_id - 1) - ((8 * ctx.IDShiftMask))); - // check if compare and internal mask match - if ((ctx.IDMask[compare / 8] & (1 << (compare % 8))) != 0) - { - return SUCCEED; - } - } - return FAILED; -} -/****************************************************************************** - * @brief Parse multicast mask to find if target exists - * @param target of message - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline error_return_t Recep_TopicCompare(uint16_t topic_id) -{ - uint8_t compare = 0; - // make sure there is a topic that can be received by the node - if (topic_id <= LAST_TOPIC) - { - compare = topic_id - ((topic_id / 8) * 8); - // search if topic exists in mask - if ((ctx.TopicMask[(topic_id / 8)] & (1 << compare)) != 0) - { - return SUCCEED; - } - } - return FAILED; -} /****************************************************************************** * @brief Parse msg to find a service concerne * @param header of message @@ -473,7 +425,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) ctx.rx.status.rx_error = false; case SERVICEID: // Check all ll_service id - if (Recep_ServiceIDCompare(header->target) == SUCCEED) + if (Filter_ServiceID(header->target)) { return LOCALHOST; } @@ -510,7 +462,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) } break; case TOPIC: - if (Recep_TopicCompare(header->target) == SUCCEED) + if (Filter_Topic(header->target)) { return MULTIHOST; } @@ -605,7 +557,7 @@ void Recep_InterpretMsgProtocol(msg_t *msg) _CRITICAL static inline uint8_t Recep_IsAckNeeded(void) { // check the mode of the message received - if ((current_msg->header.target_mode == SERVICEIDACK) && (Recep_ServiceIDCompare(current_msg->header.target) == SUCCEED)) + if ((current_msg->header.target_mode == SERVICEIDACK) && (Filter_ServiceID(current_msg->header.target))) { // when it is a serviceidack and this message is destined to the node send an ack return 1; diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 7ff1ea9c7..0df3533e3 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -17,6 +17,7 @@ #include "msg_alloc.h" #include "luos_utils.h" #include "luos_engine.h" +#include "filter.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -67,14 +68,9 @@ void Robus_Init(memory_stats_t *memory_stats) ctx.tx.status = TX_DISABLE; // Save luos baudrate baudrate = DEFAULTBAUDRATE; - // mask - Robus_MaskInit(); - - // multicast mask init - for (uint16_t i = 0; i < TOPIC_MASK_SIZE; i++) - { - ctx.TopicMask[i] = 0; - } + // Filters init + Filter_IdInit(); + Filter_TopicInit(); // Init reception Recep_Init(); @@ -94,19 +90,6 @@ void Robus_Init(memory_stats_t *memory_stats) Node_SetState(NO_DETECTION); } -/****************************************************************************** - * @brief Reset Masks - * @param None - * @return None - ******************************************************************************/ -void Robus_MaskInit(void) -{ - ctx.IDShiftMask = 0; - for (uint16_t i = 0; i < ID_MASK_SIZE; i++) - { - ctx.IDMask[i] = 0; - } -} /****************************************************************************** * @brief Loop of the Robus communication protocole * @param None @@ -478,27 +461,3 @@ static error_return_t Robus_MsgHandler(msg_t *input) } return FAILED; } -/****************************************************************************** - * @brief ID Mask calculation - * @param ID and Number of service - * @return None - ******************************************************************************/ -void Robus_IDMaskCalculation(uint16_t service_id, uint16_t service_number) -{ - // 4096 bit address 512 byte possible - // Create a mask of only possibility in the node - //--------------------------->|__________| - // Shift byte byte Mask of bit address - - LUOS_ASSERT(service_id > 0); - LUOS_ASSERT(service_id <= 4096 - MAX_SERVICE_NUMBER); - uint16_t tempo = 0; - ctx.IDShiftMask = (service_id - 1) / 8; // aligned to byte - - // create a mask of bit corresponding to ID number in the node - for (uint16_t i = 0; i < service_number; i++) - { - tempo = (((service_id - 1) + i) - (8 * ctx.IDShiftMask)); - ctx.IDMask[tempo / 8] |= 1 << ((tempo) % 8); - } -} diff --git a/test/test_robus/main.c b/test/test_robus/main.c index df6dc34bc..b91a70851 100644 --- a/test/test_robus/main.c +++ b/test/test_robus/main.c @@ -3,60 +3,46 @@ #include "robus.h" #include "context.h" #include "unit_test.h" -#include +#include "default_scenario.h" +#include "filter.h" extern default_scenario_t default_sc; -void unittest_Robus_IDMaskCalculation() +void unittest_Filter_AddServiceId() { - NEW_TEST_CASE("ID shift mask test"); + NEW_TEST_CASE("Service ID mask test"); { - Robus_MaskInit(); + Filter_IdInit(); - Robus_IDMaskCalculation(7, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(0, ctx.IDShiftMask); + Filter_AddServiceId(7, SERVICE_NUMBER); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + SERVICE_NUMBER - 1)); - Robus_IDMaskCalculation(8, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(0, ctx.IDShiftMask); + Filter_AddServiceId(8, SERVICE_NUMBER); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + SERVICE_NUMBER - 1)); - Robus_IDMaskCalculation(9, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(1, ctx.IDShiftMask); - } - - NEW_TEST_CASE("ID mask test"); - { - Robus_MaskInit(); - Robus_IDMaskCalculation(7, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(0xC0, ctx.IDMask[0]); - TEST_ASSERT_EQUAL(0x07, ctx.IDMask[1]); - - Robus_MaskInit(); - Robus_IDMaskCalculation(8, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(0, ctx.IDShiftMask); - TEST_ASSERT_EQUAL(0x80, ctx.IDMask[0]); - TEST_ASSERT_EQUAL(0x0F, ctx.IDMask[1]); - - Robus_MaskInit(); - Robus_IDMaskCalculation(9, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(1, ctx.IDShiftMask); - TEST_ASSERT_EQUAL(0x1F, ctx.IDMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.IDMask[1]); + Filter_AddServiceId(9, SERVICE_NUMBER); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + SERVICE_NUMBER - 1)); } NEW_TEST_CASE("Limit 4096"); { - Robus_MaskInit(); - Robus_IDMaskCalculation(4096 - MAX_SERVICE_NUMBER, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(508, ctx.IDShiftMask); + Filter_IdInit(); + Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER, SERVICE_NUMBER); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_SERVICE_NUMBER)); } NEW_TEST_CASE("Limit 0"); { RESET_ASSERT(); - Robus_MaskInit(); + Filter_IdInit(); TRY { - Robus_IDMaskCalculation(0, SERVICE_NUMBER); + Filter_AddServiceId(0, SERVICE_NUMBER); } TEST_ASSERT_TRUE(IS_ASSERT()); RESET_ASSERT(); @@ -71,15 +57,25 @@ void unittest_Luos_Subscribe(void) Init_Context(); Luos_Subscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); Luos_Subscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); Luos_Subscribe(default_sc.App_1.app, 6); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); Luos_Subscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); } NEW_TEST_CASE("Assert when adding last topic"); { @@ -103,18 +99,24 @@ void unittest_Luos_Subscribe(void) Init_Context(); Luos_Subscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); Luos_Subscribe(default_sc.App_2.app, 0); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); Luos_Subscribe(default_sc.App_3.app, 0); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); Luos_Subscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); Luos_Subscribe(default_sc.App_2.app, 4); - TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); Luos_Subscribe(default_sc.App_3.app, 4); - TEST_ASSERT_EQUAL(0x11, ctx.TopicMask[0]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); } } @@ -137,37 +139,43 @@ void unittest_Robus_TopicUnsubscribe(void) Luos_Subscribe(default_sc.App_1.app, 4); Luos_Subscribe(default_sc.App_1.app, 6); Luos_Subscribe(default_sc.App_1.app, 18); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); Luos_Unsubscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(0x40, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_1.app, 6); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); } NEW_TEST_CASE("Demand to remove last topic"); { // Init default scenario context Init_Context(); Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x08, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC); TEST_ASSERT_EQUAL(err, FAILED); } @@ -184,37 +192,52 @@ void unittest_Robus_TopicUnsubscribe(void) Luos_Subscribe(default_sc.App_1.app, 18); Luos_Subscribe(default_sc.App_2.app, 18); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_2.app, 4); - TEST_ASSERT_EQUAL(0x51, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_3.app, 4); - TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_2.app, 6); - TEST_ASSERT_EQUAL(0x41, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_3.app, 6); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x04, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + Luos_Unsubscribe(default_sc.App_2.app, 18); - TEST_ASSERT_EQUAL(0x01, ctx.TopicMask[0]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[1]); - TEST_ASSERT_EQUAL(0x00, ctx.TopicMask[2]); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); } } @@ -223,7 +246,7 @@ int main(int argc, char **argv) UNITY_BEGIN(); // Big data reception - UNIT_TEST_RUN(unittest_Robus_IDMaskCalculation); + UNIT_TEST_RUN(unittest_Filter_AddServiceId); UNIT_TEST_RUN(unittest_Luos_Subscribe); UNIT_TEST_RUN(unittest_Robus_TopicUnsubscribe); From 9d6e04fa86ad5527ba83abd43d7eb42241927233 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 3 Apr 2023 13:58:51 +0200 Subject: [PATCH 023/198] Remove all context usage on msg_alloc --- engine/IO/src/msg_alloc.c | 7 ------- engine/core/src/luos_engine.c | 7 +++++++ network/robus/src/robus.c | 12 ++++++++++++ platformio.ini | 6 ++---- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 95c0f6b63..248b22fc1 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -52,8 +52,6 @@ #include "node.h" #include "filter.h" -#include "context.h" - /******************************************************************************* * Definitions ******************************************************************************/ @@ -145,11 +143,6 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void); void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** - // Reinit ll_service id - for (uint8_t i = 0; i < ctx.ll_service_number; i++) - { - ctx.ll_service_table[i].id = DEFAULTID; - } current_msg = (msg_t *)&msg_buffer[0]; data_ptr = (uint8_t *)&msg_buffer[0]; data_end_estimation = (uint8_t *)¤t_msg->data[CRC_SIZE]; diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 0376a5481..d9af57414 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -13,6 +13,7 @@ #include "bootloader_core.h" #include "_timestamp.h" #include "filter.h" +#include "context.h" /******************************************************************************* * Variables @@ -96,6 +97,12 @@ void Luos_Loop(void) if (MsgAlloc_IsReseted() == SUCCEED) { // We receive a reset detection + // Reset services ID + // Reinit ll_service id + for (uint8_t i = 0; i < ctx.ll_service_number; i++) + { + ctx.ll_service_table[i].id = DEFAULTID; + } // Reset the data reception context Luos_ReceiveData(NULL, NULL, NULL); } diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 0df3533e3..9827a21c9 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -316,6 +316,13 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) while (MsgAlloc_TxAllComplete() != SUCCEED) ; + // Reinit ll_service id + for (uint8_t i = 0; i < ctx.ll_service_number; i++) + { + ctx.ll_service_table[i].id = DEFAULTID; + } + + // Reinit msg alloc MsgAlloc_Init(NULL); // wait for some 2ms to be sure all previous messages are received and treated @@ -434,6 +441,11 @@ static error_return_t Robus_MsgHandler(msg_t *input) if (Node_Get()->node_id != 0) { Node_Get()->node_id = 0; + // Reinit ll_service id + for (uint8_t i = 0; i < ctx.ll_service_number; i++) + { + ctx.ll_service_table[i].id = DEFAULTID; + } MsgAlloc_Init(NULL); } // This is a node bootstrap information. diff --git a/platformio.ini b/platformio.ini index 38826d289..3a9d7b877 100644 --- a/platformio.ini +++ b/platformio.ini @@ -31,7 +31,5 @@ build_flags = build_type = debug test_build_src = true -; To debug a test : -; 1) Copy this file in Luos root directory -; 2) Replace "test_template" by the directory test name you want to debug (example : "routing_table") -;debug_test = test_template +; To debug a test, replace "test_template" by the directory test name you want to debug (example : "test_msg_alloc") +; debug_test = test_template From 7a41ddd608e7b9dd143386dd70d2187f1b1eadc1 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 13:22:49 +0200 Subject: [PATCH 024/198] Create Service files --- engine/core/inc/service.h | 14 ++++++++++++++ engine/core/src/service.c | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 engine/core/inc/service.h create mode 100644 engine/core/src/service.c diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h new file mode 100644 index 000000000..ad101de28 --- /dev/null +++ b/engine/core/inc/service.h @@ -0,0 +1,14 @@ +/****************************************************************************** + * @file service.h + * @brief Service related functions + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERVICE_H_ +#define _SERVICE_H_ + +/******************************************************************************* + * Function + ******************************************************************************/ + +#endif /* _SERVICE_H_ */ diff --git a/engine/core/src/service.c b/engine/core/src/service.c new file mode 100644 index 000000000..b1e3dd515 --- /dev/null +++ b/engine/core/src/service.c @@ -0,0 +1,7 @@ +/****************************************************************************** + * @file Service + * @brief Service related functions + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#include "service.h" \ No newline at end of file From 49619b9d78dc047fdd7c6f38d1da0005e2c1903e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 12:27:30 +0200 Subject: [PATCH 025/198] Group all services function into service file. --- engine/core/inc/service.h | 11 +- engine/core/inc/service_structs.h | 1 - engine/core/src/luos_engine.c | 305 ++++-------------------------- engine/core/src/service.c | 297 ++++++++++++++++++++++++++++- 4 files changed, 338 insertions(+), 276 deletions(-) diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h index ad101de28..f88580639 100644 --- a/engine/core/inc/service.h +++ b/engine/core/inc/service.h @@ -7,8 +7,17 @@ #ifndef _SERVICE_H_ #define _SERVICE_H_ +#include "service_structs.h" + /******************************************************************************* * Function ******************************************************************************/ - +void Service_Init(void); +service_t *Service_GetTable(void); +uint16_t Service_GetNumber(void); +void Service_ResetStatistics(void); +void Service_GenerateId(uint16_t base_id); +service_t *Service_GetService(ll_service_t *ll_service); +uint16_t Service_GetIndex(service_t *service); +void Service_AutoUpdateManager(void); #endif /* _SERVICE_H_ */ diff --git a/engine/core/inc/service_structs.h b/engine/core/inc/service_structs.h index 66c0efb90..a5ccc3c83 100644 --- a/engine/core/inc/service_structs.h +++ b/engine/core/inc/service_structs.h @@ -127,7 +127,6 @@ typedef struct __attribute__((__packed__)) service_t uint8_t alias[MAX_ALIAS_SIZE]; /*!< service alias. */ timed_update_t auto_refresh; /*!< service auto refresh context. */ revision_t revision; /*!< service firmware version. */ - luos_stats_t *node_statistics; /*!< Node level statistics. */ service_stats_t statistics; /*!< service level statistics. */ access_t access; /*!< service read write access. */ void *profile_context; /*!< Pointer to the profile context. */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index d9af57414..861c8ea11 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -14,6 +14,7 @@ #include "_timestamp.h" #include "filter.h" #include "context.h" +#include "service.h" /******************************************************************************* * Variables @@ -21,8 +22,6 @@ revision_t luos_version = {.major = 3, .minor = 0, .build = 0}; package_t package_table[MAX_SERVICE_NUMBER]; uint16_t package_number = 0; -service_t service_table[MAX_SERVICE_NUMBER]; -uint16_t service_number = 0; service_t *detection_service; uint8_t Flag_DetectServices = 0; @@ -33,11 +32,9 @@ general_stats_t general_stats; * Function ******************************************************************************/ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input); -static service_t *Luos_GetService(ll_service_t *ll_service); -static uint16_t Luos_GetServiceIndex(service_t *service); static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); -static void Luos_AutoUpdateManager(void); static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t size); +static error_return_t Luos_Send(service_t *service, msg_t *msg); static inline void Luos_EmptyNode(void); static inline void Luos_PackageInit(void); static inline void Luos_PackageLoop(void); @@ -49,7 +46,7 @@ static inline void Luos_PackageLoop(void); ******************************************************************************/ void Luos_Init(void) { - service_number = 0; + Service_Init(); memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); LuosHAL_Init(); Robus_Init(&luos_stats.memory); @@ -112,7 +109,7 @@ void Luos_Loop(void) while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_ll_service) != FAILED) { // There is a message available find the service linked to it - service_t *service = Luos_GetService(oldest_ll_service); + service_t *service = Service_GetService(oldest_ll_service); // check if this is a Luos Command uint8_t cmd = 0; uint16_t size = 0; @@ -172,7 +169,7 @@ void Luos_Loop(void) // finish msg used MsgAlloc_UsedMsgEnd(); // manage timed auto update - Luos_AutoUpdateManager(); + Service_AutoUpdateManager(); // save loop date last_loop_date = LuosHAL_GetSystick(); @@ -191,10 +188,7 @@ void Luos_Loop(void) void Luos_ResetStatistic(void) { memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); - for (uint16_t i = 0; i < service_number; i++) - { - service_table[i].statistics.max_retry = 0; - } + void Service_ResetStatistics(void); } /****************************************************************************** * @brief Check if this command concern luos @@ -290,30 +284,7 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) // generate local ID RoutingTB_Erase(); memcpy(&base_id, &input->data[0], sizeof(uint16_t)); - if (base_id == 1) - { - // set service Id based on received data except for the detector one. - base_id = 2; - int index = 0; - for (uint16_t i = 0; i < service_number; i++) - { - if (service_table[i].ll_service->id != 1) - { - service_table[i].ll_service->id = base_id + index; - index++; - } - } - Filter_AddServiceId(1, service_number); - } - else - { - // set service Id based on received data - for (uint16_t i = 0; i < service_number; i++) - { - service_table[i].ll_service->id = base_id + i; - } - Filter_AddServiceId(base_id, service_number); - } + Service_GenerateId(base_id); case 0: // send back a local routing table output_msg.header.cmd = RTB; @@ -416,38 +387,6 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) } return consume; } -/****************************************************************************** - * @brief Get pointer to a service in route table - * @param ll_service : low level service - * @return Service from list - ******************************************************************************/ -static service_t *Luos_GetService(ll_service_t *ll_service) -{ - for (uint16_t i = 0; i < service_number; i++) - { - if (ll_service == service_table[i].ll_service) - { - return &service_table[i]; - } - } - return 0; -} -/****************************************************************************** - * @brief Get this index of the service - * @param Service - * @return Service from list - ******************************************************************************/ -static uint16_t Luos_GetServiceIndex(service_t *service) -{ - for (uint16_t i = 0; i < service_number; i++) - { - if (service == &service_table[i]) - { - return i; - } - } - return 0xFFFF; -} /****************************************************************************** * @brief Transmit local RTB to network * @param service @@ -457,134 +396,19 @@ static uint16_t Luos_GetServiceIndex(service_t *service) static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg) { uint16_t entry_nb = 0; - routing_table_t local_routing_table[service_number + 1]; + routing_table_t local_routing_table[Service_GetNumber() + 1]; // start by saving node entry RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Node_Get()); entry_nb++; // save services entry - for (uint16_t i = 0; i < service_number; i++) + for (uint16_t i = 0; i < Service_GetNumber(); i++) { - RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &service_table[i]); + RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &Service_GetTable()[i]); } Luos_SendData(service, routeTB_msg, (void *)local_routing_table, (entry_nb * sizeof(routing_table_t))); } -/****************************************************************************** - * @brief Auto update publication for service - * @param none - * @return none - ******************************************************************************/ -static void Luos_AutoUpdateManager(void) -{ - // check all services timed_update_t contexts - for (uint16_t i = 0; i < service_number; i++) - { - // check if services have an actual ID. If not, we are in detection mode and should reset the auto refresh - if (service_table[i].ll_service->id == DEFAULTID) - { - // this service have not been detected or is in detection mode. remove auto_refresh parameters - service_table[i].auto_refresh.target = 0; - service_table[i].auto_refresh.time_ms = 0; - service_table[i].auto_refresh.last_update = 0; - } - else - { - // check if there is a timed update setted and if it's time to update it. - if (service_table[i].auto_refresh.time_ms) - { - if (service_table[i].ll_service->dead_service_spotted == service_table[i].auto_refresh.target) - { - service_table[i].auto_refresh.target = 0; - service_table[i].auto_refresh.time_ms = 0; - service_table[i].auto_refresh.last_update = 0; - continue; - } - if ((LuosHAL_GetSystick() - service_table[i].auto_refresh.last_update) >= service_table[i].auto_refresh.time_ms) - { - // This service need to send an update - // Create a fake message for it from the service asking for update - msg_t updt_msg; - updt_msg.header.config = BASE_PROTOCOL; - updt_msg.header.target = service_table[i].ll_service->id; - updt_msg.header.source = service_table[i].auto_refresh.target; - updt_msg.header.target_mode = SERVICEIDACK; - updt_msg.header.cmd = GET_CMD; - updt_msg.header.size = 0; - if ((service_table[i].service_cb != 0)) - { - service_table[i].service_cb(&service_table[i], &updt_msg); - } - else - { - if (Node_GetState() == DETECTION_OK) - { - // directly transmit the message in Localhost - Robus_SetTxTask(service_table[i].ll_service, &updt_msg); - } - } - service_table[i].auto_refresh.last_update = LuosHAL_GetSystick(); - } - } - } - } -} -/****************************************************************************** - * @brief Clear list of service - * @param none - * @return none - ******************************************************************************/ -void Luos_ServicesClear(void) -{ - service_number = 0; - Robus_ServicesClear(); -} -/****************************************************************************** - * @brief API to Create a service - * @param service_cb : Callback msg handler for the service - * @param type of service corresponding to object dictionnary - * @param alias for the service string (15 caracters max). - * @param version FW for the service (tab[MajorVersion,MinorVersion,Patch]) - * @return Service object pointer. - ******************************************************************************/ -service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *alias, revision_t revision) -{ - uint8_t i = 0; - service_t *service = &service_table[service_number]; - service->ll_service = Robus_ServiceCreate(type); - - // Link the service to his callback - service->service_cb = service_cb; - // Initialise the service aliases to 0 - memset((void *)service->default_alias, 0, MAX_ALIAS_SIZE); - memset((void *)service->alias, 0, MAX_ALIAS_SIZE); - // Save aliases - for (i = 0; i < MAX_ALIAS_SIZE - 1; i++) - { - service->default_alias[i] = alias[i]; - service->alias[i] = alias[i]; - if (service->default_alias[i] == '\0') - break; - } - service->default_alias[i] = '\0'; - service->alias[i] = '\0'; - - // Initialise the service revision to 0 - memset((void *)service->revision.unmap, 0, sizeof(revision_t)); - // Save firmware version - for (i = 0; i < sizeof(revision_t); i++) - { - service->revision.unmap[i] = revision.unmap[i]; - } - - // initiate service statistics - service->node_statistics = &luos_stats; - service->ll_service->ll_stat.max_retry = &service->statistics.max_retry; - - service_number++; - LUOS_ASSERT(service_number <= MAX_SERVICE_NUMBER); - return service; -} /****************************************************************************** * @brief Send msg through network * @param Service : Who send @@ -595,19 +419,7 @@ error_return_t Luos_SendMsg(service_t *service, msg_t *msg) { // set protocol version msg->header.config = BASE_PROTOCOL; - - if (service == 0) - { - // There is no service specified here, take the first one - service = &service_table[0]; - } - if ((service->ll_service->id == 0) && (msg->header.cmd >= LUOS_LAST_RESERVED_CMD)) - { - // We are in detection mode and this command come from user - // We can't send it - return PROHIBITED; - } - return Robus_SendMsg(service->ll_service, msg); + return Luos_Send(service, msg); } /****************************************************************************** @@ -621,10 +433,22 @@ error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t { // set timestamp in message Timestamp_EncodeMsg(msg, timestamp); + return Luos_Send(service, msg); +} + +/****************************************************************************** + * @brief Send msg through network + * @param service : Who send + * @param msg : Message to send + * @param timestamp + * @return SUCCEED : If the message is sent, else FAILED or PROHIBITED + ******************************************************************************/ +static error_return_t Luos_Send(service_t *service, msg_t *msg) +{ if (service == 0) { // There is no service specified here, take the first one - service = &service_table[0]; + service = &Service_GetTable()[0]; } if ((service->ll_service->id == 0) && (msg->header.cmd >= LUOS_LAST_RESERVED_CMD)) { @@ -632,11 +456,7 @@ error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t // We can't send it return PROHIBITED; } - if (Robus_SendMsg(service->ll_service, msg) == FAILED) - { - return FAILED; - } - return SUCCEED; + return Robus_SendMsg(service->ll_service, msg); } /****************************************************************************** @@ -794,7 +614,7 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) LUOS_ASSERT(msg != 0); LUOS_ASSERT(bin_data != 0); - uint16_t id = Luos_GetServiceIndex(service); + uint16_t id = Service_GetIndex(service); // check good service index if (id == 0xFFFF) { @@ -852,57 +672,6 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) } return 0; } -/****************************************************************************** - * @brief Store alias name service in flash - * @param service : Service to store - * @param alias : Alias to store - * @return SUCCEED : If the alias is correctly updated - ******************************************************************************/ -error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t size) -{ - - if ((size == 0) || (alias[0] == '\0')) - { - // This is a void alias just replace it with the default alias, write it - memcpy(service->alias, service->default_alias, MAX_ALIAS_SIZE); - return SUCCEED; - } - // Be sure to have a size including \0 - if (alias[size - 1] != '\0') - { - size++; - } - // Clip size - if (size > MAX_ALIAS_SIZE) - { - size = MAX_ALIAS_SIZE; - } - char clean_alias[MAX_ALIAS_SIZE] = {0}; - // Replace any ' '' character by a '_' character, FAIL at any special character. - for (uint8_t i = 0; i < size - 1; i++) - { - switch (alias[i]) - { - case 'A' ... 'Z': - case 'a' ... 'z': - case '0' ... '9': - case '_': - // This is good - clean_alias[i] = alias[i]; - break; - case ' ': - clean_alias[i] = '_'; - break; - default: - // This is a wrong character, don't do anything and return FAILED - return FAILED; - break; - } - } - // We are ready to save this new alias, write it - memcpy(service->alias, clean_alias, MAX_ALIAS_SIZE); - return SUCCEED; -} /****************************************************************************** * @brief Return the number of messages available * @param None @@ -1012,20 +781,6 @@ void Luos_Run(void) #endif } } -/****************************************************************************** - * @brief Set a local id - * @param service : Service that we want to set id - * @param id : Id value - * @return None - ******************************************************************************/ -void Luos_SetID(service_t *service, uint16_t id) -{ - Filter_IdInit(); - // set id - service->ll_service->id = 1; - // change filter mask - Filter_AddServiceId(id, service_number); -} /****************************************************************************** * @brief Demand a detection * @param service : Service that launched the detection @@ -1037,8 +792,12 @@ void Luos_Detect(service_t *service) if (Node_GetState() < LOCAL_DETECTION) { - // set the detection launcher id to 1 - Luos_SetID(service, 1); + Filter_IdInit(); + // Set the detection launcher id to 1 + service->ll_service->id = 1; + // Update the filter just to accept our detector id + Filter_AddServiceId(1, 1); + // send ask detection message detection_service = service; detect_msg.header.target_mode = SERVICEIDACK; diff --git a/engine/core/src/service.c b/engine/core/src/service.c index b1e3dd515..7ef2b07cc 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -4,4 +4,299 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include "service.h" \ No newline at end of file +#include +#include "service.h" +#include "filter.h" +#include "luos_list.h" +#include "node.h" +#include "luos_utils.h" +#include "luos_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +typedef struct +{ + service_t list[MAX_SERVICE_NUMBER]; + uint16_t number; +} service_ctx_t; + +/******************************************************************************* + * Variables + ******************************************************************************/ +service_ctx_t service_ctx; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief API to Init the service table + * @param None + * @return None + ******************************************************************************/ +void Service_Init(void) +{ + service_ctx.number = 0; +} + +/****************************************************************************** + * @brief API to get the service table + * @param None + * @return service table + ******************************************************************************/ +service_t *Service_GetTable(void) +{ + return service_ctx.list; +} + +/****************************************************************************** + * @brief API to get the service number + * @param None + * @return service number + ******************************************************************************/ +uint16_t Service_GetNumber(void) +{ + return service_ctx.number; +} + +/****************************************************************************** + * @brief API to reset all service statistics + * @param None + * @return None + ******************************************************************************/ +void Service_ResetStatistics(void) +{ + for (uint16_t i = 0; i < service_ctx.number; i++) + { + service_ctx.list[i].statistics.max_retry = 0; + } +} + +/****************************************************************************** + * @brief API to generate a service ID + * @param baseId : base ID of the services, this value will be increased for eeach services + * @return None + ******************************************************************************/ +void Service_GenerateId(uint16_t base_id) +{ + LUOS_ASSERT(base_id > 0); + Filter_AddServiceId(base_id, service_ctx.number); + if (base_id == 1) + { + // If base_id is 1, it means that the node is a detector. + // Id 1 would be reserved for the already setted detector service. + // So we need to avoid the service with id 1 and start with id 2. + base_id = 2; + } + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (service_ctx.list[i].ll_service->id != 1) + { + service_ctx.list[i].ll_service->id = base_id++; + } + } +} + +/****************************************************************************** + * @brief Get pointer to a service based on ll_service + * @param ll_service : low level service + * @return Service from list + ******************************************************************************/ +service_t *Service_GetService(ll_service_t *ll_service) +{ + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (ll_service == service_ctx.list[i].ll_service) + { + return &service_ctx.list[i]; + } + } + return 0; +} + +/****************************************************************************** + * @brief Get this service index in the service table + * @param Service + * @return Service id the service list + ******************************************************************************/ +uint16_t Service_GetIndex(service_t *service) +{ + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (service == &service_ctx.list[i]) + { + return i; + } + } + return 0xFFFF; +} + +/****************************************************************************** + * @brief Auto update call for services + * @param none + * @return none + ******************************************************************************/ +void Service_AutoUpdateManager(void) +{ + // check all services timed_update_t contexts + for (uint16_t i = 0; i < service_ctx.number; i++) + { + // check if services have an actual ID. If not, we are in detection mode and should reset the auto refresh + if (service_ctx.list[i].ll_service->id == DEFAULTID) + { + // this service have not been detected or is in detection mode. remove auto_refresh parameters + service_ctx.list[i].auto_refresh.target = 0; + service_ctx.list[i].auto_refresh.time_ms = 0; + service_ctx.list[i].auto_refresh.last_update = 0; + } + else + { + // check if there is a timed update setted and if it's time to update it. + if (service_ctx.list[i].auto_refresh.time_ms) + { + if (service_ctx.list[i].ll_service->dead_service_spotted == service_ctx.list[i].auto_refresh.target) + { + service_ctx.list[i].auto_refresh.target = 0; + service_ctx.list[i].auto_refresh.time_ms = 0; + service_ctx.list[i].auto_refresh.last_update = 0; + continue; + } + if ((LuosHAL_GetSystick() - service_ctx.list[i].auto_refresh.last_update) >= service_ctx.list[i].auto_refresh.time_ms) + { + // This service need to send an update + // Create a fake message for it from the service asking for update + msg_t updt_msg; + updt_msg.header.config = BASE_PROTOCOL; + updt_msg.header.target = service_ctx.list[i].ll_service->id; + updt_msg.header.source = service_ctx.list[i].auto_refresh.target; + updt_msg.header.target_mode = SERVICEIDACK; + updt_msg.header.cmd = GET_CMD; + updt_msg.header.size = 0; + if ((service_ctx.list[i].service_cb != 0)) + { + service_ctx.list[i].service_cb(&service_ctx.list[i], &updt_msg); + } + else + { + if (Node_GetState() == DETECTION_OK) + { + // directly transmit the message in Localhost + Robus_SetTxTask(service_ctx.list[i].ll_service, &updt_msg); + } + } + service_ctx.list[i].auto_refresh.last_update = LuosHAL_GetSystick(); + } + } + } + } +} + +/****************************************************************************** + * @brief API to Create a service + * @param service_cb : Callback msg handler for the service + * @param type of service corresponding to object dictionnary + * @param alias for the service string (15 caracters max). + * @param version FW for the service (tab[MajorVersion,MinorVersion,Patch]) + * @return Service object pointer. + ******************************************************************************/ +service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *alias, revision_t revision) +{ + uint8_t i = 0; + service_t *service = &service_ctx.list[service_ctx.number]; + service->ll_service = Robus_ServiceCreate(type); + + // Link the service to his callback + service->service_cb = service_cb; + + // Initialise the service aliases to 0 + memset((void *)service->default_alias, 0, MAX_ALIAS_SIZE); + memset((void *)service->alias, 0, MAX_ALIAS_SIZE); + // Save aliases + for (i = 0; i < MAX_ALIAS_SIZE - 1; i++) + { + service->default_alias[i] = alias[i]; + service->alias[i] = alias[i]; + if (service->default_alias[i] == '\0') + break; + } + service->default_alias[i] = '\0'; + service->alias[i] = '\0'; + + // Initialise the service revision to 0 + memset((void *)service->revision.unmap, 0, sizeof(revision_t)); + // Save firmware version + for (i = 0; i < sizeof(revision_t); i++) + { + service->revision.unmap[i] = revision.unmap[i]; + } + + // initiate service statistics + service->ll_service->ll_stat.max_retry = &service->statistics.max_retry; + + service_ctx.number++; + LUOS_ASSERT(service_ctx.number <= MAX_SERVICE_NUMBER); + return service; +} + +/****************************************************************************** + * @brief Store alias name service in flash + * @param service : Service to store + * @param alias : Alias to store + * @return SUCCEED : If the alias is correctly updated + ******************************************************************************/ +error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t size) +{ + + if ((size == 0) || (alias[0] == '\0')) + { + // This is a void alias just replace it with the default alias, write it + memcpy(service->alias, service->default_alias, MAX_ALIAS_SIZE); + return SUCCEED; + } + // Be sure to have a size including \0 + if (alias[size - 1] != '\0') + { + size++; + } + // Clip size + if (size > MAX_ALIAS_SIZE) + { + size = MAX_ALIAS_SIZE; + } + char clean_alias[MAX_ALIAS_SIZE] = {0}; + // Replace any ' '' character by a '_' character, FAIL at any special character. + for (uint8_t i = 0; i < size - 1; i++) + { + switch (alias[i]) + { + case 'A' ... 'Z': + case 'a' ... 'z': + case '0' ... '9': + case '_': + // This is good + clean_alias[i] = alias[i]; + break; + case ' ': + clean_alias[i] = '_'; + break; + default: + // This is a wrong character, don't do anything and return FAILED + return FAILED; + break; + } + } + // We are ready to save this new alias, write it + memcpy(service->alias, clean_alias, MAX_ALIAS_SIZE); + return SUCCEED; +} +/****************************************************************************** + * @brief Clear list of service + * @param none + * @return none + ******************************************************************************/ +void Luos_ServicesClear(void) +{ + service_ctx.number = 0; + Robus_ServicesClear(); +} \ No newline at end of file From 358549d467f66a33d0d51966a1828d77eaad2b29 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 14:42:49 +0200 Subject: [PATCH 026/198] Update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1640de383..54745e067 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,7 @@ /examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/build/ /examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/.generated_files/ /examples/projects/SAMD21XPLAINED/bootloader/firmware/luos_bootloader_samd21j18a.X/dist/ +examples/projects/ESP32/button/sdkconfig.esp32dev +examples/projects/ESP32/led/sdkconfig.esp32dev +tool_services/pipe/WS/ARDUINO/arduinoWebSockets/ mongoose/ From ae237a6fc842cd695ba34e11c135664d8661cdae Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 14:45:40 +0200 Subject: [PATCH 027/198] Remove useless Luos_EmptyNode() function --- engine/core/src/luos_engine.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 861c8ea11..ca671b433 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -35,7 +35,6 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input); static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t size); static error_return_t Luos_Send(service_t *service, msg_t *msg); -static inline void Luos_EmptyNode(void); static inline void Luos_PackageInit(void); static inline void Luos_PackageLoop(void); @@ -704,16 +703,6 @@ void Luos_AddPackage(void (*Init)(void), void (*Loop)(void)) package_number += 1; } -/****************************************************************************** - * @brief Create a service to signal an empty node - * @param None - * @return None - ******************************************************************************/ -void Luos_EmptyNode(void) -{ - Luos_CreateService(0, VOID_TYPE, "empty_node", luos_version); -} - /****************************************************************************** * @brief Run each package Init() * @param None @@ -732,7 +721,8 @@ void Luos_PackageInit(void) } else { - Luos_EmptyNode(); + // Create an emply node service + Luos_CreateService(0, VOID_TYPE, "empty_node", luos_version); } } From 8147a44db4361f74d988cd08fcdefd98691ed990 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 14:54:37 +0200 Subject: [PATCH 028/198] Small code improvement --- engine/core/src/luos_engine.c | 1 - engine/core/src/routing_table.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index ca671b433..d07a6d2a5 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -174,7 +174,6 @@ void Luos_Loop(void) if (Flag_DetectServices == 1) { - Flag_DetectServices++; RoutingTB_DetectServices(detection_service); Flag_DetectServices = 0; } diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index e1ceeb7a4..4684e199e 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -368,15 +368,15 @@ void RoutingTB_DetectServices(service_t *service) uint16_t nb_node = Robus_TopologyDetection(service->ll_service); // Clear data reception state Luos_ReceiveData(NULL, NULL, NULL); - // clear the routing table. + // Clear the routing table. RoutingTB_Erase(); // Generate the routing_table RoutingTB_Generate(service, nb_node); // We have a complete routing table now share it with others. RoutingTB_Share(service, nb_node); - // send a message to indicate the end of the detection + // Send a message to indicate the end of the detection RoutingTB_SendEndDetection(service); - // clear statistic of node who start the detction + // Clear statistic of node who start the detction Luos_ResetStatistic(); } /****************************************************************************** From 664d2848740eaf748ec0748215f3ab23d3851c41 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 15:55:11 +0200 Subject: [PATCH 029/198] Add type filtering on filter file --- engine/IO/inc/filter.h | 1 + engine/IO/src/filter.c | 24 ++++++++++++++++++++++-- network/robus/src/reception.c | 9 +++------ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index 272dbe0a6..9105cc720 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -30,5 +30,6 @@ void Filter_AddTopic(uint16_t topic_id); void Filter_RmTopic(uint16_t topic_id); bool Filter_ServiceID(uint16_t service_id); bool Filter_Topic(uint16_t topic_id); +bool Filter_Type(uint16_t type_id); #endif /* _FILTER_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index b028e1882..cf2de5387 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -8,6 +8,7 @@ #include "filter.h" #include "luos_utils.h" #include "luos_hal.h" +#include "service.h" /******************************************************************************* * Definitions @@ -132,8 +133,8 @@ _CRITICAL bool Filter_ServiceID(uint16_t service_id) /****************************************************************************** * @brief Parse multicast mask to find if target exists - * @param target of message - * @return None + * @param topic_id of message + * @return bool true if there is one false if not * _CRITICAL function call in IRQ ******************************************************************************/ _CRITICAL bool Filter_Topic(uint16_t topic_id) @@ -150,4 +151,23 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) } } return false; +} + +/****************************************************************************** + * @brief Parse all services type to find if target exists + * @param type_id of message + * @return bool true if there is one false if not + * _CRITICAL function call in IRQ + ******************************************************************************/ +_CRITICAL bool Filter_Type(uint16_t type_id) +{ + // Check all ll_service type + for (int i = 0; i < Service_GetNumber(); i++) + { + if (type_id == Service_GetTable()[i].ll_service->type) + { + return true; + } + } + return false; } \ No newline at end of file diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 1eb753dc3..413218e5e 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -431,13 +431,10 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) } break; case TYPE: - // Check all ll_service type - for (i = 0; i < ctx.ll_service_number; i++) + + if (Filter_Type(header->target)) { - if (header->target == ctx.ll_service_table[i].type) - { - return MULTIHOST; - } + return MULTIHOST; } break; case BROADCAST: From 6812c053eba1eef83b2db86c56037fad5d3e88bd Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 15:56:32 +0200 Subject: [PATCH 030/198] Remove the redundant ll_service_number from robus context --- engine/core/inc/service.h | 6 ++ engine/core/src/pub_sub.c | 3 +- engine/core/src/service.c | 153 +++++++++++++++++++++++++++++++++- network/robus/inc/context.h | 2 - network/robus/inc/reception.h | 1 - network/robus/inc/robus.h | 4 +- network/robus/src/reception.c | 121 --------------------------- network/robus/src/robus.c | 43 ++-------- 8 files changed, 172 insertions(+), 161 deletions(-) diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h index f88580639..7ff844ebb 100644 --- a/engine/core/inc/service.h +++ b/engine/core/inc/service.h @@ -17,7 +17,13 @@ service_t *Service_GetTable(void); uint16_t Service_GetNumber(void); void Service_ResetStatistics(void); void Service_GenerateId(uint16_t base_id); +void Service_ClearId(void); service_t *Service_GetService(ll_service_t *ll_service); uint16_t Service_GetIndex(service_t *service); void Service_AutoUpdateManager(void); + +// IO related functions +ll_service_t *Service_GetConcerned(header_t *header); +void Service_AllocMsg(msg_t *msg); + #endif /* _SERVICE_H_ */ diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index c56639a08..584515f33 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -9,6 +9,7 @@ #include #include #include "filter.h" +#include "service.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -103,7 +104,7 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) // Recompute multicast mask if needed if (err == SUCCEED) { - for (uint16_t i = 0; i < ctx.ll_service_number; i++) + for (uint16_t i = 0; i < Service_GetNumber(); i++) { if (PubSub_IsTopicSubscribed((ll_service_t *)(&ctx.ll_service_table[i]), topic) == true) { diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 7ef2b07cc..dbddfeed1 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -11,6 +11,8 @@ #include "node.h" #include "luos_utils.h" #include "luos_hal.h" +#include "msg_alloc.h" +#include "pub_sub.h" /******************************************************************************* * Definitions @@ -98,6 +100,18 @@ void Service_GenerateId(uint16_t base_id) } } +/****************************************************************************** + * @brief Clear all service ID + * @return None + ******************************************************************************/ +void Service_ClearId(void) +{ + for (uint16_t i = 0; i < service_ctx.number; i++) + { + service_ctx.list[i].ll_service->id = DEFAULTID; + } +} + /****************************************************************************** * @brief Get pointer to a service based on ll_service * @param ll_service : low level service @@ -192,6 +206,128 @@ void Service_AutoUpdateManager(void) } } +/****************************************************************************** + * @brief Parse msg to find a service concerned + * @param header of message + * @return ll_service pointer + ******************************************************************************/ +ll_service_t *Service_GetConcerned(header_t *header) +{ + uint16_t i = 0; + LUOS_ASSERT(header); + // Find if we are concerned by this message. + switch (header->target_mode) + { + case SERVICEIDACK: + case SERVICEID: + // Check all ll_service id + for (i = 0; i < service_ctx.number; i++) + { + if (header->target == service_ctx.list[i].ll_service->id) + { + return service_ctx.list[i].ll_service; + } + } + break; + case TYPE: + // Check all ll_service type + for (i = 0; i < service_ctx.number; i++) + { + if (header->target == service_ctx.list[i].ll_service->type) + { + return service_ctx.list[i].ll_service; + } + } + break; + case BROADCAST: + case NODEIDACK: + case NODEID: + return service_ctx.list[0].ll_service; + break; + case TOPIC: + default: + return NULL; + break; + } + return NULL; +} + +/****************************************************************************** + * @brief Parse msg to find all services concerned and allocate them + * @param msg pointer + * @return None + ******************************************************************************/ +void Service_AllocMsg(msg_t *msg) +{ + uint16_t i = 0; + + // Find if we are concerned by this message. + switch (msg->header.target_mode) + { + case SERVICEIDACK: + case SERVICEID: + // Check all ll_service id + for (i = 0; i < service_ctx.number; i++) + { + if (msg->header.target == service_ctx.list[i].ll_service->id) + { + MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + break; + } + } + return; + break; + case TYPE: + // Check all ll_service type + for (i = 0; i < service_ctx.number; i++) + { + if (msg->header.target == service_ctx.list[i].ll_service->type) + { + MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + } + } + return; + break; + case BROADCAST: + for (i = 0; i < service_ctx.number; i++) + { + MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + } + return; + break; + case TOPIC: + for (i = 0; i < service_ctx.number; i++) + { + if (PubSub_IsTopicSubscribed(service_ctx.list[i].ll_service, msg->header.target)) + { + // TODO manage multiple slave concerned + MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + } + } + return; + break; + case NODEIDACK: + case NODEID: + if (msg->header.target == DEFAULTID) // on default ID it's always a luos command create only one task + { + MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[0], msg); + return; + } + // check if the message is really for the node or it is a service that has no filter + if (msg->header.target == Node_Get()->node_id) + { + for (i = 0; i < service_ctx.number; i++) + { + MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + } + } + return; + break; + default: + break; + } +} + /****************************************************************************** * @brief API to Create a service * @param service_cb : Callback msg handler for the service @@ -204,7 +340,22 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a { uint8_t i = 0; service_t *service = &service_ctx.list[service_ctx.number]; - service->ll_service = Robus_ServiceCreate(type); + service->ll_service = &Robus_GetLlServiceList()[service_ctx.number]; + + // Set the service type + service->ll_service->type = type; + // Initialise the service id, TODO the ID could be stored in EEprom, the default ID could be set in factory... + service->ll_service->id = DEFAULTID; + // Initialize dead service detection + service->ll_service->dead_service_spotted = 0; + // Clear stats + service->ll_service->ll_stat.max_retry = 0; + // Clear topic number + service->ll_service->last_topic_position = 0; + for (uint16_t i = 0; i < LAST_TOPIC; i++) + { + service->ll_service->topic_list[i] = 0; + } // Link the service to his callback service->service_cb = service_cb; diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index baf07b5d7..3d498ee67 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -26,8 +26,6 @@ typedef struct // Low level service management ll_service_t ll_service_table[MAX_SERVICE_NUMBER]; /*!< Low level Service table. */ - uint16_t ll_service_number; /*!< Low level Service number. */ - } context_t; /******************************************************************************* diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index 96e9ead98..6229af67a 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -54,7 +54,6 @@ void Recep_Init(void); void Recep_EndMsg(void); void Recep_Reset(void); void Recep_Timeout(void); -void Recep_InterpretMsgProtocol(msg_t *msg); luos_localhost_t Recep_NodeConcerned(header_t *header); ll_service_t *Recep_GetConcernedLLService(header_t *header); diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index b20521033..6e5551734 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -19,8 +19,10 @@ ******************************************************************************/ void Robus_Init(memory_stats_t *memory_stats); void Robus_Loop(void); -ll_service_t *Robus_ServiceCreate(uint16_t type); + void Robus_ServicesClear(void); +ll_service_t *Robus_GetLlServiceList(void); + error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg); error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg); uint16_t Robus_TopologyDetection(ll_service_t *ll_service); diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 413218e5e..ecad49653 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -360,51 +360,6 @@ _CRITICAL void Recep_CatchAck(volatile uint8_t *data) ctx.tx.status = TX_NOK; } } -/****************************************************************************** - * @brief Parse msg to find a service concerned - * @param header of message - * @return ll_service pointer - ******************************************************************************/ -ll_service_t *Recep_GetConcernedLLService(header_t *header) -{ - uint16_t i = 0; - LUOS_ASSERT(header); - // Find if we are concerned by this message. - switch (header->target_mode) - { - case SERVICEIDACK: - case SERVICEID: - // Check all ll_service id - for (i = 0; i < ctx.ll_service_number; i++) - { - if (header->target == ctx.ll_service_table[i].id) - { - return (ll_service_t *)&ctx.ll_service_table[i]; - } - } - break; - case TYPE: - // Check all ll_service type - for (i = 0; i < ctx.ll_service_number; i++) - { - if (header->target == ctx.ll_service_table[i].type) - { - return (ll_service_t *)&ctx.ll_service_table[i]; - } - } - break; - case BROADCAST: - case NODEIDACK: - case NODEID: - return (ll_service_t *)&ctx.ll_service_table[0]; - break; - case TOPIC: - default: - return NULL; - break; - } - return NULL; -} /****************************************************************************** * @brief Parse msg to find a service concerne * @param header of message @@ -414,8 +369,6 @@ ll_service_t *Recep_GetConcernedLLService(header_t *header) ******************************************************************************/ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) { - uint16_t i = 0; - // Find if we are concerned by this message. // check if we need to filter all the messages @@ -470,81 +423,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) } return EXTERNALHOST; } -/****************************************************************************** - * @brief Parse msg to find all services concerned and create - * @param msg pointer - * @return None - ******************************************************************************/ -void Recep_InterpretMsgProtocol(msg_t *msg) -{ - uint16_t i = 0; - // Find if we are concerned by this message. - switch (msg->header.target_mode) - { - case SERVICEIDACK: - case SERVICEID: - // Check all ll_service id - for (i = 0; i < ctx.ll_service_number; i++) - { - if (msg->header.target == ctx.ll_service_table[i].id) - { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); - break; - } - } - return; - break; - case TYPE: - // Check all ll_service type - for (i = 0; i < ctx.ll_service_number; i++) - { - if (msg->header.target == ctx.ll_service_table[i].type) - { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); - } - } - return; - break; - case BROADCAST: - for (i = 0; i < ctx.ll_service_number; i++) - { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); - } - return; - break; - case TOPIC: - for (i = 0; i < ctx.ll_service_number; i++) - { - if (PubSub_IsTopicSubscribed((ll_service_t *)&ctx.ll_service_table[i], msg->header.target)) - { - // TODO manage multiple slave concerned - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); - } - } - return; - break; - case NODEIDACK: - case NODEID: - if (msg->header.target == DEFAULTID) // on default ID it's always a luos command create only one task - { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[0], msg); - return; - } - // check if the message is really for the node or it is a service that has no filter - if (msg->header.target == Node_Get()->node_id) - { - for (i = 0; i < ctx.ll_service_number; i++) - { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[i], msg); - } - } - return; - break; - default: - break; - } -} /****************************************************************************** * @brief Check if we need to send an ack * @param None diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 9827a21c9..aaa7b9bdf 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -18,6 +18,7 @@ #include "luos_utils.h" #include "luos_engine.h" #include "filter.h" +#include "service.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -57,8 +58,6 @@ volatile uint16_t last_node = 0; ******************************************************************************/ void Robus_Init(memory_stats_t *memory_stats) { - // Init the number of created virtual service. - ctx.ll_service_number = 0; Node_Init(); // no transmission lock ctx.tx.lock = false; @@ -108,35 +107,19 @@ void Robus_Loop(void) // Check if this message is a protocol one if (Robus_MsgHandler(msg) == FAILED) { - // If not create luos tasks. - Recep_InterpretMsgProtocol(msg); + // If not create luos tasks for all services. + Service_AllocMsg(msg); } } RobusHAL_Loop(); } /****************************************************************************** - * @brief create a service add in local route table - * @param type of service create + * @brief return the ll_service list * @return None ******************************************************************************/ -ll_service_t *Robus_ServiceCreate(uint16_t type) +ll_service_t *Robus_GetLlServiceList(void) { - // Set the service type - ctx.ll_service_table[ctx.ll_service_number].type = type; - // Initialise the service id, TODO the ID could be stored in EEprom, the default ID could be set in factory... - ctx.ll_service_table[ctx.ll_service_number].id = DEFAULTID; - // Initialize dead service detection - ctx.ll_service_table[ctx.ll_service_number].dead_service_spotted = 0; - // Clear stats - ctx.ll_service_table[ctx.ll_service_number].ll_stat.max_retry = 0; - // Clear topic number - ctx.ll_service_table[ctx.ll_service_number].last_topic_position = 0; - for (uint16_t i = 0; i < LAST_TOPIC; i++) - { - ctx.ll_service_table[ctx.ll_service_number].topic_list[i] = 0; - } - // Return the freshly initialized ll_service pointer. - return (ll_service_t *)&ctx.ll_service_table[ctx.ll_service_number++]; + return (ll_service_t *)ctx.ll_service_table; } /****************************************************************************** * @brief clear service list in route table @@ -147,8 +130,6 @@ void Robus_ServicesClear(void) { // Clear ll_service table memset((void *)ctx.ll_service_table, 0, sizeof(ll_service_t) * MAX_SERVICE_NUMBER); - // Reset the number of created services - ctx.ll_service_number = 0; } /****************************************************************************** * @brief Formalize message Set tx task and send @@ -317,10 +298,7 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) ; // Reinit ll_service id - for (uint8_t i = 0; i < ctx.ll_service_number; i++) - { - ctx.ll_service_table[i].id = DEFAULTID; - } + Service_ClearId(); // Reinit msg alloc MsgAlloc_Init(NULL); @@ -401,7 +379,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) { msg_t output_msg; node_bootstrap_t node_bootstrap; - ll_service_t *ll_service = Recep_GetConcernedLLService(&input->header); + ll_service_t *ll_service = Service_GetConcerned(&input->header); switch (input->header.cmd) { case WRITE_NODE_ID: @@ -442,10 +420,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) { Node_Get()->node_id = 0; // Reinit ll_service id - for (uint8_t i = 0; i < ctx.ll_service_number; i++) - { - ctx.ll_service_table[i].id = DEFAULTID; - } + Service_ClearId(); MsgAlloc_Init(NULL); } // This is a node bootstrap information. From 000575a43c7c9303fcd45339b76648a650ba18ca Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Apr 2023 15:57:40 +0200 Subject: [PATCH 031/198] Remove useless baudrate variable --- network/robus/src/robus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index aaa7b9bdf..78c170507 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -44,7 +44,6 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service); ******************************************************************************/ // Creation of the robus context. This variable is used in all files of this lib. volatile context_t ctx; -uint32_t baudrate; /*!< System current baudrate. */ volatile uint16_t last_node = 0; /******************************************************************************* @@ -65,8 +64,6 @@ void Robus_Init(memory_stats_t *memory_stats) ctx.tx.collision = false; // Init Tx status ctx.tx.status = TX_DISABLE; - // Save luos baudrate - baudrate = DEFAULTBAUDRATE; // Filters init Filter_IdInit(); Filter_TopicInit(); From 07b8b3e5cde5eeffd0f0d49cab033affbc834872 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 5 Apr 2023 11:08:39 +0200 Subject: [PATCH 032/198] Move ll_service_t into Service_t, only one struct remain now. --- engine/IO/inc/filter.h | 2 +- engine/IO/inc/io_struct.h | 157 ------------- engine/IO/inc/msg_alloc.h | 14 +- engine/IO/inc/struct_io.h | 47 ++++ engine/IO/src/filter.c | 5 +- engine/IO/src/msg_alloc.c | 58 ++--- engine/OD/od_linear.h | 2 +- engine/bootloader/bootloader_core.h | 2 +- engine/core/inc/luos_engine.h | 4 +- engine/core/inc/luos_list.h | 2 +- engine/core/inc/pub_sub.h | 4 +- engine/core/inc/routing_table.h | 3 +- engine/core/inc/service.h | 5 +- engine/core/inc/streaming.h | 2 +- engine/core/inc/struct_engine.h | 27 +++ .../inc/{service_structs.h => struct_luos.h} | 179 ++++++++------- engine/core/inc/struct_stat.h | 78 +++++++ engine/core/inc/struct_utils.h | 27 +++ engine/core/src/luos_engine.c | 52 ++--- engine/core/src/luos_utils.c | 4 +- engine/core/src/node.c | 1 + engine/core/src/pub_sub.c | 43 ++-- engine/core/src/routing_table.c | 12 +- engine/core/src/service.c | 98 ++++---- engine/core/src/timestamp.c | 2 +- engine/engine_config.h | 12 +- .../native/ping_pong/lib/PingPong/ping_pong.c | 4 +- network/robus/inc/context.h | 3 - network/robus/inc/reception.h | 4 +- network/robus/inc/robus.h | 11 +- network/robus/inc/transmission.h | 2 +- network/robus/selftest/selftest.c | 1 + network/robus/src/reception.c | 15 +- network/robus/src/robus.c | 77 +++---- network/robus/src/transmission.c | 16 +- test/_resources/Unity/unit_test.h | 2 +- .../unit_test_mem_alloc_generic.c | 94 ++++---- .../unit_test_mem_alloc_static.c | 24 +- test/test_msg_alloc/unit_test_mem_alloc_tx.c | 210 +++++++++--------- test/test_topic/main.c | 60 ++--- tool_services/gate/TinyJSON/bootloader_ex.h | 2 +- tool_services/gate/TinyJSON/convert.c | 2 +- tool_services/gate/data_manager.c | 6 +- tool_services/gate/pipe_link.c | 4 +- tool_services/inspector/pipe_link.c | 2 +- 45 files changed, 677 insertions(+), 704 deletions(-) delete mode 100644 engine/IO/inc/io_struct.h create mode 100644 engine/IO/inc/struct_io.h create mode 100644 engine/core/inc/struct_engine.h rename engine/core/inc/{service_structs.h => struct_luos.h} (60%) create mode 100644 engine/core/inc/struct_stat.h create mode 100644 engine/core/inc/struct_utils.h diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index 9105cc720..66f327192 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -7,8 +7,8 @@ #ifndef _FILTER_H_ #define _FILTER_H_ -#include "io_struct.h" #include +#include /******************************************************************************* * Definitions diff --git a/engine/IO/inc/io_struct.h b/engine/IO/inc/io_struct.h deleted file mode 100644 index 078633862..000000000 --- a/engine/IO/inc/io_struct.h +++ /dev/null @@ -1,157 +0,0 @@ -/****************************************************************************** - * @file robus_struct - * @brief definition protocole robus structure - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _ROBUS_STRUCT_H_ -#define _ROBUS_STRUCT_H_ - -#include "stdint.h" -#include "engine_config.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/****************************************************************************** - * @struct luos_localhost_t - * @brief Transmit message direction - ******************************************************************************/ -typedef enum -{ - EXTERNALHOST, // This message is for an external service - LOCALHOST, // This message is for an internal service only - MULTIHOST // This message is for an internal and an external service -} luos_localhost_t; - -/****************************************************************************** - * @struct memory_stats_t - * @brief store informations about RAM occupation - ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - uint8_t rx_msg_stack_ratio; - uint8_t engine_msg_stack_ratio; - uint8_t tx_msg_stack_ratio; - uint8_t buffer_occupation_ratio; - uint8_t msg_drop_number; -} memory_stats_t; - -typedef struct __attribute__((__packed__)) -{ - uint8_t *max_retry; -} ll_stats_t; -/* - * This structure is used to get the message addressing mode list. - */ -typedef enum -{ - SERVICEID, /*!< Unique or virtual ID, used to send something to only one service. */ - SERVICEIDACK, /*!< Unique or virtual ID with reception Acknoledgment (ACK). */ - TYPE, /*!< Type mode, used to send something to all service of the same type. */ - BROADCAST, /*!< Broadcast mode, used to send something to everybody. */ - TOPIC, /*!< Multicast mode, used to send something to multiple services. */ - NODEID, /*!< Node mode, used to send something to all services of a node. */ - NODEIDACK, /*!< Node mode with reception Acknoledgment (ACK). */ - - ID = SERVICEID, /*!< This define is deprecated, please use SERVICEID instead. */ - IDACK = SERVICEIDACK /*!< This define is deprecated, please use SERVICEIDACK instead. */ -} target_mode_t; - -/* This structure is used specify data and destination of datas. - * please refer to the documentation - */ -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - uint16_t config : 4; /*!< Protocol version. */ - uint16_t target : 12; /*!< Target address, it can be (ID, Multicast/Broadcast, Type). */ - uint16_t target_mode : 4; /*!< Select targeting mode (ID, ID+ACK, Multicast/Broadcast, Type). */ - uint16_t source : 12; /*!< Source address, it can be (ID, Multicast/Broadcast, Type). */ - uint8_t cmd; /*!< msg definition. */ - uint16_t size; /*!< Size of the data field. */ - }; - uint8_t unmap[7]; /*!< Unmaped form. */ - }; -} header_t; - -/* This structure is used to receive or send messages between services in slave - * and master mode. - * please refer to the documentation - */ -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - header_t header; /*!< Header filed. */ - uint8_t data[MAX_DATA_MSG_SIZE]; /*!< Data with size known. */ - }; - uint8_t stream[sizeof(header_t) + MAX_DATA_MSG_SIZE]; /*!< unmaped option. */ - }; -} msg_t; - -/* This structure is used to manage virtual services - * please refer to the documentation - */ -typedef struct __attribute__((__packed__)) -{ - - // Service infomations - uint16_t id; /*!< Service ID. */ - uint16_t type; /*!< Service type. */ - - // Variables - uint16_t last_topic_position; /*!< Position pointer of the last topic added. */ - uint16_t topic_list[LAST_TOPIC]; /*!< multicast target bank. */ - uint16_t dead_service_spotted; /*!< The ID of a service that don't reply to a lot of ACK msg */ - - // variable stat on robus com for ll_service - ll_stats_t ll_stat; -} ll_service_t; - -/****************************************************************************** - * @struct error_return_t - * @brief Return function error global convention - ******************************************************************************/ -typedef enum -{ - SUCCEED, /*!< function work properly. */ - PROHIBITED, /*!< function usage is currently prohibited. */ - FAILED = 0xFF /*!< function fail. */ -} error_return_t; - -typedef enum -{ - // protocol level command - WRITE_NODE_ID, /*!< Get and save a new given node ID. */ - START_DETECTION, /*!< Start a detection*/ - END_DETECTION, /*!< Detect the end of a detection*/ - ASSERT, /*!< Node Assert message (only broadcast with a source as a node */ - - /*!< Compatibility area*/ - ROBUS_PROTOCOL_NB = 13, -} robus_cmd_t; - -typedef enum -{ - // Protocol version - BASE_PROTOCOL = PROTOCOL_REVISION, - TIMESTAMP_PROTOCOL, -} robus_protocol_t; - -typedef void (*RX_CB)(ll_service_t *ll_service, msg_t *msg); -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ - -#endif /* _ROBUS_STRUCT_H_ */ diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index e1c30d636..3547981de 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -7,8 +7,8 @@ #ifndef _MSGALLOC_H_ #define _MSGALLOC_H_ -#include "io_struct.h" -#include "stdint.h" +#include "struct_luos.h" +#include "struct_io.h" /******************************************************************************* * Definitions @@ -42,12 +42,12 @@ void MsgAlloc_ValidDataIntegrity(void); error_return_t MsgAlloc_PullMsgToInterpret(msg_t **returned_msg); // Luos task stack -void MsgAlloc_LuosTaskAlloc(ll_service_t *service_concerned_by_current_msg, msg_t *concerned_msg); +void MsgAlloc_LuosTaskAlloc(service_t *service_concerned_by_current_msg, msg_t *concerned_msg); // Luos task research and pull -error_return_t MsgAlloc_PullMsg(ll_service_t *target_service, msg_t **returned_msg); +error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg); error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **returned_msg); -error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, ll_service_t **allocated_service); +error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, service_t **allocated_service); error_return_t MsgAlloc_GetLuosTaskSourceId(uint16_t luos_task_id, uint16_t *source_id); error_return_t MsgAlloc_GetLuosTaskCmd(uint16_t luos_task_id, uint8_t *cmd); error_return_t MsgAlloc_GetLuosTaskSize(uint16_t luos_task_id, uint16_t *size); @@ -55,10 +55,10 @@ uint16_t MsgAlloc_LuosTasksNbr(void); void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg); // Tx tasks create, get and consume -error_return_t MsgAlloc_SetTxTask(ll_service_t *ll_service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack); +error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack); void MsgAlloc_PullMsgFromTxTask(void); void MsgAlloc_PullServiceFromTxTask(uint16_t service_id); -error_return_t MsgAlloc_GetTxTask(ll_service_t **ll_service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost); +error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost); error_return_t MsgAlloc_TxAllComplete(void); #endif /* _MSGALLOC_H_ */ diff --git a/engine/IO/inc/struct_io.h b/engine/IO/inc/struct_io.h new file mode 100644 index 000000000..37751a41f --- /dev/null +++ b/engine/IO/inc/struct_io.h @@ -0,0 +1,47 @@ +/****************************************************************************** + * @file struct_io + * @brief io level structures + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _STRUCT_IO_H_ +#define _STRUCT_IO_H_ + +#include +#include "engine_config.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct luos_localhost_t + * @brief Transmit message direction + ******************************************************************************/ +typedef enum +{ + EXTERNALHOST, // This message is for an external service + LOCALHOST, // This message is for an internal service only + MULTIHOST // This message is for an internal and an external service +} luos_localhost_t; + +typedef enum +{ + // protocol level command + WRITE_NODE_ID, /*!< Get and save a new given node ID. */ + START_DETECTION, /*!< Start a detection*/ + END_DETECTION, /*!< Detect the end of a detection*/ + ASSERT, /*!< Node Assert message (only broadcast with a source as a node */ + + /*!< Compatibility area*/ + // ROBUS_PROTOCOL_NB = 13, +} robus_cmd_t; + +typedef enum +{ + // Protocol version + BASE_PROTOCOL = PROTOCOL_REVISION, + TIMESTAMP_PROTOCOL, +} robus_protocol_t; + +#endif /* _STRUCT_IO_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index cf2de5387..d7fd42553 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -9,6 +9,7 @@ #include "luos_utils.h" #include "luos_hal.h" #include "service.h" +#include "struct_luos.h" /******************************************************************************* * Definitions @@ -161,10 +162,10 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) ******************************************************************************/ _CRITICAL bool Filter_Type(uint16_t type_id) { - // Check all ll_service type + // Check all service type for (int i = 0; i < Service_GetNumber(); i++) { - if (type_id == Service_GetTable()[i].ll_service->type) + if (type_id == Service_GetTable()[i].type) { return true; } diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 248b22fc1..202fffa65 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -32,7 +32,7 @@ * tasks at this space in memory and clear the memory space use by * msg_tasks or Luos_tasks. Also we have to prepare the reception of * the next header. - * - Event C : This event represent robus_loop and it is executed outside of IT. + * - Event C : This event represent phy_loop and it is executed outside of IT. * This event pull msg_tasks tasks and interpret all messages to * create one or more Luos_tasks. * - Task D : This is all msg trait by Luos Library interpret in Luos_loop. Msg can be @@ -45,12 +45,12 @@ #include #include #include -#include "robus_config.h" #include "msg_alloc.h" #include "luos_hal.h" #include "luos_utils.h" #include "node.h" #include "filter.h" +#include "struct_luos.h" /******************************************************************************* * Definitions @@ -65,16 +65,16 @@ ******************************************************************************/ typedef struct { - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - ll_service_t *ll_service_pt; /*!< Pointer to the concerned ll_service. */ + msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ + service_t *service_pt; /*!< Pointer to the concerned service. */ } luos_task_t; typedef struct { - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - ll_service_t *ll_service_pt; /*!< Pointer to the transmitting ll_service. */ - uint8_t localhost; /*!< is this message a localhost one? */ + uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ + uint16_t size; /*!< size of the data. */ + service_t *service_pt; /*!< Pointer to the transmitting service. */ + uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* * Variables @@ -851,7 +851,7 @@ _CRITICAL static inline void MsgAlloc_ClearMsgTask(void) MsgAlloc_FindNewOldestMsg(); } /****************************************************************************** - * @brief Pull a message that is not interpreted by robus yet + * @brief Pull a message that is not interpreted by the phy yet * @param returned_msg : The message pointer. * @return error_return_t ******************************************************************************/ @@ -934,8 +934,8 @@ _CRITICAL static inline void MsgAlloc_ClearLuosTask(uint16_t luos_task_id) if (luos_tasks_stack_id != 0) { luos_tasks_stack_id--; - luos_tasks[luos_tasks_stack_id].msg_pt = 0; - luos_tasks[luos_tasks_stack_id].ll_service_pt = 0; + luos_tasks[luos_tasks_stack_id].msg_pt = 0; + luos_tasks[luos_tasks_stack_id].service_pt = 0; } LuosHAL_SetIrqState(true); MSGALLOC_MUTEX_UNLOCK @@ -947,7 +947,7 @@ _CRITICAL static inline void MsgAlloc_ClearLuosTask(uint16_t luos_task_id) * @param service_concerned_by_current_msg concerned msg * @return None ******************************************************************************/ -void MsgAlloc_LuosTaskAlloc(ll_service_t *service_concerned_by_current_msg, msg_t *concerned_msg) +void MsgAlloc_LuosTaskAlloc(service_t *service_concerned_by_current_msg, msg_t *concerned_msg) { // Find a free slot if (luos_tasks_stack_id == MAX_MSG_NB) @@ -964,8 +964,8 @@ void MsgAlloc_LuosTaskAlloc(ll_service_t *service_concerned_by_current_msg, msg_ MSGALLOC_MUTEX_LOCK LuosHAL_SetIrqState(false); LUOS_ASSERT(luos_tasks_stack_id < MAX_MSG_NB); - luos_tasks[luos_tasks_stack_id].msg_pt = concerned_msg; - luos_tasks[luos_tasks_stack_id].ll_service_pt = service_concerned_by_current_msg; + luos_tasks[luos_tasks_stack_id].msg_pt = concerned_msg; + luos_tasks[luos_tasks_stack_id].service_pt = service_concerned_by_current_msg; if (luos_tasks_stack_id == 0) { // This is the first message in the stack, so it could be the oldest one. @@ -992,7 +992,7 @@ void MsgAlloc_LuosTaskAlloc(ll_service_t *service_concerned_by_current_msg, msg_ * @param returned_msg : The message pointer. * @return error_return_t ******************************************************************************/ -error_return_t MsgAlloc_PullMsg(ll_service_t *target_service, msg_t **returned_msg) +error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg) { MsgAlloc_ValidDataIntegrity(); // @@ -1030,7 +1030,7 @@ error_return_t MsgAlloc_PullMsg(ll_service_t *target_service, msg_t **returned_m // find the oldest message allocated to this service for (uint16_t i = 0; i < luos_tasks_stack_id; i++) { - if (luos_tasks[i].ll_service_pt == target_service) + if (luos_tasks[i].service_pt == target_service) { *returned_msg = luos_tasks[i].msg_pt; // Clear the slot by sliding others to the left on it @@ -1120,7 +1120,7 @@ error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **retur * @param luos_task_id : Id of the allocator slot * @return error_return_t : Fail is there is no more message available. ******************************************************************************/ -error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, ll_service_t **allocated_service) +error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, service_t **allocated_service) { MsgAlloc_ValidDataIntegrity(); // @@ -1142,7 +1142,7 @@ error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, ll_service_t **all MSGALLOC_MUTEX_LOCK if (luos_task_id < luos_tasks_stack_id) { - *allocated_service = luos_tasks[luos_task_id].ll_service_pt; + *allocated_service = luos_tasks[luos_task_id].service_pt; MSGALLOC_MUTEX_UNLOCK return SUCCEED; } @@ -1375,7 +1375,7 @@ void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg) * @param size of the data to transmit * @return None ******************************************************************************/ -error_return_t MsgAlloc_SetTxTask(ll_service_t *ll_service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack) +error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack) { LUOS_ASSERT((tx_tasks_stack_id >= 0) && (tx_tasks_stack_id < MAX_MSG_NB) && ((uintptr_t)data > 0) && ((uintptr_t)current_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]) && ((uintptr_t)current_msg >= (uintptr_t)&msg_buffer[0])); void *rx_msg_bkp = 0; @@ -1641,10 +1641,10 @@ error_return_t MsgAlloc_SetTxTask(ll_service_t *ll_service_pt, uint8_t *data, ui // // Now we are ready to transmit, we can create the tx task LuosHAL_SetIrqState(false); - tx_tasks[tx_tasks_stack_id].size = size; - tx_tasks[tx_tasks_stack_id].data_pt = (uint8_t *)tx_msg; - tx_tasks[tx_tasks_stack_id].ll_service_pt = ll_service_pt; - tx_tasks[tx_tasks_stack_id].localhost = (localhost != EXTERNALHOST); + tx_tasks[tx_tasks_stack_id].size = size; + tx_tasks[tx_tasks_stack_id].data_pt = (uint8_t *)tx_msg; + tx_tasks[tx_tasks_stack_id].service_pt = service_pt; + tx_tasks[tx_tasks_stack_id].localhost = (localhost != EXTERNALHOST); tx_tasks_stack_id++; LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); LuosHAL_SetIrqState(true); @@ -1810,14 +1810,14 @@ void MsgAlloc_PullServiceFromTxTask(uint16_t service_id) } /****************************************************************************** * @brief return a message to transmit - * @param ll_service_pt service sending this data + * @param service_pt service sending this data * @param data to send * @param size of the data to send * @param localhost is this message a localhost one * @return error_return_t : Fail is there is no more message available. * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL error_return_t MsgAlloc_GetTxTask(ll_service_t **ll_service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost) +_CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost) { LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); MsgAlloc_ValidDataIntegrity(); @@ -1838,10 +1838,10 @@ _CRITICAL error_return_t MsgAlloc_GetTxTask(ll_service_t **ll_service_pt, uint8_ LuosHAL_SetIrqState(false); if (tx_tasks_stack_id > 0) { - *data = tx_tasks[0].data_pt; - *size = tx_tasks[0].size; - *ll_service_pt = tx_tasks[0].ll_service_pt; - *localhost = tx_tasks[0].localhost; + *data = tx_tasks[0].data_pt; + *size = tx_tasks[0].size; + *service_pt = tx_tasks[0].service_pt; + *localhost = tx_tasks[0].localhost; LuosHAL_SetIrqState(true); return SUCCEED; } diff --git a/engine/OD/od_linear.h b/engine/OD/od_linear.h index 95752f7a4..aac85d89a 100644 --- a/engine/OD/od_linear.h +++ b/engine/OD/od_linear.h @@ -7,7 +7,7 @@ #ifndef OD_OD_LINEAR_H_ #define OD_OD_LINEAR_H_ -#include "io_struct.h" +#include "struct_io.h" #include "string.h" /******************************************************************************* diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/bootloader_core.h index d15fc0fc1..2ee7bab12 100644 --- a/engine/bootloader/bootloader_core.h +++ b/engine/bootloader/bootloader_core.h @@ -7,7 +7,7 @@ #ifndef BOOTLOADER_H #define BOOTLOADER_H -#include "io_struct.h" +#include "struct_luos.h" /******************************************************************************* * Definitions diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 668676d34..b16056c66 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -6,9 +6,11 @@ #ifndef LUOS_ENGINE_H #define LUOS_ENGINE_H +#include +#include #include "luos_utils.h" #include "luos_list.h" -#include "service_structs.h" +#include "struct_luos.h" #include "routing_table.h" #include "luos_od.h" diff --git a/engine/core/inc/luos_list.h b/engine/core/inc/luos_list.h index 579794d84..c2f8e20c7 100644 --- a/engine/core/inc/luos_list.h +++ b/engine/core/inc/luos_list.h @@ -7,7 +7,7 @@ #ifndef LUOS_LIST_H #define LUOS_LIST_H -#include "service_structs.h" +#include "engine_config.h" /******************************************************************************* * Definitions diff --git a/engine/core/inc/pub_sub.h b/engine/core/inc/pub_sub.h index 5da77ece1..6b1402273 100644 --- a/engine/core/inc/pub_sub.h +++ b/engine/core/inc/pub_sub.h @@ -7,11 +7,11 @@ #ifndef _PUB_SUB_H_ #define _PUB_SUB_H_ -#include "context.h" +#include "struct_luos.h" /******************************************************************************* * Function ******************************************************************************/ -uint8_t PubSub_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id); +uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id); #endif /* _PUB_SUB_H_ */ diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index e912eb260..055feeeb9 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -7,7 +7,8 @@ #ifndef TABLE #define TABLE -#include "luos_engine.h" +#include "struct_luos.h" +#include "luos_list.h" #include "node.h" /******************************************************************************* * Definitions diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h index 7ff844ebb..db19c5198 100644 --- a/engine/core/inc/service.h +++ b/engine/core/inc/service.h @@ -7,7 +7,7 @@ #ifndef _SERVICE_H_ #define _SERVICE_H_ -#include "service_structs.h" +#include "struct_luos.h" /******************************************************************************* * Function @@ -18,12 +18,11 @@ uint16_t Service_GetNumber(void); void Service_ResetStatistics(void); void Service_GenerateId(uint16_t base_id); void Service_ClearId(void); -service_t *Service_GetService(ll_service_t *ll_service); uint16_t Service_GetIndex(service_t *service); void Service_AutoUpdateManager(void); // IO related functions -ll_service_t *Service_GetConcerned(header_t *header); +service_t *Service_GetConcerned(header_t *header); void Service_AllocMsg(msg_t *msg); #endif /* _SERVICE_H_ */ diff --git a/engine/core/inc/streaming.h b/engine/core/inc/streaming.h index 03c503f01..4c3e6eea8 100644 --- a/engine/core/inc/streaming.h +++ b/engine/core/inc/streaming.h @@ -15,9 +15,9 @@ ******************************************************************************/ #ifndef STREAMING_H #define STREAMING_H -#include "service_structs.h" #include + /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/engine/core/inc/struct_engine.h b/engine/core/inc/struct_engine.h new file mode 100644 index 000000000..982239f0b --- /dev/null +++ b/engine/core/inc/struct_engine.h @@ -0,0 +1,27 @@ +/****************************************************************************** + * @file engine structures + * @brief describe all engine private related structures + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef __ENGINE_STRUCT_H +#define __ENGINE_STRUCT_H + +#include +#include "struct_io.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * This structure is used to manage packages + * please refer to the documentation + ******************************************************************************/ +typedef struct +{ + void (*Init)(void); + void (*Loop)(void); +} package_t; + +#endif /*__ENGINE_STRUCT_H */ diff --git a/engine/core/inc/service_structs.h b/engine/core/inc/struct_luos.h similarity index 60% rename from engine/core/inc/service_structs.h rename to engine/core/inc/struct_luos.h index a5ccc3c83..c102c23b7 100644 --- a/engine/core/inc/service_structs.h +++ b/engine/core/inc/struct_luos.h @@ -1,71 +1,91 @@ /****************************************************************************** - * @file services structures - * @brief describe all the service related structures + * @file luos structures + * @brief describe all core structures * @author Luos * @version 0.0.0 ******************************************************************************/ -#ifndef __SERVICE_STRUCT_H -#define __SERVICE_STRUCT_H +#ifndef __LUOS_STRUCT_H +#define __LUOS_STRUCT_H -#include -#include "robus.h" +#include "engine_config.h" +#include "struct_stat.h" +#include "struct_utils.h" /******************************************************************************* * Definitions ******************************************************************************/ /****************************************************************************** - * store informations about luos stats + * This enum list all CMD reserved to Luos * please refer to the documentation ******************************************************************************/ -typedef struct __attribute__((__packed__)) +typedef enum { - union - { - struct __attribute__((__packed__)) - { - memory_stats_t memory; - uint8_t max_loop_time_ms; - }; - uint8_t unmap[sizeof(memory_stats_t) + 1]; /*!< streamable form. */ - }; -} luos_stats_t; + // Luos specific registers + LOCAL_RTB = ROBUS_PROTOCOL_NB, // Ask(size == 0), generate(size == 2) a local routing_table. + RTB, // Receive a routing_table. + WRITE_ALIAS, // Get and save a new given alias. + UPDATE_PUB, // Ask to update a sensor value each time duration to the sender + ASK_DETECTION, // Ask Luos to launch a detection + + // Revision management + REVISION, // service sends its firmware revision + LUOS_REVISION, // service sends its luos revision + LUOS_STATISTICS, // service sends its luos revision + + // bootloader command and response + BOOTLOADER_CMD, + BOOTLOADER_RESP, + + // Verbose command + VERBOSE, + + // compatibility area + // LUOS_LAST_RESERVED_CMD = 42 +} reserved_luos_cmd_t; + /****************************************************************************** - * This structure is used to create services version - * please refer to the documentation + * @enum target_mode_t + * @brief This enum list all target mode. ******************************************************************************/ -typedef struct __attribute__((__packed__)) +typedef enum { - union - { - struct __attribute__((__packed__)) - { - uint8_t major; - uint8_t minor; - uint8_t build; - }; - uint8_t unmap[3]; /*!< streamable form. */ - }; -} revision_t; + SERVICEID, /*!< Unique or virtual ID, used to send something to only one service. */ + SERVICEIDACK, /*!< Unique or virtual ID with reception Acknoledgment (ACK). */ + TYPE, /*!< Type mode, used to send something to all service of the same type. */ + BROADCAST, /*!< Broadcast mode, used to send something to everybody. */ + TOPIC, /*!< Multicast mode, used to send something to multiple services. */ + NODEID, /*!< Node mode, used to send something to all services of a node. */ + NODEIDACK, /*!< Node mode with reception Acknoledgment (ACK). */ + + ID = SERVICEID, /*!< This define is deprecated, please use SERVICEID instead. */ + IDACK = SERVICEIDACK /*!< This define is deprecated, please use SERVICEIDACK instead. */ +} target_mode_t; + /****************************************************************************** - * This structure is used to manage services statistic - * please refer to the documentation + * @struct header_t + * @brief This structure is used specify data and destination of datas. ******************************************************************************/ -typedef struct __attribute__((__packed__)) service_stats_t +typedef struct __attribute__((__packed__)) { union { struct __attribute__((__packed__)) { - uint8_t max_retry; + uint16_t config : 4; /*!< Protocol version. */ + uint16_t target : 12; /*!< Target address, it can be (ID, Multicast/Broadcast, Type). */ + uint16_t target_mode : 4; /*!< Select targeting mode (ID, ID+ACK, Multicast/Broadcast, Type). */ + uint16_t source : 12; /*!< Source address, it can be (ID, Multicast/Broadcast, Type). */ + uint8_t cmd; /*!< msg definition. */ + uint16_t size; /*!< Size of the data field. */ }; - uint8_t unmap[1]; /*!< streamable form. */ + uint8_t unmap[7]; /*!< Unmaped form. */ }; -} service_stats_t; +} header_t; /****************************************************************************** - * @struct general_stats_t - * @brief format all datas to be sent trough msg + * @struct msg_t + * @brief Message structure ******************************************************************************/ typedef struct __attribute__((__packed__)) { @@ -73,12 +93,12 @@ typedef struct __attribute__((__packed__)) { struct __attribute__((__packed__)) { - luos_stats_t node_stat; - service_stats_t service_stat; + header_t header; /*!< Header filed. */ + uint8_t data[MAX_DATA_MSG_SIZE]; /*!< Data with size known. */ }; - uint8_t unmap[sizeof(luos_stats_t) + sizeof(service_stats_t)]; /*!< streamable form. */ + uint8_t stream[sizeof(header_t) + MAX_DATA_MSG_SIZE]; /*!< unmaped option. */ }; -} general_stats_t; +} msg_t; /****************************************************************************** * This structure is used to manage services timed auto update @@ -104,63 +124,52 @@ typedef enum } access_t; /****************************************************************************** - * This structure is used to manage packages + * This structure is used to create services version * please refer to the documentation ******************************************************************************/ -typedef struct +typedef struct __attribute__((__packed__)) { - void (*Init)(void); - void (*Loop)(void); -} package_t; + union + { + struct __attribute__((__packed__)) + { + uint8_t major; + uint8_t minor; + uint8_t build; + }; + uint8_t unmap[3]; /*!< streamable form. */ + }; +} revision_t; /****************************************************************************** * This structure is used to manage services * please refer to the documentation ******************************************************************************/ -typedef struct __attribute__((__packed__)) service_t +typedef struct service_t { - ll_service_t *ll_service; - // Callback - void (*service_cb)(struct service_t *service, msg_t *msg); - // Variables + // Service infomations + uint16_t id; /*!< Service ID. */ + uint16_t type; /*!< Service type. */ uint8_t default_alias[MAX_ALIAS_SIZE]; /*!< service default alias. */ uint8_t alias[MAX_ALIAS_SIZE]; /*!< service alias. */ - timed_update_t auto_refresh; /*!< service auto refresh context. */ revision_t revision; /*!< service firmware version. */ - service_stats_t statistics; /*!< service level statistics. */ access_t access; /*!< service read write access. */ - void *profile_context; /*!< Pointer to the profile context. */ -} service_t; + uint16_t dead_service_spotted; /*!< The ID of a service that don't reply to a lot of ACK msg */ -typedef void (*SERVICE_CB)(service_t *service, msg_t *msg); - -/****************************************************************************** - * This enum list all CMD reserved to Luos - * please refer to the documentation - ******************************************************************************/ -typedef enum -{ - // Luos specific registers - LOCAL_RTB = ROBUS_PROTOCOL_NB, // Ask(size == 0), generate(size == 2) a local routing_table. - RTB, // Receive a routing_table. - WRITE_ALIAS, // Get and save a new given alias. - UPDATE_PUB, // Ask to update a sensor value each time duration to the sender - ASK_DETECTION, // Ask Luos to launch a detection + // Callback + void (*service_cb)(struct service_t *service, msg_t *msg); - // Revision management - REVISION, // service sends its firmware revision - LUOS_REVISION, // service sends its luos revision - LUOS_STATISTICS, // service sends its luos revision + // Statistics + service_stats_t statistics; /*!< service level statistics. */ - // bootloader command and response - BOOTLOADER_CMD, - BOOTLOADER_RESP, + // Private Variables + uint16_t last_topic_position; /*!< Position pointer of the last topic added. */ + uint16_t topic_list[LAST_TOPIC]; /*!< multicast target bank. */ + timed_update_t auto_refresh; /*!< service auto refresh context. */ + void *profile_context; /*!< Pointer to the profile context. */ - // Verbose command - VERBOSE, +} service_t; - // compatibility area - LUOS_LAST_RESERVED_CMD = 42 -} reserved_luos_cmd_t; +typedef void (*SERVICE_CB)(service_t *service, msg_t *msg); -#endif /*__SERVICE_STRUCT_H */ +#endif /*__LUOS_STRUCT_H */ \ No newline at end of file diff --git a/engine/core/inc/struct_stat.h b/engine/core/inc/struct_stat.h new file mode 100644 index 000000000..7b82783d2 --- /dev/null +++ b/engine/core/inc/struct_stat.h @@ -0,0 +1,78 @@ +/****************************************************************************** + * @file stat structures + * @brief describe all the statistics related structures + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef __STAT_STRUCT_H +#define __STAT_STRUCT_H + +#include + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct memory_stats_t + * @brief store informations about RAM occupation + ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + uint8_t rx_msg_stack_ratio; + uint8_t engine_msg_stack_ratio; + uint8_t tx_msg_stack_ratio; + uint8_t buffer_occupation_ratio; + uint8_t msg_drop_number; +} memory_stats_t; + +/****************************************************************************** + * store informations about luos stats + * please refer to the documentation + ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + memory_stats_t memory; + uint8_t max_loop_time_ms; + }; + uint8_t unmap[sizeof(memory_stats_t) + 1]; /*!< streamable form. */ + }; +} luos_stats_t; +/****************************************************************************** + * This structure is used to manage services statistic + * please refer to the documentation + ******************************************************************************/ +typedef struct __attribute__((__packed__)) service_stats_t +{ + union + { + struct __attribute__((__packed__)) + { + uint8_t max_retry; + }; + uint8_t unmap[1]; /*!< streamable form. */ + }; +} service_stats_t; + +/****************************************************************************** + * @struct general_stats_t + * @brief format all datas to be sent trough msg + ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + luos_stats_t node_stat; + service_stats_t service_stat; + }; + uint8_t unmap[sizeof(luos_stats_t) + sizeof(service_stats_t)]; /*!< streamable form. */ + }; +} general_stats_t; + +#endif /*__STAT_STRUCT_H */ diff --git a/engine/core/inc/struct_utils.h b/engine/core/inc/struct_utils.h new file mode 100644 index 000000000..fc8e9a841 --- /dev/null +++ b/engine/core/inc/struct_utils.h @@ -0,0 +1,27 @@ +/****************************************************************************** + * @file utils structures + * @brief describe practical general structures used by Luos + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef __STRUCT_UTILS_H +#define __STRUCT_UTILS_H + +#include + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct error_return_t + * @brief Return function error global convention + ******************************************************************************/ +typedef enum +{ + SUCCEED, /*!< function work properly. */ + PROHIBITED, /*!< function usage is currently prohibited. */ + FAILED = 0xFF /*!< function fail. */ +} error_return_t; + +#endif /*__STRUCT_UTILS_H */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index d07a6d2a5..c812f0991 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -13,8 +13,8 @@ #include "bootloader_core.h" #include "_timestamp.h" #include "filter.h" -#include "context.h" #include "service.h" +#include "struct_engine.h" /******************************************************************************* * Variables @@ -68,9 +68,9 @@ void Luos_Init(void) void Luos_Loop(void) { static uint32_t last_loop_date; - uint16_t remaining_msg_number = 0; - ll_service_t *oldest_ll_service = NULL; - msg_t *returned_msg = NULL; + uint16_t remaining_msg_number = 0; + service_t *oldest_service = NULL; + msg_t *returned_msg = NULL; #ifdef WITH_BOOTLOADER // After 3 Luos_Loop, consider this application as safe and write a flag to let the booloader know it can jump to the application safely. @@ -94,22 +94,16 @@ void Luos_Loop(void) { // We receive a reset detection // Reset services ID - // Reinit ll_service id - for (uint8_t i = 0; i < ctx.ll_service_number; i++) - { - ctx.ll_service_table[i].id = DEFAULTID; - } + Service_ClearId(); // Reset the data reception context Luos_ReceiveData(NULL, NULL, NULL); } Robus_Loop(); // look at all received messages LUOS_MUTEX_LOCK - while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_ll_service) != FAILED) + while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_service) != FAILED) { - // There is a message available find the service linked to it - service_t *service = Service_GetService(oldest_ll_service); - // check if this is a Luos Command + // There is a message available, check if this is a Luos Command uint8_t cmd = 0; uint16_t size = 0; // There is a possibility to receive in IT a START_DETECTION so check task before doing any treatement @@ -118,12 +112,12 @@ void Luos_Loop(void) break; } // check if this msg cmd should be consumed by Luos_MsgHandler - if (Luos_IsALuosCmd(service, cmd, size) == SUCCEED) + if (Luos_IsALuosCmd(oldest_service, cmd, size) == SUCCEED) { if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) { // be sure the content of this message need to be managed by Luos and do it if it is. - if (Luos_MsgHandler((service_t *)service, returned_msg) == SUCCEED) + if (Luos_MsgHandler((service_t *)oldest_service, returned_msg) == SUCCEED) { // Luos CMD are generic for all services and have to be executed only once // Clear all luos tasks related to this message (in case of multicast message) @@ -132,9 +126,9 @@ void Luos_Loop(void) else { // Here we should not have polling services. - LUOS_ASSERT(service->service_cb != 0); + LUOS_ASSERT(oldest_service->service_cb != 0); // This message is for the user, pass it to the user. - service->service_cb(service, returned_msg); + oldest_service->service_cb(oldest_service, returned_msg); } } } @@ -142,13 +136,13 @@ void Luos_Loop(void) { // This message is for a service // check if this service have a callback? - if (service->service_cb != 0) + if (oldest_service->service_cb != 0) { // This service have a callback pull the message if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) { // This message is for the user, pass it to the user. - service->service_cb(service, returned_msg); + oldest_service->service_cb(oldest_service, returned_msg); } } else @@ -259,7 +253,7 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) time_luos_t time; uint16_t base_id = 0; - if (((input->header.target_mode == SERVICEIDACK) || (input->header.target_mode == SERVICEID)) && (input->header.target != service->ll_service->id)) + if (((input->header.target_mode == SERVICEIDACK) || (input->header.target_mode == SERVICEID)) && (input->header.target != service->id)) { return FAILED; } @@ -448,13 +442,13 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) // There is no service specified here, take the first one service = &Service_GetTable()[0]; } - if ((service->ll_service->id == 0) && (msg->header.cmd >= LUOS_LAST_RESERVED_CMD)) + if ((service->id == 0) && (msg->header.cmd >= LUOS_LAST_RESERVED_CMD)) { // We are in detection mode and this command come from user // We can't send it return PROHIBITED; } - return Robus_SendMsg(service->ll_service, msg); + return Robus_SendMsg(service, msg); } /****************************************************************************** @@ -469,7 +463,7 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg) LUOS_MUTEX_LOCK while (error == SUCCEED) { - error = MsgAlloc_PullMsg(service->ll_service, returned_msg); + error = MsgAlloc_PullMsg(service, returned_msg); // check if the content of this message need to be managed by Luos and do it if it is. if (error == SUCCEED) { @@ -494,14 +488,14 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg) ******************************************************************************/ error_return_t Luos_ReadFromService(service_t *service, short id, msg_t **returned_msg) { - uint16_t remaining_msg_number = 0; - ll_service_t *oldest_ll_service = NULL; - error_return_t error = SUCCEED; + uint16_t remaining_msg_number = 0; + service_t *oldest_service = NULL; + error_return_t error = SUCCEED; LUOS_MUTEX_LOCK - while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_ll_service) != FAILED) + while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_service) != FAILED) { // Check if this message is for us - if (oldest_ll_service == service->ll_service) + if (oldest_service == service) { // Check the source id uint16_t source = 0; @@ -783,7 +777,7 @@ void Luos_Detect(service_t *service) { Filter_IdInit(); // Set the detection launcher id to 1 - service->ll_service->id = 1; + service->id = 1; // Update the filter just to accept our detector id Filter_AddServiceId(1, 1); diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 91064b0fe..74191c68b 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -1,5 +1,5 @@ /****************************************************************************** - * @file robus_utils + * @file luos_utils * @brief Some tools used to debug * @author Luos * @version 0.0.0 @@ -10,7 +10,7 @@ #include "string.h" #include "luos_hal.h" #include "msg_alloc.h" -#include "stdbool.h" +#include #ifdef WITH_BOOTLOADER #include "bootloader_core.h" #endif diff --git a/engine/core/src/node.c b/engine/core/src/node.c index e031b575f..d1fabf312 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -64,6 +64,7 @@ void Node_Init(void) #ifdef NO_RTB node_ctx.node_info |= 1 << 0; #endif + Node_SetState(NO_DETECTION); } /****************************************************************************** diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index 584515f33..60d134df4 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -28,12 +28,12 @@ * @param multicast bank * @return Error ******************************************************************************/ -uint8_t PubSub_IsTopicSubscribed(ll_service_t *ll_service, uint16_t topic_id) +uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id) { unsigned char i; - for (i = 0; i < ll_service->last_topic_position; i++) + for (i = 0; i < service->last_topic_position; i++) { - if (ll_service->topic_list[i] == topic_id) + if (service->topic_list[i] == topic_id) return true; } return false; @@ -49,22 +49,16 @@ error_return_t Luos_Subscribe(service_t *service, uint16_t topic) { // Assert if we add a topic that is greater than the max topic value LUOS_ASSERT(topic <= LAST_TOPIC); + LUOS_ASSERT(service != 0); // Put this topic in the multicast bank Filter_AddTopic(topic); - // add multicast this topic to the service - ll_service_t *ll_service = (ll_service_t *)&ctx.ll_service_table[0]; - if (service != 0) - { - ll_service = service->ll_service; - } - // Check if target exists or if we reached the maximum topics number - if ((PubSub_IsTopicSubscribed(ll_service, topic) == false) && (ll_service->last_topic_position < LAST_TOPIC)) + if ((PubSub_IsTopicSubscribed(service, topic) == false) && (service->last_topic_position < LAST_TOPIC)) { - ll_service->topic_list[ll_service->last_topic_position] = topic; - ll_service->last_topic_position++; + service->topic_list[service->last_topic_position] = topic; + service->last_topic_position++; return SUCCEED; } return FAILED; @@ -78,24 +72,21 @@ error_return_t Luos_Subscribe(service_t *service, uint16_t topic) ******************************************************************************/ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { - error_return_t err = FAILED; - ll_service_t *ll_service = (ll_service_t *)&ctx.ll_service_table[0]; - unsigned char i; - if (service != 0) - { - ll_service = service->ll_service; - } + LUOS_ASSERT(topic <= LAST_TOPIC); + LUOS_ASSERT(service != 0); + + error_return_t err = FAILED; // Delete topic from service list - for (i = 0; i < ll_service->last_topic_position; i++) + for (uint16_t i = 0; i < service->last_topic_position; i++) { - if (ll_service->topic_list[i] == topic) + if (service->topic_list[i] == topic) { - if (ll_service->last_topic_position >= LAST_TOPIC) + if (service->last_topic_position >= LAST_TOPIC) { break; } - memcpy(&ll_service->topic_list[i], &ll_service->topic_list[i + 1], ll_service->last_topic_position - i); - ll_service->last_topic_position--; + memcpy(&service->topic_list[i], &service->topic_list[i + 1], service->last_topic_position - i); + service->last_topic_position--; err = SUCCEED; break; } @@ -106,7 +97,7 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { for (uint16_t i = 0; i < Service_GetNumber(); i++) { - if (PubSub_IsTopicSubscribed((ll_service_t *)(&ctx.ll_service_table[i]), topic) == true) + if (PubSub_IsTopicSubscribed(&Service_GetTable()[i], topic) == true) { return err; } diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 4684e199e..f242e7999 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -11,7 +11,9 @@ #include #include #include "luos_hal.h" -#include "context.h" +#include "luos_engine.h" +#include "struct_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -365,7 +367,7 @@ void RoutingTB_DetectServices(service_t *service) // Desactivate verbose mode Luos_SetVerboseMode(false); // Starts the topology detection. - uint16_t nb_node = Robus_TopologyDetection(service->ll_service); + uint16_t nb_node = Robus_TopologyDetection(service); // Clear data reception state Luos_ReceiveData(NULL, NULL, NULL); // Clear the routing table. @@ -401,8 +403,8 @@ void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node) ******************************************************************************/ void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service) { - entry->type = service->ll_service->type; - entry->id = service->ll_service->id; + entry->type = service->type; + entry->id = service->id; entry->mode = SERVICE; for (uint8_t i = 0; i < MAX_ALIAS_SIZE; i++) { @@ -680,7 +682,7 @@ search_result_t *RTFilter_Service(search_result_t *result, service_t *service) while (entry_nbr < result->result_nbr) { // find a service with the wanted type - if (result->result_table[entry_nbr]->id != service->ll_service->id) + if (result->result_table[entry_nbr]->id != service->id) { // if we find an other id, erase it from the research table memcpy(&result->result_table[entry_nbr], &result->result_table[entry_nbr + 1], sizeof(routing_table_t *) * (result->result_nbr - entry_nbr)); diff --git a/engine/core/src/service.c b/engine/core/src/service.c index dbddfeed1..4ca6a4084 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -13,6 +13,7 @@ #include "luos_hal.h" #include "msg_alloc.h" #include "pub_sub.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -93,9 +94,9 @@ void Service_GenerateId(uint16_t base_id) } for (uint16_t i = 0; i < service_ctx.number; i++) { - if (service_ctx.list[i].ll_service->id != 1) + if (service_ctx.list[i].id != 1) { - service_ctx.list[i].ll_service->id = base_id++; + service_ctx.list[i].id = base_id++; } } } @@ -108,27 +109,10 @@ void Service_ClearId(void) { for (uint16_t i = 0; i < service_ctx.number; i++) { - service_ctx.list[i].ll_service->id = DEFAULTID; + service_ctx.list[i].id = DEFAULTID; } } -/****************************************************************************** - * @brief Get pointer to a service based on ll_service - * @param ll_service : low level service - * @return Service from list - ******************************************************************************/ -service_t *Service_GetService(ll_service_t *ll_service) -{ - for (uint16_t i = 0; i < service_ctx.number; i++) - { - if (ll_service == service_ctx.list[i].ll_service) - { - return &service_ctx.list[i]; - } - } - return 0; -} - /****************************************************************************** * @brief Get this service index in the service table * @param Service @@ -157,7 +141,7 @@ void Service_AutoUpdateManager(void) for (uint16_t i = 0; i < service_ctx.number; i++) { // check if services have an actual ID. If not, we are in detection mode and should reset the auto refresh - if (service_ctx.list[i].ll_service->id == DEFAULTID) + if (service_ctx.list[i].id == DEFAULTID) { // this service have not been detected or is in detection mode. remove auto_refresh parameters service_ctx.list[i].auto_refresh.target = 0; @@ -169,7 +153,7 @@ void Service_AutoUpdateManager(void) // check if there is a timed update setted and if it's time to update it. if (service_ctx.list[i].auto_refresh.time_ms) { - if (service_ctx.list[i].ll_service->dead_service_spotted == service_ctx.list[i].auto_refresh.target) + if (service_ctx.list[i].dead_service_spotted == service_ctx.list[i].auto_refresh.target) { service_ctx.list[i].auto_refresh.target = 0; service_ctx.list[i].auto_refresh.time_ms = 0; @@ -182,7 +166,7 @@ void Service_AutoUpdateManager(void) // Create a fake message for it from the service asking for update msg_t updt_msg; updt_msg.header.config = BASE_PROTOCOL; - updt_msg.header.target = service_ctx.list[i].ll_service->id; + updt_msg.header.target = service_ctx.list[i].id; updt_msg.header.source = service_ctx.list[i].auto_refresh.target; updt_msg.header.target_mode = SERVICEIDACK; updt_msg.header.cmd = GET_CMD; @@ -195,8 +179,8 @@ void Service_AutoUpdateManager(void) { if (Node_GetState() == DETECTION_OK) { - // directly transmit the message in Localhost - Robus_SetTxTask(service_ctx.list[i].ll_service, &updt_msg); + // Directly transmit the message in Localhost + Robus_SetTxTask(&service_ctx.list[i], &updt_msg); } } service_ctx.list[i].auto_refresh.last_update = LuosHAL_GetSystick(); @@ -209,9 +193,9 @@ void Service_AutoUpdateManager(void) /****************************************************************************** * @brief Parse msg to find a service concerned * @param header of message - * @return ll_service pointer + * @return service pointer ******************************************************************************/ -ll_service_t *Service_GetConcerned(header_t *header) +service_t *Service_GetConcerned(header_t *header) { uint16_t i = 0; LUOS_ASSERT(header); @@ -220,29 +204,29 @@ ll_service_t *Service_GetConcerned(header_t *header) { case SERVICEIDACK: case SERVICEID: - // Check all ll_service id + // Check all service id for (i = 0; i < service_ctx.number; i++) { - if (header->target == service_ctx.list[i].ll_service->id) + if (header->target == service_ctx.list[i].id) { - return service_ctx.list[i].ll_service; + return &service_ctx.list[i]; } } break; case TYPE: - // Check all ll_service type + // Check all service type for (i = 0; i < service_ctx.number; i++) { - if (header->target == service_ctx.list[i].ll_service->type) + if (header->target == service_ctx.list[i].type) { - return service_ctx.list[i].ll_service; + return &service_ctx.list[i]; } } break; case BROADCAST: case NODEIDACK: case NODEID: - return service_ctx.list[0].ll_service; + return &service_ctx.list[0]; break; case TOPIC: default: @@ -266,24 +250,24 @@ void Service_AllocMsg(msg_t *msg) { case SERVICEIDACK: case SERVICEID: - // Check all ll_service id + // Check all service id for (i = 0; i < service_ctx.number; i++) { - if (msg->header.target == service_ctx.list[i].ll_service->id) + if (msg->header.target == service_ctx.list[i].id) { - MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); break; } } return; break; case TYPE: - // Check all ll_service type + // Check all service type for (i = 0; i < service_ctx.number; i++) { - if (msg->header.target == service_ctx.list[i].ll_service->type) + if (msg->header.target == service_ctx.list[i].type) { - MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); } } return; @@ -291,17 +275,17 @@ void Service_AllocMsg(msg_t *msg) case BROADCAST: for (i = 0; i < service_ctx.number; i++) { - MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); } return; break; case TOPIC: for (i = 0; i < service_ctx.number; i++) { - if (PubSub_IsTopicSubscribed(service_ctx.list[i].ll_service, msg->header.target)) + if (PubSub_IsTopicSubscribed(&service_ctx.list[i], msg->header.target)) { // TODO manage multiple slave concerned - MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); } } return; @@ -310,7 +294,7 @@ void Service_AllocMsg(msg_t *msg) case NODEID: if (msg->header.target == DEFAULTID) // on default ID it's always a luos command create only one task { - MsgAlloc_LuosTaskAlloc((ll_service_t *)&ctx.ll_service_table[0], msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[0], msg); return; } // check if the message is really for the node or it is a service that has no filter @@ -318,7 +302,7 @@ void Service_AllocMsg(msg_t *msg) { for (i = 0; i < service_ctx.number; i++) { - MsgAlloc_LuosTaskAlloc(service_ctx.list[i].ll_service, msg); + MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); } } return; @@ -338,23 +322,22 @@ void Service_AllocMsg(msg_t *msg) ******************************************************************************/ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *alias, revision_t revision) { - uint8_t i = 0; - service_t *service = &service_ctx.list[service_ctx.number]; - service->ll_service = &Robus_GetLlServiceList()[service_ctx.number]; + uint8_t i = 0; + service_t *service = &service_ctx.list[service_ctx.number]; // Set the service type - service->ll_service->type = type; + service->type = type; // Initialise the service id, TODO the ID could be stored in EEprom, the default ID could be set in factory... - service->ll_service->id = DEFAULTID; + service->id = DEFAULTID; // Initialize dead service detection - service->ll_service->dead_service_spotted = 0; + service->dead_service_spotted = 0; // Clear stats - service->ll_service->ll_stat.max_retry = 0; + service->statistics.max_retry = 0; // Clear topic number - service->ll_service->last_topic_position = 0; + service->last_topic_position = 0; for (uint16_t i = 0; i < LAST_TOPIC; i++) { - service->ll_service->topic_list[i] = 0; + service->topic_list[i] = 0; } // Link the service to his callback @@ -382,9 +365,6 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a service->revision.unmap[i] = revision.unmap[i]; } - // initiate service statistics - service->ll_service->ll_stat.max_retry = &service->statistics.max_retry; - service_ctx.number++; LUOS_ASSERT(service_ctx.number <= MAX_SERVICE_NUMBER); return service; @@ -449,5 +429,7 @@ error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t void Luos_ServicesClear(void) { service_ctx.number = 0; - Robus_ServicesClear(); + + // Clear service table + memset((void *)service_ctx.list, 0, sizeof(service_t) * MAX_SERVICE_NUMBER); } \ No newline at end of file diff --git a/engine/core/src/timestamp.c b/engine/core/src/timestamp.c index a9ae6fb11..ee1f5d6be 100644 --- a/engine/core/src/timestamp.c +++ b/engine/core/src/timestamp.c @@ -7,7 +7,7 @@ #include "_timestamp.h" #include "luos_hal.h" #include "string.h" -#include "service_structs.h" +#include "struct_luos.h" /******************************* Description of Timestamp process ************************************ * * Timestamp is a mechanism which enables to track events in the system. To use it users have to get and save a timestamp in diff --git a/engine/engine_config.h b/engine/engine_config.h index 2287bf457..7e7f57e89 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -10,11 +10,13 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection -#define BOOT_TIMEOUT 1000 -#define DEFAULTID 0x00 -#define PROTOCOL_REVISION 0 -#define BROADCAST_VAL 0x0FFF +#define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command +#define ROBUS_PROTOCOL_NB 13 // Number of Robus protocol command +#define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection +#define BOOT_TIMEOUT 1000 +#define DEFAULTID 0x00 +#define PROTOCOL_REVISION 0 +#define BROADCAST_VAL 0x0FFF #define MAX_ALIAS_SIZE 16 #define MAX_DATA_MSG_SIZE 128 diff --git a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c index 7ae9fe70a..6dfc5022e 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c +++ b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c @@ -64,7 +64,7 @@ uint16_t last_id = 0; void Player_MsgHandler(service_t *service, msg_t *msg) { - if ((msg->header.target_mode == TOPIC) & (msg->header.target = SCORE_TOPIC) & (msg->header.source != service->ll_service->id)) + if ((msg->header.target_mode == TOPIC) & (msg->header.target = SCORE_TOPIC) & (msg->header.source != service->id)) { score_update(msg); set_screen_to(score_view); @@ -168,7 +168,7 @@ bool send_random() do { target = rand() % target_list.result_nbr; - } while (target_list.result_table[target]->id == player->ll_service->id); + } while (target_list.result_table[target]->id == player->id); // Our target is OK, Send the message msg_t msg; diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index 3d498ee67..b4c65ac40 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -23,9 +23,6 @@ typedef struct RxCom_t rx; /*!< Receiver informations. */ TxCom_t tx; /*!< Transmitter informations. */ PortMng_t port; /*!< Port informations. */ - - // Low level service management - ll_service_t ll_service_table[MAX_SERVICE_NUMBER]; /*!< Low level Service table. */ } context_t; /******************************************************************************* diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index 6229af67a..46a107081 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -7,7 +7,8 @@ #ifndef _RECEPTION_H_ #define _RECEPTION_H_ -#include +#include "robus.h" +#include "struct_io.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -55,6 +56,5 @@ void Recep_EndMsg(void); void Recep_Reset(void); void Recep_Timeout(void); luos_localhost_t Recep_NodeConcerned(header_t *header); -ll_service_t *Recep_GetConcernedLLService(header_t *header); #endif /* _RECEPTION_H_ */ diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 6e5551734..e4e167ef8 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -9,7 +9,7 @@ #include #include -#include "io_struct.h" +#include "struct_luos.h" /******************************************************************************* * Variables ******************************************************************************/ @@ -20,11 +20,8 @@ void Robus_Init(memory_stats_t *memory_stats); void Robus_Loop(void); -void Robus_ServicesClear(void); -ll_service_t *Robus_GetLlServiceList(void); - -error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg); -error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg); -uint16_t Robus_TopologyDetection(ll_service_t *ll_service); +error_return_t Robus_SetTxTask(service_t *service, msg_t *msg); +error_return_t Robus_SendMsg(service_t *service, msg_t *msg); +uint16_t Robus_TopologyDetection(service_t *service); #endif /* _ROBUS_H_ */ diff --git a/network/robus/inc/transmission.h b/network/robus/inc/transmission.h index 0fb37070f..8f3b28456 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus/inc/transmission.h @@ -7,7 +7,7 @@ #ifndef _TRANSMISSION_H_ #define _TRANSMISSION_H_ -#include "io_struct.h" +#include "struct_io.h" #include /******************************************************************************* * Definitions diff --git a/network/robus/selftest/selftest.c b/network/robus/selftest/selftest.c index 0b1b1320e..7cac5f195 100644 --- a/network/robus/selftest/selftest.c +++ b/network/robus/selftest/selftest.c @@ -9,6 +9,7 @@ #include "context.h" #include "stdbool.h" #include "robus_hal.h" +#include "struct_engine.h" /******************************************************************************* * Definitions diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index ecad49653..4be6741af 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -54,6 +54,8 @@ #include "robus.h" #include "bootloader_core.h" #include "filter.h" +#include "struct_engine.h" +#include "context.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -80,7 +82,6 @@ static int64_t ll_rx_timestamp = 0; * Function ******************************************************************************/ static inline uint8_t Recep_IsAckNeeded(void); -static inline uint16_t Recep_CtxIndexFromID(uint16_t id); /****************************************************************************** * @brief Reception init. * @param None @@ -377,7 +378,7 @@ _CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) case SERVICEIDACK: ctx.rx.status.rx_error = false; case SERVICEID: - // Check all ll_service id + // Check all service id if (Filter_ServiceID(header->target)) { return LOCALHOST; @@ -446,13 +447,3 @@ _CRITICAL static inline uint8_t Recep_IsAckNeeded(void) // if not failed return 0; } - -/****************************************************************************** - * @brief returns the index in context table from the service id - * @param id - * @return index - ******************************************************************************/ -static inline uint16_t Recep_CtxIndexFromID(uint16_t id) -{ - return (id - ctx.ll_service_table[0].id); -} diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 78c170507..2ef8c9028 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -37,8 +37,8 @@ typedef struct __attribute__((__packed__)) } node_bootstrap_t; static error_return_t Robus_MsgHandler(msg_t *input); -static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service); -static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service); +static error_return_t Robus_DetectNextNodes(service_t *service); +static error_return_t Robus_ResetNetworkDetection(service_t *service); /******************************************************************************* * Variables ******************************************************************************/ @@ -83,8 +83,6 @@ void Robus_Init(memory_stats_t *memory_stats) // Initialize the robus service status ctx.rx.status.unmap = 0; ctx.rx.status.identifier = 0xF; - - Node_SetState(NO_DETECTION); } /****************************************************************************** * @brief Loop of the Robus communication protocole @@ -110,31 +108,14 @@ void Robus_Loop(void) } RobusHAL_Loop(); } -/****************************************************************************** - * @brief return the ll_service list - * @return None - ******************************************************************************/ -ll_service_t *Robus_GetLlServiceList(void) -{ - return (ll_service_t *)ctx.ll_service_table; -} -/****************************************************************************** - * @brief clear service list in route table - * @param None - * @return None - ******************************************************************************/ -void Robus_ServicesClear(void) -{ - // Clear ll_service table - memset((void *)ctx.ll_service_table, 0, sizeof(ll_service_t) * MAX_SERVICE_NUMBER); -} + /****************************************************************************** * @brief Formalize message Set tx task and send * @param service to send * @param msg to send * @return error_return_t ******************************************************************************/ -error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) +error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) { error_return_t error = SUCCEED; uint8_t ack = 0; @@ -180,7 +161,7 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) } // ********** Allocate the message ******************** - if (MsgAlloc_SetTxTask(ll_service, (uint8_t *)msg->stream, crc_val, full_size, localhost, ack) == FAILED) + if (MsgAlloc_SetTxTask(service, (uint8_t *)msg->stream, crc_val, full_size, localhost, ack) == FAILED) { error = FAILED; } @@ -201,18 +182,18 @@ error_return_t Robus_SetTxTask(ll_service_t *ll_service, msg_t *msg) * @param msg to send * @return none ******************************************************************************/ -error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg) +error_return_t Robus_SendMsg(service_t *service, msg_t *msg) { // ********** Prepare the message ******************** - if (ll_service->id != 0) + if (service->id != 0) { - msg->header.source = ll_service->id; + msg->header.source = service->id; } else { msg->header.source = Node_Get()->node_id; } - if (Robus_SetTxTask(ll_service, msg) == FAILED) + if (Robus_SetTxTask(service, msg) == FAILED) { return FAILED; } @@ -220,10 +201,10 @@ error_return_t Robus_SendMsg(ll_service_t *ll_service, msg_t *msg) } /****************************************************************************** * @brief Start a topology detection procedure - * @param ll_service pointer to the detecting ll_service + * @param service pointer to the detecting service * @return The number of detected node. ******************************************************************************/ -uint16_t Robus_TopologyDetection(ll_service_t *ll_service) +uint16_t Robus_TopologyDetection(service_t *service) { uint8_t redetect_nb = 0; bool detect_enabled = true; @@ -240,7 +221,7 @@ uint16_t Robus_TopologyDetection(ll_service_t *ll_service) detect_enabled = false; // Reset all detection state of services on the network - Robus_ResetNetworkDetection(ll_service); + Robus_ResetNetworkDetection(service); // Make sure that the detection is not interrupted if (Node_GetState() == EXTERNAL_DETECTION) { @@ -249,10 +230,10 @@ uint16_t Robus_TopologyDetection(ll_service_t *ll_service) // setup local node Node_Get()->node_id = 1; last_node = 1; - // setup sending ll_service - ll_service->id = 1; + // setup sending service + service->id = 1; - if (Robus_DetectNextNodes(ll_service) == FAILED) + if (Robus_DetectNextNodes(service) == FAILED) { // check the number of retry we made LUOS_ASSERT((redetect_nb <= 4)); @@ -266,10 +247,10 @@ uint16_t Robus_TopologyDetection(ll_service_t *ll_service) } /****************************************************************************** * @brief reset all service port states - * @param ll_service pointer to the detecting ll_service + * @param service pointer to the detecting service * @return The number of detected node. ******************************************************************************/ -static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) +static error_return_t Robus_ResetNetworkDetection(service_t *service) { msg_t msg; uint8_t try_nbr = 0; @@ -289,12 +270,12 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) return 0; } // msg send not blocking - Robus_SendMsg(ll_service, &msg); + Robus_SendMsg(service, &msg); // need to wait until tx msg before clear msg alloc while (MsgAlloc_TxAllComplete() != SUCCEED) ; - // Reinit ll_service id + // Reinit service id Service_ClearId(); // Reinit msg alloc @@ -319,17 +300,17 @@ static error_return_t Robus_ResetNetworkDetection(ll_service_t *ll_service) } /****************************************************************************** * @brief run the procedure allowing to detect the next nodes on the next port - * @param ll_service pointer to the detecting ll_service + * @param service pointer to the detecting service * @return None. ******************************************************************************/ -static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service) +static error_return_t Robus_DetectNextNodes(service_t *service) { // Lets try to poke other nodes while (PortMng_PokeNextPort() == SUCCEED) { // There is someone here // Clear spotted dead service detection - ll_service->dead_service_spotted = 0; + service->dead_service_spotted = 0; // Ask an ID to the detector service. msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -337,12 +318,12 @@ static error_return_t Robus_DetectNextNodes(ll_service_t *ll_service) msg.header.target = 1; msg.header.cmd = WRITE_NODE_ID; msg.header.size = 0; - Robus_SendMsg(ll_service, &msg); + Robus_SendMsg(service, &msg); // Wait the end of transmission while (MsgAlloc_TxAllComplete() == FAILED) ; // Check if there is a failure on transmission - if (ll_service->dead_service_spotted != 0) + if (service->dead_service_spotted != 0) { // Message transmission failure // Consider this port unconnected @@ -376,7 +357,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) { msg_t output_msg; node_bootstrap_t node_bootstrap; - ll_service_t *ll_service = Service_GetConcerned(&input->header); + service_t *service = Service_GetConcerned(&input->header); switch (input->header.cmd) { case WRITE_NODE_ID: @@ -393,7 +374,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) output_msg.header.target = input->header.source; output_msg.header.target_mode = NODEIDACK; memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); - Robus_SendMsg(ll_service, &output_msg); + Robus_SendMsg(service, &output_msg); break; case 2: // This is a node id for the next node. @@ -410,13 +391,13 @@ static error_return_t Robus_MsgHandler(msg_t *input) output_msg.header.target = 0; output_msg.header.target_mode = NODEIDACK; memcpy((void *)&output_msg.data[0], (void *)&node_bootstrap.unmap[0], sizeof(node_bootstrap_t)); - Robus_SendMsg(ll_service, &output_msg); + Robus_SendMsg(service, &output_msg); break; case sizeof(node_bootstrap_t): if (Node_Get()->node_id != 0) { Node_Get()->node_id = 0; - // Reinit ll_service id + // Reinit service id Service_ClearId(); MsgAlloc_Init(NULL); } @@ -425,7 +406,7 @@ static error_return_t Robus_MsgHandler(msg_t *input) Node_Get()->node_id = node_bootstrap.nodeid; Node_Get()->port_table[ctx.port.activ] = node_bootstrap.prev_nodeid; // Continue the topology detection on our other ports. - Robus_DetectNextNodes(ll_service); + Robus_DetectNextNodes(service); default: break; } diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index c6cdb66ff..0064095af 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -118,24 +118,24 @@ _CRITICAL void Transmit_Process() uint8_t *data = 0; uint16_t size; uint8_t localhost; - ll_service_t *ll_service_pt; - if ((MsgAlloc_GetTxTask(&ll_service_pt, &data, &size, &localhost) == SUCCEED) && (Transmit_GetLockStatus() == false)) + service_t *service_pt; + if ((MsgAlloc_GetTxTask(&service_pt, &data, &size, &localhost) == SUCCEED) && (Transmit_GetLockStatus() == false)) { // We have something to send // Check if we already try to send it multiple times and save it on stats if it is - if ((*ll_service_pt->ll_stat.max_retry < nbrRetry) || (nbrRetry >= NBR_RETRY)) + if ((service_pt->statistics.max_retry < nbrRetry) || (nbrRetry >= NBR_RETRY)) { - *ll_service_pt->ll_stat.max_retry = nbrRetry; + service_pt->statistics.max_retry = nbrRetry; if (nbrRetry >= NBR_RETRY) { // We failed to transmit this message. We can't allow it, there is a issue on this target. - ll_service_pt->dead_service_spotted = (uint16_t)(((msg_t *)data)->header.target); - nbrRetry = 0; - ctx.tx.collision = false; + service_pt->dead_service_spotted = (uint16_t)(((msg_t *)data)->header.target); + nbrRetry = 0; + ctx.tx.collision = false; // Remove all transmist messages of this specific target MsgAlloc_PullServiceFromTxTask((uint16_t)(((msg_t *)data)->header.target)); // Try to get a tx_task for another service - if (MsgAlloc_GetTxTask(&ll_service_pt, &data, &size, &localhost) == FAILED) + if (MsgAlloc_GetTxTask(&service_pt, &data, &size, &localhost) == FAILED) { // Nothing to transmit anymore, just exit. return; diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index e2ef0f48c..7f8d759dd 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -9,7 +9,7 @@ #include "robus_hal.h" #include "luos_engine.h" #include "luos_utils.h" -#include "io_struct.h" +#include "struct_io.h" #include /******************************************************************************* diff --git a/test/test_msg_alloc/unit_test_mem_alloc_generic.c b/test/test_msg_alloc/unit_test_mem_alloc_generic.c index 1b89821a8..dbd332ab2 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_generic.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_generic.c @@ -7,16 +7,16 @@ ******************************************************************************/ typedef struct __attribute__((__packed__)) { - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - ll_service_t *ll_service_pt; /*!< Pointer to the concerned ll_service. */ + msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ + service_t *service_pt; /*!< Pointer to the concerned service. */ } luos_task_t; typedef struct { - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - ll_service_t *ll_service_pt; /*!< Pointer to the transmitting ll_service. */ - uint8_t localhost; /*!< is this message a localhost one? */ + uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ + uint16_t size; /*!< size of the data. */ + service_t *service_pt; /*!< Pointer to the transmitting service. */ + uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* @@ -957,7 +957,7 @@ void unittest_MsgAlloc_LuosTaskAlloc() // luos_task_t expected_luos_task; - ll_service_t service; + service_t service; // Init variables memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, @@ -995,18 +995,18 @@ void unittest_MsgAlloc_LuosTaskAlloc() // luos_tasks init state luos_tasks end state // // +---------+<--luos_tasks_stack_id +---------+ - // | 0 | | D 1 | (msg_pt & ll_service_pt are allocated) + // | 0 | | D 1 | (msg_pt & service_pt are allocated) // |---------| |---------| - // | 0 | | D 2 | (msg_pt & ll_service_pt are allocated) + // | 0 | | D 2 | (msg_pt & service_pt are allocated) // |---------| |---------| // | etc... | | etc... | // |---------| |---------| - // | 0 | | Last | (msg_pt & ll_service_pt are allocated) + // | 0 | | Last | (msg_pt & service_pt are allocated) // +---------+ luos_tasks_stack_id-->+---------+ // msg_t *message; - ll_service_t *service_concerned; + service_t *service_concerned; uint16_t expected_luos_tasks_stack_id; uint8_t expected_mem_stat; @@ -1026,7 +1026,7 @@ void unittest_MsgAlloc_LuosTaskAlloc() expected_luos_tasks_stack_id = i + 1; expected_mem_stat = ((i + 1) * 100 / MAX_MSG_NB); message = (msg_t *)&msg_buffer[0]; - service_concerned = (ll_service_t *)&msg_buffer[0]; + service_concerned = (service_t *)&msg_buffer[0]; // Launch Test MsgAlloc_LuosTaskAlloc(service_concerned, message); @@ -1035,7 +1035,7 @@ void unittest_MsgAlloc_LuosTaskAlloc() NEW_STEP_IN_LOOP("Check message pointer is allocated", i); TEST_ASSERT_EQUAL(message, luos_tasks[i].msg_pt); NEW_STEP_IN_LOOP("Check service pointer is allocated", i); - TEST_ASSERT_EQUAL(service_concerned, luos_tasks[i].ll_service_pt); + TEST_ASSERT_EQUAL(service_concerned, luos_tasks[i].service_pt); NEW_STEP_IN_LOOP("Check \"luos tasks stack id\" is updated", i); TEST_ASSERT_EQUAL(expected_luos_tasks_stack_id, luos_tasks_stack_id); NEW_STEP_IN_LOOP("Check \"oldest message\" points to first luos task", i); @@ -1088,13 +1088,13 @@ void unittest_MsgAlloc_PullMsg() // msg_t *returned_message; - ll_service_t *service = (ll_service_t *)0xFFFF; + service_t *service = (service_t *)0xFFFF; // Init variables luos_tasks_stack_id = MAX_MSG_NB - 1; for (uintptr_t i = 0; i < MAX_MSG_NB; i++) { - luos_tasks[i].ll_service_pt = (ll_service_t *)i; + luos_tasks[i].service_pt = (service_t *)i; } // Launch Test & Verify @@ -1135,7 +1135,7 @@ void unittest_MsgAlloc_PullMsg() msg_t *returned_message; msg_t *msg_to_clear; - ll_service_t *service; + service_t *service; luos_task_t expected_luos_tasks[MAX_MSG_NB]; for (uint16_t i = 0; i < MAX_MSG_NB; i++) @@ -1146,11 +1146,11 @@ void unittest_MsgAlloc_PullMsg() luos_tasks_stack_id = MAX_MSG_NB; for (uint16_t j = 0; j < MAX_MSG_NB; j++) { - luos_tasks[j].ll_service_pt = (ll_service_t *)&msg_buffer[j]; + luos_tasks[j].service_pt = (service_t *)&msg_buffer[j]; luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); expected_luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); } - service = luos_tasks[i].ll_service_pt; + service = luos_tasks[i].service_pt; msg_to_clear = luos_tasks[i].msg_pt; // Launch Test & Verify @@ -1229,7 +1229,7 @@ void unittest_MsgAlloc_PullMsgFromLuosTask() uint16_t task_id; msg_t *returned_message; msg_t *msg_to_clear; - ll_service_t *service; + service_t *service; luos_task_t expected_luos_tasks[MAX_MSG_NB]; for (uint16_t task_id = 0; task_id < MAX_MSG_NB; task_id++) @@ -1282,7 +1282,7 @@ void unittest_MsgAlloc_LookAtLuosTask() // uint16_t task_id; - ll_service_t **allocated_service; + service_t **allocated_service; // Init variables luos_tasks_stack_id = 0; @@ -1317,21 +1317,21 @@ void unittest_MsgAlloc_LookAtLuosTask() // // Init variables - ll_service_t *oldest_ll_service = NULL; - luos_tasks_stack_id = MAX_MSG_NB; + service_t *oldest_service = NULL; + luos_tasks_stack_id = MAX_MSG_NB; for (uintptr_t i = 0; i < MAX_MSG_NB; i++) { - luos_tasks[i].ll_service_pt = (ll_service_t *)i; + luos_tasks[i].service_pt = (service_t *)i; } // Call function & Verify for (uint16_t i = 0; i < MAX_MSG_NB; i++) { NEW_STEP_IN_LOOP("Check function returns SUCCEED", i); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_LookAtLuosTask(i, &oldest_ll_service)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_LookAtLuosTask(i, &oldest_service)); NEW_STEP_IN_LOOP("Check if function return the service concerned by the oldest message", i); - TEST_ASSERT_EQUAL(i, oldest_ll_service); + TEST_ASSERT_EQUAL(i, oldest_service); } } } @@ -1567,23 +1567,23 @@ void unittest_MsgAlloc_ClearMsgFromLuosTasks() luos_task_t expected_luos_tasks[MAX_MSG_NB]; msg_t message; - ll_service_t service; + service_t service; // Init variables luos_tasks_stack_id = 0; for (uint16_t i = 0; i < MAX_MSG_NB; i++) { - luos_tasks[i].msg_pt = &message; - luos_tasks[i].ll_service_pt = &service; - expected_luos_tasks[i].msg_pt = &message; - expected_luos_tasks[i].ll_service_pt = &service; + luos_tasks[i].msg_pt = &message; + luos_tasks[i].service_pt = &service; + expected_luos_tasks[i].msg_pt = &message; + expected_luos_tasks[i].service_pt = &service; // Call function MsgAlloc_ClearMsgFromLuosTasks(luos_tasks[i].msg_pt); NEW_STEP_IN_LOOP("Check luos message pointer is not cleared", i); TEST_ASSERT_EQUAL(expected_luos_tasks[i].msg_pt, luos_tasks[i].msg_pt); NEW_STEP_IN_LOOP("Check luos service pointer is not cleared", i); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].ll_service_pt, luos_tasks[i].ll_service_pt); + TEST_ASSERT_EQUAL(expected_luos_tasks[i].service_pt, luos_tasks[i].service_pt); } } @@ -1946,21 +1946,21 @@ void unittest_MsgAlloc_GetTxTask() // Init variables //--------------- - ll_service_t *ll_service; + service_t *service; uint8_t *data; uint16_t size = 128; uint8_t localhost = 1; - tx_tasks[0].data_pt = (uint8_t *)16; - tx_tasks[0].ll_service_pt = (ll_service_t *)32; - tx_tasks[0].size = 128; - tx_tasks[0].localhost = 1; + tx_tasks[0].data_pt = (uint8_t *)16; + tx_tasks[0].service_pt = (service_t *)32; + tx_tasks[0].size = 128; + tx_tasks[0].localhost = 1; tx_tasks_stack_id = MAX_MSG_NB + i; // Call function //--------------- - MsgAlloc_GetTxTask(&ll_service, &data, &size, &localhost); + MsgAlloc_GetTxTask(&service, &data, &size, &localhost); // Verify //--------------- @@ -1969,7 +1969,7 @@ void unittest_MsgAlloc_GetTxTask() // Call function //--------------- - MsgAlloc_GetTxTask(&ll_service, &data, &size, &localhost); + MsgAlloc_GetTxTask(&service, &data, &size, &localhost); // Verify //--------------- @@ -1995,7 +1995,7 @@ void unittest_MsgAlloc_GetTxTask() // +---------+ // - ll_service_t *ll_service; + service_t *service; uint8_t *data; uint16_t *size; uint8_t *localhost; @@ -2007,7 +2007,7 @@ void unittest_MsgAlloc_GetTxTask() // Call function & Verify //-------------------------- NEW_STEP("Check function returns FAILED when tx task is empty"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetTxTask(&ll_service, &data, size, localhost)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetTxTask(&service, &data, size, localhost)); } NEW_TEST_CASE("Verify there is a message"); @@ -2026,7 +2026,7 @@ void unittest_MsgAlloc_GetTxTask() // +---------+ // - ll_service_t *ll_service; + service_t *service; uint8_t *data; uint16_t size; uint8_t localhost; @@ -2035,17 +2035,17 @@ void unittest_MsgAlloc_GetTxTask() //--------------- tx_tasks_stack_id = 1; - tx_tasks[0].data_pt = (uint8_t *)16; - tx_tasks[0].ll_service_pt = (ll_service_t *)32; - tx_tasks[0].size = 128; - tx_tasks[0].localhost = 1; + tx_tasks[0].data_pt = (uint8_t *)16; + tx_tasks[0].service_pt = (service_t *)32; + tx_tasks[0].size = 128; + tx_tasks[0].localhost = 1; // Call function & Verify //-------------------------- NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetTxTask(&ll_service, &data, &size, &localhost)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetTxTask(&service, &data, &size, &localhost)); NEW_STEP("Check function returns expected service pointer"); - TEST_ASSERT_EQUAL(tx_tasks[0].ll_service_pt, ll_service); + TEST_ASSERT_EQUAL(tx_tasks[0].service_pt, service); NEW_STEP("Check function returns expected data"); TEST_ASSERT_EQUAL(tx_tasks[0].data_pt, data); NEW_STEP("Check function returns expected size"); diff --git a/test/test_msg_alloc/unit_test_mem_alloc_static.c b/test/test_msg_alloc/unit_test_mem_alloc_static.c index 5a6e2e343..deda161f8 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_static.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_static.c @@ -691,8 +691,8 @@ void unittest_ClearMsgSpace(void) for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) { - luos_tasks[i].msg_pt = (msg_t *)&msg_buffer[i + 2]; - luos_tasks[i].ll_service_pt = (ll_service_t *)&msg_buffer[i + 2]; + luos_tasks[i].msg_pt = (msg_t *)&msg_buffer[i + 2]; + luos_tasks[i].service_pt = (service_t *)&msg_buffer[i + 2]; } used_msg = (msg_t *)&msg_buffer[0]; oldest_msg = (msg_t *)&msg_buffer[2]; @@ -712,7 +712,7 @@ void unittest_ClearMsgSpace(void) for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) { TEST_ASSERT_EQUAL(0, luos_tasks[i].msg_pt); - TEST_ASSERT_EQUAL(0, luos_tasks[i].ll_service_pt); + TEST_ASSERT_EQUAL(0, luos_tasks[i].service_pt); } } @@ -1033,24 +1033,24 @@ void unittest_ClearLuosTask(void) for (uint16_t pt_value = 0; pt_value < MAX_MSG_NB; pt_value++) { // Init luos_tasks pointers - luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); - luos_tasks[pt_value].ll_service_pt = (ll_service_t *)(&msg_buffer[0] + pt_value); + luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); + luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value); // Init expected pointers if (pt_value == (tasks_stack_id - 1)) { - expected_luos_tasks[pt_value].msg_pt = 0; - expected_luos_tasks[pt_value].ll_service_pt = 0; + expected_luos_tasks[pt_value].msg_pt = 0; + expected_luos_tasks[pt_value].service_pt = 0; } else if (pt_value < task_id) { - expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); - expected_luos_tasks[pt_value].ll_service_pt = (ll_service_t *)(&msg_buffer[0] + pt_value); + expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); + expected_luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value); } else { - expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value + 1); - expected_luos_tasks[pt_value].ll_service_pt = (ll_service_t *)(&msg_buffer[0] + pt_value + 1); + expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value + 1); + expected_luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value + 1); } } @@ -1062,7 +1062,7 @@ void unittest_ClearLuosTask(void) for (uint8_t i = 0; i < tasks_stack_id; i++) { TEST_ASSERT_EQUAL(expected_luos_tasks[i].msg_pt, luos_tasks[i].msg_pt); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].ll_service_pt, luos_tasks[i].ll_service_pt); + TEST_ASSERT_EQUAL(expected_luos_tasks[i].service_pt, luos_tasks[i].service_pt); } } } diff --git a/test/test_msg_alloc/unit_test_mem_alloc_tx.c b/test/test_msg_alloc/unit_test_mem_alloc_tx.c index 8ff47b621..3d08fb60f 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_tx.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_tx.c @@ -13,16 +13,16 @@ ******************************************************************************/ typedef struct __attribute__((__packed__)) { - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - ll_service_t *ll_service_pt; /*!< Pointer to the concerned ll_service. */ + msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ + service_t *service_pt; /*!< Pointer to the concerned service. */ } luos_task_t; typedef struct { - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - ll_service_t *ll_service_pt; /*!< Pointer to the transmitting ll_service. */ - uint8_t localhost; /*!< is this message a localhost one? */ + uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ + uint16_t size; /*!< size of the data. */ + service_t *service_pt; /*!< Pointer to the transmitting service. */ + uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* @@ -70,7 +70,7 @@ void unittest_SetTxTask_buffer_full() error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -87,7 +87,7 @@ void unittest_SetTxTask_buffer_full() { RESET_ASSERT(); NEW_STEP_IN_LOOP("Function returns FAILED when \"tx tasks stack id\" overflows", i - (MAX_MSG_NB - 1)); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, &dummy_data, crc, size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, &dummy_data, crc, size, localhost, ack)); NEW_STEP_IN_LOOP("Check NO assert has occured", i - (MAX_MSG_NB - 1)); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -104,7 +104,7 @@ void unittest_SetTxTask_Tx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -147,7 +147,7 @@ void unittest_SetTxTask_Tx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -160,7 +160,7 @@ void unittest_SetTxTask_Tx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -204,7 +204,7 @@ void unittest_SetTxTask_Tx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -217,7 +217,7 @@ void unittest_SetTxTask_Tx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -261,7 +261,7 @@ void unittest_SetTxTask_Tx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -277,7 +277,7 @@ void unittest_SetTxTask_Tx_too_long_2() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -320,7 +320,7 @@ void unittest_SetTxTask_Tx_too_long_2() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -333,7 +333,7 @@ void unittest_SetTxTask_Tx_too_long_2() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -374,7 +374,7 @@ void unittest_SetTxTask_Tx_too_long_2() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -387,7 +387,7 @@ void unittest_SetTxTask_Tx_too_long_2() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -431,7 +431,7 @@ void unittest_SetTxTask_Tx_too_long_2() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -447,7 +447,7 @@ void unittest_SetTxTask_Tx_too_long_3() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -486,7 +486,7 @@ void unittest_SetTxTask_Tx_too_long_3() uint8_t *init_rx_message; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -498,10 +498,10 @@ void unittest_SetTxTask_Tx_too_long_3() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)msg_buffer; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)msg_buffer; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -522,7 +522,7 @@ void unittest_SetTxTask_Tx_too_long_3() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -541,7 +541,7 @@ void unittest_SetTxTask_Tx_too_long_3() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -573,7 +573,7 @@ void unittest_SetTxTask_Rx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -614,7 +614,7 @@ void unittest_SetTxTask_Rx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -627,7 +627,7 @@ void unittest_SetTxTask_Rx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -664,7 +664,7 @@ void unittest_SetTxTask_Rx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -677,7 +677,7 @@ void unittest_SetTxTask_Rx_too_long_1() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -714,7 +714,7 @@ void unittest_SetTxTask_Rx_too_long_1() //--------------------------- RESET_ASSERT(); NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -729,7 +729,7 @@ void unittest_SetTxTask_Rx_too_long_2() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -766,7 +766,7 @@ void unittest_SetTxTask_Rx_too_long_2() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns FAILED when Tx + Rx size doesn't fit msg buffer and a task is in requested memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -782,7 +782,7 @@ void unittest_SetTxTask_Rx_too_long_3() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -819,7 +819,7 @@ void unittest_SetTxTask_Rx_too_long_3() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns FAILED when Tx + Rx size doesn't fit msg buffer and a task is in memory beginning"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -834,7 +834,7 @@ void unittest_SetTxTask_Rx_too_long_4() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -864,7 +864,7 @@ void unittest_SetTxTask_Rx_too_long_4() uint8_t *init_rx_message; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 1)]; // There are only 51 bytes left in msg buffer data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -876,10 +876,10 @@ void unittest_SetTxTask_Rx_too_long_4() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)msg_buffer; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)msg_buffer; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -900,7 +900,7 @@ void unittest_SetTxTask_Rx_too_long_4() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -919,7 +919,7 @@ void unittest_SetTxTask_Rx_too_long_4() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -951,7 +951,7 @@ void unittest_SetTxTask_Task_already_exists() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -981,7 +981,7 @@ void unittest_SetTxTask_Task_already_exists() uint16_t rx_bytes_received = 15; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -993,7 +993,7 @@ void unittest_SetTxTask_Task_already_exists() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns FAILED when a task is in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(ll_service_pt, data, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); } @@ -1008,7 +1008,7 @@ void unittest_SetTxTask_copy_OK() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -1043,7 +1043,7 @@ void unittest_SetTxTask_copy_OK() uint8_t *init_rx_message; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -1055,10 +1055,10 @@ void unittest_SetTxTask_copy_OK() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1079,7 +1079,7 @@ void unittest_SetTxTask_copy_OK() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1098,7 +1098,7 @@ void unittest_SetTxTask_copy_OK() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -1128,7 +1128,7 @@ void unittest_SetTxTask_copy_OK() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -1166,7 +1166,7 @@ void unittest_SetTxTask_copy_OK() uint16_t padding; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 80 bytes @@ -1179,10 +1179,10 @@ void unittest_SetTxTask_copy_OK() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1203,7 +1203,7 @@ void unittest_SetTxTask_copy_OK() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1222,7 +1222,7 @@ void unittest_SetTxTask_copy_OK() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -1252,7 +1252,7 @@ void unittest_SetTxTask_copy_OK() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -1290,7 +1290,7 @@ void unittest_SetTxTask_copy_OK() uint16_t padding; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 80 bytes @@ -1302,10 +1302,10 @@ void unittest_SetTxTask_copy_OK() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1326,7 +1326,7 @@ void unittest_SetTxTask_copy_OK() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1345,7 +1345,7 @@ void unittest_SetTxTask_copy_OK() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -1373,7 +1373,7 @@ void unittest_SetTxTask_copy_OK() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -1408,7 +1408,7 @@ void unittest_SetTxTask_copy_OK() uint8_t *init_rx_message; ack = 0; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -1420,10 +1420,10 @@ void unittest_SetTxTask_copy_OK() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1444,7 +1444,7 @@ void unittest_SetTxTask_copy_OK() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1463,7 +1463,7 @@ void unittest_SetTxTask_copy_OK() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -1495,7 +1495,7 @@ void unittest_SetTxTask_ACK() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost = EXTERNALHOST; @@ -1531,7 +1531,7 @@ void unittest_SetTxTask_ACK() uint8_t *init_rx_message; ack = 55; localhost = 0; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 51 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -1543,10 +1543,10 @@ void unittest_SetTxTask_ACK() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE - sizeof(ack); i++) @@ -1568,7 +1568,7 @@ void unittest_SetTxTask_ACK() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1587,7 +1587,7 @@ void unittest_SetTxTask_ACK() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); @@ -1621,7 +1621,7 @@ void unittest_SetTxTask_internal_localhost() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost; @@ -1659,7 +1659,7 @@ void unittest_SetTxTask_internal_localhost() ack = 0; localhost = LOCALHOST; // Localhost : to fill msg_task - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -1672,10 +1672,10 @@ void unittest_SetTxTask_internal_localhost() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1696,7 +1696,7 @@ void unittest_SetTxTask_internal_localhost() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1716,7 +1716,7 @@ void unittest_SetTxTask_internal_localhost() // Check Tx Tasks is void tx_tasks_stack_id--; NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].data_pt); NEW_STEP("Check Tx task \"size\" = 0"); @@ -1753,7 +1753,7 @@ void unittest_SetTxTask_multihost() { error_return_t result; uint8_t *data; - ll_service_t *ll_service_pt; + service_t *service_pt; uint16_t crc; uint16_t size; luos_localhost_t localhost; @@ -1792,7 +1792,7 @@ void unittest_SetTxTask_multihost() ack = 0; localhost = MULTIHOST; - ll_service_pt = (ll_service_t *)msg_buffer; // Fake service value + service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 50 bytes current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes @@ -1805,10 +1805,10 @@ void unittest_SetTxTask_multihost() expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.ll_service_pt = ll_service_pt; - expected_tx_task.localhost = localhost; + expected_tx_task.size = tx_size; + expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.service_pt = service_pt; + expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -1829,7 +1829,7 @@ void unittest_SetTxTask_multihost() //--------------------------- RESET_ASSERT(); NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(ll_service_pt, tx_message, crc, tx_size, localhost, ack)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); @@ -1851,7 +1851,7 @@ void unittest_SetTxTask_multihost() NEW_STEP("Check Tx task \"size\" is correctly computed"); TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(ll_service_pt, tx_tasks[tx_tasks_stack_id].ll_service_pt); + TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); NEW_STEP("Check \"localhost\" value is set to LOCALHOST"); TEST_ASSERT_EQUAL(LOCALHOST, tx_tasks[tx_tasks_stack_id].localhost); // Mutlihost must be seen as localhost NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); diff --git a/test/test_topic/main.c b/test/test_topic/main.c index f8bb378b5..a13432548 100644 --- a/test/test_topic/main.c +++ b/test/test_topic/main.c @@ -16,10 +16,10 @@ void unittest_PubSub_IsTopicSubscribed(void) Luos_Subscribe(default_sc.App_1.app, 1); Luos_Subscribe(default_sc.App_2.app, 18); - TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, 1)); - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_2.app->ll_service, 1)); - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, 18)); - TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_2.app->ll_service, 18)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 18)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 18)); } } @@ -34,10 +34,10 @@ void unittest_Luos_Subscribe(void) TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 18)); TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 27)); - TEST_ASSERT_EQUAL(3, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(18, default_sc.App_1.app->ll_service->topic_list[1]); - TEST_ASSERT_EQUAL(27, default_sc.App_1.app->ll_service->topic_list[2]); + TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(18, default_sc.App_1.app->topic_list[1]); + TEST_ASSERT_EQUAL(27, default_sc.App_1.app->topic_list[2]); } NEW_TEST_CASE("Add max topics number"); { @@ -47,13 +47,13 @@ void unittest_Luos_Subscribe(void) for (uint8_t i = 0; i < LAST_TOPIC; i++) { TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, i)); - TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->ll_service->last_topic_position); + TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->last_topic_position); } TEST_ASSERT_EQUAL(FAILED, Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC)); - TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->ll_service->last_topic_position); + TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app->ll_service, LAST_TOPIC)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC)); } } @@ -67,27 +67,27 @@ void unittest_Luos_Unsubscribe(void) Luos_Subscribe(default_sc.App_1.app, 2); Luos_Subscribe(default_sc.App_1.app, 7); Luos_Subscribe(default_sc.App_1.app, 17); - TEST_ASSERT_EQUAL(3, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(7, default_sc.App_1.app->ll_service->topic_list[1]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[2]); + TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(7, default_sc.App_1.app->topic_list[1]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[2]); TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 7)); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[1]); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 18)); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[1]); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 17)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->ll_service->topic_list[0]); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(0, default_sc.App_1.app->ll_service->last_topic_position); + TEST_ASSERT_EQUAL(0, default_sc.App_1.app->last_topic_position); } NEW_TEST_CASE("Remove same topic"); { @@ -98,12 +98,12 @@ void unittest_Luos_Unsubscribe(void) Luos_Subscribe(default_sc.App_1.app, 17); TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[0]); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->ll_service->last_topic_position); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->ll_service->topic_list[0]); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); } NEW_TEST_CASE("Last topic position is corrupted"); @@ -112,11 +112,11 @@ void unittest_Luos_Unsubscribe(void) Init_Context(); Luos_Subscribe(default_sc.App_1.app, 2); - default_sc.App_1.app->ll_service->last_topic_position = LAST_TOPIC - 1; + default_sc.App_1.app->last_topic_position = LAST_TOPIC - 1; TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); Luos_Subscribe(default_sc.App_1.app, 2); - default_sc.App_1.app->ll_service->last_topic_position = LAST_TOPIC; + default_sc.App_1.app->last_topic_position = LAST_TOPIC; TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); } } diff --git a/tool_services/gate/TinyJSON/bootloader_ex.h b/tool_services/gate/TinyJSON/bootloader_ex.h index ad95d9a59..ab1aef3c7 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.h +++ b/tool_services/gate/TinyJSON/bootloader_ex.h @@ -7,7 +7,7 @@ #ifndef BOOTLOADER_EX_H #define BOOTLOADER_EX_H -#include "io_struct.h" +#include "struct_io.h" #include "luos_engine.h" #include "tiny-json.h" /******************************************************************************* diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index 5dcea0646..da01d432a 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -930,7 +930,7 @@ void Convert_ExcludedServiceData(service_t *service) { char json[300]; search_result_t result; - RTFilter_ID(RTFilter_Reset(&result), service->ll_service->dead_service_spotted); + RTFilter_ID(RTFilter_Reset(&result), service->dead_service_spotted); sprintf(json, "{\"dead_service\":\"%s\"}\n", result.result_table[0]->alias); // Send the message to pipe PipeLink_Send(service, json, strlen(json)); diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index 8325b0bd2..2e230f85b 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -62,12 +62,12 @@ void DataManager_collect(service_t *service) void DataManager_Run(service_t *service) { // Check if there is a dead service. - if (service->ll_service->dead_service_spotted) + if (service->dead_service_spotted) { Convert_ExcludedServiceData(service); - RoutingTB_RemoveOnRoutingTable(service->ll_service->dead_service_spotted); + RoutingTB_RemoveOnRoutingTable(service->dead_service_spotted); // Reset spotted dead service - service->ll_service->dead_service_spotted = 0; + service->dead_service_spotted = 0; } #ifdef GATE_POLLING DataManager_collect(service); diff --git a/tool_services/gate/pipe_link.c b/tool_services/gate/pipe_link.c index f3ea1b525..94d4f845f 100644 --- a/tool_services/gate/pipe_link.c +++ b/tool_services/gate/pipe_link.c @@ -56,7 +56,7 @@ uint16_t PipeLink_Find(service_t *service) search_result_t result; uint8_t localhost = false; // search a pipe type in localhost - RTFilter_Node(RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE), RoutingTB_NodeIDFromID(service->ll_service->id)); + RTFilter_Node(RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE), RoutingTB_NodeIDFromID(service->id)); if (result.result_nbr > 0) { @@ -97,7 +97,7 @@ uint16_t PipeLink_Find(service_t *service) msg.header.target_mode = SERVICEIDACK; msg.header.cmd = PARAMETERS; msg.header.size = 0; - LUOS_ASSERT(service->ll_service->id != 0); + LUOS_ASSERT(service->id != 0); while (Luos_SendMsg(service, &msg) != SUCCEED) ; } diff --git a/tool_services/inspector/pipe_link.c b/tool_services/inspector/pipe_link.c index 117082880..4e646a900 100644 --- a/tool_services/inspector/pipe_link.c +++ b/tool_services/inspector/pipe_link.c @@ -57,7 +57,7 @@ uint16_t PipeLink_Find(service_t *service) search_result_t result; uint8_t localhost = false; // search a pipe type in localhost - RTFilter_Node(RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE), RoutingTB_NodeIDFromID(service->ll_service->id)); + RTFilter_Node(RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE), RoutingTB_NodeIDFromID(service->id)); if (result.result_nbr > 0) { From 9e1e024a73c5a94074a5c53acdf7f3652fb05236 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 09:35:31 +0200 Subject: [PATCH 033/198] Move robus init and loop things into IO --- engine/IO/inc/luos_io.h | 5 ++-- engine/IO/src/luos_io.c | 47 ++++++++++++++++++++++++++++++-- engine/core/src/luos_engine.c | 10 +++++-- network/robus/inc/robus.h | 10 ++----- network/robus/inc/transmission.h | 1 + network/robus/src/reception.c | 5 ++-- network/robus/src/robus.c | 44 +++--------------------------- network/robus/src/transmission.c | 14 ++++++++++ 8 files changed, 79 insertions(+), 57 deletions(-) diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index 9765d6a17..ee880e334 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -7,6 +7,7 @@ #ifndef _LUOSIO_H_ #define _LUOSIO_H_ +#include "struct_luos.h" /******************************************************************************* * Definitions @@ -21,7 +22,7 @@ ******************************************************************************/ // generic functions -void LuosIO_Init(void); - +void LuosIO_Init(memory_stats_t *memory_stats); +void LuosIO_Loop(void); #endif /* _LUOSIO_H_ */ diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 143464d3c..510d0acef 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -6,7 +6,12 @@ ******************************************************************************/ #include - +#include "transmission.h" +#include "reception.h" +#include "msg_alloc.h" +#include "robus.h" +#include "service.h" +#include "filter.h" /******************************************************************************* * Definitions @@ -20,13 +25,49 @@ * Functions ******************************************************************************/ - /****************************************************************************** * @brief Init the interface file. * @param None * @return None ******************************************************************************/ -void LuosIO_Init(void) +void LuosIO_Init(memory_stats_t *memory_stats) { + // Init filter + Filter_IdInit(); + Filter_TopicInit(); + + // Init transmission + Transmit_Init(); + + // Init reception + Recep_Init(); + + // Clear message allocation buffer table + MsgAlloc_Init(memory_stats); + + // Init Robus + Robus_Init(); +} +/****************************************************************************** + * @brief Loop of the IO level + * @param None + * @return None + ******************************************************************************/ +void LuosIO_Loop(void) +{ + // Execute message allocation tasks + MsgAlloc_loop(); + // Interpreat received messages and create luos task for it. + msg_t *msg; + while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) + { + // Check if this message is a protocol one + if (Robus_MsgHandler(msg) == FAILED) + { + // If not create luos tasks for all services. + Service_AllocMsg(msg); + } + } + Robus_Loop(); } diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index c812f0991..57977bb6b 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -46,9 +46,10 @@ static inline void Luos_PackageLoop(void); void Luos_Init(void) { Service_Init(); + Node_Init(); memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); LuosHAL_Init(); - Robus_Init(&luos_stats.memory); + LuosIO_Init(&luos_stats.memory); #ifdef WITH_BOOTLOADER if (APP_START_ADDRESS == (uint32_t)FLASH_BASE) @@ -98,7 +99,8 @@ void Luos_Loop(void) // Reset the data reception context Luos_ReceiveData(NULL, NULL, NULL); } - Robus_Loop(); + Node_Loop(); + LuosIO_Loop(); // look at all received messages LUOS_MUTEX_LOCK while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_service) != FAILED) @@ -764,6 +766,7 @@ void Luos_Run(void) #endif } } + /****************************************************************************** * @brief Demand a detection * @param service : Service that launched the detection @@ -775,13 +778,14 @@ void Luos_Detect(service_t *service) if (Node_GetState() < LOCAL_DETECTION) { + // Reset filters Filter_IdInit(); // Set the detection launcher id to 1 service->id = 1; // Update the filter just to accept our detector id Filter_AddServiceId(1, 1); - // send ask detection message + // Send ask detection message detection_service = service; detect_msg.header.target_mode = SERVICEIDACK; detect_msg.header.cmd = ASK_DETECTION; diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index e4e167ef8..ef1d101a8 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -7,21 +7,17 @@ #ifndef _ROBUS_H_ #define _ROBUS_H_ -#include -#include -#include "struct_luos.h" -/******************************************************************************* - * Variables - ******************************************************************************/ +#include "luos_io.h" /******************************************************************************* * Function ******************************************************************************/ -void Robus_Init(memory_stats_t *memory_stats); +void Robus_Init(void); void Robus_Loop(void); error_return_t Robus_SetTxTask(service_t *service, msg_t *msg); error_return_t Robus_SendMsg(service_t *service, msg_t *msg); uint16_t Robus_TopologyDetection(service_t *service); +error_return_t Robus_MsgHandler(msg_t *input); #endif /* _ROBUS_H_ */ diff --git a/network/robus/inc/transmission.h b/network/robus/inc/transmission.h index 8f3b28456..82c44bf70 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus/inc/transmission.h @@ -34,6 +34,7 @@ typedef struct /******************************************************************************* * Function ******************************************************************************/ +void Transmit_Init(void); uint16_t ll_crc_compute(uint8_t *, uint16_t, uint16_t); void Transmit_SendAck(void); void Transmit_Process(void); diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 4be6741af..c433c577a 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -90,8 +90,9 @@ static inline uint8_t Recep_IsAckNeeded(void); void Recep_Init(void) { // Initialize the reception state machine - ctx.rx.status.unmap = 0; - ctx.rx.callback = Recep_GetHeader; + ctx.rx.status.unmap = 0; + ctx.rx.callback = Recep_GetHeader; + ctx.rx.status.identifier = 0xF; } /****************************************************************************** * @brief Callback to get a complete header diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 2ef8c9028..9d9f64efe 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -36,7 +36,6 @@ typedef struct __attribute__((__packed__)) }; } node_bootstrap_t; -static error_return_t Robus_MsgHandler(msg_t *input); static error_return_t Robus_DetectNextNodes(service_t *service); static error_return_t Robus_ResetNetworkDetection(service_t *service); /******************************************************************************* @@ -55,35 +54,15 @@ volatile uint16_t last_node = 0; * @param None * @return None ******************************************************************************/ -void Robus_Init(memory_stats_t *memory_stats) +void Robus_Init(void) { - Node_Init(); - // no transmission lock - ctx.tx.lock = false; - // Init collision state - ctx.tx.collision = false; - // Init Tx status - ctx.tx.status = TX_DISABLE; - // Filters init - Filter_IdInit(); - Filter_TopicInit(); - - // Init reception - Recep_Init(); - - // Clear message allocation buffer table - MsgAlloc_Init(memory_stats); - // Init hal RobusHAL_Init(); // init detection structure PortMng_Init(); - - // Initialize the robus service status - ctx.rx.status.unmap = 0; - ctx.rx.status.identifier = 0xF; } + /****************************************************************************** * @brief Loop of the Robus communication protocole * @param None @@ -91,21 +70,6 @@ void Robus_Init(memory_stats_t *memory_stats) ******************************************************************************/ void Robus_Loop(void) { - // Network timeout management - Node_Loop(); - // Execute message allocation tasks - MsgAlloc_loop(); - // Interpreat received messages and create luos task for it. - msg_t *msg = NULL; - while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) - { - // Check if this message is a protocol one - if (Robus_MsgHandler(msg) == FAILED) - { - // If not create luos tasks for all services. - Service_AllocMsg(msg); - } - } RobusHAL_Loop(); } @@ -338,7 +302,7 @@ static error_return_t Robus_DetectNextNodes(service_t *service) uint32_t start_tick = LuosHAL_GetSystick(); while (ctx.port.keepLine) { - Robus_Loop(); + LuosIO_Loop(); if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) { // topology detection is too long, we should abort it and restart @@ -353,7 +317,7 @@ static error_return_t Robus_DetectNextNodes(service_t *service) * @param msg pointer to the reeived message * @return error_return_t SUCCEED if the message have been consumed. ******************************************************************************/ -static error_return_t Robus_MsgHandler(msg_t *input) +error_return_t Robus_MsgHandler(msg_t *input) { msg_t output_msg; node_bootstrap_t node_bootstrap; diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 0064095af..7a61ab13b 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -67,6 +67,20 @@ volatile uint8_t nbrRetry = 0; ******************************************************************************/ _CRITICAL static uint8_t Transmit_GetLockStatus(void); +/****************************************************************************** + * @brief Transmit_Init + * @param None + * @return None + ******************************************************************************/ +void Transmit_Init(void) +{ + // no transmission lock + ctx.tx.lock = false; + // Init collision state + ctx.tx.collision = false; + // Init Tx status + ctx.tx.status = TX_DISABLE; +} /****************************************************************************** * @brief Transmit an ACK * @param None From 8944f80ec2186d6c7e3a16f1d7d3b9cc12920b60 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 11:27:40 +0200 Subject: [PATCH 034/198] Move topology management to LuosIO --- engine/IO/inc/luos_io.h | 1 + engine/IO/src/luos_io.c | 249 +++++++++++++++++++++++++++- engine/core/src/luos_engine.c | 16 +- engine/core/src/routing_table.c | 5 +- engine/engine_config.h | 1 + network/robus/inc/port_manager.h | 2 + network/robus/inc/robus.h | 9 +- network/robus/src/port_manager.c | 22 +++ network/robus/src/robus.c | 274 +++---------------------------- 9 files changed, 320 insertions(+), 259 deletions(-) diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index ee880e334..6d5d38af3 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -24,5 +24,6 @@ // generic functions void LuosIO_Init(memory_stats_t *memory_stats); void LuosIO_Loop(void); +uint16_t LuosIO_TopologyDetection(service_t *service); #endif /* _LUOSIO_H_ */ diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 510d0acef..3eac78e34 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -5,21 +5,44 @@ * @version 0.0.0 ******************************************************************************/ -#include +#include +#include "luos_io.h" #include "transmission.h" #include "reception.h" #include "msg_alloc.h" #include "robus.h" #include "service.h" #include "filter.h" +#include "node.h" +#include "luos_utils.h" +#include "luos_hal.h" +#include "luos_engine.h" /******************************************************************************* * Definitions ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + uint16_t prev_nodeid; + uint16_t nodeid; + }; + uint8_t unmap[sizeof(uint16_t) * 2]; + }; +} node_bootstrap_t; + +static error_return_t LuosIO_StartTopologyDetection(service_t *service); +static error_return_t LuosIO_MsgHandler(msg_t *input); +static error_return_t LuosIO_DetectNextNodes(service_t *service); + /******************************************************************************* * Variables ******************************************************************************/ +volatile uint16_t last_node = 0; /******************************************************************************* * Functions @@ -63,7 +86,7 @@ void LuosIO_Loop(void) while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) { // Check if this message is a protocol one - if (Robus_MsgHandler(msg) == FAILED) + if (LuosIO_MsgHandler(msg) == FAILED) { // If not create luos tasks for all services. Service_AllocMsg(msg); @@ -71,3 +94,225 @@ void LuosIO_Loop(void) } Robus_Loop(); } + +/****************************************************************************** + * @brief Run a topology detection procedure as a master node. + * @param service pointer to the detecting service + * @return The number of detected node. + ******************************************************************************/ +uint16_t LuosIO_TopologyDetection(service_t *service) +{ + uint8_t redetect_nb = 0; + bool detect_enabled = true; + + // If a detection is in progress, don't do an another detection and return 0 + if (Node_GetState() >= LOCAL_DETECTION) + { + return 0; + } + while (detect_enabled) + { + detect_enabled = false; + + // Reset all detection state of services on the network to start a new detection + LuosIO_StartTopologyDetection(service); + // Make sure that the detection is not interrupted + if (Node_GetState() == EXTERNAL_DETECTION) + { + return 0; + } + // Setup local node + Node_Get()->node_id = 1; + last_node = 1; + // Setup sending service id + service->id = 1; + + if (LuosIO_DetectNextNodes(service) == FAILED) + { + // check the number of retry we made + LUOS_ASSERT((redetect_nb <= 4)); + // Detection fail, restart it + redetect_nb++; + detect_enabled = true; + } + } + return last_node; +} + +/****************************************************************************** + * @brief Initiate a topology detection by reseting all service port states as a master node. + * @param service pointer to the detecting service + * @return The number of detected node. + ******************************************************************************/ +static error_return_t LuosIO_StartTopologyDetection(service_t *service) +{ + msg_t msg; + uint8_t try_nbr = 0; + + msg.header.config = BASE_PROTOCOL; + msg.header.target = BROADCAST_VAL; + msg.header.target_mode = BROADCAST; + msg.header.cmd = START_DETECTION; + msg.header.size = 0; + do + { + // If a detection is in progress, don't do an another detection and return 0 + if (Node_GetState() >= LOCAL_DETECTION) + { + return 0; + } + // Load the message to send + Luos_SendMsg(service, &msg); + // Wait until message is actually transmitted + while (MsgAlloc_TxAllComplete() != SUCCEED) + ; + // Reinit services id + Service_ClearId(); + // Reinit msg alloc + MsgAlloc_Init(NULL); + // Wait 2ms to be sure all previous messages are received and treated by other nodes + uint32_t start_tick = LuosHAL_GetSystick(); + while (LuosHAL_GetSystick() - start_tick < 2) + ; + try_nbr++; + } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); + // Reinit our node id + Node_Get()->node_id = 0; + // Clear any saved node id on physical layer ports + Robus_ResetNodeID(); + if (try_nbr < 5) + { + Node_SetState(LOCAL_DETECTION); + return SUCCEED; + } + return FAILED; +} + +/****************************************************************************** + * @brief check if received messages are protocols one and manage it if it is. + * @param msg pointer to the reeived message + * @return error_return_t SUCCEED if the message have been consumed. + ******************************************************************************/ +error_return_t LuosIO_MsgHandler(msg_t *input) +{ + msg_t output_msg; + node_bootstrap_t node_bootstrap; + service_t *service = Service_GetConcerned(&input->header); + switch (input->header.cmd) + { + case WRITE_NODE_ID: + // Depending on the size of the received data we have to do different things + switch (input->header.size) + { + case 0: + // Someone asking us a new node id (we are the detecting service) + // Increase the number of node_nb and send it back + last_node++; + output_msg.header.config = BASE_PROTOCOL; + output_msg.header.cmd = WRITE_NODE_ID; + output_msg.header.size = sizeof(uint16_t); + output_msg.header.target = input->header.source; + output_msg.header.target_mode = NODEIDACK; + memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); + Luos_SendMsg(service, &output_msg); + break; + case 2: + // This is a node id for the next node. + // This is a reply to our request to generate the next node id. + // This node_id is the one after the currently poked branch. + // Extract the node id from the received data + memcpy((void *)&node_bootstrap.nodeid, (void *)&input->data[0], sizeof(uint16_t)); + // We need to save this node ID as a connection to a port + Robus_SaveNodeID(node_bootstrap.nodeid); + // Now we can send it to the next node + node_bootstrap.prev_nodeid = Node_Get()->node_id; + output_msg.header.config = BASE_PROTOCOL; + output_msg.header.cmd = WRITE_NODE_ID; + output_msg.header.size = sizeof(node_bootstrap_t); + output_msg.header.target = 0; + output_msg.header.target_mode = NODEIDACK; + memcpy((void *)&output_msg.data[0], (void *)&node_bootstrap.unmap[0], sizeof(node_bootstrap_t)); + Luos_SendMsg(service, &output_msg); + break; + case sizeof(node_bootstrap_t): + if (Node_Get()->node_id != 0) + { + Node_Get()->node_id = 0; + // Reinit service id + Service_ClearId(); + MsgAlloc_Init(NULL); + } + // This is a node bootstrap information. + memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); + Node_Get()->node_id = node_bootstrap.nodeid; + Robus_SaveNodeID(node_bootstrap.prev_nodeid); + // Continue the topology detection on our other ports. + LuosIO_DetectNextNodes(service); + default: + break; + } + return SUCCEED; + break; + case START_DETECTION: + return SUCCEED; + break; + case END_DETECTION: + // Detect end of detection + Node_SetState(DETECTION_OK); + return FAILED; + break; + default: + return FAILED; + break; + } + return FAILED; +} + +/****************************************************************************** + * @brief run the procedure allowing to detect the next nodes on the next physical layer port. + * @param service pointer to the detecting service + * @return None. + ******************************************************************************/ +static error_return_t LuosIO_DetectNextNodes(service_t *service) +{ + // Lets try to poke other nodes + while (Robus_FindNeighbour() == SUCCEED) + { + // There is someone here + // Clear spotted dead service detection + service->dead_service_spotted = 0; + // Ask an ID to the detector service. + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 1; + msg.header.cmd = WRITE_NODE_ID; + msg.header.size = 0; + Luos_SendMsg(service, &msg); + // Wait the end of transmission + while (MsgAlloc_TxAllComplete() == FAILED) + ; + // Check if there is a failure on transmission + if (service->dead_service_spotted != 0) + { + // Message transmission failure + // Consider this port unconnected by sending a 0xFFFF node id meaning that this port is not connected + Robus_SaveNodeID(0xFFFF); + continue; + } + + // when Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. + // We just have to wait the end of the treatment of the entire branch + uint32_t start_tick = LuosHAL_GetSystick(); + while (Robus_Busy()) + { + LuosIO_Loop(); + if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) + { + // topology detection is too long, we should abort it and restart + return FAILED; + } + } + } + return SUCCEED; +} diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 57977bb6b..8f39c32a3 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -450,7 +450,21 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) // We can't send it return PROHIBITED; } - return Robus_SendMsg(service, msg); + + // ********** Prepare the message ******************** + if (service->id != 0) + { + msg->header.source = service->id; + } + else + { + msg->header.source = Node_Get()->node_id; + } + if (Robus_SetTxTask(service, msg) == FAILED) + { + return FAILED; + } + return SUCCEED; } /****************************************************************************** diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index f242e7999..71306facb 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -13,12 +13,11 @@ #include "luos_hal.h" #include "luos_engine.h" #include "struct_engine.h" -#include "robus.h" +#include "luos_io.h" /******************************************************************************* * Definitions ******************************************************************************/ -#define ALIAS_SIZE 15 /******************************************************************************* * Variables ******************************************************************************/ @@ -367,7 +366,7 @@ void RoutingTB_DetectServices(service_t *service) // Desactivate verbose mode Luos_SetVerboseMode(false); // Starts the topology detection. - uint16_t nb_node = Robus_TopologyDetection(service); + uint16_t nb_node = LuosIO_TopologyDetection(service); // Clear data reception state Luos_ReceiveData(NULL, NULL, NULL); // Clear the routing table. diff --git a/engine/engine_config.h b/engine/engine_config.h index 7e7f57e89..23e346126 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -12,6 +12,7 @@ ******************************************************************************/ #define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command #define ROBUS_PROTOCOL_NB 13 // Number of Robus protocol command +#define ALIAS_SIZE 15 // Number of max char for service alias #define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection #define BOOT_TIMEOUT 1000 #define DEFAULTID 0x00 diff --git a/network/robus/inc/port_manager.h b/network/robus/inc/port_manager.h index 1a4e2d975..bf7bcc644 100644 --- a/network/robus/inc/port_manager.h +++ b/network/robus/inc/port_manager.h @@ -30,5 +30,7 @@ void PortMng_PtpHandler(uint8_t PortNbr); uint8_t PortMng_PokePort(uint8_t PortNbr); error_return_t PortMng_PokeNextPort(void); uint8_t PortMng_PortPokedStatus(void); +void PortMng_SaveNodeID(uint16_t nodeid); +bool PortMng_Busy(void); #endif /* _PORTMANAGER_H_ */ diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index ef1d101a8..a0de76386 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -8,6 +8,7 @@ #define _ROBUS_H_ #include "luos_io.h" +#include /******************************************************************************* * Function @@ -16,8 +17,10 @@ void Robus_Init(void); void Robus_Loop(void); error_return_t Robus_SetTxTask(service_t *service, msg_t *msg); -error_return_t Robus_SendMsg(service_t *service, msg_t *msg); -uint16_t Robus_TopologyDetection(service_t *service); -error_return_t Robus_MsgHandler(msg_t *input); + +void Robus_SaveNodeID(uint16_t nodeid); +void Robus_ResetNodeID(void); +bool Robus_Busy(void); +error_return_t Robus_FindNeighbour(void); #endif /* _ROBUS_H_ */ diff --git a/network/robus/src/port_manager.c b/network/robus/src/port_manager.c index dd034ef77..3acc3473e 100644 --- a/network/robus/src/port_manager.c +++ b/network/robus/src/port_manager.c @@ -179,3 +179,25 @@ _CRITICAL void PortMng_Reset(void) RobusHAL_SetPTPDefaultState(port); } } + +/****************************************************************************** + * @brief save node id on the port table + * @param node id + * @return None + ******************************************************************************/ +void PortMng_SaveNodeID(uint16_t nodeid) +{ + Node_Get()->port_table[ctx.port.activ] = nodeid; + if (nodeid == 0xFFFF) + { + // This means no that we failed to reach the next node + // Consider this port unconnected + ctx.port.activ = NBR_PORT; + ctx.port.keepLine = false; + } +} + +bool PortMng_Busy(void) +{ + return ctx.port.keepLine; +} diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 9d9f64efe..65d0c649e 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -23,27 +23,11 @@ * Definitions ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - uint16_t prev_nodeid; - uint16_t nodeid; - }; - uint8_t unmap[sizeof(uint16_t) * 2]; - }; -} node_bootstrap_t; - -static error_return_t Robus_DetectNextNodes(service_t *service); -static error_return_t Robus_ResetNetworkDetection(service_t *service); /******************************************************************************* * Variables ******************************************************************************/ // Creation of the robus context. This variable is used in all files of this lib. volatile context_t ctx; -volatile uint16_t last_node = 0; /******************************************************************************* * Function @@ -59,7 +43,7 @@ void Robus_Init(void) // Init hal RobusHAL_Init(); - // init detection structure + // Init detection structure PortMng_Init(); } @@ -140,253 +124,43 @@ error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) #endif return error; } + /****************************************************************************** - * @brief Send Msg to a service - * @param service to send - * @param msg to send - * @return none + * @brief Save a node id in the port table + * @param nodeid to save + * @return None. ******************************************************************************/ -error_return_t Robus_SendMsg(service_t *service, msg_t *msg) +void Robus_SaveNodeID(uint16_t nodeid) { - // ********** Prepare the message ******************** - if (service->id != 0) - { - msg->header.source = service->id; - } - else - { - msg->header.source = Node_Get()->node_id; - } - if (Robus_SetTxTask(service, msg) == FAILED) - { - return FAILED; - } - return SUCCEED; + PortMng_SaveNodeID(nodeid); } -/****************************************************************************** - * @brief Start a topology detection procedure - * @param service pointer to the detecting service - * @return The number of detected node. - ******************************************************************************/ -uint16_t Robus_TopologyDetection(service_t *service) -{ - uint8_t redetect_nb = 0; - bool detect_enabled = true; - - // if a detection is in progress, - // Don't do an another detection and return 0 - if (Node_GetState() >= LOCAL_DETECTION) - { - return 0; - } - - while (detect_enabled) - { - detect_enabled = false; - - // Reset all detection state of services on the network - Robus_ResetNetworkDetection(service); - // Make sure that the detection is not interrupted - if (Node_GetState() == EXTERNAL_DETECTION) - { - return 0; - } - // setup local node - Node_Get()->node_id = 1; - last_node = 1; - // setup sending service - service->id = 1; - - if (Robus_DetectNextNodes(service) == FAILED) - { - // check the number of retry we made - LUOS_ASSERT((redetect_nb <= 4)); - // Detection fail, restart it - redetect_nb++; - detect_enabled = true; - } - } - return last_node; -} /****************************************************************************** - * @brief reset all service port states - * @param service pointer to the detecting service - * @return The number of detected node. + * @brief Reset the node id of the port table + * @param None + * @return None. ******************************************************************************/ -static error_return_t Robus_ResetNetworkDetection(service_t *service) +void Robus_ResetNodeID(void) { - msg_t msg; - uint8_t try_nbr = 0; - - msg.header.config = BASE_PROTOCOL; - msg.header.target = BROADCAST_VAL; - msg.header.target_mode = BROADCAST; - msg.header.cmd = START_DETECTION; - msg.header.size = 0; - - do - { - // if a detection is in progress, - // Don't do an another detection and return 0 - if (Node_GetState() >= LOCAL_DETECTION) - { - return 0; - } - // msg send not blocking - Robus_SendMsg(service, &msg); - // need to wait until tx msg before clear msg alloc - while (MsgAlloc_TxAllComplete() != SUCCEED) - ; - - // Reinit service id - Service_ClearId(); - - // Reinit msg alloc - MsgAlloc_Init(NULL); - - // wait for some 2ms to be sure all previous messages are received and treated - uint32_t start_tick = LuosHAL_GetSystick(); - while (LuosHAL_GetSystick() - start_tick < 2) - ; - try_nbr++; - } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); - - Node_Get()->node_id = 0; PortMng_Init(); - if (try_nbr < 5) - { - Node_SetState(LOCAL_DETECTION); - return SUCCEED; - } - - return FAILED; } + /****************************************************************************** - * @brief run the procedure allowing to detect the next nodes on the next port - * @param service pointer to the detecting service - * @return None. + * @brief Is Robus busy + * @param None + * @return nodeid. ******************************************************************************/ -static error_return_t Robus_DetectNextNodes(service_t *service) +bool Robus_Busy(void) { - // Lets try to poke other nodes - while (PortMng_PokeNextPort() == SUCCEED) - { - // There is someone here - // Clear spotted dead service detection - service->dead_service_spotted = 0; - // Ask an ID to the detector service. - msg_t msg; - msg.header.config = BASE_PROTOCOL; - msg.header.target_mode = NODEIDACK; - msg.header.target = 1; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = 0; - Robus_SendMsg(service, &msg); - // Wait the end of transmission - while (MsgAlloc_TxAllComplete() == FAILED) - ; - // Check if there is a failure on transmission - if (service->dead_service_spotted != 0) - { - // Message transmission failure - // Consider this port unconnected - Node_Get()->port_table[ctx.port.activ] = 0xFFFF; - ctx.port.activ = NBR_PORT; - ctx.port.keepLine = false; - continue; - } - - // when Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. - // We just have to wait the end of the treatment of the entire branch - uint32_t start_tick = LuosHAL_GetSystick(); - while (ctx.port.keepLine) - { - LuosIO_Loop(); - if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) - { - // topology detection is too long, we should abort it and restart - return FAILED; - } - } - } - return SUCCEED; + return PortMng_Busy(); } + /****************************************************************************** - * @brief check if received messages are protocols one and manage it if it is. - * @param msg pointer to the reeived message - * @return error_return_t SUCCEED if the message have been consumed. + * @brief Find the next neighbour on this phy + * @param None + * @return error_return_t ******************************************************************************/ -error_return_t Robus_MsgHandler(msg_t *input) +error_return_t Robus_FindNeighbour(void) { - msg_t output_msg; - node_bootstrap_t node_bootstrap; - service_t *service = Service_GetConcerned(&input->header); - switch (input->header.cmd) - { - case WRITE_NODE_ID: - // Depending on the size of the received data we have to do different things - switch (input->header.size) - { - case 0: - // Someone asking us a new node id (we are the detecting service) - // Increase the number of node_nb and send it back - last_node++; - output_msg.header.config = BASE_PROTOCOL; - output_msg.header.cmd = WRITE_NODE_ID; - output_msg.header.size = sizeof(uint16_t); - output_msg.header.target = input->header.source; - output_msg.header.target_mode = NODEIDACK; - memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); - Robus_SendMsg(service, &output_msg); - break; - case 2: - // This is a node id for the next node. - // This is a reply to our request to generate the next node id. - // This node_id is the one after the currently poked branch. - // We need to save this ID as a connection on a port - memcpy((void *)&Node_Get()->port_table[ctx.port.activ], (void *)&input->data[0], sizeof(uint16_t)); - // Now we can send it to the next node - memcpy((void *)&node_bootstrap.nodeid, (void *)&input->data[0], sizeof(uint16_t)); - node_bootstrap.prev_nodeid = Node_Get()->node_id; - output_msg.header.config = BASE_PROTOCOL; - output_msg.header.cmd = WRITE_NODE_ID; - output_msg.header.size = sizeof(node_bootstrap_t); - output_msg.header.target = 0; - output_msg.header.target_mode = NODEIDACK; - memcpy((void *)&output_msg.data[0], (void *)&node_bootstrap.unmap[0], sizeof(node_bootstrap_t)); - Robus_SendMsg(service, &output_msg); - break; - case sizeof(node_bootstrap_t): - if (Node_Get()->node_id != 0) - { - Node_Get()->node_id = 0; - // Reinit service id - Service_ClearId(); - MsgAlloc_Init(NULL); - } - // This is a node bootstrap information. - memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); - Node_Get()->node_id = node_bootstrap.nodeid; - Node_Get()->port_table[ctx.port.activ] = node_bootstrap.prev_nodeid; - // Continue the topology detection on our other ports. - Robus_DetectNextNodes(service); - default: - break; - } - return SUCCEED; - break; - case START_DETECTION: - return SUCCEED; - break; - case END_DETECTION: - // Detect end of detection - Node_SetState(DETECTION_OK); - return FAILED; - break; - default: - return FAILED; - break; - } - return FAILED; -} + return PortMng_PokeNextPort(); +} \ No newline at end of file From 7534573efe5a1c5e8a536ccc0c53d294c10a8801 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 16:17:06 +0200 Subject: [PATCH 035/198] Create a phy.h/c files defining phy structs --- engine/IO/inc/phy.h | 28 ++++++++++++++++++++++++++++ engine/IO/src/phy.c | 29 +++++++++++++++++++++++++++++ network/robus/src/reception.c | 15 ++++++++------- 3 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 engine/IO/inc/phy.h create mode 100644 engine/IO/src/phy.c diff --git a/engine/IO/inc/phy.h b/engine/IO/inc/phy.h new file mode 100644 index 000000000..cff517e01 --- /dev/null +++ b/engine/IO/inc/phy.h @@ -0,0 +1,28 @@ +/****************************************************************************** + * @file phy.h + * @brief interface with the phy + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _PHY_H_ +#define _PHY_H_ + +#include + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct phy_t + * @brief the data structure allowing the phy to interract with LuosIO + ******************************************************************************/ +typedef struct phy_t +{ + int64_t rx_timestamp; + +} phy_t; + +void Phy_Init(void); + +#endif /* _PHY_H_ */ diff --git a/engine/IO/src/phy.c b/engine/IO/src/phy.c new file mode 100644 index 000000000..851896858 --- /dev/null +++ b/engine/IO/src/phy.c @@ -0,0 +1,29 @@ +/****************************************************************************** + * @file phy.c + * @brief Manage physical layers + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "phy.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + +/****************************************************************************** + * @brief POhy initialization + * @param None + * @return None + ******************************************************************************/ +void Phy_Init(void) +{ +} \ No newline at end of file diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index c433c577a..f6fa735d8 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -47,7 +47,6 @@ #include "robus_hal.h" #include "luos_hal.h" #include "pub_sub.h" -#include "transmission.h" #include "msg_alloc.h" #include "luos_utils.h" #include "_timestamp.h" @@ -56,6 +55,7 @@ #include "filter.h" #include "struct_engine.h" #include "context.h" +#include "phy.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -73,10 +73,10 @@ /******************************************************************************* * Variables ******************************************************************************/ -uint16_t data_count = 0; -uint16_t data_size = 0; -uint16_t crc_val = 0; -static int64_t ll_rx_timestamp = 0; +uint16_t data_count = 0; +uint16_t data_size = 0; +uint16_t crc_val = 0; +phy_t phy; /******************************************************************************* * Function @@ -93,6 +93,7 @@ void Recep_Init(void) ctx.rx.status.unmap = 0; ctx.rx.callback = Recep_GetHeader; ctx.rx.status.identifier = 0xF; + phy.rx_timestamp = 0; } /****************************************************************************** * @brief Callback to get a complete header @@ -112,7 +113,7 @@ _CRITICAL void Recep_GetHeader(volatile uint8_t *data) case 1: // reset CRC computation // when we catch the first byte we timestamp the msg // -8 : time to transmit 8 bits at 1 us/bit - ll_rx_timestamp = LuosHAL_GetTimestamp() - BYTE_TRANSMIT_TIME; + phy.rx_timestamp = LuosHAL_GetTimestamp() - BYTE_TRANSMIT_TIME; ctx.tx.lock = true; // Switch the transmit status to disable to be sure to not interpreat the end timeout as an end of transmission. @@ -207,7 +208,7 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) if (Luos_IsMsgTimstamped((msg_t *)current_msg)) { // This conversion also remove the timestamp from the message size. - Timestamp_ConvertToDate((msg_t *)current_msg, ll_rx_timestamp); + Timestamp_ConvertToDate((msg_t *)current_msg, phy.rx_timestamp); } // Make an exception for bootloader command From ab2035e316a416c1bcd8cdde5f753379cb8c5aa5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 17:32:00 +0200 Subject: [PATCH 036/198] Move back rx and tx init into robus --- engine/IO/src/luos_io.c | 6 ------ network/robus/src/robus.c | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 3eac78e34..74f9104fc 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -59,12 +59,6 @@ void LuosIO_Init(memory_stats_t *memory_stats) Filter_IdInit(); Filter_TopicInit(); - // Init transmission - Transmit_Init(); - - // Init reception - Recep_Init(); - // Clear message allocation buffer table MsgAlloc_Init(memory_stats); diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 65d0c649e..f31480aca 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -43,8 +43,13 @@ void Robus_Init(void) // Init hal RobusHAL_Init(); - // Init detection structure + // Init port structure PortMng_Init(); + + // Init transmission + Transmit_Init(); + // Init reception + Recep_Init(); } /****************************************************************************** From dce87651a2c2df53d881df0c58e80e6d088b9d68 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 6 Apr 2023 17:33:41 +0200 Subject: [PATCH 037/198] Manage phy instantiation --- engine/IO/inc/luos_phy.h | 39 +++++++++++++++++++ engine/IO/inc/phy.h | 28 ------------- engine/IO/src/{phy.c => luos_phy.c} | 32 ++++++++++++++- .../ESP32/button_arduino/sdkconfig.esp32dev | 30 ++++++++++++-- .../ESP32/gate_serialcom/sdkconfig.esp32dev | 25 +++++++++--- .../gate_serialcom_arduino/sdkconfig.esp32dev | 30 ++++++++++++-- .../ESP32/gate_wscom/sdkconfig.esp32dev | 21 ++++++++-- .../gate_wscom_arduino/sdkconfig.esp32dev | 30 ++++++++++++-- network/robus/HAL/ATSAMD21/robus_hal.c | 2 +- .../robus/HAL/ATSAMD21_ARDUINO/robus_hal.c | 2 +- network/robus/HAL/ATSAMD21_MBED/robus_hal.c | 2 +- network/robus/HAL/ESP32/robus_hal.c | 2 +- network/robus/HAL/NATIVE/robus_hal.c | 2 +- network/robus/HAL/STM32F0/robus_hal.c | 2 +- network/robus/HAL/STM32F4/robus_hal.c | 2 +- network/robus/HAL/STM32G4/robus_hal.c | 2 +- network/robus/HAL/STM32L0/robus_hal.c | 2 +- network/robus/HAL/STM32L4/robus_hal.c | 2 +- network/robus/HAL/template/robus_hal.c | 4 +- network/robus/inc/reception.h | 24 ++++++------ network/robus/inc/robus.h | 2 +- network/robus/src/reception.c | 30 +++++++------- network/robus/src/robus.c | 18 ++++++++- 23 files changed, 242 insertions(+), 91 deletions(-) create mode 100644 engine/IO/inc/luos_phy.h delete mode 100644 engine/IO/inc/phy.h rename engine/IO/src/{phy.c => luos_phy.c} (52%) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h new file mode 100644 index 000000000..7aea41d45 --- /dev/null +++ b/engine/IO/inc/luos_phy.h @@ -0,0 +1,39 @@ +/****************************************************************************** + * @file phy.h + * @brief interface with the phy + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _LUOS_PHY_H_ +#define _LUOS_PHY_H_ + +#include + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct luos_luos_phy_t + * @brief the data structure allowing the phy to interract with LuosIO + ******************************************************************************/ +typedef struct luos_luos_phy_t +{ + volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. + uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. + volatile uint8_t *rx_data; // Pointer to write received bytes. + volatile uint16_t rx_size; // Size of data to receive data. + struct __attribute__((__packed__)) + { + volatile uint8_t rx_alloc_job : 1; // If true, loop will need to filter already received data, if filter is ok, set rx_keep, alloc space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. + volatile uint8_t rx_keep : 1; // True if we want to keep the received data. + }; +} luos_phy_t; + +void Phy_Init(void); +void Phy_Loop(void); +luos_phy_t *Phy_Create(void); + +void Phy_Send(luos_phy_t *phy, uint8_t *data, uint16_t size); + +#endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/inc/phy.h b/engine/IO/inc/phy.h deleted file mode 100644 index cff517e01..000000000 --- a/engine/IO/inc/phy.h +++ /dev/null @@ -1,28 +0,0 @@ -/****************************************************************************** - * @file phy.h - * @brief interface with the phy - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _PHY_H_ -#define _PHY_H_ - -#include - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/****************************************************************************** - * @struct phy_t - * @brief the data structure allowing the phy to interract with LuosIO - ******************************************************************************/ -typedef struct phy_t -{ - int64_t rx_timestamp; - -} phy_t; - -void Phy_Init(void); - -#endif /* _PHY_H_ */ diff --git a/engine/IO/src/phy.c b/engine/IO/src/luos_phy.c similarity index 52% rename from engine/IO/src/phy.c rename to engine/IO/src/luos_phy.c index 851896858..2833b6e22 100644 --- a/engine/IO/src/phy.c +++ b/engine/IO/src/luos_phy.c @@ -5,7 +5,7 @@ * @version 0.0.0 ******************************************************************************/ -#include "phy.h" +#include "luos_phy.h" /******************************************************************************* * Definitions @@ -14,6 +14,7 @@ /******************************************************************************* * Variables ******************************************************************************/ +luos_phy_t phy; /******************************************************************************* * Functions @@ -26,4 +27,33 @@ ******************************************************************************/ void Phy_Init(void) { +} + +/****************************************************************************** + * @brief Phy loop + * @param None + * @return None + ******************************************************************************/ +void Phy_Loop(void) +{ +} + +/****************************************************************************** + * @brief Instanciate a physical layer + * @param None + * @return None + ******************************************************************************/ +luos_phy_t *Phy_Create(void) +{ + return &phy; +} + +/****************************************************************************** + * @brief Send data on the physical layer + * @param data Data to send + * @param size Size of the data to send + * @return None + ******************************************************************************/ +void Phy_Send(luos_phy_t *phy, uint8_t *data, uint16_t size) +{ } \ No newline at end of file diff --git a/examples/projects/ESP32/button_arduino/sdkconfig.esp32dev b/examples/projects/ESP32/button_arduino/sdkconfig.esp32dev index d0dec9acf..466eb0ad5 100644 --- a/examples/projects/ESP32/button_arduino/sdkconfig.esp32dev +++ b/examples/projects/ESP32/button_arduino/sdkconfig.esp32dev @@ -54,6 +54,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL=3 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 @@ -95,6 +96,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y @@ -131,6 +135,7 @@ CONFIG_PARTITION_TABLE_MD5=y # # Arduino Configuration # +CONFIG_ARDUINO_VARIANT="esp32" CONFIG_ENABLE_ARDUINO_DEPENDS=y CONFIG_AUTOSTART_ARDUINO=y # CONFIG_ARDUINO_RUN_CORE0 is not set @@ -142,11 +147,17 @@ CONFIG_ARDUINO_LOOP_STACK_SIZE=8192 CONFIG_ARDUINO_EVENT_RUN_CORE1=y # CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE0 is not set +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE1 is not set +CONFIG_ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY=y +CONFIG_ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE=-1 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_PRIORITY=24 # CONFIG_ARDUINO_UDP_RUN_CORE0 is not set CONFIG_ARDUINO_UDP_RUN_CORE1=y # CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set -CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 # CONFIG_ARDUINO_ISR_IRAM is not set CONFIG_DISABLE_HAL_LOCKS=y @@ -310,8 +321,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -519,6 +530,13 @@ CONFIG_ESP_PHY_REDUCE_TX_POWER=y # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -602,6 +620,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set # end of Wi-Fi # @@ -948,6 +967,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 # end of Certificate Bundle # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set @@ -1099,6 +1119,7 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # # NVS # +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set # end of NVS # @@ -1236,7 +1257,6 @@ CONFIG_VFS_SUPPORT_TERMIOS=y # Host File System I/O (Semihosting) # CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # end of Host File System I/O (Semihosting) # end of Virtual file system @@ -1253,6 +1273,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y # end of Wi-Fi Provisioning Manager # @@ -1265,6 +1286,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # CONFIG_WPA_TESTING_OPTIONS is not set # CONFIG_WPA_WPS_STRICT is not set # CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set # end of Supplicant # end of Component config @@ -1433,5 +1456,4 @@ CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options diff --git a/examples/projects/ESP32/gate_serialcom/sdkconfig.esp32dev b/examples/projects/ESP32/gate_serialcom/sdkconfig.esp32dev index 27849c495..bdebf7235 100644 --- a/examples/projects/ESP32/gate_serialcom/sdkconfig.esp32dev +++ b/examples/projects/ESP32/gate_serialcom/sdkconfig.esp32dev @@ -54,6 +54,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL=3 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 @@ -95,6 +96,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y @@ -263,8 +267,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -472,6 +476,13 @@ CONFIG_ESP_PHY_REDUCE_TX_POWER=y # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -557,6 +568,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set # end of Wi-Fi # @@ -903,6 +915,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 # end of Certificate Bundle # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set @@ -1050,6 +1063,7 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # # NVS # +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set # end of NVS # @@ -1187,7 +1201,6 @@ CONFIG_VFS_SUPPORT_TERMIOS=y # Host File System I/O (Semihosting) # CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # end of Host File System I/O (Semihosting) # end of Virtual file system @@ -1204,6 +1217,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y # end of Wi-Fi Provisioning Manager # @@ -1216,6 +1230,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # CONFIG_WPA_TESTING_OPTIONS is not set # CONFIG_WPA_WPS_STRICT is not set # CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set # end of Supplicant # end of Component config @@ -1306,8 +1322,8 @@ CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set # CONFIG_ESP32S2_PANIC_GDBSTUB is not set CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=4096 +CONFIG_MAIN_TASK_STACK_SIZE=8192 # CONFIG_CONSOLE_UART_DEFAULT is not set CONFIG_CONSOLE_UART_CUSTOM=y # CONFIG_ESP_CONSOLE_UART_NONE is not set @@ -1386,5 +1402,4 @@ CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options diff --git a/examples/projects/ESP32/gate_serialcom_arduino/sdkconfig.esp32dev b/examples/projects/ESP32/gate_serialcom_arduino/sdkconfig.esp32dev index b5d0c4dbb..b654c993a 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/sdkconfig.esp32dev +++ b/examples/projects/ESP32/gate_serialcom_arduino/sdkconfig.esp32dev @@ -54,6 +54,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL=1 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 @@ -95,6 +96,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y @@ -131,6 +135,7 @@ CONFIG_PARTITION_TABLE_MD5=y # # Arduino Configuration # +CONFIG_ARDUINO_VARIANT="esp32" CONFIG_ENABLE_ARDUINO_DEPENDS=y CONFIG_AUTOSTART_ARDUINO=y # CONFIG_ARDUINO_RUN_CORE0 is not set @@ -142,11 +147,17 @@ CONFIG_ARDUINO_LOOP_STACK_SIZE=8192 CONFIG_ARDUINO_EVENT_RUN_CORE1=y # CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE0 is not set +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE1 is not set +CONFIG_ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY=y +CONFIG_ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE=-1 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_PRIORITY=24 # CONFIG_ARDUINO_UDP_RUN_CORE0 is not set CONFIG_ARDUINO_UDP_RUN_CORE1=y # CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set -CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 # CONFIG_ARDUINO_ISR_IRAM is not set CONFIG_DISABLE_HAL_LOCKS=y @@ -310,8 +321,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -519,6 +530,13 @@ CONFIG_ESP_PHY_REDUCE_TX_POWER=y # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -604,6 +622,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set # end of Wi-Fi # @@ -952,6 +971,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 # end of Certificate Bundle # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set @@ -1103,6 +1123,7 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # # NVS # +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set # end of NVS # @@ -1240,7 +1261,6 @@ CONFIG_VFS_SUPPORT_TERMIOS=y # Host File System I/O (Semihosting) # CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # end of Host File System I/O (Semihosting) # end of Virtual file system @@ -1257,6 +1277,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y # end of Wi-Fi Provisioning Manager # @@ -1269,6 +1290,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # CONFIG_WPA_TESTING_OPTIONS is not set # CONFIG_WPA_WPS_STRICT is not set # CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set # end of Supplicant # end of Component config @@ -1439,5 +1462,4 @@ CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options diff --git a/examples/projects/ESP32/gate_wscom/sdkconfig.esp32dev b/examples/projects/ESP32/gate_wscom/sdkconfig.esp32dev index 2576ae935..0d6b5cac7 100644 --- a/examples/projects/ESP32/gate_wscom/sdkconfig.esp32dev +++ b/examples/projects/ESP32/gate_wscom/sdkconfig.esp32dev @@ -54,6 +54,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL=3 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 @@ -95,6 +96,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y @@ -263,8 +267,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -472,6 +476,13 @@ CONFIG_ESP_PHY_REDUCE_TX_POWER=y # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -559,6 +570,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set # end of Wi-Fi # @@ -905,6 +917,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 # end of Certificate Bundle # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set @@ -1056,6 +1069,7 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # # NVS # +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set # end of NVS # @@ -1193,7 +1207,6 @@ CONFIG_VFS_SUPPORT_TERMIOS=y # Host File System I/O (Semihosting) # CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # end of Host File System I/O (Semihosting) # end of Virtual file system @@ -1210,6 +1223,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y # end of Wi-Fi Provisioning Manager # @@ -1222,6 +1236,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # CONFIG_WPA_TESTING_OPTIONS is not set # CONFIG_WPA_WPS_STRICT is not set # CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set # end of Supplicant # end of Component config @@ -1394,5 +1410,4 @@ CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options diff --git a/examples/projects/ESP32/gate_wscom_arduino/sdkconfig.esp32dev b/examples/projects/ESP32/gate_wscom_arduino/sdkconfig.esp32dev index b5d0c4dbb..b654c993a 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/sdkconfig.esp32dev +++ b/examples/projects/ESP32/gate_wscom_arduino/sdkconfig.esp32dev @@ -54,6 +54,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL=1 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y CONFIG_BOOTLOADER_WDT_ENABLE=y # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set CONFIG_BOOTLOADER_WDT_TIME_MS=9000 @@ -95,6 +96,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y @@ -131,6 +135,7 @@ CONFIG_PARTITION_TABLE_MD5=y # # Arduino Configuration # +CONFIG_ARDUINO_VARIANT="esp32" CONFIG_ENABLE_ARDUINO_DEPENDS=y CONFIG_AUTOSTART_ARDUINO=y # CONFIG_ARDUINO_RUN_CORE0 is not set @@ -142,11 +147,17 @@ CONFIG_ARDUINO_LOOP_STACK_SIZE=8192 CONFIG_ARDUINO_EVENT_RUN_CORE1=y # CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE0 is not set +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE1 is not set +CONFIG_ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY=y +CONFIG_ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE=-1 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_PRIORITY=24 # CONFIG_ARDUINO_UDP_RUN_CORE0 is not set CONFIG_ARDUINO_UDP_RUN_CORE1=y # CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set -CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 # CONFIG_ARDUINO_ISR_IRAM is not set CONFIG_DISABLE_HAL_LOCKS=y @@ -310,8 +321,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -519,6 +530,13 @@ CONFIG_ESP_PHY_REDUCE_TX_POWER=y # CONFIG_PM_ENABLE is not set # end of Power Management +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + # # ESP System Settings # @@ -604,6 +622,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set # end of Wi-Fi # @@ -952,6 +971,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 # end of Certificate Bundle # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set @@ -1103,6 +1123,7 @@ CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # # NVS # +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set # end of NVS # @@ -1240,7 +1261,6 @@ CONFIG_VFS_SUPPORT_TERMIOS=y # Host File System I/O (Semihosting) # CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # end of Host File System I/O (Semihosting) # end of Virtual file system @@ -1257,6 +1277,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y # end of Wi-Fi Provisioning Manager # @@ -1269,6 +1290,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # CONFIG_WPA_TESTING_OPTIONS is not set # CONFIG_WPA_WPS_STRICT is not set # CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set # end of Supplicant # end of Component config @@ -1439,5 +1462,4 @@ CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y CONFIG_SUPPORT_TERMIOS=y CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 # End of deprecated options diff --git a/network/robus/HAL/ATSAMD21/robus_hal.c b/network/robus/HAL/ATSAMD21/robus_hal.c index 1fe81e351..9636840ab 100644 --- a/network/robus/HAL/ATSAMD21/robus_hal.c +++ b/network/robus/HAL/ATSAMD21/robus_hal.c @@ -211,7 +211,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // clean start bit detection uint8_t data = LUOS_COM->USART_INT.SERCOM_DATA; - ctx.rx.callback(&data); + Recep_data(&data); if (data_size_to_transmit == 0) { LUOS_COM->USART_INT.SERCOM_STATUS = SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk; diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c b/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c index 55654e652..9667c916f 100644 --- a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c +++ b/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c @@ -214,7 +214,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // clean start bit detection uint8_t data = LUOS_COM->USART.DATA.reg; - ctx.rx.callback(&data); + Recep_data(&data); if (data_size_to_transmit == 0) { LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; diff --git a/network/robus/HAL/ATSAMD21_MBED/robus_hal.c b/network/robus/HAL/ATSAMD21_MBED/robus_hal.c index 586e0ecff..9549a0d4e 100644 --- a/network/robus/HAL/ATSAMD21_MBED/robus_hal.c +++ b/network/robus/HAL/ATSAMD21_MBED/robus_hal.c @@ -213,7 +213,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // clean start bit detection uint8_t data = LUOS_COM->USART.DATA.reg; - ctx.rx.callback(&data); + Recep_data(&data); if (data_size_to_transmit == 0) { LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; diff --git a/network/robus/HAL/ESP32/robus_hal.c b/network/robus/HAL/ESP32/robus_hal.c index 66853fcee..4a590f902 100644 --- a/network/robus/HAL/ESP32/robus_hal.c +++ b/network/robus/HAL/ESP32/robus_hal.c @@ -275,7 +275,7 @@ _CRITICAL void RobusHAL_ComIrqHandler(void *arg) uart_hal_clr_intsts_mask(&uart_hal_context, UART_INTR_RXFIFO_FULL | UART_INTR_RXFIFO_TOUT); if (RxEn == true) { - ctx.rx.callback(&data[size - 1]); + Recep_data(&data[size - 1]); } else { diff --git a/network/robus/HAL/NATIVE/robus_hal.c b/network/robus/HAL/NATIVE/robus_hal.c index 5fe50a05d..af4c1d014 100644 --- a/network/robus/HAL/NATIVE/robus_hal.c +++ b/network/robus/HAL/NATIVE/robus_hal.c @@ -209,7 +209,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) #endif for (uint16_t i = 0; i < (int)wm->data.len; i++) { - ctx.rx.callback((volatile uint8_t *)&wm->data.ptr[i]); + Recep_data((volatile uint8_t *)&wm->data.ptr[i]); } #ifdef WS_PRINT printf("\n"); diff --git a/network/robus/HAL/STM32F0/robus_hal.c b/network/robus/HAL/STM32F0/robus_hal.c index 1e9ce2ed0..d53a24652 100644 --- a/network/robus/HAL/STM32F0/robus_hal.c +++ b/network/robus/HAL/STM32F0/robus_hal.c @@ -201,7 +201,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // We receive a byte uint8_t data = LL_USART_ReceiveData8(LUOS_COM); - ctx.rx.callback(&data); // send reception byte to state machine + Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { LUOS_COM->ICR = 0xFFFFFFFF; diff --git a/network/robus/HAL/STM32F4/robus_hal.c b/network/robus/HAL/STM32F4/robus_hal.c index b5b1bd02d..49985e5e6 100644 --- a/network/robus/HAL/STM32F4/robus_hal.c +++ b/network/robus/HAL/STM32F4/robus_hal.c @@ -202,7 +202,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // We receive a byte uint8_t data = LL_USART_ReceiveData8(LUOS_COM); - ctx.rx.callback(&data); // send reception byte to state machine + Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { LUOS_COM->SR = 0xFFFFFFFF; diff --git a/network/robus/HAL/STM32G4/robus_hal.c b/network/robus/HAL/STM32G4/robus_hal.c index 9970d9b7e..dc70622c2 100644 --- a/network/robus/HAL/STM32G4/robus_hal.c +++ b/network/robus/HAL/STM32G4/robus_hal.c @@ -202,7 +202,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // We receive a byte uint8_t data = LL_USART_ReceiveData8(LUOS_COM); - ctx.rx.callback(&data); // send reception byte to state machine + Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { LUOS_COM->ICR = 0xFFFFFFFF; diff --git a/network/robus/HAL/STM32L0/robus_hal.c b/network/robus/HAL/STM32L0/robus_hal.c index d30035d1b..5a25f9417 100644 --- a/network/robus/HAL/STM32L0/robus_hal.c +++ b/network/robus/HAL/STM32L0/robus_hal.c @@ -201,7 +201,7 @@ void LUOS_COM_IRQHANDLER() { // We receive a byte uint8_t data = LL_USART_ReceiveData8(LUOS_COM); - ctx.rx.callback(&data); // send reception byte to state machine + Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { LUOS_COM->ICR = 0xFFFFFFFF; diff --git a/network/robus/HAL/STM32L4/robus_hal.c b/network/robus/HAL/STM32L4/robus_hal.c index 1c810b1cc..aadc29a1f 100644 --- a/network/robus/HAL/STM32L4/robus_hal.c +++ b/network/robus/HAL/STM32L4/robus_hal.c @@ -202,7 +202,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() { // We receive a byte uint8_t data = LL_USART_ReceiveData8(LUOS_COM); - ctx.rx.callback(&data); // send reception byte to state machine + Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { LUOS_COM->ICR = 0xFFFFFFFF; diff --git a/network/robus/HAL/template/robus_hal.c b/network/robus/HAL/template/robus_hal.c index f194908f6..ba0ee0e45 100644 --- a/network/robus/HAL/template/robus_hal.c +++ b/network/robus/HAL/template/robus_hal.c @@ -226,7 +226,7 @@ void LUOS_COM_IRQHANDLER() * 1. Reset the timeout with the default value each time this function is call * * 2. Check if IRQ flag Rx is active (this means that this IRAQ have been raised because we receive a byte) - * Read the received byte and pass it to ctx.rx.callback(byte). + * Read the received byte and pass it to Recep_data(byte). * This function is the Robus reception state machine allowing to check and decode Luos frames. * * 3. Check framing error @@ -247,7 +247,7 @@ void LUOS_COM_IRQHANDLER() if ("Reception buffer not empty interrupt is true and enable") { // Get data from register - ctx.rx.callback(&data); // Send received byte to the Robus state machine + Recep_data(&data); // Send received byte to the Robus state machine if (data_size_to_transmit == 0) { // Clear error IT diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index 46a107081..5d47919ed 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -7,12 +7,13 @@ #ifndef _RECEPTION_H_ #define _RECEPTION_H_ -#include "robus.h" +#include "luos_phy.h" #include "struct_io.h" +#include "luos_io.h" /******************************************************************************* * Definitions ******************************************************************************/ -typedef void (*DATA_CB)(volatile uint8_t *data); +typedef void (*DATA_CB)(luos_phy_t *phy, volatile uint8_t *data); typedef struct __attribute__((__packed__)) { @@ -35,23 +36,22 @@ typedef struct status_t status; } RxCom_t; -/******************************************************************************* - * Variables - ******************************************************************************/ - /******************************************************************************* * Function ******************************************************************************/ + +void Recep_data(volatile uint8_t *data); + // Callbacks reception -void Recep_GetHeader(volatile uint8_t *data); -void Recep_GetData(volatile uint8_t *data); -void Recep_GetCollision(volatile uint8_t *data); -void Recep_Drop(volatile uint8_t *data); +void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data); +void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data); +void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data); +void Recep_Drop(luos_phy_t *phy_robus, volatile uint8_t *data); // Callbacks send -void Recep_CatchAck(volatile uint8_t *data); +void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data); -void Recep_Init(void); +void Recep_Init(luos_phy_t *phy_robus); void Recep_EndMsg(void); void Recep_Reset(void); void Recep_Timeout(void); diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index a0de76386..5b4421f1b 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -7,8 +7,8 @@ #ifndef _ROBUS_H_ #define _ROBUS_H_ -#include "luos_io.h" #include +#include "luos_io.h" /******************************************************************************* * Function diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index f6fa735d8..a4e97b80a 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -19,7 +19,7 @@ * v | | | * Header complete | | source ID |yes * + | | received +------>Disable Rx - * | yes | | + | + + * | yes | | + | + * v | | |no | | * +------+------+ +-------------+ | no| v | v * | Get | | Get | +------+ Collision | Wait End @@ -41,9 +41,9 @@ * +-------------+ +-----------------+ ***********************************************************************************************/ -#include "reception.h" #include #include +#include "reception.h" #include "robus_hal.h" #include "luos_hal.h" #include "pub_sub.h" @@ -55,7 +55,6 @@ #include "filter.h" #include "struct_engine.h" #include "context.h" -#include "phy.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -76,7 +75,6 @@ uint16_t data_count = 0; uint16_t data_size = 0; uint16_t crc_val = 0; -phy_t phy; /******************************************************************************* * Function @@ -87,13 +85,13 @@ static inline uint8_t Recep_IsAckNeeded(void); * @param None * @return None ******************************************************************************/ -void Recep_Init(void) +void Recep_Init(luos_phy_t *phy_robus) { // Initialize the reception state machine ctx.rx.status.unmap = 0; ctx.rx.callback = Recep_GetHeader; ctx.rx.status.identifier = 0xF; - phy.rx_timestamp = 0; + phy_robus->rx_timestamp = 0; } /****************************************************************************** * @brief Callback to get a complete header @@ -101,7 +99,7 @@ void Recep_Init(void) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void Recep_GetHeader(volatile uint8_t *data) +_CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) { // Catch a byte. MsgAlloc_SetData(*data); @@ -113,7 +111,7 @@ _CRITICAL void Recep_GetHeader(volatile uint8_t *data) case 1: // reset CRC computation // when we catch the first byte we timestamp the msg // -8 : time to transmit 8 bits at 1 us/bit - phy.rx_timestamp = LuosHAL_GetTimestamp() - BYTE_TRANSMIT_TIME; + phy_robus->rx_timestamp = LuosHAL_GetTimestamp() - BYTE_TRANSMIT_TIME; ctx.tx.lock = true; // Switch the transmit status to disable to be sure to not interpreat the end timeout as an end of transmission. @@ -186,7 +184,7 @@ _CRITICAL void Recep_GetHeader(volatile uint8_t *data) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void Recep_GetData(volatile uint8_t *data) +_CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) { MsgAlloc_SetData(*data); if (data_count < data_size) @@ -208,7 +206,7 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) if (Luos_IsMsgTimstamped((msg_t *)current_msg)) { // This conversion also remove the timestamp from the message size. - Timestamp_ConvertToDate((msg_t *)current_msg, phy.rx_timestamp); + Timestamp_ConvertToDate((msg_t *)current_msg, phy_robus->rx_timestamp); } // Make an exception for bootloader command @@ -251,7 +249,7 @@ _CRITICAL void Recep_GetData(volatile uint8_t *data) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void Recep_GetCollision(volatile uint8_t *data) +_CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) { // Check data integrity if ((ctx.tx.data[data_count++] != *data) || (!ctx.tx.lock) || (ctx.rx.status.rx_framing_error == true)) @@ -286,17 +284,17 @@ _CRITICAL void Recep_GetCollision(volatile uint8_t *data) #ifdef SELFTEST selftest_SetRxFlag(); #endif - // collision detection end + // Collision detection end RobusHAL_SetRxState(false); RobusHAL_ResetTimeout(0); if (ctx.tx.status == TX_NOK) { - // switch to catch Ack. + // Switch to catch Ack. ctx.rx.callback = Recep_CatchAck; } else { - // switch to get header. + // Switch to get header. ctx.rx.callback = Recep_GetHeader; } return; @@ -310,7 +308,7 @@ _CRITICAL void Recep_GetCollision(volatile uint8_t *data) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void Recep_Drop(volatile uint8_t *data) +_CRITICAL void Recep_Drop(luos_phy_t *phy_robus, volatile uint8_t *data) { return; } @@ -350,7 +348,7 @@ _CRITICAL void Recep_Reset(void) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void Recep_CatchAck(volatile uint8_t *data) +_CRITICAL void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data) { volatile status_t status; status.unmap = *data; diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index f31480aca..d312bdb8e 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -28,6 +28,7 @@ ******************************************************************************/ // Creation of the robus context. This variable is used in all files of this lib. volatile context_t ctx; +luos_phy_t *phy_robus; /******************************************************************************* * Function @@ -48,8 +49,13 @@ void Robus_Init(void) // Init transmission Transmit_Init(); + + // Instantiate the phy struct + phy_robus = Phy_Create(); + LUOS_ASSERT(phy_robus); + // Init reception - Recep_Init(); + Recep_Init(phy_robus); } /****************************************************************************** @@ -168,4 +174,14 @@ bool Robus_Busy(void) error_return_t Robus_FindNeighbour(void) { return PortMng_PokeNextPort(); +} + +/****************************************************************************** + * @brief add the phy pointer to the callback + * @param pointer to the received data + * @return None + ******************************************************************************/ +_CRITICAL void Recep_data(volatile uint8_t *data) +{ + ctx.rx.callback(phy_robus, data); } \ No newline at end of file From e3825c7e30f450138d17be2804f7f0c3068c9b76 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 11 Apr 2023 15:03:44 +0200 Subject: [PATCH 038/198] Move reception filtering into filter except for Robus exceptions --- engine/IO/inc/filter.h | 3 ++ engine/IO/src/filter.c | 58 ++++++++++++++++++++++++++++-- network/robus/inc/reception.h | 3 +- network/robus/src/reception.c | 66 +++++++---------------------------- network/robus/src/robus.c | 11 +++--- 5 files changed, 80 insertions(+), 61 deletions(-) diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index 66f327192..26aae2651 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -9,6 +9,8 @@ #include #include +#include "struct_io.h" +#include "struct_luos.h" /******************************************************************************* * Definitions @@ -31,5 +33,6 @@ void Filter_RmTopic(uint16_t topic_id); bool Filter_ServiceID(uint16_t service_id); bool Filter_Topic(uint16_t topic_id); bool Filter_Type(uint16_t type_id); +luos_localhost_t Filter_GetLocalhost(header_t *header); #endif /* _FILTER_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index d7fd42553..e8459c309 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -9,7 +9,7 @@ #include "luos_utils.h" #include "luos_hal.h" #include "service.h" -#include "struct_luos.h" +#include "node.h" /******************************************************************************* * Definitions @@ -171,4 +171,58 @@ _CRITICAL bool Filter_Type(uint16_t type_id) } } return false; -} \ No newline at end of file +} + +/****************************************************************************** + * @brief Parse msg to find a service concerne + * @param header of message + * @return None + * _CRITICAL function call in IRQ + ******************************************************************************/ +_CRITICAL luos_localhost_t Filter_GetLocalhost(header_t *header) +{ + // Find if we are concerned by this message. + // check if we need to filter all the messages + + switch (header->target_mode) + { + case SERVICEIDACK: + case SERVICEID: + // Check all service id + if (Filter_ServiceID(header->target)) + { + return LOCALHOST; + } + break; + case TYPE: + + if (Filter_Type(header->target)) + { + return MULTIHOST; + } + break; + case BROADCAST: + if (header->target == BROADCAST_VAL) + { + return MULTIHOST; + } + break; + case NODEIDACK: + case NODEID: + if ((header->target == Node_Get()->node_id) && (header->target != DEFAULTID)) + { + return LOCALHOST; + } + break; + case TOPIC: + if (Filter_Topic(header->target)) + { + return MULTIHOST; + } + break; + default: + return EXTERNALHOST; + break; + } + return EXTERNALHOST; +} diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index 5d47919ed..bfe7bb32c 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -7,6 +7,7 @@ #ifndef _RECEPTION_H_ #define _RECEPTION_H_ +#include #include "luos_phy.h" #include "struct_io.h" #include "luos_io.h" @@ -55,6 +56,6 @@ void Recep_Init(luos_phy_t *phy_robus); void Recep_EndMsg(void); void Recep_Reset(void); void Recep_Timeout(void); -luos_localhost_t Recep_NodeConcerned(header_t *header); +bool Recep_NodeConcerned(header_t *header); #endif /* _RECEPTION_H_ */ diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index a4e97b80a..16e72757a 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -42,7 +42,6 @@ ***********************************************************************************************/ #include -#include #include "reception.h" #include "robus_hal.h" #include "luos_hal.h" @@ -364,65 +363,26 @@ _CRITICAL void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data) /****************************************************************************** * @brief Parse msg to find a service concerne * @param header of message - * @return None + * @return true or false * warning : this function can be redefined only for mock testing purpose * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL luos_localhost_t Recep_NodeConcerned(header_t *header) +_CRITICAL bool Recep_NodeConcerned(header_t *header) { // Find if we are concerned by this message. - // check if we need to filter all the messages - - switch (header->target_mode) + if ((header->target_mode == NODEIDACK) || (header->target_mode == SERVICEIDACK)) { - case SERVICEIDACK: - ctx.rx.status.rx_error = false; - case SERVICEID: - // Check all service id - if (Filter_ServiceID(header->target)) - { - return LOCALHOST; - } - break; - case TYPE: - - if (Filter_Type(header->target)) - { - return MULTIHOST; - } - break; - case BROADCAST: - if (header->target == BROADCAST_VAL) - { - return MULTIHOST; - } - break; - case NODEIDACK: - ctx.rx.status.rx_error = false; - case NODEID: - if ((header->target == 0) && (ctx.port.activ != NBR_PORT) && (ctx.port.keepLine == false)) - { - return LOCALHOST; // discard message if ID = 0 and no Port activ - } - else - { - if ((header->target == Node_Get()->node_id) && ((header->target != 0))) - { - return LOCALHOST; - } - } - break; - case TOPIC: - if (Filter_Topic(header->target)) - { - return MULTIHOST; - } - break; - default: - return EXTERNALHOST; - break; + // In both of those cases we potentially need an ack. + ctx.rx.status.rx_error = false; + } + if ((header->target_mode == NODEID) || (header->target_mode == NODEIDACK)) + { + if ((header->target == 0) && (ctx.port.activ != NBR_PORT) && (ctx.port.keepLine == false)) + { + return true; // Keep message if nodeID = 0 and a PTP is activ + } } - return EXTERNALHOST; + return (Filter_GetLocalhost(header) != EXTERNALHOST); } /****************************************************************************** diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index d312bdb8e..a330930ac 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -14,11 +14,11 @@ #include "context.h" #include "robus_hal.h" #include "luos_hal.h" -#include "msg_alloc.h" #include "luos_utils.h" + +#include "msg_alloc.h" #include "luos_engine.h" #include "filter.h" -#include "service.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -97,6 +97,9 @@ error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) { data_size = msg->header.size; } + + // Check the localhost situation + luos_localhost_t localhost = Filter_GetLocalhost(&msg->header); // Add the CRC to the total size of the message uint16_t full_size = sizeof(header_t) + data_size + CRC_SIZE; @@ -109,10 +112,8 @@ error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) // Compute the CRC crc_val = ll_crc_compute(&msg->stream[0], crc_max_index - CRC_SIZE, 0xFFFF); - // Check the localhost situation - luos_localhost_t localhost = Recep_NodeConcerned(&msg->header); // Check if ACK needed - if (((msg->header.target_mode == SERVICEIDACK) || (msg->header.target_mode == NODEIDACK)) && ((localhost && (msg->header.target != DEFAULTID)))) + if (((msg->header.target_mode == SERVICEIDACK) || (msg->header.target_mode == NODEIDACK)) && (localhost != EXTERNALHOST)) { // This is a localhost message and we need to transmit a ack. Add it at the end of the data to transmit ack = ctx.rx.status.unmap; From e4b83ff9258aab15cc71dacf624bb4febc751e6d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 11 Apr 2023 15:57:01 +0200 Subject: [PATCH 039/198] Fix timestamp msg reception computation --- network/robus/src/reception.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 16e72757a..79e27c887 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -107,10 +107,12 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) // Check if we have all we need. switch (data_count) { - case 1: // reset CRC computation - // when we catch the first byte we timestamp the msg - // -8 : time to transmit 8 bits at 1 us/bit - phy_robus->rx_timestamp = LuosHAL_GetTimestamp() - BYTE_TRANSMIT_TIME; + case 1: + // Reset CRC computation + // When we catch the first byte we timestamp the msg + // We remove the time of the first byte to get the exact reception date. + // 1 byte is 10 bits and we convert it to nanoseconds + phy_robus->rx_timestamp = LuosHAL_GetTimestamp() - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)DEFAULTBAUDRATE); ctx.tx.lock = true; // Switch the transmit status to disable to be sure to not interpreat the end timeout as an end of transmission. From f7439b1290b6ba54fa1f95f931cf805692cd4baa Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 12 Apr 2023 11:38:54 +0200 Subject: [PATCH 040/198] Reshape reception and almost completely shortcut msg_tasks --- engine/IO/inc/_luos_io.h | 26 + engine/IO/inc/luos_phy.h | 41 +- engine/IO/inc/msg_alloc.h | 9 +- engine/IO/src/luos_io.c | 34 +- engine/IO/src/luos_phy.c | 214 ++- engine/IO/src/msg_alloc.c | 658 +------- engine/core/src/luos_engine.c | 1 + examples/projects/l0/dxl/lib/Dxl/dxl.c | 2 +- .../projects/l0/gate_serialcom/node_config.h | 4 +- network/robus/inc/robus.h | 3 +- network/robus/src/reception.c | 190 +-- network/robus/src/robus.c | 11 +- platformio.ini | 2 +- test/test_msg_alloc/main.c | 19 +- test/test_msg_alloc/main.h | 17 +- .../unit_test_mem_alloc_generic.c | 696 +------- .../unit_test_mem_alloc_static.c | 104 +- test/test_msg_alloc/unit_test_mem_alloc_tx.c | 1458 ++--------------- 18 files changed, 591 insertions(+), 2898 deletions(-) create mode 100644 engine/IO/inc/_luos_io.h diff --git a/engine/IO/inc/_luos_io.h b/engine/IO/inc/_luos_io.h new file mode 100644 index 000000000..b8ff046bb --- /dev/null +++ b/engine/IO/inc/_luos_io.h @@ -0,0 +1,26 @@ +/****************************************************************************** + * @file luos_io.c + * @brief Interface file between Luos and a physical layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _PRIVATE_LUOSIO_H_ +#define _PRIVATE_LUOSIO_H_ + +#include "struct_luos.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Functions + ******************************************************************************/ + +error_return_t LuosIO_MsgHandler(msg_t *input); + +#endif /* _PRIVATE_LUOSIO_H_ */ \ No newline at end of file diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 7aea41d45..7d9c57f17 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -1,13 +1,15 @@ /****************************************************************************** * @file phy.h - * @brief interface with the phy - * @author Luos + * @brief This file have to be imported by phy layers to interract with Luos + * @author Nicolas Rabault * @version 0.0.0 ******************************************************************************/ #ifndef _LUOS_PHY_H_ #define _LUOS_PHY_H_ #include +#include "struct_luos.h" +#include "struct_io.h" /******************************************************************************* * Definitions @@ -17,23 +19,50 @@ * @struct luos_luos_phy_t * @brief the data structure allowing the phy to interract with LuosIO ******************************************************************************/ +typedef struct +{ + // This is allowing to access the data as data or message + union + { + uint8_t *data_pt; // Start pointer of the data on msg_buffer. + msg_t *msg_pt; // Pointer to the message. + }; + uint16_t size; // size of the data. + void *phy_data; // Phy developpers can use this pointer to store any data they need. +} phy_tx_job_t; + typedef struct luos_luos_phy_t { + // *************** RX information *************** volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. - volatile uint8_t *rx_data; // Pointer to write received bytes. - volatile uint16_t rx_size; // Size of data to receive data. + union + { + volatile uint8_t *rx_data; // Pointer to write received bytes. + volatile msg_t *rx_msg; // Pointer to the message where we will write received bytes. + }; + volatile uint16_t received_data; // Number of bytes already received. + volatile uint16_t rx_size; // Size of data to receive. struct __attribute__((__packed__)) { - volatile uint8_t rx_alloc_job : 1; // If true, loop will need to filter already received data, if filter is ok, set rx_keep, alloc space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. + volatile uint8_t rx_alloc_job : 1; // If true, Luosio_Loop funciton will need to filter already received data, if filter is ok, set rx_keep, alloc needed space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. volatile uint8_t rx_keep : 1; // True if we want to keep the received data. }; + + // RX Private data + luos_localhost_t rx_phy_filter; // The phy concerned by this message. + + // *************** TX informations *************** + phy_tx_job_t tx_job[MAX_MSG_NB]; // List of phy tx jobs to send. + uint8_t tx_job_nb; // Number of tx jobs to send. } luos_phy_t; void Phy_Init(void); void Phy_Loop(void); luos_phy_t *Phy_Create(void); -void Phy_Send(luos_phy_t *phy, uint8_t *data, uint16_t size); +void Phy_Send(luos_phy_t *phy_ptr, uint8_t *data, uint16_t size); +void Phy_ComputeMsgSize(luos_phy_t *phy_ptr); +void Phy_ValidMsg(luos_phy_t *phy_ptr); #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index 3547981de..39b50bbd2 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -18,7 +18,7 @@ /******************************************************************************* * Variables ******************************************************************************/ -extern volatile msg_t *current_msg; + /******************************************************************************* * Functions ******************************************************************************/ @@ -28,15 +28,12 @@ void MsgAlloc_Init(memory_stats_t *memory_stats); void MsgAlloc_loop(void); // msg buffering functions -void MsgAlloc_ValidHeader(uint8_t valid, uint16_t data_size); -void MsgAlloc_InvalidMsg(void); -void MsgAlloc_EndMsg(void); -void MsgAlloc_SetData(uint8_t data); +uint8_t *MsgAlloc_Alloc(uint16_t data_size); + error_return_t MsgAlloc_IsEmpty(void); void MsgAlloc_UsedMsgEnd(void); void MsgAlloc_Reset(void); error_return_t MsgAlloc_IsReseted(void); -void MsgAlloc_ValidDataIntegrity(void); // msg interpretation task stack error_return_t MsgAlloc_PullMsgToInterpret(msg_t **returned_msg); diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 74f9104fc..11f8188fa 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -17,6 +17,7 @@ #include "luos_utils.h" #include "luos_hal.h" #include "luos_engine.h" +#include "bootloader_core.h" /******************************************************************************* * Definitions @@ -36,7 +37,6 @@ typedef struct __attribute__((__packed__)) } node_bootstrap_t; static error_return_t LuosIO_StartTopologyDetection(service_t *service); -static error_return_t LuosIO_MsgHandler(msg_t *input); static error_return_t LuosIO_DetectNextNodes(service_t *service); /******************************************************************************* @@ -75,18 +75,7 @@ void LuosIO_Loop(void) { // Execute message allocation tasks MsgAlloc_loop(); - // Interpreat received messages and create luos task for it. - msg_t *msg; - while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) - { - // Check if this message is a protocol one - if (LuosIO_MsgHandler(msg) == FAILED) - { - // If not create luos tasks for all services. - Service_AllocMsg(msg); - } - } - Robus_Loop(); + Phy_Loop(); } /****************************************************************************** @@ -164,6 +153,8 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) Service_ClearId(); // Reinit msg alloc MsgAlloc_Init(NULL); + // Reinit Phy + Phy_Init(); // Wait 2ms to be sure all previous messages are received and treated by other nodes uint32_t start_tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - start_tick < 2) @@ -234,7 +225,10 @@ error_return_t LuosIO_MsgHandler(msg_t *input) Node_Get()->node_id = 0; // Reinit service id Service_ClearId(); + // Reinit msg alloc MsgAlloc_Init(NULL); + // Reinit Phy + Phy_Init(); } // This is a node bootstrap information. memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); @@ -247,7 +241,21 @@ error_return_t LuosIO_MsgHandler(msg_t *input) } return SUCCEED; break; + case BOOTLOADER_CMD: + if (input->data[0] == BOOTLOADER_RESET) + { + LuosHAL_SetMode((uint8_t)BOOT_MODE); + LuosHAL_Reboot(); + // This message have been consumed + return SUCCEED; + } + return FAILED; + break; case START_DETECTION: + MsgAlloc_Reset(); + Node_SetState(EXTERNAL_DETECTION); + Robus_ResetNodeID(); + // This message have been consumed return SUCCEED; break; case END_DETECTION: diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 2833b6e22..a97396dce 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -1,20 +1,47 @@ /****************************************************************************** * @file phy.c - * @brief Manage physical layers - * @author Luos + * @brief This is the interface with all th phy layers This file manage all the jobs of all the phys + * @author Nicolas Rabault * @version 0.0.0 ******************************************************************************/ +#include #include "luos_phy.h" +#include "filter.h" +#include "msg_alloc.h" +#include "engine_config.h" +#include "luos_hal.h" +#include "node.h" +#include "_timestamp.h" +#include "robus.h" +#include "luos_io.h" +#include "_luos_io.h" +#include "service.h" /******************************************************************************* * Definitions ******************************************************************************/ +typedef struct __attribute__((__packed__)) +{ + uint64_t timestamp; + msg_t *alloc_msg; + luos_localhost_t phy_filter; +} luos_phy_job_t; + +typedef struct +{ + luos_phy_t phy; + luos_phy_job_t phy_job[MAX_MSG_NB]; + volatile uint16_t phy_job_nb; +} luos_phy_ctx_t; + +static void Phy_alloc(luos_phy_t *phy); +static void Phy_Dispatch(void); /******************************************************************************* * Variables ******************************************************************************/ -luos_phy_t phy; +luos_phy_ctx_t phy_ctx; /******************************************************************************* * Functions @@ -27,6 +54,8 @@ luos_phy_t phy; ******************************************************************************/ void Phy_Init(void) { + // Put everything to 0 + memset((void *)&phy_ctx, 0, sizeof(phy_ctx)); } /****************************************************************************** @@ -36,6 +65,14 @@ void Phy_Init(void) ******************************************************************************/ void Phy_Loop(void) { + // Manage received data allocation + if (phy_ctx.phy.rx_alloc_job) + { + Phy_alloc(&phy_ctx.phy); + } + // Manage complete message received dispatching + Phy_Dispatch(); + Robus_Loop(); } /****************************************************************************** @@ -45,7 +82,7 @@ void Phy_Loop(void) ******************************************************************************/ luos_phy_t *Phy_Create(void) { - return &phy; + return &phy_ctx.phy; } /****************************************************************************** @@ -54,6 +91,171 @@ luos_phy_t *Phy_Create(void) * @param size Size of the data to send * @return None ******************************************************************************/ -void Phy_Send(luos_phy_t *phy, uint8_t *data, uint16_t size) +void Phy_Send(luos_phy_t *phy_ptr, uint8_t *data, uint16_t size) +{ +} + +/****************************************************************************** + * @brief Consider the message as valid + * @param phy_ptr Pointer to the phy concerned by the allocation + * @return None + ******************************************************************************/ +_CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) +{ + LUOS_ASSERT(phy_ptr != NULL); + // Check if the allocation of the received message have been done + if (phy_ptr->rx_alloc_job) + { + // We did not allocate the received data yet + // This can happen if we did not had the time to execute Phy_Loop function before the end of the message reception or if this phy get the complete mgs in one time. + Phy_alloc(phy_ptr); + } + // Now we can create a phy_job to dispatch the tx_job later + LUOS_ASSERT(phy_ctx.phy_job_nb < MAX_MSG_NB); + LuosHAL_SetIrqState(false); + phy_ctx.phy_job[phy_ctx.phy_job_nb].timestamp = phy_ptr->rx_timestamp; + phy_ctx.phy_job[phy_ctx.phy_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; + phy_ctx.phy_job[phy_ctx.phy_job_nb].phy_filter = phy_ptr->rx_phy_filter; + phy_ctx.phy_job_nb++; + // Then reset the phy to receive the next message + phy_ptr->rx_data = phy_ptr->rx_buffer_base; + phy_ptr->received_data = 0; + LuosHAL_SetIrqState(true); +} + +/****************************************************************************** + * @brief Compute the size of the message + * @param phy_ptr Pointer to the phy concerned by this message + * @return None + ******************************************************************************/ +inline void Phy_ComputeMsgSize(luos_phy_t *phy_ptr) +{ + + // Compute the size of the data to allocate + if (((header_t *)phy_ptr->rx_buffer_base)->size > MAX_DATA_MSG_SIZE) + { + // Cap the size to the maximum size of a message + phy_ptr->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t); + } + else + { + phy_ptr->rx_size = ((header_t *)phy_ptr->rx_buffer_base)->size + sizeof(header_t); + // We need to check if we have a timestamped message and increase the data size if yes + if (Luos_IsMsgTimstamped((msg_t *)(phy_ptr->rx_data)) == true) // TODO move it to TX + { + phy_ptr->rx_size += sizeof(time_luos_t); + } + } +} + +/****************************************************************************** + * @brief Allocate the received data if needed + * @param phy_ptr Pointer to the phy concerned by this message + * @return None + ******************************************************************************/ +_CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) +{ + void *rx_data; + void *copy_from; + + LuosHAL_SetIrqState(false); + // Check if this phy really need to alloc + if (phy_ptr->rx_alloc_job == false) + { + LuosHAL_SetIrqState(true); + return; + } + // Check if we receive enougth data to be able to allocate the complete message + LUOS_ASSERT((phy_ptr->received_data >= sizeof(header_t)) && (phy_ptr->received_data <= MAX_DATA_MSG_SIZE + sizeof(header_t))); + // Check if their is a mistake on the buffer allocation. In this case, the phy.rx_data was not properly set to rx_buffer_base before the data reception. + LUOS_ASSERT(phy_ptr->rx_data == phy_ptr->rx_buffer_base); + LuosHAL_SetIrqState(true); + + // We need to allocate this phy received data + Phy_ComputeMsgSize(phy_ptr); + + // Compute the phy concerned by this message + luos_localhost_t phy_filter = Filter_GetLocalhost((header_t *)phy_ptr->rx_buffer_base); + + // Now we can check if we need to store the received data + if (phy_filter != EXTERNALHOST) + { + // We need to store the received data. + // Update the informations allowing reception to continue and directly copy the data into the allocated buffer + LuosHAL_SetIrqState(false); + if (phy_ptr->rx_alloc_job) + { + uint16_t phy_stored_data_size = phy_ptr->received_data; + // Now allocate it + phy_ptr->rx_data = MsgAlloc_Alloc(phy_ptr->rx_size); + rx_data = (void *)phy_ptr->rx_data; + // Job is done + phy_ptr->rx_alloc_job = false; + LuosHAL_SetIrqState(true); + phy_ptr->rx_keep = true; + phy_ptr->rx_phy_filter = phy_filter; + copy_from = (void *)phy_ptr->rx_buffer_base; + + // Now we can copy the data already received + memcpy(rx_data, copy_from, phy_stored_data_size); + return; + } + LuosHAL_SetIrqState(true); + } + else + { + LuosHAL_SetIrqState(false); + if (phy_ptr->rx_alloc_job) + { + // Job is done + phy_ptr->rx_alloc_job = false; + LuosHAL_SetIrqState(true); + // We don't need to store the received data. + phy_ptr->rx_keep = false; + return; + } + LuosHAL_SetIrqState(true); + } +} + +/****************************************************************************** + * @brief Dispatch the received message + * @param None + * @return None + ******************************************************************************/ +static void Phy_Dispatch(void) { -} \ No newline at end of file + // Interpreat received messages and create luos task for it. + while (phy_ctx.phy_job_nb) + { + // Get the oldest job + LuosHAL_SetIrqState(false); + luos_phy_job_t job = phy_ctx.phy_job[--phy_ctx.phy_job_nb]; + LuosHAL_SetIrqState(true); + // If message is timestamped, convert the latency to date + if (Luos_IsMsgTimstamped(job.alloc_msg)) + { + // This conversion also remove the timestamp from the message size. + Timestamp_ConvertToDate(job.alloc_msg, job.timestamp); + } + // Check if this message is a protocol one + if (LuosIO_MsgHandler(job.alloc_msg) == FAILED) + { + // If not create luos tasks for all services. + Service_AllocMsg(job.alloc_msg); + // Later this service level dispatch will need to be done in core. + // LuosIO shoudn't care about service level, and should just list the message as a task to do on the Luos side. + } + } + // Localhost message are still stored on the MsgAlloc msg_task buffer, we have to deal with it too. + msg_t *msg; + while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) + { + // Check if this message is a protocol one + if (LuosIO_MsgHandler(msg) == FAILED) + { + // If not create luos tasks for all services. + Service_AllocMsg(msg); + } + } +} diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 202fffa65..813138d09 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -84,12 +84,10 @@ volatile bool reset_needed = false; // msg buffering volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; /*!< Memory space used to save and alloc messages. */ -volatile msg_t *current_msg; /*!< current work in progress msg pointer. */ volatile uint8_t *data_ptr; /*!< Pointer to the next data able to be written into msgbuffer. */ -volatile uint8_t *data_end_estimation; /*!< Estimated end of the current receiving message. */ -volatile msg_t *oldest_msg = NULL; /*!< The oldest message among all the stacks. */ -volatile msg_t *used_msg = NULL; /*!< Message curently used by luos loop. */ -volatile uint8_t mem_clear_needed; /*!< A flag allowing to spot some msg space cleaning operations to do. */ + +volatile msg_t *oldest_msg = NULL; /*!< The oldest message among all the stacks. */ +volatile msg_t *used_msg = NULL; /*!< Message curently used by luos loop. */ // msg interpretation task stack volatile msg_t *msg_tasks[MAX_MSG_NB]; /*!< ready message table. */ @@ -143,18 +141,15 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void); void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** - current_msg = (msg_t *)&msg_buffer[0]; - data_ptr = (uint8_t *)&msg_buffer[0]; - data_end_estimation = (uint8_t *)¤t_msg->data[CRC_SIZE]; - msg_tasks_stack_id = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; + msg_tasks_stack_id = 0; memset((void *)msg_tasks, 0, sizeof(msg_tasks)); luos_tasks_stack_id = 0; memset((void *)luos_tasks, 0, sizeof(luos_tasks)); tx_tasks_stack_id = 0; memset((void *)tx_tasks, 0, sizeof(tx_tasks)); - used_msg = NULL; - oldest_msg = (msg_t *)INT_MAX; - mem_clear_needed = false; + used_msg = NULL; + oldest_msg = (msg_t *)INT_MAX; if (memory_stats != NULL) { mem_stat = memory_stats; @@ -190,25 +185,6 @@ void MsgAlloc_loop(void) { mem_stat->buffer_occupation_ratio = stat; } - MsgAlloc_ValidDataIntegrity(); -} -/****************************************************************************** - * @brief execute some memory sanity tasks out of IRQ - * @param None - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void MsgAlloc_ValidDataIntegrity(void) -{ - // Do we have to check data dropping? - LuosHAL_SetIrqState(false); - if (mem_clear_needed == true) - { - mem_clear_needed = false; - error_return_t clear_state = MsgAlloc_ClearMsgSpace((void *)current_msg, (void *)data_end_estimation); - LUOS_ASSERT(clear_state == SUCCEED); - } - LuosHAL_SetIrqState(true); } /****************************************************************************** * @brief compute remaing space on msg_buffer. @@ -224,9 +200,9 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) { LUOS_ASSERT(((uintptr_t)oldest_msg >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); // There is some tasks - if ((uintptr_t)oldest_msg > (uintptr_t)data_end_estimation) + if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) { - // The oldest task is between `data_end_estimation` and the end of the buffer + // The oldest task is between `data_ptr` and the end of the buffer // msg_buffer // +-------------------------------------------------------------+ // |-------------------------------------------------------------| @@ -234,9 +210,9 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // | | // |<-----Free space---->| // | | - // data_end_estimation oldest_task + // data_ptr oldest_task // - stack_free_space = (uintptr_t)oldest_msg - (uintptr_t)data_end_estimation; + stack_free_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; LuosHAL_SetIrqState(true); } else @@ -246,21 +222,21 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // msg_buffer // +-------------------------------------------------------------+ // |-------------------------------------------------------------| - // +-------------^--------------^------------------^-------------+ - // | | | - // <-Free space->| | |<-Free space-> - // | | | - // | | | - // oldest_task current_message data_end_estimation + // +-------------^---------------------------------^-------------+ + // | | + // <-Free space->| |<-Free space-> + // | | + // | | + // oldest_task data_ptr // - stack_free_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_end_estimation); + stack_free_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); LuosHAL_SetIrqState(true); } } else { // There is no task yet just compute the actual reception - stack_free_space = MSG_BUFFER_SIZE - ((uintptr_t)data_end_estimation - (uintptr_t)current_msg); + stack_free_space = MSG_BUFFER_SIZE; LuosHAL_SetIrqState(true); } return stack_free_space; @@ -278,36 +254,36 @@ _CRITICAL static inline void MsgAlloc_OldestMsgCandidate(msg_t *oldest_stack_msg LUOS_ASSERT(((uintptr_t)oldest_stack_msg_pt >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_stack_msg_pt < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); // recompute oldest_stack_msg_pt into delta byte from current message uint32_t stack_delta_space; - if ((uintptr_t)oldest_stack_msg_pt > (uintptr_t)current_msg) + if ((uintptr_t)oldest_stack_msg_pt > (uintptr_t)data_ptr) { - // The oldest task is between `data_end_estimation` and the end of the buffer + // The oldest task is between `data_ptr` and the end of the buffer LuosHAL_SetIrqState(false); - stack_delta_space = (uintptr_t)oldest_stack_msg_pt - (uintptr_t)current_msg; + stack_delta_space = (uintptr_t)oldest_stack_msg_pt - (uintptr_t)data_ptr; LuosHAL_SetIrqState(true); } else { - // The oldest task is between the begin of the buffer and `data_end_estimation` + // The oldest task is between the begin of the buffer and `data_ptr` // we have to decay it to be able to define delta LuosHAL_SetIrqState(false); - stack_delta_space = ((uintptr_t)oldest_stack_msg_pt - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)current_msg); + stack_delta_space = ((uintptr_t)oldest_stack_msg_pt - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); LuosHAL_SetIrqState(true); } // recompute oldest_msg into delta byte from current message uintptr_t oldest_msg_delta_space; - if ((uintptr_t)oldest_msg > (uintptr_t)current_msg) + if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) { - // The oldest msg is between `data_end_estimation` and the end of the buffer + // The oldest msg is between `data_ptr` and the end of the buffer LuosHAL_SetIrqState(false); - oldest_msg_delta_space = (uintptr_t)oldest_msg - (uintptr_t)current_msg; + oldest_msg_delta_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; LuosHAL_SetIrqState(true); } else { - // The oldest msg is between the begin of the buffer and `data_end_estimation` + // The oldest msg is between the begin of the buffer and `data_ptr` // we have to decay it to be able to define delta LuosHAL_SetIrqState(false); - oldest_msg_delta_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)current_msg); + oldest_msg_delta_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); LuosHAL_SetIrqState(true); } // Compare deltas @@ -354,7 +330,7 @@ _CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpace(void *to) { if ((uintptr_t)to > ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - 1])) { - // We reach msg_buffer end return an error + // We reach msg_buffer end. // // msg_buffer // +-------------------------------------------------------------+ @@ -362,294 +338,58 @@ _CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpace(void *to) // |-------------------------------------------------------------+ ^ // | // pointer + // Return as FAILED // return FAILED; } return SUCCEED; } /****************************************************************************** - * @brief Invalid the current message header by removing it (data will be ignored). - * @param None + * @brief Allocate a new message + * @param uint16_t data_size * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void MsgAlloc_InvalidMsg(void) +_CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size) { - //******** Remove the header by reseting data_ptr ********* - // clean the memory zone - if (mem_clear_needed == true) + uint8_t *returned_ptr; + // Check data ptr alignement + if ((uintptr_t)data_ptr % 2 == 1) { - mem_clear_needed = false; - error_return_t clear_state = MsgAlloc_ClearMsgSpace((void *)current_msg, (void *)(data_ptr)); - LUOS_ASSERT(clear_state == SUCCEED); + data_ptr++; } - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^--------------^----------------------------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^---------------------^---------------------------------------+ - // | | - // current_msg data_end_estimation - // data_ptr - // | | - // <----Header + CRC----> - // - data_ptr = (uint8_t *)current_msg; - data_end_estimation = (uint8_t *)(¤t_msg->stream[sizeof(header_t) + CRC_SIZE]); - LUOS_ASSERT((uintptr_t)data_end_estimation < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]); -} -/****************************************************************************** - * @brief Valid the current message header by preparing the allocator to get the message data - * @param valid : is the header valid or not - * @param data_size : size of the data to receive - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void MsgAlloc_ValidHeader(uint8_t valid, uint16_t data_size) -{ - //******** Prepare the allocator to get data ********* - // Save the concerned service pointer into the concerned service pointer stack - if (valid == true) + // Check if we have space for the message + if (MsgAlloc_DoWeHaveSpace((void *)(data_ptr + data_size)) == FAILED) { - if (MsgAlloc_DoWeHaveSpace((void *)(¤t_msg->data[data_size + CRC_SIZE])) == FAILED) - { - // We are at the end of msg_buffer, we need to move the current space to the begin of msg_buffer - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |------------------------------------| Header | Datas to be received | - // +------------------------------------^----------^-------------+ ^ - // | | | - // current_msg data_ptr data_end_estimation - // - // - // msg_buffer ending state : - // +-------------------------------------------------------------+ - // | Header | Datas to be received |---------------------------- - // +----------^--------------------------------------------------+ - // | | - // current_msg data_ptr - // - // Copy the header at the begining of msg_buffer - memcpy((void *)&msg_buffer[0], (void *)¤t_msg->header, sizeof(header_t)); - // Move current_msg to msg_buffer - current_msg = (volatile msg_t *)&msg_buffer[0]; - // move data_ptr after the new location of the header - data_ptr = &msg_buffer[sizeof(header_t)]; - } - // Save the end position of our message // - // msg_buffer init state + // We don't have the space to store the message : // +-------------------------------------------------------------+ - // |----------------------| Header |---------------------------| - // +----------------------^----------^---------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state : MEM_CLEAR_NEEDED = True + // |------------------------------------| Datas to be received | + // +------------------------------------^------------------------+ ^ + // | | + // data_ptr data_end + // move data_ptr to the beginning of the buffer // +-------------------------------------------------------------+ - // |----------------------| Header | Datas to be received |----| - // +----------------------^----------^----------------------^----+ - // | | | - // current_msg data_ptr data_end_estimation + // |-------------------------------------------------------------| + // | Datas to be received |---------------------------| + // ^---------------------------------^---------------------------+ + // | | + // data_ptr data_end // - data_end_estimation = (uint8_t *)¤t_msg->data[data_size + CRC_SIZE]; - // check if there is a msg treatment pending - if (((uintptr_t)used_msg >= (uintptr_t)current_msg) && ((uintptr_t)used_msg <= (uintptr_t)(¤t_msg->data[data_size + CRC_SIZE]))) - { - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------| Header | Datas to be received |-------| - // |----------------------------------------| An old message |---| - // +-------------------^----------^---------^--------------------+ - // | | | - // current_msg data_ptr used_msg - // - // - // msg_buffer ending state : old message is cleared (used_msg = NULL) - // +-------------------------------------------------------------+ - // |-------------------| Header | Datas to be received |-------| - // +-------------------^----------^------------------------------+ - // | | - // current_msg data_ptr - // - used_msg = NULL; - // This message is in the space we want to use, clear the task - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->buffer_occupation_ratio = 100; - } - } - // Raise the clear flag allowing to perform a clear - mem_clear_needed = true; + // We don't have the space to store the message, move data_ptr to the beginning of the buffer + returned_ptr = (uint8_t *)&msg_buffer[0]; } else { - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------| Header |------------------------------| - // +-------------------^----------^------------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------| ****** |------------------------------| - // +-------------------^-----------------------------------------+ - // | - // current_msg - // data_ptr - // - data_ptr = (uint8_t *)current_msg; - } -} -/****************************************************************************** - * @brief Finish the current message - * @param None - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void MsgAlloc_EndMsg(void) -{ - //******** End the message ********** - // clean the memory zone - if (mem_clear_needed == true) - { - // No luos_loop make it for us outside of IRQ, we have to make it - error_return_t clear_state = MsgAlloc_ClearMsgSpace((void *)current_msg, (void *)data_ptr); - LUOS_ASSERT(clear_state == SUCCEED); - mem_clear_needed = false; + returned_ptr = (uint8_t *)data_ptr; } + // Check if we have space for the message, assert if we don't + LUOS_ASSERT(MsgAlloc_CheckMsgSpace((void *)returned_ptr, (void *)((uintptr_t)returned_ptr + data_size)) == SUCCEED); - // Store the received message - if (msg_tasks_stack_id == MAX_MSG_NB) - { - // There is no more space on the msg_tasks, remove the oldest msg. - // - // msg_tasks init state msg_tasks end state - // +---------+ +---------+ - // | MSG_1 | | MSG_2 |<--Oldest message "D 1" is deleted - // |---------| |---------| - // | MSG_2 | | MSG_3 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------|<--luos_tasks_stack_id - // | MSG_10 | | 0 | - // +---------+<--luos_tasks_stack_id +---------+ - // - MsgAlloc_ClearMsgTask(); - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->rx_msg_stack_ratio = 100; - } - } - MSGALLOC_MUTEX_LOCK - LUOS_ASSERT(msg_tasks[msg_tasks_stack_id] == 0); - LUOS_ASSERT(!(msg_tasks_stack_id > 0) || (((uintptr_t)msg_tasks[0] >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)msg_tasks[0] < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]))); - msg_tasks[msg_tasks_stack_id] = current_msg; - if (msg_tasks_stack_id == 0) - { - MsgAlloc_OldestMsgCandidate((msg_t *)msg_tasks[0]); - } - LUOS_ASSERT((msg_tasks[msg_tasks_stack_id] != 0)); - msg_tasks_stack_id++; - - //******** Prepare the next msg ********* - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // | Header | Data | CRC |---------------------------------------+ - // +---------------------^---------------------------------------+ - // | - // data_ptr - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // OLD | Header | Data | CRC |---------------------------------------+ - // FUTURE |---------------| Header |------------------------------------+ - // +---------------^--------^------------------------------------+ - // | | - // data_ptr data_end_estimation - // current_msg - // - // data_ptr is actually 2 bytes after the message data because of the CRC. Remove the CRC. - data_ptr -= CRC_SIZE; - // Check data ptr alignement - if ((uintptr_t)data_ptr % 2 == 1) - { - data_ptr++; - } - // Check if we have space for the next message - if (MsgAlloc_DoWeHaveSpace((void *)(data_ptr + sizeof(header_t) + CRC_SIZE)) == FAILED) - { - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |------------------------------------| Header | Datas to be received | - // +-------------------------------------------------------------+ ^ - // | - // data_end_estimation - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |------------------------------------| Header |-------------| - // |---------| Datas to be received |----------------------------| - // ^---------^---------------------------------------------------+ - // | | - // data_ptr data_end_estimation - // current_mag - // - data_ptr = &msg_buffer[0]; - } - // update the current_msg - current_msg = (volatile msg_t *)data_ptr; - // Save the estimated end of the next message - data_end_estimation = (uint8_t *)¤t_msg->data[CRC_SIZE]; - // Raise the clear flag allowing to perform a clear - mem_clear_needed = true; - MSGALLOC_MUTEX_UNLOCK -} -/****************************************************************************** - * @brief write a byte into the current message. - * @param uint8_t data to write in the allocator - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void MsgAlloc_SetData(uint8_t data) -{ - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------------------------------------------+ - // | - // data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |First Data Byte|---------------------------------------------| - // +---------------^---------------------------------------------+ - // | - // data_ptr - // - //******** Write data ********* - *data_ptr = data; - data_ptr++; + // We consider this space as occupied, move data to the next available space + data_ptr = (uint8_t *)((uintptr_t)returned_ptr + data_size); + return returned_ptr; } /****************************************************************************** * @brief No message in buffer receive since initialization @@ -857,7 +597,6 @@ _CRITICAL static inline void MsgAlloc_ClearMsgTask(void) ******************************************************************************/ error_return_t MsgAlloc_PullMsgToInterpret(msg_t **returned_msg) { - MsgAlloc_ValidDataIntegrity(); if (msg_tasks_stack_id > 0) { // Case SUCCEED @@ -994,7 +733,6 @@ void MsgAlloc_LuosTaskAlloc(service_t *service_concerned_by_current_msg, msg_t * ******************************************************************************/ error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg) { - MsgAlloc_ValidDataIntegrity(); // // Pull a message from a specific service // @@ -1064,7 +802,6 @@ error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg) ******************************************************************************/ error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **returned_msg) { - MsgAlloc_ValidDataIntegrity(); // // msg_buffer example : msg_buffer after pulling message D2 // +------------------------+ +------------------------+ @@ -1122,7 +859,6 @@ error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **retur ******************************************************************************/ error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, service_t **allocated_service) { - MsgAlloc_ValidDataIntegrity(); // // luos_tasks // +---------+ @@ -1377,260 +1113,23 @@ void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg) ******************************************************************************/ error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack) { - LUOS_ASSERT((tx_tasks_stack_id >= 0) && (tx_tasks_stack_id < MAX_MSG_NB) && ((uintptr_t)data > 0) && ((uintptr_t)current_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]) && ((uintptr_t)current_msg >= (uintptr_t)&msg_buffer[0])); - void *rx_msg_bkp = 0; - void *tx_msg = 0; - uint16_t progression_size = 0; - uint16_t estimated_size = 0; - uint16_t decay_size = 0; - - // Start by cleaning the memory - MsgAlloc_ValidDataIntegrity(); + LUOS_ASSERT((tx_tasks_stack_id >= 0) && (tx_tasks_stack_id < MAX_MSG_NB) && ((uintptr_t)data > 0)); + void *tx_msg = 0; // Then compute if we have space into the TX_message buffer stack if (tx_tasks_stack_id >= MAX_MSG_NB - 1) { return FAILED; } - // Stop it MSGALLOC_MUTEX_LOCK - LuosHAL_SetIrqState(false); - // compute RX progression - progression_size = (uintptr_t)data_ptr - (uintptr_t)current_msg; - estimated_size = (uintptr_t)data_end_estimation - (uintptr_t)current_msg; - rx_msg_bkp = (void *)current_msg; - // - // * msg_buffer at beginning of MsgAlloc_SetTxTask : we are receiving a Rx message (complete or incomplete) - // +--------------------------------------------------------------------------+ - // |------------------------------| Receiving Rx ... |------------------------| - // +------------------------------^-------------------------------------------+ - // | - // current_msg - // - // * 2 cases for msg_buffer at end of MsgAlloc_SetTxTask : - // - // --> Case 1 : If Rx size received >= Tx size : - // - Rx message is decayed of "decay_size" after Tx message - // - Tx message is copied to former Rx message space memory - // - Padding is added : important for a correct mem copy behaviour - // +--------------------------------------------------------------------------+ - // |------------------------------| Tx | Padding | Rx |-------------| - // +------------------------------^--------------^----------------------------+ - // | | - // |------------->| - // | decay_size | - // | | - // current_msg current_msg - // init state - // - // --> Case 2 : If Rx size received > Tx size : - // - Rx message is decayed of "decay_size" after Tx message - // - Tx message is copied to former Rx message space memory - // - No padding - // +--------------------------------------------------------------------------+ - // |------------------------------| Tx | Rx |-------------------| - // +-------------------------------------------------^-----------------------+ - // | | - // |----------------->| - // | decay_size | - // | | - // current_msg current_msg - // init state - // - // So, we have to consider the biggest size between progression_size and size to be able to make a clean copy without stopping IRQ - if (progression_size > size) - { - decay_size = progression_size; - } - else - { - decay_size = size; - } - // Check if the message to send size (+ possible padding) fits into msg buffer - if (MsgAlloc_DoWeHaveSpace((void *)((uintptr_t)current_msg + decay_size)) == FAILED) - { - // - // message to send don't fit - // check at the end of buffer if there is a task - // - // - // +--------------------------------------------------------+ - // memory needed : |--------------------------------| "size Tx" or "size Rx received" | - // +--------------------------------^-----------------------+ - // | - // current_msg - // - // There is no space available for now - if (MsgAlloc_CheckMsgSpace((void *)current_msg, (void *)(uintptr_t)(&msg_buffer[MSG_BUFFER_SIZE - 1])) == FAILED) - { - // Check at the beginning of buffer if there is a task - // - // - // +----------------------------------------------------------------------------+ - // memory needed : |----------| "size Tx" or "size Rx received" |----------------------------| - // msg_buffer : |----------|------------|Task|----------------------------------------------| - // +----------^------------^---------------------------------------------------+ - // | | - // current_msg FAILED (there is a task) - // - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - - if (MsgAlloc_CheckMsgSpace((void *)msg_buffer, (void *)((uintptr_t)msg_buffer + decay_size + estimated_size)) == FAILED) - { - // Check at the beginning of buffer if there is a task - // - // - // +----------------------------------------------------------------------------+ - // memory needed : | "size Tx" or "size Rx received" |---------------------------------------| - // msg_buffer : |--------------------------|Task|--------------------------------------------| - // +--------------------------^------------------------------------------------+ - // | - // FAILED (there is a task) - // - // There is no space available for now - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - // move everything at the begining of the buffer - tx_msg = (void *)msg_buffer; - current_msg = (msg_t *)((uintptr_t)msg_buffer + decay_size); - data_ptr = (uint8_t *)((uintptr_t)current_msg + progression_size); - data_end_estimation = (uint8_t *)((uintptr_t)current_msg + estimated_size); - // We don't need to clear the space, we already check it using MsgAlloc_CheckMsgSpace - } - else - { - // Message to send fit - // - // +----------------------------------------------------------------+ - // memory needed : |-------------------| "size Tx" or "size Rx received" |-------| - // +-------------------^--------------------------------------------+ - // | - // current_msg - // - tx_msg = (void *)current_msg; - // Check if the receiving message size fit into msg buffer - if (MsgAlloc_DoWeHaveSpace((void *)((uintptr_t)tx_msg + decay_size + estimated_size)) == FAILED) - { - // receiving message don't fit, move it to the start of the buffer - // - // +------------------------------------------------------+ - // memory needed : |---------------| ("size Tx" or "size Rx received") + Rx estimated_size | - // +---------------^--------------------------------------+ - // | - // tx_msg - // - // Check space for the TX message - if (MsgAlloc_CheckMsgSpace((void *)tx_msg, (void *)((uintptr_t)tx_msg + decay_size)) == FAILED) - { - // There is no space available for now - // - // +--------------------------------------------------+ - // memory needed : |----------| "size Tx" or "size Rx received" |--+ - // msg_buffer : |----------|------------|Task|---------------------+ - // +----------^------------^--------------------------+ - // | | - // tx_msg FAILED (there is a task) - // - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - // Check if there is a task between tx and end of buffer - if (MsgAlloc_CheckMsgSpace((void *)tx_msg, (void *)(uintptr_t)(&msg_buffer[MSG_BUFFER_SIZE - 1])) == FAILED) - { - // There is no space available for now - // - // +----------------------------------------------------------------------------+ - // memory needed : |----------| "size Tx" or "size Rx received" |----------------------------| - // msg_buffer : |----------|------------|-----------------------------------------------|Task| - // +----------^------------------------------------------------------------^----+ - // | | - // tx_msg FAILED (there is a task) - // - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - // Check space for the RX message - if (MsgAlloc_CheckMsgSpace((void *)msg_buffer, (void *)((uintptr_t)msg_buffer + estimated_size)) == FAILED) - { - // There is no space available for now - // - // +----------------------------------------------------------------------------+ - // memory needed : | Rx estimated_size |------------------------------------------------------+ - // msg_buffer : |------------------|Task|----------------------------------------------------+ - // +------------------^---------------------------------------------------------+ - // | - // FAILED (there is a task) - // - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - current_msg = (msg_t *)msg_buffer; - data_end_estimation = (uint8_t *)((uintptr_t)current_msg + estimated_size); - // We don't need to clear the space, we already check it using MsgAlloc_CheckMsgSpace - } - else - { - // receiving message fit, move receiving message of tx_message size - // Check space for the TX and RX message - if (MsgAlloc_CheckMsgSpace((void *)((uintptr_t)tx_msg), (void *)((uintptr_t)tx_msg + decay_size + estimated_size)) == FAILED) - { - // There is no space available for now - // - // +----------------------------------------------------------------------+ - // memory needed : |-----|("size Tx" or "size Rx received") + Rx estimated_size|-------+ - // msg_buffer : |-----|------------|Task|----------------------------------------------+ - // +-----^------------^---------------------------------------------------+ - // | | - // tx_msg FAILED (there is a task) - // - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - current_msg = (msg_t *)((uintptr_t)current_msg + decay_size); - data_end_estimation = (uint8_t *)((uintptr_t)current_msg + estimated_size); - // We don't need to clear the space, we already check it using MsgAlloc_CheckMsgSpace - } - data_ptr = (uint8_t *)((uintptr_t)current_msg + progression_size); - LUOS_ASSERT((uintptr_t)(data_ptr) < (uintptr_t)(&msg_buffer[MSG_BUFFER_SIZE])); - } - // From here we have enough space to copy Tx message followed by Rx message - // First : deals with Rx - //---------------------------- - void *current_msg_cpy = (void *)current_msg; - // Copy previously received header parts - if (progression_size >= sizeof(header_t)) - { - // We have already received more than a header - // Copy the header before reenabling IRQ - memcpy((void *)current_msg_cpy, rx_msg_bkp, sizeof(header_t)); - // re-enable IRQ - LuosHAL_SetIrqState(true); - // Now we can copy additional datas - memcpy((void *)((uintptr_t)current_msg_cpy + sizeof(header_t)), (void *)((uintptr_t)rx_msg_bkp + sizeof(header_t)), (progression_size - sizeof(header_t))); - } - else - { - // Copy previously received incomplete header bytes - memcpy((void *)current_msg_cpy, rx_msg_bkp, progression_size); - // re-enable IRQ - LuosHAL_SetIrqState(true); - } + LuosHAL_SetIrqState(false); + // Alloc the space for the message + tx_msg = (void *)MsgAlloc_Alloc(size); + LuosHAL_SetIrqState(true); - // Secondly : deals with Tx - //---------------------------- - // Copy 3 bytes from the message to transmit just to be sure to be ready to start transmitting - // During those 3 bytes we have the time necessary to copy the other bytes - memcpy((void *)tx_msg, (void *)data, 3); + // Copy the tx msg into the buffer + memcpy((void *)tx_msg, (void *)data, size); #ifndef VERBOSE_LOCALHOST if (localhost != LOCALHOST) @@ -1657,33 +1156,17 @@ error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t } #endif - // finish the Tx copy (with Ack if necessary) + // Write the CRC and the ACK if needed if (ack != 0) { - // msg_buffer : add Ack - // +-------------------------------------------------------------+ - // |----------------------------------| Tx + Ack | Rx |------| - // +-------------------------------------------------------------+ - // - // Finish the copy of the message to transmit - LuosHAL_SetIrqState(false); - memcpy((void *)&((char *)tx_msg)[3], (void *)&data[3], size - 6); // 3 bytes already copied - 2 bytes CRC - 1 byte ack - LuosHAL_SetIrqState(true); + // Write the CRC and Ack ((char *)tx_msg)[size - 3] = (uint8_t)(crc); ((char *)tx_msg)[size - 2] = (uint8_t)(crc >> 8); ((char *)tx_msg)[size - 1] = ack; } else { - // msg_buffer - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +----------------------------------^--------------------------+ - // | - // tx_msg - // - // Finish the copy of the message to transmit - memcpy((void *)&((char *)tx_msg)[3], (void *)&data[3], size - 5); // 3 bytes already copied - 2 bytes CRC + // Write the CRC only ((char *)tx_msg)[size - 2] = (uint8_t)(crc); ((char *)tx_msg)[size - 1] = (uint8_t)(crc >> 8); } @@ -1820,7 +1303,6 @@ void MsgAlloc_PullServiceFromTxTask(uint16_t service_id) _CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost) { LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); - MsgAlloc_ValidDataIntegrity(); // // example if luos_tasks_stack_id = 0 diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 8f39c32a3..0312fdfbe 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -15,6 +15,7 @@ #include "filter.h" #include "service.h" #include "struct_engine.h" +#include "luos_io.h" /******************************************************************************* * Variables diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 16a8952dc..99a7e79d0 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -15,7 +15,7 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define BUFFER_SIZE 1000 +#define BUFFER_SIZE 500 /******************************************************************************* * Variables diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index 538cc74bb..012118c0f 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -100,8 +100,8 @@ * :-------------------------|------------------------------------------------------ * MAX_RTB_ENTRY | 40 | max number entry in routing table * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size + * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size + * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ #define MAX_RTB_ENTRY 40 diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 5b4421f1b..2db25fb2e 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -8,7 +8,7 @@ #define _ROBUS_H_ #include -#include "luos_io.h" +#include "luos_phy.h" /******************************************************************************* * Function @@ -22,5 +22,6 @@ void Robus_SaveNodeID(uint16_t nodeid); void Robus_ResetNodeID(void); bool Robus_Busy(void); error_return_t Robus_FindNeighbour(void); +luos_phy_t *Robus_GetPhy(void); #endif /* _ROBUS_H_ */ diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 79e27c887..6b15c4be5 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -50,9 +50,7 @@ #include "luos_utils.h" #include "_timestamp.h" #include "robus.h" -#include "bootloader_core.h" #include "filter.h" -#include "struct_engine.h" #include "context.h" /******************************************************************************* * Definitions @@ -66,19 +64,18 @@ #endif #define COLLISION_DETECTION_NUMBER 4 -#define BYTE_TRANSMIT_TIME 8 /******************************************************************************* * Variables ******************************************************************************/ -uint16_t data_count = 0; -uint16_t data_size = 0; -uint16_t crc_val = 0; +uint8_t data_rx[sizeof(msg_t)] = {0}; // Buffer to store the received data +uint16_t crc_val = 0; // CRC value /******************************************************************************* * Function ******************************************************************************/ -static inline uint8_t Recep_IsAckNeeded(void); +static inline uint8_t Recep_IsAckNeeded(luos_phy_t *phy_robus); +static inline bool Recep_IsARobusSpecialMsg(header_t *header); /****************************************************************************** * @brief Reception init. * @param None @@ -86,11 +83,16 @@ static inline uint8_t Recep_IsAckNeeded(void); ******************************************************************************/ void Recep_Init(luos_phy_t *phy_robus) { + LUOS_ASSERT(phy_robus != NULL); + LUOS_ASSERT(phy_robus->rx_alloc_job == false); // Initialize the reception state machine - ctx.rx.status.unmap = 0; - ctx.rx.callback = Recep_GetHeader; - ctx.rx.status.identifier = 0xF; - phy_robus->rx_timestamp = 0; + ctx.rx.status.unmap = 0; + ctx.rx.callback = Recep_GetHeader; + ctx.rx.status.identifier = 0xF; + phy_robus->rx_timestamp = 0; + phy_robus->rx_buffer_base = data_rx; + phy_robus->rx_data = data_rx; + phy_robus->rx_keep = true; } /****************************************************************************** * @brief Callback to get a complete header @@ -100,78 +102,50 @@ void Recep_Init(luos_phy_t *phy_robus) ******************************************************************************/ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) { - // Catch a byte. - MsgAlloc_SetData(*data); - data_count++; + // Catch the byte. + phy_robus->rx_data[phy_robus->received_data++] = *data; // Check if we have all we need. - switch (data_count) + switch (phy_robus->received_data) { case 1: - // Reset CRC computation // When we catch the first byte we timestamp the msg // We remove the time of the first byte to get the exact reception date. // 1 byte is 10 bits and we convert it to nanoseconds phy_robus->rx_timestamp = LuosHAL_GetTimestamp() - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)DEFAULTBAUDRATE); + // Declare Robus as busy ctx.tx.lock = true; // Switch the transmit status to disable to be sure to not interpreat the end timeout as an end of transmission. ctx.tx.status = TX_DISABLE; - crc_val = 0xFFFF; - break; - - case 3: // check if message is for the node - if (Recep_NodeConcerned((header_t *)¤t_msg->header) == false) - { - MsgAlloc_ValidHeader(false, data_size); - ctx.rx.callback = Recep_Drop; - return; - } + // Reset CRC computation + crc_val = 0xFFFF; break; - case (sizeof(header_t)): // Process at the header + case (sizeof(header_t)): + // Header finished #ifdef DEBUG printf("*******header data*******\n"); - printf("protocol : 0x%04x\n", current_msg->header.config); /*!< Protocol version. */ - printf("target : 0x%04x\n", current_msg->header.target); /*!< Target address, it can be (ID, Multicast/Broadcast, Type). */ - printf("target_mode : 0x%04x\n", current_msg->header.target_mode); /*!< Select targeting mode (ID, ID+ACK, Multicast/Broadcast, Type). */ - printf("source : 0x%04x\n", current_msg->header.source); /*!< Source address, it can be (ID, Multicast/Broadcast, Type). */ - printf("cmd : 0x%04x\n", current_msg->header.cmd); /*!< msg definition. */ - printf("size : 0x%04x\n", current_msg->header.size); /*!< Size of the data field. */ + printf("protocol : 0x%04x\n", phy_robus->rx_msg->header.config); /*!< Protocol version. */ + printf("target : 0x%04x\n", phy_robus->rx_msg->header.target); /*!< Target address, it can be (ID, Multicast/Broadcast, Type). */ + printf("target_mode : 0x%04x\n", phy_robus->rx_msg->header.target_mode); /*!< Select targeting mode (ID, ID+ACK, Multicast/Broadcast, Type). */ + printf("source : 0x%04x\n", phy_robus->rx_msg->header.source); /*!< Source address, it can be (ID, Multicast/Broadcast, Type). */ + printf("cmd : 0x%04x\n", phy_robus->rx_msg->header.cmd); /*!< msg definition. */ + printf("size : 0x%04x\n", phy_robus->rx_msg->header.size); /*!< Size of the data field. */ #endif - // Reset the catcher. - data_count = 0; - // Switch state machine to data reception ctx.rx.callback = Recep_GetData; - // Cap size for big messages - if (current_msg->header.size > MAX_DATA_MSG_SIZE) - { - data_size = MAX_DATA_MSG_SIZE; - } - else - { - data_size = current_msg->header.size; - // we need to check if we have a timestamped message and increase the data size if yes - if (Luos_IsMsgTimstamped((msg_t *)current_msg) == true) - { - data_size += sizeof(time_luos_t); - } - } + // Compute message size the result will be available in phy_robus->rx_size + Phy_ComputeMsgSize(phy_robus); if (ctx.rx.status.rx_framing_error == false) { - if (data_size) + if (Recep_IsARobusSpecialMsg((header_t *)data_rx) == false) { - MsgAlloc_ValidHeader(true, data_size); + // Put a flag to tell that we need to alloc this message + phy_robus->rx_alloc_job = true; } } - else - { - MsgAlloc_ValidHeader(false, data_size); - ctx.rx.callback = Recep_Drop; - return; - } break; default: @@ -187,62 +161,48 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) ******************************************************************************/ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) { - MsgAlloc_SetData(*data); - if (data_count < data_size) + static uint16_t crc; + if (phy_robus->received_data < phy_robus->rx_size) { - // Continue CRC computation until the end of data + // Catch the byte. + phy_robus->rx_data[phy_robus->received_data] = *data; + // Continue the CRC computation until the end of data RobusHAL_ComputeCRC((uint8_t *)data, (uint8_t *)&crc_val); } - else if (data_count > data_size) + else if (phy_robus->received_data > phy_robus->rx_size) { - uint16_t crc = ((uint16_t)current_msg->data[data_size]) | ((uint16_t)current_msg->data[data_size + 1] << 8); + crc = crc | ((uint16_t)(*data) << 8); if (crc == crc_val) { - if (Recep_IsAckNeeded()) + // Message is OK + // Check if we need to send an ack + if (Recep_IsAckNeeded(phy_robus)) { + // Send an Ack Transmit_SendAck(); } - MsgAlloc_ValidDataIntegrity(); - // If message is timestamped, convert the latency to date - if (Luos_IsMsgTimstamped((msg_t *)current_msg)) - { - // This conversion also remove the timestamp from the message size. - Timestamp_ConvertToDate((msg_t *)current_msg, phy_robus->rx_timestamp); - } - - // Make an exception for bootloader command - if ((current_msg->header.cmd == BOOTLOADER_CMD) && (current_msg->data[0] == BOOTLOADER_RESET)) - { - LuosHAL_SetMode((uint8_t)BOOT_MODE); - LuosHAL_Reboot(); - } - - // Make an exception for reset detection command - if (current_msg->header.cmd == START_DETECTION) - { - MsgAlloc_Reset(); - ctx.tx.status = TX_DISABLE; - Node_SetState(EXTERNAL_DETECTION); - PortMng_Init(); - } - else - { - MsgAlloc_EndMsg(); - } + // Valid the message + Phy_ValidMsg(phy_robus); } else { ctx.rx.status.rx_error = true; - if (Recep_IsAckNeeded()) + if (Recep_IsAckNeeded(phy_robus)) { Transmit_SendAck(); } - MsgAlloc_InvalidMsg(); + // We dont valid the message, this will fragment a little bit the memory but it will be faster than a full memory check } + // We will drop any data received between now and the timeout ctx.rx.callback = Recep_Drop; return; } - data_count++; + else + { + // This is the first byte of the CRC, store it + crc = (uint16_t)(*data); + } + phy_robus->received_data++; } /****************************************************************************** * @brief Callback to get a collision beetween RX and Tx @@ -252,6 +212,7 @@ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) ******************************************************************************/ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) { + static uint8_t data_count = 0; // Check data integrity if ((ctx.tx.data[data_count++] != *data) || (!ctx.tx.lock) || (ctx.rx.status.rx_framing_error == true)) { @@ -262,21 +223,12 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) // Save the received data into the allocator to be able to continue the reception for (uint8_t i = 0; i < data_count - 1; i++) { - MsgAlloc_SetData(*ctx.tx.data + i); + Recep_GetHeader(phy_robus, &ctx.tx.data[i]); } - MsgAlloc_SetData(*data); + Recep_GetHeader(phy_robus, data); // Switch to get header. ctx.rx.callback = Recep_GetHeader; ctx.tx.status = TX_NOK; - if (data_count >= 3) - { - if (Recep_NodeConcerned((header_t *)¤t_msg->header) == false) - { - MsgAlloc_ValidHeader(false, data_size); - ctx.rx.callback = Recep_Drop; - return; - } - } } else { @@ -286,6 +238,7 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) selftest_SetRxFlag(); #endif // Collision detection end + data_count = 0; RobusHAL_SetRxState(false); RobusHAL_ResetTimeout(0); if (ctx.tx.status == TX_NOK) @@ -301,7 +254,6 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) return; } } - RobusHAL_ComputeCRC((uint8_t *)data, (uint8_t *)&crc_val); } /****************************************************************************** * @brief Callback to drop received data wrong header, data, or collision @@ -325,7 +277,6 @@ _CRITICAL void Recep_Timeout(void) { ctx.rx.status.rx_timeout = true; } - MsgAlloc_InvalidMsg(); Recep_Reset(); Transmit_End(); // This is possibly the end of a transmission, check it. } @@ -337,10 +288,13 @@ _CRITICAL void Recep_Timeout(void) ******************************************************************************/ _CRITICAL void Recep_Reset(void) { - data_count = 0; + luos_phy_t *phy_robus = Robus_GetPhy(); + phy_robus->received_data = 0; crc_val = 0xFFFF; ctx.rx.status.rx_framing_error = false; ctx.rx.callback = Recep_GetHeader; + phy_robus->rx_buffer_base = data_rx; + phy_robus->rx_data = data_rx; RobusHAL_SetRxDetecPin(true); } /****************************************************************************** @@ -369,7 +323,7 @@ _CRITICAL void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data) * warning : this function can be redefined only for mock testing purpose * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL bool Recep_NodeConcerned(header_t *header) +_CRITICAL static inline bool Recep_IsARobusSpecialMsg(header_t *header) { // Find if we are concerned by this message. if ((header->target_mode == NODEIDACK) || (header->target_mode == SERVICEIDACK)) @@ -381,10 +335,10 @@ _CRITICAL bool Recep_NodeConcerned(header_t *header) { if ((header->target == 0) && (ctx.port.activ != NBR_PORT) && (ctx.port.keepLine == false)) { - return true; // Keep message if nodeID = 0 and a PTP is activ + return true; // Message is specific to Robus if nodeID = 0 and a a PTP is activ } } - return (Filter_GetLocalhost(header) != EXTERNALHOST); + return false; } /****************************************************************************** @@ -393,19 +347,19 @@ _CRITICAL bool Recep_NodeConcerned(header_t *header) * @return true or false * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline uint8_t Recep_IsAckNeeded(void) +_CRITICAL static inline uint8_t Recep_IsAckNeeded(luos_phy_t *phy_robus) { - // check the mode of the message received - if ((current_msg->header.target_mode == SERVICEIDACK) && (Filter_ServiceID(current_msg->header.target))) + header_t *header = (header_t *)(phy_robus->rx_buffer_base); + // Check the mode of the message received + if ((header->target_mode == SERVICEIDACK) && (Filter_ServiceID(header->target))) { - // when it is a serviceidack and this message is destined to the node send an ack + // When it is a serviceidack and this message is destined to the node send an ack return 1; } - else if ((current_msg->header.target_mode == NODEIDACK) && (Node_Get()->node_id == current_msg->header.target)) + else if ((header->target_mode == NODEIDACK) && (Node_Get()->node_id == header->target)) { - // when it is nodeidack and this message is destined to the node send an ack + // When it is nodeidack and this message is destined to the node send an ack return 1; } - // if not failed return 0; } diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index a330930ac..0a5c5711f 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -185,4 +185,13 @@ error_return_t Robus_FindNeighbour(void) _CRITICAL void Recep_data(volatile uint8_t *data) { ctx.rx.callback(phy_robus, data); -} \ No newline at end of file +} + +/****************************************************************************** + * @brief Get the phy pointer + * @return luos_phy_t* + ******************************************************************************/ +luos_phy_t *Robus_GetPhy(void) +{ + return phy_robus; +} diff --git a/platformio.ini b/platformio.ini index 3a9d7b877..86e7b38a9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -32,4 +32,4 @@ build_type = debug test_build_src = true ; To debug a test, replace "test_template" by the directory test name you want to debug (example : "test_msg_alloc") -; debug_test = test_template +debug_test = test_msg_alloc diff --git a/test/test_msg_alloc/main.c b/test/test_msg_alloc/main.c index ce3f1a18e..f3762bf3f 100644 --- a/test/test_msg_alloc/main.c +++ b/test/test_msg_alloc/main.c @@ -14,15 +14,10 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_ClearMsgTask); UNIT_TEST_RUN(unittest_ClearLuosTask); UNIT_TEST_RUN(unittest_ClearMsgSpace); - UNIT_TEST_RUN(unittest_ValidDataIntegrity); - ////MsgAlloc_FindNewOldestMsg => this function doesn't need unit test // Generic functions UNIT_TEST_RUN(unittest_MsgAlloc_loop); - UNIT_TEST_RUN(unittest_MsgAlloc_ValidHeader); - UNIT_TEST_RUN(unittest_MsgAlloc_InvalidMsg); - UNIT_TEST_RUN(unittest_MsgAlloc_EndMsg); - UNIT_TEST_RUN(unittest_MsgAlloc_SetData); + UNIT_TEST_RUN(unittest_MsgAlloc_Alloc); UNIT_TEST_RUN(unittest_MsgAlloc_IsEmpty); UNIT_TEST_RUN(unittest_MsgAlloc_UsedMsgEnd); UNIT_TEST_RUN(unittest_MsgAlloc_GetLuosTaskSourceId); @@ -39,19 +34,13 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_MsgAlloc_PullMsgFromTxTask); UNIT_TEST_RUN(unittest_MsgAlloc_PullServiceFromTxTask); UNIT_TEST_RUN(unittest_MsgAlloc_GetTxTask); - // MsgAlloc_Init => this function doesn't need unit test // Tx functions UNIT_TEST_RUN(unittest_SetTxTask_buffer_full); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_too_long_1); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_too_long_2); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_too_long_3); - UNIT_TEST_RUN(unittest_SetTxTask_Rx_too_long_1); - UNIT_TEST_RUN(unittest_SetTxTask_Rx_too_long_2); - UNIT_TEST_RUN(unittest_SetTxTask_Rx_too_long_3); - UNIT_TEST_RUN(unittest_SetTxTask_Rx_too_long_4); + UNIT_TEST_RUN(unittest_SetTxTask_Tx_too_long); + UNIT_TEST_RUN(unittest_SetTxTask_Tx_overflow); + UNIT_TEST_RUN(unittest_SetTxTask_Tx_fit); UNIT_TEST_RUN(unittest_SetTxTask_Task_already_exists); - UNIT_TEST_RUN(unittest_SetTxTask_copy_OK); UNIT_TEST_RUN(unittest_SetTxTask_ACK); UNIT_TEST_RUN(unittest_SetTxTask_internal_localhost); UNIT_TEST_RUN(unittest_SetTxTask_multihost); diff --git a/test/test_msg_alloc/main.h b/test/test_msg_alloc/main.h index 4074e811e..def9a9541 100644 --- a/test/test_msg_alloc/main.h +++ b/test/test_msg_alloc/main.h @@ -9,14 +9,10 @@ void unittest_OldestMsgCandidate(void); void unittest_ClearMsgTask(void); void unittest_ClearLuosTask(void); void unittest_ClearMsgSpace(void); -void unittest_ValidDataIntegrity(void); // Generic functions void unittest_MsgAlloc_loop(void); -void unittest_MsgAlloc_ValidHeader(void); -void unittest_MsgAlloc_InvalidMsg(void); -void unittest_MsgAlloc_EndMsg(void); -void unittest_MsgAlloc_SetData(void); +void unittest_MsgAlloc_Alloc(void); void unittest_MsgAlloc_IsEmpty(void); void unittest_MsgAlloc_UsedMsgEnd(void); void unittest_MsgAlloc_GetLuosTaskSourceId(void); @@ -36,15 +32,10 @@ void unittest_MsgAlloc_GetTxTask(void); // Tx functions void unittest_SetTxTask_buffer_full(void); -void unittest_SetTxTask_Tx_too_long_1(void); -void unittest_SetTxTask_Tx_too_long_2(void); -void unittest_SetTxTask_Tx_too_long_3(void); -void unittest_SetTxTask_Rx_too_long_1(void); -void unittest_SetTxTask_Rx_too_long_2(void); -void unittest_SetTxTask_Rx_too_long_3(void); -void unittest_SetTxTask_Rx_too_long_4(void); +void unittest_SetTxTask_Tx_too_long(void); +void unittest_SetTxTask_Tx_overflow(void); +void unittest_SetTxTask_Tx_fit(void); void unittest_SetTxTask_Task_already_exists(void); -void unittest_SetTxTask_copy_OK(void); void unittest_SetTxTask_ACK(void); void unittest_SetTxTask_internal_localhost(void); void unittest_SetTxTask_multihost(void); diff --git a/test/test_msg_alloc/unit_test_mem_alloc_generic.c b/test/test_msg_alloc/unit_test_mem_alloc_generic.c index dbd332ab2..4f0d2e41e 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_generic.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_generic.c @@ -25,12 +25,9 @@ typedef struct extern memory_stats_t *mem_stat; extern volatile bool reset_needed; extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; -extern volatile msg_t *current_msg; extern volatile uint8_t *data_ptr; -extern volatile uint8_t *data_end_estimation; extern volatile msg_t *oldest_msg; extern volatile msg_t *used_msg; -extern volatile uint8_t mem_clear_needed; extern volatile msg_t *msg_tasks[MAX_MSG_NB]; extern volatile uint16_t msg_tasks_stack_id; extern volatile luos_task_t luos_tasks[MAX_MSG_NB]; @@ -97,14 +94,14 @@ void unittest_MsgAlloc_loop() NEW_TEST_CASE("Verify buffer occupation rate stat computing"); MsgAlloc_Init(NULL); { - // data_end_estimation is incremented : buffer occupation computing is verified + // data_ptr is incremented : buffer occupation computing is verified // // msg_buffer // +-------------------------------------------------------------+ // |-------------------------------------------------------------| // ^-------------------------^---------------------^-------------+ // | | | - // data_end_estimation data_end_estimation data_end_estimation + // data_ptr data_ptr data_ptr // (0% occupation) (X% occupation) (etc...) // @@ -119,12 +116,11 @@ void unittest_MsgAlloc_loop() memset(&memory_stats, 0, sizeof(memory_stats)); MsgAlloc_Init(&memory_stats); - current_msg = (msg_t *)&msg_buffer[0]; + data_ptr = &msg_buffer[0]; // Call function and Verify //--------------------------- // Empty buffer - data_end_estimation = (uint8_t *)(current_msg); expected_buffer_occupation_ratio = 0; MsgAlloc_loop(); @@ -133,9 +129,10 @@ void unittest_MsgAlloc_loop() // Buffer occupation from 0 -> 100% NEW_STEP("Check buffer is full in all cases"); + oldest_msg = (msg_t *)&msg_buffer[0]; for (uint16_t i = sizeof(header_t); i < MSG_BUFFER_SIZE; i++) { - data_end_estimation = (uint8_t *)(current_msg) + i; + data_ptr = &msg_buffer[0] + i; expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); MsgAlloc_loop(); @@ -145,690 +142,9 @@ void unittest_MsgAlloc_loop() } } -void unittest_MsgAlloc_ValidHeader() -{ -#define DATA_SIZE 64 - NEW_TEST_CASE("Invalid header"); - MsgAlloc_Init(NULL); - { - // valid = FALSE => the header is invalidated - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------| Header |------------------------------| - // +-------------------^----------^------------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------| ****** |------------------------------| - // +-------------------^-----------------------------------------+ - // | - // current_msg - // data_ptr - // - - uint8_t valid = false; - uint16_t data_size = 0; - - data_ptr = (uint8_t *)&msg_buffer[0]; - current_msg = (msg_t *)&msg_buffer[1]; - - MsgAlloc_ValidHeader(valid, data_size); - - NEW_STEP("Check header is invalid: \"data pointer\" is reseted to \"current message\""); - TEST_ASSERT_EQUAL((uint8_t *)current_msg, data_ptr); - } - - NEW_TEST_CASE("Drop message"); - MsgAlloc_Init(NULL); - { - // There is a used message pending in current message memory - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------| Header | Datas to be received |-------| - // |----------------------------------------| An old message |---| - // +-------------------^----------^---------^--------------------+ - // | | | - // current_msg data_ptr used_msg - // - // - // msg_buffer ending state : old message is cleared (used_msg = NULL) - // +-------------------------------------------------------------+ - // |-------------------| Header | Datas to be received |-------| - // +-------------------^----------^------------------------------+ - // | | - // current_msg data_ptr - // - - uint8_t valid = true; - uint16_t data_size = DATA_SIZE; - uint8_t *ptr = (uint8_t *)&msg_buffer[0]; - - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - current_msg = (msg_t *)ptr++; - used_msg = (msg_t *)ptr; - - MsgAlloc_ValidHeader(valid, data_size); - - NEW_STEP("Check buffer is full"); - TEST_ASSERT_EQUAL(100, memory_stats.buffer_occupation_ratio); - NEW_STEP("Check there is 1 message dropped"); - TEST_ASSERT_EQUAL(1, memory_stats.msg_drop_number); - } - - NEW_TEST_CASE("There is no space in msg_buffer"); - MsgAlloc_Init(NULL); - { - // There is a no space left - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |------------------------------------| Header | Datas to be received | - // +------------------------------------^----------^-------------+ ^ - // | | | - // current_msg data_ptr data_end_estimation - // - // - // msg_buffer ending state : - // +-------------------------------------------------------------+ - // || Header | Datas to be received |-------------------------- - // +----------^--------------------------------------------------+ - // | | - // current_msg data_ptr - // - - uint8_t valid = true; - uint16_t data_size = DATA_SIZE; - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]; - uint8_t *expected_data_ptr = (uint8_t *)&msg_buffer[0] + sizeof(header_t); - uint8_t *expected_data_end = expected_data_ptr + data_size + CRC_SIZE; - - MsgAlloc_ValidHeader(valid, data_size); - NEW_STEP("Check mem cleared flag is raised"); - TEST_ASSERT_EQUAL(true, mem_clear_needed); - NEW_STEP("Check \"data pointer\" has been computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" has been computed"); - TEST_ASSERT_EQUAL(expected_data_end, data_end_estimation); - } - - NEW_TEST_CASE("There is enough space : save the end position and raise the clear flag"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |----------------------| Header |---------------------------| - // +----------------------^----------^---------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state : MEM_CLEAR_NEEDED = True - // +-------------------------------------------------------------+ - // |----------------------| Header | Datas to be received |----| - // +----------------------^----------^----------------------^----+ - // | | | - // current_msg data_ptr data_end_estimation - // - - uint8_t *expected_data_end; - uint8_t valid = true; - uint16_t data_size = DATA_SIZE; - - current_msg = (msg_t *)&msg_buffer[0]; - expected_data_end = (uint8_t *)current_msg + sizeof(header_t) + data_size + CRC_SIZE; - - MsgAlloc_ValidHeader(valid, data_size); - NEW_STEP("Check mem cleared flag is raised"); - TEST_ASSERT_EQUAL(true, mem_clear_needed); - NEW_STEP("Check \"data end estimation\" has been computed"); - TEST_ASSERT_EQUAL(expected_data_end, data_end_estimation); - } -} - -void unittest_MsgAlloc_InvalidMsg() -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { -#define DATA_END_LIMIT (MSG_BUFFER_SIZE - sizeof(header_t) - CRC_SIZE) - - // current_msg is in limit position : no left memory for a message : ASSERT - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |---------------------------------------------| Message | - // +---------------------------------------------^---------------^ - // | | - // current_msg data_ptr - // - - NEW_STEP("Forbidden values are injected -> Verify function is asserting"); - for (uint16_t i = DATA_END_LIMIT; i < MSG_BUFFER_SIZE; i++) - { - // Init variables - //--------------- - current_msg = (msg_t *)&msg_buffer[i]; - RESET_ASSERT(); - - // Call function - //--------------- - MsgAlloc_InvalidMsg(); - - // Verify - //--------------- - TEST_ASSERT_TRUE(IS_ASSERT()); - } - RESET_ASSERT(); - - // current_msg is OK : enough memory for a message : NO ASSERT - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |----------------------------------------| Message |----| - // +----------------------------------------^---------------^----+ - // | | - // current_msg data_ptr - // - - NEW_STEP("Correct values are injected -> Verify function is NOT asserting"); - for (uint16_t i = 0; i < DATA_END_LIMIT; i++) - { - // Init variables - //--------------- - current_msg = (msg_t *)&msg_buffer[i]; - RESET_ASSERT(); - - // Call function - //--------------- - MsgAlloc_InvalidMsg(); - - // Verify - //--------------- - TEST_ASSERT_FALSE(IS_ASSERT()); - } - } - - NEW_TEST_CASE("Check pointers values after invaliding a message"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^--------------^----------------------------------------------+ - // | | - // current_msg data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^---------------------^---------------------------------------+ - // | | - // current_msg data_end_estimation - // data_ptr - // | | - // <----Header + CRC----> - // - -#define DATA_END (sizeof(header_t) + CRC_SIZE) - - // Init variables - //--------------- - current_msg = (msg_t *)&msg_buffer[0]; - data_ptr = &msg_buffer[10]; - // Call function - //--------------- - MsgAlloc_InvalidMsg(); - - // Verify - //--------------- - NEW_STEP("Check message is invalid: \"data pointer\" is reseted to \"current message\""); - TEST_ASSERT_EQUAL(current_msg, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(data_end_estimation, ((uint8_t *)current_msg + DATA_END)); - - // Init variables - //--------------- - current_msg = (msg_t *)&msg_buffer[100]; - data_ptr = &msg_buffer[110]; - - // Call function - //--------------- - MsgAlloc_InvalidMsg(); - - // Verify - //--------------- - NEW_STEP("Check message is invalid: \"data pointer\" is reseted to \"current message\""); - TEST_ASSERT_EQUAL(current_msg, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(data_end_estimation, ((uint8_t *)current_msg + DATA_END)); - } - - NEW_TEST_CASE("Clean memory"); - MsgAlloc_Init(NULL); - { - // msg_buffer init - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +------^-----------------^------^-------^---------------------+ - // | | | | - // oldest_msg | data_ptr | - // Msg 1.......... Msg 10 - // - // msg_tasks init state msg_tasks end state - // +---------+ +---------+ - // | Msg 1 | | Msg 6 | - // |---------| |---------| - // | Msg 2 | | Msg 7 | - // |---------| |---------| - // | Msg 3 | | Msg 8 | - // |---------| |---------| - // | Msg 4 | | Msg 9 | - // |---------| |---------| - // | Msg 5 | | Msg 10 | - // |---------| |---------| - // | Msg 6 | | 0 | - // |---------| |---------| - // | Msg 7 | | 0 | - // |---------| |---------| - // | Msg 8 | | 0 | - // |---------| |---------| - // | Msg 9 | | 0 | - // |---------| |---------| - // | Msg 10 | | 0 | - // +---------+ +---------+ - // - -#define DATA_INDEX 15 - // Init variables - //--------------- - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - msg_t *expected_msg_tasks[MAX_MSG_NB]; - oldest_msg = (msg_t *)&msg_buffer[DATA_INDEX - (MAX_MSG_NB / 2)]; - current_msg = (msg_t *)oldest_msg; - data_ptr = &msg_buffer[DATA_INDEX - 1]; - mem_clear_needed = true; // TRUE to clean memory - msg_tasks_stack_id = MAX_MSG_NB; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - msg_tasks[i] = (msg_t *)&msg_buffer[i + DATA_INDEX - (MAX_MSG_NB / 2)]; - } - - for (uint16_t i = 0; i < (MAX_MSG_NB / 2); i++) - { - expected_msg_tasks[i] = (msg_t *)msg_tasks[(i + (MAX_MSG_NB / 2))]; // 5 tasks must be shifted - } - - for (uint16_t i = (MAX_MSG_NB / 2); i < MAX_MSG_NB; i++) - { - expected_msg_tasks[i] = 0; // other msg_tasks must be cleared - } - - // Call function - //--------------- - MsgAlloc_InvalidMsg(); - - // Verify - //--------------- - NEW_STEP("Check there is no need to clear memory"); - TEST_ASSERT_EQUAL(false, mem_clear_needed); - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - NEW_STEP_IN_LOOP("Clean message task", i); - TEST_ASSERT_EQUAL(expected_msg_tasks[i], msg_tasks[i]); - } - } -} - -void unittest_MsgAlloc_EndMsg() -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { -#define assert_nb 6 - typedef struct - { - bool expected_asserts; - uint16_t stack_id; - msg_t *tasks; - msg_t *old_message; - } assert_scenario; - - assert_scenario assert_sc[assert_nb]; - - // Expected Values - assert_sc[0].expected_asserts = true; - assert_sc[0].tasks = (msg_t *)&msg_buffer[0]; - assert_sc[0].stack_id = 0; - assert_sc[0].old_message = 0; - - assert_sc[1].expected_asserts = false; - assert_sc[1].tasks = 0; - assert_sc[1].stack_id = 0; - assert_sc[1].old_message = (msg_t *)&msg_buffer[0]; - - assert_sc[2].expected_asserts = false; - assert_sc[2].tasks = 0; - assert_sc[2].stack_id = 1; - assert_sc[2].old_message = (msg_t *)&msg_buffer[0]; - - assert_sc[3].expected_asserts = false; - assert_sc[3].tasks = 0; - assert_sc[3].stack_id = 0; - assert_sc[3].old_message = (msg_t *)&msg_buffer[MAX_MSG_NB * sizeof(msg_t)]; - - assert_sc[4].expected_asserts = true; - assert_sc[4].tasks = 0; - assert_sc[4].stack_id = 1; - assert_sc[4].old_message = (msg_t *)&msg_buffer[MAX_MSG_NB * sizeof(msg_t)]; - - assert_sc[5].expected_asserts = true; - assert_sc[5].tasks = 0; - assert_sc[5].stack_id = 1; - assert_sc[5].old_message = (msg_t *)&luos_tasks; - - // Launch test - for (uint8_t i = 0; i < assert_nb; i++) - { - RESET_ASSERT(); - // Init variables - //--------------- - current_msg = (msg_t *)&msg_buffer[0]; - msg_tasks_stack_id = assert_sc[i].stack_id; - msg_tasks[0] = assert_sc[i].old_message; - msg_tasks[msg_tasks_stack_id] = assert_sc[i].tasks; - - // Call function - //--------------- - MsgAlloc_EndMsg(); - - // Verify - //--------------- - NEW_STEP_IN_LOOP("Verify function is asserting when forbidden values are injected", i); - TEST_ASSERT_EQUAL(assert_sc[i].expected_asserts, IS_ASSERT()); - } - RESET_ASSERT(); - } - RESET_ASSERT(); - - NEW_TEST_CASE("Prepare the next message : update pointers"); - MsgAlloc_Init(NULL); - { - // msg_buffer init state - // +-------------------------------------------------------------+ - // | Header | Data | CRC |---------------------------------------+ - // +---------------------^---------------------------------------+ - // | - // data_ptr - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // OLD | Header | Data | CRC |---------------------------------------+ - // FUTURE |---------------| Header |------------------------------------+ - // +---------------^--------^------------------------------------+ - // | | - // data_ptr data_end_estimation - // current_msg - // - - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - - // Init variables - //--------------- - if ((uintptr_t)&msg_buffer[10] % 2 == 0) - { - data_ptr = &msg_buffer[10]; // Data is already aligned - } - else - { - data_ptr = &msg_buffer[9]; // Align data - } - expected_data_ptr = (uint8_t *)(data_ptr - CRC_SIZE); - expected_data_end_estimation = (uint8_t *)(data_ptr + sizeof(header_t)); - - // Call function - //--------------- - RESET_ASSERT(); - MsgAlloc_EndMsg(); - - // Verify - //--------------- - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - NEW_STEP("Check \"data pointer\" alignment"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(data_ptr, current_msg); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - NEW_STEP("Check mem cleared flag is raised"); - TEST_ASSERT_EQUAL(true, mem_clear_needed); - NEW_STEP("Check \"message tasks stack id\" is incremented to 1"); - TEST_ASSERT_EQUAL(1, msg_tasks_stack_id); - } - - NEW_TEST_CASE("Data are not aligned"); - MsgAlloc_Init(NULL); - { - uint8_t *expected_data_ptr; - - // Init variables - //--------------- - if ((uintptr_t)&msg_buffer[10] % 2 == 0) - { - data_ptr = &msg_buffer[9]; // Data pointer's address is not aligned - } - else - { - data_ptr = &msg_buffer[10]; // Data pointer's address is not aligned - } - - expected_data_ptr = (uint8_t *)(data_ptr - CRC_SIZE + 1); - - // Call function - //--------------- - MsgAlloc_EndMsg(); - - // Verify - //--------------- - NEW_STEP("Check \"data pointer\" alignment"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - } - - NEW_TEST_CASE("Verify task allocation"); - MsgAlloc_Init(NULL); - { - // msg_buffer init state - // +-------------------------------------------------------------+ - // | Header | Data | CRC |---------------------------------------+ - // +---------------------^---------------------------------------+ - // | - // data_ptr - // - // msg_buffer ending state after calling "MsgAlloc_EndMsg" - // +-------------------------------------------------------------+ - // OLD | Header | Data | CRC |---------------------------------------+ - // ^-------------------------------------------------------------+ - // | - // oldest_message - // msg_tasks[0] - - MsgAlloc_EndMsg(); - NEW_STEP("Check first \"message task\" points to beginning of \"message buffer\""); - TEST_ASSERT_EQUAL((msg_t *)&msg_buffer[0], msg_tasks[0]); - NEW_STEP("Check \"oldest message\" points to beginning of \"message buffer\""); - TEST_ASSERT_EQUAL((msg_t *)&msg_buffer[0], oldest_msg); - } - - NEW_TEST_CASE("Not enough space for the next message"); - MsgAlloc_Init(NULL); - { - // msg_buffer init state - // +-------------------------------------------------------------+ - // |---------------------------------------------| Header | Data | CRC | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |---------------------------------------------| Header | Data | CRC | - // ^-------------------------------------------------------------+ - // | - // data_ptr - // current_mag - - // Init variables - //--------------- - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 1]; - - // Call function - //--------------- - MsgAlloc_EndMsg(); - - // Verify - //--------------- - NEW_STEP("Check \"data pointer\" points to beginning of \"message buffer\""); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], data_ptr); - NEW_STEP("Check \"current message\" points to beginning of \"message buffer\""); - TEST_ASSERT_EQUAL((msg_t *)&msg_buffer[0], current_msg); - } - - NEW_TEST_CASE("Remove oldest msg if message task buffer is full"); - MsgAlloc_Init(NULL); - { - // msg_tasks_stack_id = MAX_MSG_NB => oldest message must be deleted - // - // msg_tasks init state msg_tasks end state - // - // +---------+ +---------+ - // | D 1 | | D 2 |<--Oldest message "D 1" is deleted - // |---------| |---------| - // | D 2 | | D 3 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------| - // | D10 | | NEW | - // +---------+<--luos_tasks_stack_id +---------+<--luos_tasks_stack_id - // - - msg_t *expected_msg_tasks[MAX_MSG_NB]; - // Init variables - //--------------- - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - // To avoid assert - msg_tasks[0] = (msg_t *)&msg_buffer[0]; - luos_tasks[0].msg_pt = (msg_t *)&msg_buffer[0]; - tx_tasks[0].data_pt = (uint8_t *)&msg_buffer[0]; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - msg_tasks[i] = (msg_t *)(&msg_buffer[0] + i); - expected_msg_tasks[i] = (msg_t *)(&msg_buffer[0] + i + 1); - } - expected_msg_tasks[MAX_MSG_NB - 1] = (msg_t *)(current_msg); - - // Last Msg Task must be cleared - msg_tasks_stack_id = MAX_MSG_NB; - - // Call function - //--------------- - MsgAlloc_EndMsg(); - - // Verify - //--------------- - NEW_STEP_IN_LOOP("Check oldest message task is cleared", 0); - TEST_ASSERT_EQUAL(expected_msg_tasks[0], msg_tasks[0]); - - for (uint16_t i = 1; i < MAX_MSG_NB - 1; i++) - { - NEW_STEP_IN_LOOP("Check message task", i); - TEST_ASSERT_EQUAL(expected_msg_tasks[i], msg_tasks[i]); - } - - NEW_STEP_IN_LOOP("Check last message task is filled with current message", MAX_MSG_NB - 1); - TEST_ASSERT_EQUAL(expected_msg_tasks[MAX_MSG_NB - 1], msg_tasks[MAX_MSG_NB - 1]); - } -} +void unittest_MsgAlloc_Alloc() {} #define COPY_LENGTH 128 -void unittest_MsgAlloc_SetData() -{ - NEW_TEST_CASE("Set Data"); - MsgAlloc_Init(NULL); - { - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------------------------------------------+ - // | - // data_ptr - // - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |0 1 2 3 ....... (COPY_LENGTH -1) ----------------------------| - // -------------------------^------------------------------------+ - // | - // data_ptr - // - - uint8_t expected_datas[COPY_LENGTH]; - - // Init variables - //--------------- - data_ptr = (uint8_t *)&msg_buffer[0]; - memset((void *)&msg_buffer[0], 0xFF, COPY_LENGTH); - for (uint8_t i = 0; i < COPY_LENGTH; i++) - { - expected_datas[i] = i; - } - - // Call function - //--------------- - for (uint8_t i = 0; i < COPY_LENGTH; i++) - { - MsgAlloc_SetData(i); - } - - // Verify - //--------------- - NEW_STEP("Check message buffer is correctly filled"); - TEST_ASSERT_EQUAL_MEMORY(expected_datas, (uint8_t *)&msg_buffer[0], COPY_LENGTH); - } -} - void unittest_MsgAlloc_IsEmpty() { NEW_TEST_CASE("Is Empty"); diff --git a/test/test_msg_alloc/unit_test_mem_alloc_static.c b/test/test_msg_alloc/unit_test_mem_alloc_static.c index deda161f8..eef242e80 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_static.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_static.c @@ -283,29 +283,24 @@ void unittest_BufferAvailableSpaceComputation(void) } } - NEW_TEST_CASE("No task is availabled"); + NEW_TEST_CASE("No task is available"); MsgAlloc_Init(NULL); { - uint32_t remaining_datas; - uint32_t expected_size = 0; - uint32_t free_space = 0; - oldest_msg = (msg_t *)INT_MAX; // No oldest message + volatile uint32_t free_space = 0; + oldest_msg = (msg_t *)INT_MAX; // No oldest message NEW_STEP("Check remaining space computing for all message size cases"); for (uint16_t i = 0; i < MSG_BUFFER_SIZE - 2; i++) { // Init variables //--------------- - current_msg = (msg_t *)&msg_buffer[i]; - data_end_estimation = (uint8_t *)&msg_buffer[i + 1]; + data_ptr = (uint8_t *)&msg_buffer[i + 1]; for (uint32_t j = 0; j < MSG_BUFFER_SIZE - 1; j++) { - // Test is launched only if "data_end_estimation" doesn't overflows "msg_buffer" size - if (data_end_estimation < (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]) + // Test is launched only if "data_ptr" doesn't overflows "msg_buffer" size + if (data_ptr < (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]) { RESET_ASSERT(); - remaining_datas = (uintptr_t)data_end_estimation - (uintptr_t)current_msg; - expected_size = MSG_BUFFER_SIZE - remaining_datas; // Call function //--------------- free_space = MsgAlloc_BufferAvailableSpaceComputation(); @@ -313,9 +308,9 @@ void unittest_BufferAvailableSpaceComputation(void) // Verify //--------------- TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(expected_size, free_space); + TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, free_space); - data_end_estimation++; + data_ptr++; } else { @@ -325,7 +320,7 @@ void unittest_BufferAvailableSpaceComputation(void) } } - NEW_TEST_CASE("Oldest task is between `data_end_estimation` and the end of message buffer"); + NEW_TEST_CASE("Oldest task is between `data_ptr` and the end of message buffer"); MsgAlloc_Init(NULL); { // msg_buffer @@ -335,12 +330,12 @@ void unittest_BufferAvailableSpaceComputation(void) // | | // |<-----Free space---->| // | | - // data_end_estimation oldest_task + // data_ptr oldest_task uint32_t free_space = 0; uint32_t expected_size = 0; oldest_msg = (msg_t *)&msg_buffer[1]; - data_end_estimation = (uint8_t *)oldest_msg - 1; + data_ptr = (uint8_t *)oldest_msg - 1; NEW_STEP("Check remaining space computing for all cases"); for (uint16_t i = 0; i < MSG_BUFFER_SIZE - 1; i++) @@ -349,10 +344,10 @@ void unittest_BufferAvailableSpaceComputation(void) // for (uint8_t j = 0; j < 2; j++) for (uint16_t j = i; j < MSG_BUFFER_SIZE - 1; j++) { - if ((uintptr_t)oldest_msg > (uintptr_t)data_end_estimation) + if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) { RESET_ASSERT(); - expected_size = (uintptr_t)oldest_msg - (uintptr_t)data_end_estimation; + expected_size = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; free_space = MsgAlloc_BufferAvailableSpaceComputation(); TEST_ASSERT_FALSE(IS_ASSERT()); TEST_ASSERT_EQUAL(expected_size, free_space); @@ -360,7 +355,7 @@ void unittest_BufferAvailableSpaceComputation(void) // oldest_msg++; oldest_msg = (msg_t *)&msg_buffer[j + 1]; } - data_end_estimation++; + data_ptr++; } } @@ -370,17 +365,17 @@ void unittest_BufferAvailableSpaceComputation(void) // msg_buffer // +-------------------------------------------------------------+ // |-------------------------------------------------------------| - // +-------------^--------------^------------------^-------------+ - // | | | - // <-Free space->| | |<-Free space-> - // | | | - // | | | - // oldest_task current_message data_end_estimation + // +-------------^---------------------------------^-------------+ + // | | + // <-Free space->| |<-Free space-> + // | | + // | | + // oldest_task data_ptr uint32_t free_space = 0; uint32_t expected_size = 0; - data_end_estimation = (uint8_t *)&msg_buffer[1]; - oldest_msg = (msg_t *)data_end_estimation - 1; + data_ptr = (uint8_t *)&msg_buffer[1]; + oldest_msg = (msg_t *)data_ptr - 1; NEW_STEP("Check remaining space computing for all cases"); // Test remaining space computing for all cases @@ -390,10 +385,10 @@ void unittest_BufferAvailableSpaceComputation(void) oldest_msg = (msg_t *)&msg_buffer[1]; for (uint16_t j = 0; j < MSG_BUFFER_SIZE - 1; j++) { - if ((uintptr_t)oldest_msg < (uintptr_t)data_end_estimation) + if ((uintptr_t)oldest_msg < (uintptr_t)data_ptr) { RESET_ASSERT(); - expected_size = (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_end_estimation; + expected_size = (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr; expected_size += (uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]; free_space = MsgAlloc_BufferAvailableSpaceComputation(); @@ -402,7 +397,7 @@ void unittest_BufferAvailableSpaceComputation(void) } oldest_msg = (msg_t *)&msg_buffer[j + 1]; } - data_end_estimation++; + data_ptr++; } } } @@ -501,7 +496,7 @@ void unittest_OldestMsgCandidate(void) for (uint8_t i = 0; i < CASE; i++) { - current_msg = (msg_t *)&msg_buffer[cases[i][0]]; + data_ptr = (uint8_t *)&msg_buffer[cases[i][0]]; oldest_msg = (msg_t *)&msg_buffer[cases[i][1]]; oldest_stack_msg_pt = (msg_t *)&msg_buffer[cases[i][2]]; expected_oldest_msg = (msg_t *)&msg_buffer[cases[i][3]]; @@ -512,53 +507,6 @@ void unittest_OldestMsgCandidate(void) } } -void unittest_ValidDataIntegrity(void) -{ - NEW_TEST_CASE("Check data integrity"); - MsgAlloc_Init(NULL); - { - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------|Header|----------------------------------------------| - // +-------------------------------------------------------------+ - // - // msg_buffer ending state (idem init) - // +-------------------------------------------------------------+ - // |-------|Header|----------------------------------------------| - // +-------------------------------------------------------------+ - // - - uint8_t expected_msg_buffer[MSG_BUFFER_SIZE]; - mem_clear_needed = 0; - - memset((void *)&msg_buffer[0], 0xAA, MSG_BUFFER_SIZE); - memset((void *)&expected_msg_buffer[0], 0xAA, MSG_BUFFER_SIZE); - RESET_ASSERT(); - MsgAlloc_ValidDataIntegrity(); - - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - NEW_STEP("Check message buffered has not been modified"); - TEST_ASSERT_EQUAL_MEMORY(expected_msg_buffer, msg_buffer, MSG_BUFFER_SIZE); - } - - NEW_TEST_CASE("Verify memory cleaning"); - MsgAlloc_Init(NULL); - { - mem_clear_needed = 1; - current_msg = (msg_t *)&msg_buffer[0]; - data_end_estimation = (uint8_t *)(current_msg + 1); - RESET_ASSERT(); - MsgAlloc_ValidDataIntegrity(); - - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - NEW_STEP("Check memory is cleared"); - TEST_ASSERT_EQUAL(0, mem_clear_needed); - // No more TEST_ASSERT needed as MsgAlloc_ClearMsgSpace has already been tested - } -} - void unittest_ClearMsgSpace(void) { NEW_TEST_CASE("There is not enough space in memory"); diff --git a/test/test_msg_alloc/unit_test_mem_alloc_tx.c b/test/test_msg_alloc/unit_test_mem_alloc_tx.c index 3d08fb60f..ecf3df379 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_tx.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_tx.c @@ -31,12 +31,9 @@ typedef struct extern memory_stats_t *mem_stat; extern volatile bool reset_needed; extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; -extern volatile msg_t *current_msg; extern volatile uint8_t *data_ptr; -extern volatile uint8_t *data_end_estimation; extern volatile msg_t *oldest_msg; extern volatile msg_t *used_msg; -extern volatile uint8_t mem_clear_needed; extern volatile header_t *copy_task_pointer; extern volatile msg_t *msg_tasks[MAX_MSG_NB]; extern volatile uint16_t msg_tasks_stack_id; @@ -94,12 +91,10 @@ void unittest_SetTxTask_buffer_full() } } -void unittest_SetTxTask_Tx_too_long_1() +void unittest_SetTxTask_Tx_too_long() { //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Tx size > Rx size received \n" - "There is already a task in memory\n"); + NEW_TEST_CASE("Tx message doesn't fit in msg buffer"); MsgAlloc_Init(NULL); { error_return_t result; @@ -110,899 +105,35 @@ void unittest_SetTxTask_Tx_too_long_1() luos_localhost_t localhost = EXTERNALHOST; uint8_t ack; - // Tx message size is greater than Rx size currently received. - // Tx message doesn't fit in msg buffer. - // There is already a Task , function should return FAILED - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-------------------------------------|Rx|--------|Task|------| - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------------|Rx|--------|Task|------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 20 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - sizeof(header_t)]; // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Rx size received > Tx size\n" - "There is already a task in memory\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Rx size currently received size is greater than Tx message. - // Tx message doesn't fit in msg buffer. - // There is already a Task , function should return FAILED - // - // msg_buffer init state (impossible state) - // +-------------------------------------------------------------+ - // |-------------------------------------------------|Task|------| - // |-------------------------------------|Rx | - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------|Task|------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = 51; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 51 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 80 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - sizeof(header_t)]; // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Rx size received = Tx size\n" - "There is already a task in memory\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size = Rx size currently received. - // Tx message doesn't fit in msg buffer. - // There is already a Task , function should return FAILED - // - // msg_buffer init state (impossible state) - // +-------------------------------------------------------------+ - // |-------------------------------------------------|Task|------| - // |-------------------------------------| Rx | - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------|Task|------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = tx_size; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 50 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 50 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - sizeof(header_t)]; // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} - -void unittest_SetTxTask_Tx_too_long_2() -{ - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Tx size > Rx size received\n" - "There is already a task at begin of message buffer\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size is greater than Rx size currently received. - // Tx message doesn't fit in msg buffer. - // There is already a Task at beginning, function should return FAILED - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-----|Task|-------------------------------|Rx|---------------| - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-----|Task|-------------------------------|Rx|---------------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 20 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_START]; // We need 70 bytes but there are only 10 bytes left in msg buffer - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Rx size received > Tx size\n" - "There is already a task at begin of message buffer\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Rx size currently received is greater than Tx message size. - // Tx message doesn't fit in msg buffer. - // There is already a Task at beginning, function should return FAILED - // - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-----|Task|--------------------------------------------------| - // |-------------------------------------|Rx | - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-----|Task|--------------------------------------------------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = 51; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 51 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 80 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_START]; // We need 70 bytes but there are only 10 bytes left in msg buffer - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer\n" - "Rx size received = Tx size\n" - "There is already a task at begin of message buffer\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size = Rx size currently received. - // Tx message doesn't fit in msg buffer. - // There is already a Task , function should return FAILED - // - // msg_buffer init state (impossible state) - // +-------------------------------------------------------------+ - // |-----|Task|--------------------------------------------------| - // |-------------------------------------|Rx | - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |-------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-----|Task|--------------------------------------------------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = tx_size; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 50 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 50 bytes - oldest_msg = (msg_t *)&msg_buffer[MSG_START]; // We need 70 bytes but there are only 10 bytes left in msg buffer - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED when there is already a task at begin of message buffer"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} -void unittest_SetTxTask_Tx_too_long_3() -{ - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in message buffer\n" - "Tx size > Rx size received \n" - "There is space at begin of message buffer\n"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size > Rx size currently received. - // Tx message doesn't fit in msg buffer. - // There is space : move messages and create Tx Task - // - // Rx message to copy - // +-------------------------------------------------------------+ - // |--------------------------------------------------|Rx|-------| - // +-------------------------------------------------------------+ - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |--------------------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // | Tx |Rx|---------------------------------------| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - tx_task_t expected_tx_task; - msg_t *expected_current_msg; - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[80]; // There is a task at beginning of msg_buffer - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)msg_buffer + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)msg_buffer; - expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)msg_buffer, tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, msg_buffer, tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, msg_buffer + tx_size, rx_bytes_received); - } -} -void unittest_SetTxTask_Rx_too_long_1() -{ - //************************************************************** - NEW_TEST_CASE("Tx message fits in msg buffer\n" - "Tx size + Rx size received doesn't fit msg buffer\n" - "Tx size > Rx size received \n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size is greater than Rx size currently received. - // Tx message fits in msg buffer. - // Tx message + Rx Tx message does not fit in msg buffer. - // - // msg_buffer init state (impossible state) - // +-------------------------------------------------------------+ - // |-------------------------------| Current Rx |---|Task|-----| - // +-------------------------------------------------------------+ - // - // Tx message + Full Rx Message - // +-------------------------------------------------------------+ - // |-------------------------------| Tx | Full Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------| Current Rx |---|Task|-----| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 30; - uint16_t rx_bytes_received = 10; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + rx_bytes_received + 1)]; // There are only 61 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 10 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 30 bytes - oldest_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message fits in msg buffer\n" - "Tx size + Rx size received doesn't fit msg buffer\n" - "Rx size received > Tx size \n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Rx size currently receivedis greater than Tx message size. - // Tx message fits in msg buffer. - // Tx message + Rx Tx message does not fit in msg buffer. - // - // - // Tx message + Full Rx Message - // +-------------------------------------------------------------+ - // |-----------------------------------| Tx | FULL Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-----------------------------------|Current Rx|------------| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 100; - uint16_t rx_bytes_received = 51; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + rx_bytes_received + 1)]; // There are only 101 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 51 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 100 bytes - oldest_msg = (msg_t *)((uintptr_t)current_msg + rx_bytes_received); // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - - //************************************************************** - NEW_TEST_CASE("Tx message fits in msg buffer\n" - "Tx size + Rx size received doesn't fit msg buffer\n" - "Rx size received = Tx size \n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Rx size currently receivedis greater than Tx message size. - // Tx message fits in msg buffer. - // Tx message + Rx Tx message does not fit in msg buffer. - // - // - // Tx message + Full Rx Message - // +-------------------------------------------------------------+ - // |--------------------------------------------------| Tx | Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |--------------------------------------------------| Rx |- | - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 100; - uint16_t rx_bytes_received = tx_size; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + rx_bytes_received + 1)]; // There are only 100 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 50 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 100 bytes - oldest_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} -void unittest_SetTxTask_Rx_too_long_2() -{ - //************************************************************** - NEW_TEST_CASE("Tx message fits in msg buffer\n" - "Tx size + Rx size received doesn't fit msg buffer\n" - "There is a Task \n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // - // msg_buffer init state (impossible state) - // +-------------------------------------------------------------+ - // |-------------------------------| Current Rx |---|Task|-----| - // +-------------------------------------------------------------+ - // - // Tx message + Full Rx Message - // +-------------------------------------------------------------+ - // |-------------------------------| Tx | Full Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-------------------------------| Current Rx |---|Task|-----| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 30; - uint16_t rx_bytes_received = 10; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + rx_bytes_received + 1)]; // There are only 61 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 10 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 30 bytes - oldest_msg = (msg_t *)((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - sizeof(header_t)); // There is a task - tx_tasks_stack_id = 1; - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns FAILED when Tx + Rx size doesn't fit msg buffer and a task is in requested memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} - -void unittest_SetTxTask_Rx_too_long_3() -{ - //************************************************************** - NEW_TEST_CASE("Tx message fits in msg buffer\n" - "Tx size + Rx size received doesn't fit msg buffer\n" - "There is already a task at begin of message buffer\n"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-----|Task|------------------------| Current Rx |----| - // +-------------------------------------------------------------+ - // - // Message to copy - // +-------------------------------------------------------------+ - // |-----------------------------------| Tx | Current Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |-----|Task|------------------------| Current Rx |----| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 30; - uint16_t rx_bytes_received = 10; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 1)]; // There are only 51 bytes left in msg buffer - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 10 bytes - data_end_estimation = (uint8_t *)current_msg + rx_size; // Rx message = 30 bytes - oldest_msg = (msg_t *)&msg_buffer[0]; // There is a task at beginning of buffer - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns FAILED when Tx + Rx size doesn't fit msg buffer and a task is in memory beginning"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} -void unittest_SetTxTask_Rx_too_long_4() -{ - //************************************************************** - NEW_TEST_CASE("Tx + Rx messages doesn't in message buffer\n" - "There is space at begin of message buffer\n"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // msg_buffer init state - // +-------------------------------------------------------------+ - // |-----------------------------------| Tx | Current Rx | - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // | Current Rx |--------------| Tx |--| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - tx_task_t expected_tx_task; - msg_t *expected_current_msg; - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 1)]; // There are only 51 bytes left in msg buffer - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[80]; // No task - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)msg_buffer); // Rx message will be copied at beginning of message buffer - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)msg_buffer; - expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 1)], tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, &msg_buffer[MSG_BUFFER_SIZE - (tx_size + 1)], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, msg_buffer, rx_bytes_received); - } -} -void unittest_SetTxTask_Task_already_exists() -{ - //************************************************************** - NEW_TEST_CASE("Tx + Rx messages fit in message buffer\n" - "There is already a task in memory\n"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // msg_buffer init state - // +-------------------------------------------------------------+ - // |------------------------| Rx |------|Task|-------------------| - // +-------------------------------------------------------------+ + // Tx message doesn't fit in msg buffer function should assert // // Tx message to copy // +-------------------------------------------------------------+ - // |------------------------| Tx |----------------------| + // |---|other msgs|-----------------------------| Tx | // +-------------------------------------------------------------+ // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |------------------------| Rx |----|Task|---------------------| - // +-------------------------------------------------------------+ - // | - // FAILED : there is a task // Init variables //--------------- - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[rx_size + 1]; // There is a Task - tx_tasks_stack_id = 1; + uint16_t tx_size = 50; + data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer + oldest_msg = (msg_t *)&msg_buffer[10]; // There is a task + tx_tasks_stack_id = 1; // Call function and Verify //--------------------------- RESET_ASSERT(); - NEW_STEP("Check function returns FAILED when a task is in memory"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); + MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack); + NEW_STEP("Check assert has occured"); + TEST_ASSERT_TRUE(IS_ASSERT()); } } -void unittest_SetTxTask_copy_OK() +void unittest_SetTxTask_Tx_overflow() { //************************************************************** - NEW_TEST_CASE("Tx and Rx messages fit in message buffer\n" - "Tx size > Rx size received \n"); + NEW_TEST_CASE("Tx message doesn't fit in message buffer\n" + "There is space at begin of message buffer"); MsgAlloc_Init(NULL); memset((void *)msg_buffer, 0, sizeof(msg_buffer)); { @@ -1014,173 +145,33 @@ void unittest_SetTxTask_copy_OK() luos_localhost_t localhost = EXTERNALHOST; uint8_t ack; - // Tx message size > Rx size currently received. - // Tx and Rx messages fit in msg buffer. - // There is space : move messages and create Tx Task - // - // Tx message + Rx message to copy - // +-------------------------------------------------------------+ - // |----------------------------------| Rx |---------------------| - // |----------------------------------| Tx |-----------------| - // +-------------------------------------------------------------+ + // Tx message doesn't fit in msg buffer. + // There is space in the begining of the buffer: move messages and create Tx Task // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - tx_task_t expected_tx_task; - msg_t *expected_current_msg; - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; - uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); - } - - //************************************************************** - NEW_TEST_CASE("Tx and Rx messages fit in message buffer\n" - "Rx size received > Tx size\n"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Rx size currently received > Tx message size. - // Tx and Rx messages fit in msg buffer. - // There is space : move messages and create Tx Task // - // Tx message + Rx message to copy + // Tx message to copy // +-------------------------------------------------------------+ - // |----------------------------------| Rx |-----------------| - // |----------------------------------| Tx |---------------------| + // |--------------------------------------------------| Tx | // +-------------------------------------------------------------+ // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +-------------------------------------------------------------+ - // | - // Padding Added - // Init variables //--------------- tx_task_t expected_tx_task; - msg_t *expected_current_msg; uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = 51; + uint16_t tx_size = 50; uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - uint16_t padding; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 80 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 51 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * rx_size + 1]; // No Task - padding = rx_bytes_received - tx_size; // Add padding (1 byte) - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size + padding); // Rx message will be copied after Tx message with padding - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); + ack = 0; + localhost = 0; + service_pt = (service_t *)msg_buffer; // Fake service value + data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer + oldest_msg = (msg_t *)&msg_buffer[80]; + tx_tasks_stack_id = 1; + + expected_data_ptr = (uint8_t *)((uintptr_t)msg_buffer + tx_size); expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.data_pt = (uint8_t *)msg_buffer; expected_tx_task.service_pt = service_pt; expected_tx_task.localhost = localhost; @@ -1190,15 +181,6 @@ void unittest_SetTxTask_copy_OK() tx_message[i] = i; } - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - // Call function and Verify //--------------------------- RESET_ASSERT(); @@ -1210,12 +192,8 @@ void unittest_SetTxTask_copy_OK() // Check pointers NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); NEW_STEP("Check \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); // Check Tx Tasks tx_tasks_stack_id--; @@ -1226,7 +204,7 @@ void unittest_SetTxTask_copy_OK() NEW_STEP("Check Tx task \"localhost\" is correctly computed"); TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); + TEST_ASSERT_EQUAL((uint8_t *)msg_buffer, tx_tasks[tx_tasks_stack_id].data_pt); #ifdef UNIT_TEST_DEBUG printf("\n"); @@ -1239,16 +217,14 @@ void unittest_SetTxTask_copy_OK() // Check messages NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size + padding, rx_bytes_received); + TEST_ASSERT_EQUAL_MEMORY(tx_message, msg_buffer, tx_size - CRC_SIZE); } - +} +void unittest_SetTxTask_Tx_fit() +{ //************************************************************** - NEW_TEST_CASE("Tx and Rx messages fit in message buffer\n" - "Tx size = Rx size received\n"); + NEW_TEST_CASE("Tx message fit in msg buffer"); MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); { error_return_t result; uint8_t *data; @@ -1258,116 +234,35 @@ void unittest_SetTxTask_copy_OK() luos_localhost_t localhost = EXTERNALHOST; uint8_t ack; - // Tx message size = Rx size currently received. - // Tx and Rx messages fit in msg buffer. - // There is space : move messages and create Tx Task + // Tx message fits in msg buffer. // - // Tx message + Rx message to copy + // Tx message fit // +-------------------------------------------------------------+ - // |----------------------------------| Rx |-----------------| - // |----------------------------------| Tx |-----------------| + // |-------------------------------| Tx |------| // +-------------------------------------------------------------+ // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |--------| - // +-------------------------------------------------------------+ - // | - // Padding Added // Init variables //--------------- - tx_task_t expected_tx_task; - msg_t *expected_current_msg; - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 80; - uint16_t rx_bytes_received = 50; - uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - uint16_t padding; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 80 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 51 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * rx_size + 1]; // No Task - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } + uint16_t tx_size = 50; + data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 20)]; // There are 70 bytes left in msg buffer // Rx message = 30 bytes + oldest_msg = (msg_t *)((uintptr_t)data_ptr - tx_size); // There is a task before + tx_tasks_stack_id = 1; // Call function and Verify //--------------------------- RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); + NEW_STEP("Function returns SUCCEED"); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); NEW_STEP("Check NO assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); } - +} +void unittest_SetTxTask_Task_already_exists() +{ //************************************************************** - NEW_TEST_CASE("Tx and Rx messages fit in message buffer\n" - "Rx size received less than a header\n"); + NEW_TEST_CASE("Tx messages fit in message buffer, but there is already a task in memory"); MsgAlloc_Init(NULL); memset((void *)msg_buffer, 0, sizeof(msg_buffer)); { @@ -1379,110 +274,30 @@ void unittest_SetTxTask_copy_OK() luos_localhost_t localhost = EXTERNALHOST; uint8_t ack; - // Rx size sizeof(header_t) - // Tx and Rx messages fit in msg buffer. - // There is space : move messages and create Tx Task // - // Tx message + Rx message to copy + // Tx message hit the next task // +-------------------------------------------------------------+ - // |----------------------------------| Rx |---------------------| - // |----------------------------------| Tx |-----------------| + // |------------------------| Tx |Task|--------------------| // +-------------------------------------------------------------+ // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +-------------------------------------------------------------+ // Init variables //--------------- - tx_task_t expected_tx_task; - msg_t *expected_current_msg; - uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 30; - uint16_t rx_bytes_received = sizeof(header_t) - 1; - uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - ack = 0; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received < header - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; - expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } + uint16_t tx_size = 50; + ack = 0; + localhost = 0; + service_pt = (service_t *)msg_buffer; // Fake service value + data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty + oldest_msg = (msg_t *)&msg_buffer[(uintptr_t)data_ptr + 1]; // There is a Task + tx_tasks_stack_id = 1; // Call function and Verify //--------------------------- RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); + MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack); + NEW_STEP("Check assert has occured"); TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); } } @@ -1520,31 +335,21 @@ void unittest_SetTxTask_ACK() // Init variables //--------------- tx_task_t expected_tx_task; - msg_t *expected_current_msg; uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50 + sizeof(ack); - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; + uint16_t tx_size = 50 + sizeof(ack); uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - ack = 55; - localhost = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 51 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); + ack = 55; + localhost = 0; + service_pt = (service_t *)msg_buffer; // Fake service value + data = (uint8_t *)tx_message; // Tx message = 51 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty + oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task + tx_tasks_stack_id = 1; + + expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); // Rx message will be copied after Tx message expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; expected_tx_task.localhost = localhost; @@ -1555,15 +360,6 @@ void unittest_SetTxTask_ACK() } tx_message[tx_size] = ack; - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - // Call function and Verify //--------------------------- RESET_ASSERT(); @@ -1575,12 +371,8 @@ void unittest_SetTxTask_ACK() // Check pointers NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); NEW_STEP("Check \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); // Check Tx Tasks tx_tasks_stack_id--; @@ -1607,8 +399,6 @@ void unittest_SetTxTask_ACK() TEST_ASSERT_EQUAL(ack, msg_buffer[MSG_START + tx_size - 1]); // Ack NEW_STEP("Check Tx message integrity : correct values in correct memory position"); TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE - 1); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); } } @@ -1647,33 +437,23 @@ void unittest_SetTxTask_internal_localhost() // Init variables //--------------- tx_task_t expected_tx_task; - msg_t *expected_current_msg; uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; + uint16_t tx_size = 50; uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - - ack = 0; - localhost = LOCALHOST; // Localhost : to fill msg_task - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - msg_tasks_stack_id = 0; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); + + ack = 0; + localhost = LOCALHOST; // Localhost : to fill msg_task + service_pt = (service_t *)msg_buffer; // Fake service value + data = (uint8_t *)tx_message; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty + oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task + tx_tasks_stack_id = 1; + msg_tasks_stack_id = 0; + + expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; expected_tx_task.localhost = localhost; @@ -1683,15 +463,6 @@ void unittest_SetTxTask_internal_localhost() tx_message[i] = i; } - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - // Call function and Verify //--------------------------- RESET_ASSERT(); @@ -1706,12 +477,8 @@ void unittest_SetTxTask_internal_localhost() NEW_STEP("Check \"message tasks stack id\" = 1"); TEST_ASSERT_EQUAL(1, msg_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); NEW_STEP("Check \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); // Check Tx Tasks is void tx_tasks_stack_id--; @@ -1740,8 +507,6 @@ void unittest_SetTxTask_internal_localhost() // Check messages NEW_STEP("Check Tx message integrity : correct values in correct memory position"); TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); } } @@ -1780,33 +545,23 @@ void unittest_SetTxTask_multihost() // Init variables //--------------- tx_task_t expected_tx_task; - msg_t *expected_current_msg; uint8_t *expected_data_ptr; - uint8_t *expected_data_end_estimation; - uint16_t tx_size = 50; - uint16_t rx_size = 20; - uint16_t rx_bytes_received = 15; + uint16_t tx_size = 50; uint8_t tx_message[tx_size]; - uint8_t rx_message[tx_size]; - uint8_t *init_rx_message; - - ack = 0; - localhost = MULTIHOST; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - current_msg = (msg_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - data_end_estimation = (uint8_t *)current_msg + rx_size; // Complete Rx message = 20 bytes - data_ptr = (uint8_t *)current_msg + rx_bytes_received; // Rx message already received = 15 bytes - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - msg_tasks_stack_id = 0; - - expected_current_msg = (msg_t *)((uintptr_t)current_msg + tx_size); // Rx message will be copied after Tx message - expected_data_ptr = (uint8_t *)((uintptr_t)expected_current_msg + rx_bytes_received); - expected_data_end_estimation = (uint8_t *)((uintptr_t)expected_current_msg + rx_size); + + ack = 0; + localhost = MULTIHOST; + service_pt = (service_t *)msg_buffer; // Fake service value + data = (uint8_t *)tx_message; // Tx message = 50 bytes + data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty + oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task + tx_tasks_stack_id = 1; + msg_tasks_stack_id = 0; + + expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)current_msg; + expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; expected_tx_task.localhost = localhost; @@ -1816,15 +571,6 @@ void unittest_SetTxTask_multihost() tx_message[i] = i; } - // Init Rx message - init_rx_message = (uint8_t *)current_msg; - for (size_t i = 0; i < rx_bytes_received; i++) - { - rx_message[i] = i + 100; - *init_rx_message = i + 100; - init_rx_message++; - } - // Call function and Verify //--------------------------- RESET_ASSERT(); @@ -1839,12 +585,8 @@ void unittest_SetTxTask_multihost() NEW_STEP("Check \"message tasks stack id\" = 1"); TEST_ASSERT_EQUAL(1, msg_tasks_stack_id); - NEW_STEP("Check \"current message\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_current_msg, current_msg); NEW_STEP("Check \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - NEW_STEP("Check \"data end estimation\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_end_estimation, data_end_estimation); // Check Tx Tasks AND Message Tasks tx_tasks_stack_id--; @@ -1871,7 +613,5 @@ void unittest_SetTxTask_multihost() // Check messages NEW_STEP("Check Tx message integrity : correct values in correct memory position"); TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - NEW_STEP("Check Rx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(rx_message, (uint8_t *)&msg_buffer[MSG_START] + tx_size, rx_bytes_received); } } From b245d60b0687c561f88f2d59b721c8778f42a3f2 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 14 Apr 2023 15:17:38 +0200 Subject: [PATCH 041/198] Assert if buffer full only on RX. TX can wait to load the buffer again... --- engine/IO/src/luos_io.c | 4 ++-- engine/IO/src/msg_alloc.c | 11 ++++++++++- test/test_msg_alloc/unit_test_mem_alloc_tx.c | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 11f8188fa..1390d7ae8 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -303,7 +303,7 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) continue; } - // when Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. + // When Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. // We just have to wait the end of the treatment of the entire branch uint32_t start_tick = LuosHAL_GetSystick(); while (Robus_Busy()) @@ -311,7 +311,7 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) LuosIO_Loop(); if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) { - // topology detection is too long, we should abort it and restart + // Topology detection is too long, we should abort it and restart return FAILED; } } diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 813138d09..0bb97a608 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -385,7 +385,11 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size) returned_ptr = (uint8_t *)data_ptr; } // Check if we have space for the message, assert if we don't - LUOS_ASSERT(MsgAlloc_CheckMsgSpace((void *)returned_ptr, (void *)((uintptr_t)returned_ptr + data_size)) == SUCCEED); + if (MsgAlloc_CheckMsgSpace((void *)returned_ptr, (void *)((uintptr_t)returned_ptr + data_size)) != SUCCEED) + { + // We don't have the space to store the message, return NULL to indicate that there is no more space + return NULL; + } // We consider this space as occupied, move data to the next available space data_ptr = (uint8_t *)((uintptr_t)returned_ptr + data_size); @@ -1126,6 +1130,11 @@ error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t LuosHAL_SetIrqState(false); // Alloc the space for the message tx_msg = (void *)MsgAlloc_Alloc(size); + if (tx_msg == NULL) + { + MSGALLOC_MUTEX_UNLOCK + return FAILED; + } LuosHAL_SetIrqState(true); // Copy the tx msg into the buffer diff --git a/test/test_msg_alloc/unit_test_mem_alloc_tx.c b/test/test_msg_alloc/unit_test_mem_alloc_tx.c index ecf3df379..ae841d619 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_tx.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_tx.c @@ -124,9 +124,8 @@ void unittest_SetTxTask_Tx_too_long() // Call function and Verify //--------------------------- RESET_ASSERT(); - MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack); NEW_STEP("Check assert has occured"); - TEST_ASSERT_TRUE(IS_ASSERT()); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); } } void unittest_SetTxTask_Tx_overflow() From 43a42b56eb616671e6983707ad0bd2cde46eae5d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 17 Apr 2023 14:00:09 +0200 Subject: [PATCH 042/198] Fix addressing generation at detection start. --- engine/core/src/luos_engine.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 0312fdfbe..307106115 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -119,7 +119,7 @@ void Luos_Loop(void) { if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) { - // be sure the content of this message need to be managed by Luos and do it if it is. + // Be sure the content of this message need to be managed by Luos and do it if it is. if (Luos_MsgHandler((service_t *)oldest_service, returned_msg) == SUCCEED) { // Luos CMD are generic for all services and have to be executed only once @@ -171,6 +171,11 @@ void Luos_Loop(void) if (Flag_DetectServices == 1) { + + // Set the detection launcher id to 1 + detection_service->id = 1; + // Generate the filters + Service_GenerateId(1); RoutingTB_DetectServices(detection_service); Flag_DetectServices = 0; } @@ -793,19 +798,23 @@ void Luos_Detect(service_t *service) if (Node_GetState() < LOCAL_DETECTION) { - // Reset filters - Filter_IdInit(); - // Set the detection launcher id to 1 - service->id = 1; - // Update the filter just to accept our detector id - Filter_AddServiceId(1, 1); + if (Node_GetState() == NO_DETECTION) + { + // We don't have any ID yet, let's create one at least for the detector + // Reset filters + Filter_IdInit(); + // Set the detection launcher id to 1 + service->id = 1; + // Update the filter just to accept our detector id + Filter_AddServiceId(1, 1); + } // Send ask detection message detection_service = service; detect_msg.header.target_mode = SERVICEIDACK; detect_msg.header.cmd = ASK_DETECTION; detect_msg.header.size = 0; - detect_msg.header.target = 1; + detect_msg.header.target = service->id; Luos_SendMsg(service, &detect_msg); } } From 5f118f34930886aac469447838de2f8a6142cd6e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 17 Apr 2023 14:06:19 +0200 Subject: [PATCH 043/198] Fix double detection process occurring at the same time, fix #229 --- engine/core/src/luos_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 307106115..79589e69a 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -172,12 +172,12 @@ void Luos_Loop(void) if (Flag_DetectServices == 1) { + Flag_DetectServices = 0; // Set the detection launcher id to 1 detection_service->id = 1; // Generate the filters Service_GenerateId(1); RoutingTB_DetectServices(detection_service); - Flag_DetectServices = 0; } } /****************************************************************************** From 083b3b63a3ef7f221a857ffdbdd5742d02a70036 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Apr 2023 11:33:34 +0200 Subject: [PATCH 044/198] Fix collision management --- engine/IO/src/luos_phy.c | 3 ++- network/robus/src/reception.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index a97396dce..6b072023b 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -55,7 +55,8 @@ luos_phy_ctx_t phy_ctx; void Phy_Init(void) { // Put everything to 0 - memset((void *)&phy_ctx, 0, sizeof(phy_ctx)); + memset((void *)phy_ctx.phy_job, 0, sizeof(phy_ctx.phy_job)); + phy_ctx.phy_job_nb = 0; } /****************************************************************************** diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 6b15c4be5..2b16e373c 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -229,6 +229,7 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) // Switch to get header. ctx.rx.callback = Recep_GetHeader; ctx.tx.status = TX_NOK; + data_count = 0; } else { @@ -251,7 +252,6 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) // Switch to get header. ctx.rx.callback = Recep_GetHeader; } - return; } } } @@ -290,6 +290,9 @@ _CRITICAL void Recep_Reset(void) { luos_phy_t *phy_robus = Robus_GetPhy(); phy_robus->received_data = 0; + phy_robus->rx_size = 0; + phy_robus->rx_keep = true; + phy_robus->rx_alloc_job = false; crc_val = 0xFFFF; ctx.rx.status.rx_framing_error = false; ctx.rx.callback = Recep_GetHeader; From 5619724bba89f21b75ed199aeae4bf4e298b23c5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Apr 2023 11:34:22 +0200 Subject: [PATCH 045/198] [Gate] Add a small check if a service is excluded during detection. --- tool_services/gate/TinyJSON/convert.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index da01d432a..daec76345 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -931,6 +931,11 @@ void Convert_ExcludedServiceData(service_t *service) char json[300]; search_result_t result; RTFilter_ID(RTFilter_Reset(&result), service->dead_service_spotted); + if (result.result_nbr == 0) + { + // This can happen if a service is excluded during the detection. + return; + } sprintf(json, "{\"dead_service\":\"%s\"}\n", result.result_table[0]->alias); // Send the message to pipe PipeLink_Send(service, json, strlen(json)); From b279fdf14ca4026eaae601a4fd642a1532c58dd5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 17 Apr 2023 19:32:39 +0200 Subject: [PATCH 046/198] Remove verbose mode --- engine/IO/inc/msg_alloc.h | 2 +- engine/IO/src/msg_alloc.c | 5 +---- engine/core/inc/luos_engine.h | 1 - engine/core/inc/struct_luos.h | 2 -- engine/core/src/luos_engine.c | 11 ---------- engine/core/src/node.c | 11 ---------- engine/core/src/routing_table.c | 2 -- network/robus/src/robus.c | 2 +- network/robus/src/transmission.c | 9 ++++----- .../unit_test_mem_alloc_generic.c | 20 ++++++------------- test/test_msg_alloc/unit_test_mem_alloc_tx.c | 17 +--------------- tool_services/inspector/data_manager.c | 15 -------------- 12 files changed, 14 insertions(+), 83 deletions(-) diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index 39b50bbd2..8e86aef14 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -55,7 +55,7 @@ void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg); error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack); void MsgAlloc_PullMsgFromTxTask(void); void MsgAlloc_PullServiceFromTxTask(uint16_t service_id); -error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost); +error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size); error_return_t MsgAlloc_TxAllComplete(void); #endif /* _MSGALLOC_H_ */ diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 0bb97a608..61f70b73e 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -74,7 +74,6 @@ typedef struct uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ uint16_t size; /*!< size of the data. */ service_t *service_pt; /*!< Pointer to the transmitting service. */ - uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* * Variables @@ -1152,7 +1151,6 @@ error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t tx_tasks[tx_tasks_stack_id].size = size; tx_tasks[tx_tasks_stack_id].data_pt = (uint8_t *)tx_msg; tx_tasks[tx_tasks_stack_id].service_pt = service_pt; - tx_tasks[tx_tasks_stack_id].localhost = (localhost != EXTERNALHOST); tx_tasks_stack_id++; LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); LuosHAL_SetIrqState(true); @@ -1309,7 +1307,7 @@ void MsgAlloc_PullServiceFromTxTask(uint16_t service_id) * @return error_return_t : Fail is there is no more message available. * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size, uint8_t *localhost) +_CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size) { LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); @@ -1332,7 +1330,6 @@ _CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **da *data = tx_tasks[0].data_pt; *size = tx_tasks[0].size; *service_pt = tx_tasks[0].service_pt; - *localhost = tx_tasks[0].localhost; LuosHAL_SetIrqState(true); return SUCCEED; } diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index b16056c66..86246ebdf 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -33,7 +33,6 @@ void Luos_ResetStatistic(void); // ***************** Node management ***************** uint32_t Luos_GetSystick(void); bool Luos_IsDetected(void); -void Luos_SetVerboseMode(uint8_t mode); void Luos_SetFilterState(uint8_t state, service_t *service); // ***************** Package management ***************** diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index c102c23b7..7754362a6 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -37,8 +37,6 @@ typedef enum BOOTLOADER_CMD, BOOTLOADER_RESP, - // Verbose command - VERBOSE, // compatibility area // LUOS_LAST_RESERVED_CMD = 42 diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 79589e69a..b88bd5690 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -232,12 +232,6 @@ static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t return SUCCEED; } break; - case VERBOSE: - if (size == 1) - { - return SUCCEED; - } - break; case BOOTLOADER_CMD: return SUCCEED; break; @@ -372,11 +366,6 @@ static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) service->auto_refresh.last_update = LuosHAL_GetSystick(); consume = SUCCEED; break; - case VERBOSE: - // this node should send messages to all the network - Luos_SetVerboseMode(input->data[0]); - consume = SUCCEED; - break; case BOOTLOADER_CMD: // send data to the bootloader LuosBootloader_MsgHandler(input); diff --git a/engine/core/src/node.c b/engine/core/src/node.c index d1fabf312..491161c32 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -143,15 +143,4 @@ void Luos_SetFilterState(uint8_t state, service_t *service) { // Enable or disable the filter for a given service // This function have been disabled since 3.0.0 -} - -/****************************************************************************** - * @brief Function that changes the verbose mode - * @param mode : Put to "1" if we want to enable the verbose mode, "0" to disable - * @return None - ******************************************************************************/ -void Luos_SetVerboseMode(uint8_t mode) -{ - // Enable or disable the verbose mode - // This function have been disabled since 3.0.0 } \ No newline at end of file diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 71306facb..228f9c1c8 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -363,8 +363,6 @@ void RoutingTB_SendEndDetection(service_t *service) ******************************************************************************/ void RoutingTB_DetectServices(service_t *service) { - // Desactivate verbose mode - Luos_SetVerboseMode(false); // Starts the topology detection. uint16_t nb_node = LuosIO_TopologyDetection(service); // Clear data reception state diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 0a5c5711f..6a313d442 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -81,7 +81,7 @@ error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) uint16_t data_size = 0; uint16_t crc_val = 0xFFFF; // *************************************************** - // don't send luos messages if network is down + // Don't send luos messages if network is down // *************************************************** if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Node_GetState() != DETECTION_OK)) { diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 7a61ab13b..fb326df39 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -131,9 +131,8 @@ _CRITICAL void Transmit_Process() { uint8_t *data = 0; uint16_t size; - uint8_t localhost; service_t *service_pt; - if ((MsgAlloc_GetTxTask(&service_pt, &data, &size, &localhost) == SUCCEED) && (Transmit_GetLockStatus() == false)) + if ((MsgAlloc_GetTxTask(&service_pt, &data, &size) == SUCCEED) && (Transmit_GetLockStatus() == false)) { // We have something to send // Check if we already try to send it multiple times and save it on stats if it is @@ -149,7 +148,7 @@ _CRITICAL void Transmit_Process() // Remove all transmist messages of this specific target MsgAlloc_PullServiceFromTxTask((uint16_t)(((msg_t *)data)->header.target)); // Try to get a tx_task for another service - if (MsgAlloc_GetTxTask(&service_pt, &data, &size, &localhost) == FAILED) + if (MsgAlloc_GetTxTask(&service_pt, &data, &size) == FAILED) { // Nothing to transmit anymore, just exit. return; @@ -158,9 +157,9 @@ _CRITICAL void Transmit_Process() } // Check if we will need an ACK for this message and compute the transmit status we will need to manage it transmitStatus_t initial_transmit_status = TX_OK; - if (((((msg_t *)data)->header.target_mode == SERVICEIDACK) || (((msg_t *)data)->header.target_mode == NODEIDACK)) && (!localhost || (((msg_t *)data)->header.target == DEFAULTID))) + if (((((msg_t *)data)->header.target_mode == SERVICEIDACK) || (((msg_t *)data)->header.target_mode == NODEIDACK))) { - // We will need to validate the good reception of the ack. + // We will need to validate the good reception with a ack. // Switch the tx status as TX_NOK allowing to detect a default at the next Timeout if no ACK have been received. initial_transmit_status = TX_NOK; } diff --git a/test/test_msg_alloc/unit_test_mem_alloc_generic.c b/test/test_msg_alloc/unit_test_mem_alloc_generic.c index 4f0d2e41e..7261480e9 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_generic.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_generic.c @@ -16,7 +16,6 @@ typedef struct uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ uint16_t size; /*!< size of the data. */ service_t *service_pt; /*!< Pointer to the transmitting service. */ - uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* @@ -1264,19 +1263,17 @@ void unittest_MsgAlloc_GetTxTask() //--------------- service_t *service; uint8_t *data; - uint16_t size = 128; - uint8_t localhost = 1; + uint16_t size = 128; tx_tasks[0].data_pt = (uint8_t *)16; tx_tasks[0].service_pt = (service_t *)32; tx_tasks[0].size = 128; - tx_tasks[0].localhost = 1; tx_tasks_stack_id = MAX_MSG_NB + i; // Call function //--------------- - MsgAlloc_GetTxTask(&service, &data, &size, &localhost); + MsgAlloc_GetTxTask(&service, &data, &size); // Verify //--------------- @@ -1285,7 +1282,7 @@ void unittest_MsgAlloc_GetTxTask() // Call function //--------------- - MsgAlloc_GetTxTask(&service, &data, &size, &localhost); + MsgAlloc_GetTxTask(&service, &data, &size); // Verify //--------------- @@ -1314,7 +1311,6 @@ void unittest_MsgAlloc_GetTxTask() service_t *service; uint8_t *data; uint16_t *size; - uint8_t *localhost; // Init variables //--------------- @@ -1323,7 +1319,7 @@ void unittest_MsgAlloc_GetTxTask() // Call function & Verify //-------------------------- NEW_STEP("Check function returns FAILED when tx task is empty"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetTxTask(&service, &data, size, localhost)); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetTxTask(&service, &data, size)); } NEW_TEST_CASE("Verify there is a message"); @@ -1333,7 +1329,7 @@ void unittest_MsgAlloc_GetTxTask() // luos_tasks // +---------+ // | D 1 | - // |---------|<--luos_tasks_stack_id : tx_tasks[0] is filled with pointers (service, data, size & localhost) + // |---------|<--luos_tasks_stack_id : tx_tasks[0] is filled with pointers (service, data, size) // | D 2 | // |---------| // | etc... | @@ -1345,7 +1341,6 @@ void unittest_MsgAlloc_GetTxTask() service_t *service; uint8_t *data; uint16_t size; - uint8_t localhost; // Init variables //--------------- @@ -1354,20 +1349,17 @@ void unittest_MsgAlloc_GetTxTask() tx_tasks[0].data_pt = (uint8_t *)16; tx_tasks[0].service_pt = (service_t *)32; tx_tasks[0].size = 128; - tx_tasks[0].localhost = 1; // Call function & Verify //-------------------------- NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetTxTask(&service, &data, &size, &localhost)); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetTxTask(&service, &data, &size)); NEW_STEP("Check function returns expected service pointer"); TEST_ASSERT_EQUAL(tx_tasks[0].service_pt, service); NEW_STEP("Check function returns expected data"); TEST_ASSERT_EQUAL(tx_tasks[0].data_pt, data); NEW_STEP("Check function returns expected size"); TEST_ASSERT_EQUAL(tx_tasks[0].size, size); - NEW_STEP("Check function returns expected localhost"); - TEST_ASSERT_EQUAL(tx_tasks[0].localhost, localhost); } } diff --git a/test/test_msg_alloc/unit_test_mem_alloc_tx.c b/test/test_msg_alloc/unit_test_mem_alloc_tx.c index ae841d619..e94f295a1 100644 --- a/test/test_msg_alloc/unit_test_mem_alloc_tx.c +++ b/test/test_msg_alloc/unit_test_mem_alloc_tx.c @@ -22,7 +22,6 @@ typedef struct uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ uint16_t size; /*!< size of the data. */ service_t *service_pt; /*!< Pointer to the transmitting service. */ - uint8_t localhost; /*!< is this message a localhost one? */ } tx_task_t; /******************************************************************************* @@ -160,7 +159,6 @@ void unittest_SetTxTask_Tx_overflow() uint16_t tx_size = 50; uint8_t tx_message[tx_size]; ack = 0; - localhost = 0; service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer @@ -172,7 +170,6 @@ void unittest_SetTxTask_Tx_overflow() expected_tx_task.size = tx_size; expected_tx_task.data_pt = (uint8_t *)msg_buffer; expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -200,8 +197,6 @@ void unittest_SetTxTask_Tx_overflow() TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL((uint8_t *)msg_buffer, tx_tasks[tx_tasks_stack_id].data_pt); @@ -284,7 +279,7 @@ void unittest_SetTxTask_Task_already_exists() //--------------- uint16_t tx_size = 50; ack = 0; - localhost = 0; + localhost = LOCALHOST; service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty @@ -338,7 +333,6 @@ void unittest_SetTxTask_ACK() uint16_t tx_size = 50 + sizeof(ack); uint8_t tx_message[tx_size]; ack = 55; - localhost = 0; service_pt = (service_t *)msg_buffer; // Fake service value data = (uint8_t *)tx_message; // Tx message = 51 bytes data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty @@ -350,7 +344,6 @@ void unittest_SetTxTask_ACK() expected_tx_task.size = tx_size; expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE - sizeof(ack); i++) @@ -379,8 +372,6 @@ void unittest_SetTxTask_ACK() TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"localhost\" is correctly computed"); - TEST_ASSERT_EQUAL(localhost, tx_tasks[tx_tasks_stack_id].localhost); NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); @@ -454,7 +445,6 @@ void unittest_SetTxTask_internal_localhost() expected_tx_task.size = tx_size; expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -487,8 +477,6 @@ void unittest_SetTxTask_internal_localhost() TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].data_pt); NEW_STEP("Check Tx task \"size\" = 0"); TEST_ASSERT_EQUAL(0, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check \"localhost\" is not allocated"); - TEST_ASSERT_EQUAL(0, tx_tasks[tx_tasks_stack_id].localhost); // Check Message Tasks NEW_STEP("Check \"message tasks\" points to expected message"); @@ -562,7 +550,6 @@ void unittest_SetTxTask_multihost() expected_tx_task.size = tx_size; expected_tx_task.data_pt = (uint8_t *)data_ptr; expected_tx_task.service_pt = service_pt; - expected_tx_task.localhost = localhost; // Init Tx message for (size_t i = 0; i < tx_size - CRC_SIZE; i++) @@ -593,8 +580,6 @@ void unittest_SetTxTask_multihost() TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check \"localhost\" value is set to LOCALHOST"); - TEST_ASSERT_EQUAL(LOCALHOST, tx_tasks[tx_tasks_stack_id].localhost); // Mutlihost must be seen as localhost NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); NEW_STEP("Check message task \"data pointer\" is correctly computed"); diff --git a/tool_services/inspector/data_manager.c b/tool_services/inspector/data_manager.c index 17ff6c40a..94e31f961 100644 --- a/tool_services/inspector/data_manager.c +++ b/tool_services/inspector/data_manager.c @@ -128,21 +128,6 @@ void DataManager_GetPipeMsg(service_t *service, msg_t *data_msg) msg.header.size = 0; Luos_SendMsg(service, &msg); break; - case VERBOSE: - msg.header.target = (data_msg->data[1] << 4) + data_msg->data[0]; - msg.header.cmd = VERBOSE; - msg.header.size = 1; - msg.data[0] = data_msg->data[7]; - if (msg.header.target == BROADCAST_VAL) - { - msg.header.target_mode = BROADCAST; - } - else - { - msg.header.target_mode = SERVICEIDACK; - } - Luos_SendMsg(service, &msg); - break; case ASSERT: if (((data_msg->data[6] << 8) + data_msg->data[5]) == 0) { From 107c9a2f93402223189a6de61c824a796bf776a7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Apr 2023 13:40:04 +0200 Subject: [PATCH 047/198] Do not allow RX dropping during reception --- engine/IO/src/luos_phy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 6b072023b..8a6663232 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -187,11 +187,13 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) if (phy_ptr->rx_alloc_job) { uint16_t phy_stored_data_size = phy_ptr->received_data; + phy_ptr->rx_alloc_job = false; // Now allocate it - phy_ptr->rx_data = MsgAlloc_Alloc(phy_ptr->rx_size); - rx_data = (void *)phy_ptr->rx_data; + rx_data = MsgAlloc_Alloc(phy_ptr->rx_size); + // Assert if the allocation failed. We don't allow to loose a RX message. + LUOS_ASSERT(rx_data != NULL); + phy_ptr->rx_data = rx_data; // Job is done - phy_ptr->rx_alloc_job = false; LuosHAL_SetIrqState(true); phy_ptr->rx_keep = true; phy_ptr->rx_phy_filter = phy_filter; From 2d2ae1d45827dac9219687d9e8dcf0be36b7f359 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Apr 2023 13:40:45 +0200 Subject: [PATCH 048/198] Fix data dropping occurring during re-init --- engine/IO/src/msg_alloc.c | 4 +++- engine/core/inc/luos_utils.h | 1 - engine/core/inc/struct_luos.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 61f70b73e..be2b20449 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -140,15 +140,17 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void); void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** - data_ptr = (uint8_t *)&msg_buffer[0]; msg_tasks_stack_id = 0; memset((void *)msg_tasks, 0, sizeof(msg_tasks)); luos_tasks_stack_id = 0; memset((void *)luos_tasks, 0, sizeof(luos_tasks)); tx_tasks_stack_id = 0; memset((void *)tx_tasks, 0, sizeof(tx_tasks)); + LuosHAL_SetIrqState(false); + data_ptr = (uint8_t *)&msg_buffer[0]; used_msg = NULL; oldest_msg = (msg_t *)INT_MAX; + LuosHAL_SetIrqState(true); if (memory_stats != NULL) { mem_stat = memory_stats; diff --git a/engine/core/inc/luos_utils.h b/engine/core/inc/luos_utils.h index 3b147a9cf..8d83aa377 100644 --- a/engine/core/inc/luos_utils.h +++ b/engine/core/inc/luos_utils.h @@ -37,7 +37,6 @@ typedef struct __attribute__((__packed__)) }; } luos_assert_t; - /******************************************************************************* * Function ******************************************************************************/ diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 7754362a6..2e5c315f5 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -37,7 +37,6 @@ typedef enum BOOTLOADER_CMD, BOOTLOADER_RESP, - // compatibility area // LUOS_LAST_RESERVED_CMD = 42 } reserved_luos_cmd_t; From a0ec64cc9c9b014ee546334354165aca47c0a359 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Apr 2023 14:39:26 +0200 Subject: [PATCH 049/198] Fix multi-node detection --- engine/IO/inc/luos_phy.h | 2 +- engine/IO/src/filter.c | 2 +- engine/IO/src/luos_phy.c | 53 +++++++++++++++------------- network/robus/src/port_manager.c | 8 ++--- network/robus/src/reception.c | 59 ++++++++++++++++---------------- 5 files changed, 66 insertions(+), 58 deletions(-) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 7d9c57f17..3a26e1723 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -62,7 +62,7 @@ void Phy_Loop(void); luos_phy_t *Phy_Create(void); void Phy_Send(luos_phy_t *phy_ptr, uint8_t *data, uint16_t size); -void Phy_ComputeMsgSize(luos_phy_t *phy_ptr); +void Phy_Computeheader(luos_phy_t *phy_ptr); void Phy_ValidMsg(luos_phy_t *phy_ptr); #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index e8459c309..7082a1825 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -209,7 +209,7 @@ _CRITICAL luos_localhost_t Filter_GetLocalhost(header_t *header) break; case NODEIDACK: case NODEID: - if ((header->target == Node_Get()->node_id) && (header->target != DEFAULTID)) + if ((header->target == Node_Get()->node_id)) { return LOCALHOST; } diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 8a6663232..475adf518 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -111,17 +111,20 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) // This can happen if we did not had the time to execute Phy_Loop function before the end of the message reception or if this phy get the complete mgs in one time. Phy_alloc(phy_ptr); } - // Now we can create a phy_job to dispatch the tx_job later - LUOS_ASSERT(phy_ctx.phy_job_nb < MAX_MSG_NB); - LuosHAL_SetIrqState(false); - phy_ctx.phy_job[phy_ctx.phy_job_nb].timestamp = phy_ptr->rx_timestamp; - phy_ctx.phy_job[phy_ctx.phy_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; - phy_ctx.phy_job[phy_ctx.phy_job_nb].phy_filter = phy_ptr->rx_phy_filter; - phy_ctx.phy_job_nb++; - // Then reset the phy to receive the next message - phy_ptr->rx_data = phy_ptr->rx_buffer_base; - phy_ptr->received_data = 0; - LuosHAL_SetIrqState(true); + if (phy_ptr->rx_keep == true) + { + // Now we can create a phy_job to dispatch the tx_job later + LUOS_ASSERT(phy_ctx.phy_job_nb < MAX_MSG_NB); + LuosHAL_SetIrqState(false); + phy_ctx.phy_job[phy_ctx.phy_job_nb].timestamp = phy_ptr->rx_timestamp; + phy_ctx.phy_job[phy_ctx.phy_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; + phy_ctx.phy_job[phy_ctx.phy_job_nb].phy_filter = phy_ptr->rx_phy_filter; + phy_ctx.phy_job_nb++; + // Then reset the phy to receive the next message + phy_ptr->rx_data = phy_ptr->rx_buffer_base; + phy_ptr->received_data = 0; + LuosHAL_SetIrqState(true); + } } /****************************************************************************** @@ -129,7 +132,7 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) * @param phy_ptr Pointer to the phy concerned by this message * @return None ******************************************************************************/ -inline void Phy_ComputeMsgSize(luos_phy_t *phy_ptr) +inline void Phy_Computeheader(luos_phy_t *phy_ptr) { // Compute the size of the data to allocate @@ -147,6 +150,19 @@ inline void Phy_ComputeMsgSize(luos_phy_t *phy_ptr) phy_ptr->rx_size += sizeof(time_luos_t); } } + + // Compute the phy concerned by this message + phy_ptr->rx_phy_filter = Filter_GetLocalhost((header_t *)phy_ptr->rx_buffer_base); + if (phy_ptr->rx_phy_filter != EXTERNALHOST) + { + phy_ptr->rx_keep = true; + phy_ptr->rx_alloc_job = true; + } + else + { + phy_ptr->rx_keep = false; + phy_ptr->rx_alloc_job = false; + } } /****************************************************************************** @@ -172,14 +188,9 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) LUOS_ASSERT(phy_ptr->rx_data == phy_ptr->rx_buffer_base); LuosHAL_SetIrqState(true); - // We need to allocate this phy received data - Phy_ComputeMsgSize(phy_ptr); - - // Compute the phy concerned by this message - luos_localhost_t phy_filter = Filter_GetLocalhost((header_t *)phy_ptr->rx_buffer_base); // Now we can check if we need to store the received data - if (phy_filter != EXTERNALHOST) + if (phy_ptr->rx_keep) { // We need to store the received data. // Update the informations allowing reception to continue and directly copy the data into the allocated buffer @@ -195,9 +206,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) phy_ptr->rx_data = rx_data; // Job is done LuosHAL_SetIrqState(true); - phy_ptr->rx_keep = true; - phy_ptr->rx_phy_filter = phy_filter; - copy_from = (void *)phy_ptr->rx_buffer_base; + copy_from = (void *)phy_ptr->rx_buffer_base; // Now we can copy the data already received memcpy(rx_data, copy_from, phy_stored_data_size); @@ -213,8 +222,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Job is done phy_ptr->rx_alloc_job = false; LuosHAL_SetIrqState(true); - // We don't need to store the received data. - phy_ptr->rx_keep = false; return; } LuosHAL_SetIrqState(true); diff --git a/network/robus/src/port_manager.c b/network/robus/src/port_manager.c index 3acc3473e..23d72b1e5 100644 --- a/network/robus/src/port_manager.c +++ b/network/robus/src/port_manager.c @@ -107,19 +107,19 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) ******************************************************************************/ uint8_t PortMng_PokePort(uint8_t PortNbr) { - // push the ptp line + // Push the ptp line RobusHAL_PushPTP(PortNbr); - // wait a little just to be sure everyone can read it + // Wait a little just to be sure everyone can read it uint32_t start_tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - start_tick < 2) ; - // release the ptp line + // Release the ptp line RobusHAL_SetPTPDefaultState(PortNbr); while (LuosHAL_GetSystick() - start_tick < 3) ; // Save port as empty by default Node_Get()->port_table[PortNbr] = 0xFFFF; - // read the line state + // Read the line state if (RobusHAL_GetPTPState(PortNbr)) { // Someone reply, reverse the detection to wake up on line release diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 2b16e373c..182c0a5a1 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -74,8 +74,8 @@ uint16_t crc_val = 0; // CRC value /******************************************************************************* * Function ******************************************************************************/ -static inline uint8_t Recep_IsAckNeeded(luos_phy_t *phy_robus); -static inline bool Recep_IsARobusSpecialMsg(header_t *header); +static inline bool Recep_IsAckNeeded(luos_phy_t *phy_robus); +static inline bool Recep_RobusShouldDrop(header_t *header); /****************************************************************************** * @brief Reception init. * @param None @@ -133,18 +133,21 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) printf("cmd : 0x%04x\n", phy_robus->rx_msg->header.cmd); /*!< msg definition. */ printf("size : 0x%04x\n", phy_robus->rx_msg->header.size); /*!< Size of the data field. */ #endif + // Switch state machine to data reception ctx.rx.callback = Recep_GetData; - // Compute message size the result will be available in phy_robus->rx_size - Phy_ComputeMsgSize(phy_robus); - if (ctx.rx.status.rx_framing_error == false) { - if (Recep_IsARobusSpecialMsg((header_t *)data_rx) == false) + if (Recep_RobusShouldDrop((header_t *)data_rx) == true) { - // Put a flag to tell that we need to alloc this message - phy_robus->rx_alloc_job = true; + ctx.rx.callback = Recep_Drop; + return; } + + + // We complete the header reception, we need to compute all the needed values. + // Compute message header size, keep, ... the result will be available in phy_robus->rx_size, ... + Phy_Computeheader(phy_robus); } break; @@ -162,6 +165,11 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) { static uint16_t crc; + if (phy_robus->rx_keep == false) + { + ctx.rx.callback = Recep_Drop; + return; + } if (phy_robus->received_data < phy_robus->rx_size) { // Catch the byte. @@ -295,6 +303,7 @@ _CRITICAL void Recep_Reset(void) phy_robus->rx_alloc_job = false; crc_val = 0xFFFF; ctx.rx.status.rx_framing_error = false; + ctx.rx.status.rx_error = false; ctx.rx.callback = Recep_GetHeader; phy_robus->rx_buffer_base = data_rx; phy_robus->rx_data = data_rx; @@ -320,25 +329,22 @@ _CRITICAL void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data) } } /****************************************************************************** - * @brief Parse msg to find a service concerne + * @brief Define if we should drop this message before Luos get it * @param header of message * @return true or false * warning : this function can be redefined only for mock testing purpose * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline bool Recep_IsARobusSpecialMsg(header_t *header) +_CRITICAL static inline bool Recep_RobusShouldDrop(header_t *header) { - // Find if we are concerned by this message. - if ((header->target_mode == NODEIDACK) || (header->target_mode == SERVICEIDACK)) - { - // In both of those cases we potentially need an ack. - ctx.rx.status.rx_error = false; - } - if ((header->target_mode == NODEID) || (header->target_mode == NODEIDACK)) + // During detection we receive node ID messages, we need to keep them only if PTP allow us to keep them. + // Find if we should remove this message. + if (header->target_mode == NODEIDACK) { - if ((header->target == 0) && (ctx.port.activ != NBR_PORT) && (ctx.port.keepLine == false)) + if ((header->target == 0) && ((ctx.port.activ == NBR_PORT) || (PortMng_Busy() == true))) { - return true; // Message is specific to Robus if nodeID = 0 and a a PTP is activ + // If a no port is activ or we are waiting for a release of a PTP we drop node ID 1 message + return true; } } return false; @@ -350,19 +356,14 @@ _CRITICAL static inline bool Recep_IsARobusSpecialMsg(header_t *header) * @return true or false * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline uint8_t Recep_IsAckNeeded(luos_phy_t *phy_robus) +_CRITICAL static inline bool Recep_IsAckNeeded(luos_phy_t *phy_robus) { header_t *header = (header_t *)(phy_robus->rx_buffer_base); // Check the mode of the message received - if ((header->target_mode == SERVICEIDACK) && (Filter_ServiceID(header->target))) + if (((header->target_mode == SERVICEIDACK) || (header->target_mode == NODEIDACK)) && (phy_robus->rx_keep == true)) { - // When it is a serviceidack and this message is destined to the node send an ack - return 1; + // If the message is a serviceidack or nodeidack and we keep it we need to send an ack + return true; } - else if ((header->target_mode == NODEIDACK) && (Node_Get()->node_id == header->target)) - { - // When it is nodeidack and this message is destined to the node send an ack - return 1; - } - return 0; + return false; } From 5c1a2c5556634eccd0b7329923bb850b75de06e7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Apr 2023 14:42:31 +0200 Subject: [PATCH 050/198] RX CRC optimization --- network/robus/src/reception.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 182c0a5a1..532292da4 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -144,7 +144,6 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) return; } - // We complete the header reception, we need to compute all the needed values. // Compute message header size, keep, ... the result will be available in phy_robus->rx_size, ... Phy_Computeheader(phy_robus); @@ -154,7 +153,7 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) default: break; } - RobusHAL_ComputeCRC((uint8_t *)data, (uint8_t *)&crc_val); + RobusHAL_ComputeCRC((uint8_t *)&phy_robus->rx_data[phy_robus->received_data - 1], (uint8_t *)&crc_val); } /****************************************************************************** * @brief Callback to get a complete data @@ -175,7 +174,7 @@ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) // Catch the byte. phy_robus->rx_data[phy_robus->received_data] = *data; // Continue the CRC computation until the end of data - RobusHAL_ComputeCRC((uint8_t *)data, (uint8_t *)&crc_val); + RobusHAL_ComputeCRC((uint8_t *)&phy_robus->rx_data[phy_robus->received_data], (uint8_t *)&crc_val); } else if (phy_robus->received_data > phy_robus->rx_size) { From 2f3a12288cea1b214da45448b5bc9c055f3ad864 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Apr 2023 16:50:41 +0200 Subject: [PATCH 051/198] Improve RX/TX comment on Robus --- network/robus/src/reception.c | 64 ++++++++++++++++------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 532292da4..8298ba687 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -5,52 +5,48 @@ * @version 0.0.0 ******************************************************************************/ -/******************************* Description of the RX process *********************************** +/******************************* Description of the RX/TX process *********************************** * Byte Received - * + + * | * | * no v yes - * +-----------------+Tx Enable+---------------+ + * +------------------Tx Enable----------------+ * | | - * +------+ true v v - * | Drop | <--------+Drop state<-----------------------+ +------+------+ - * | byte | + | | Get | - * +------+ | false | | Collision | - * v | | | - * Header complete | | source ID |yes - * + | | received +------>Disable Rx - * | yes | | + | + - * v | | |no | | - * +------+------+ +-------------+ | no| v | v - * | Get | | Get | +------+ Collision | Wait End - * | Header | | Data | +-------------+ Transmit - * | | | | |yes + - * | +---------+ | | | v | - * no| | Node | | | Message | Disable Tx no v - *Drop = true <-------+Concerned| | | Complete | +----+Ack needed - * ^ | +---------+ | | + | | + - * | | |yes | | |yes | Drop message | |yes - * | | v | | v |no Send NACK | v - * | no| valid | | Valid +----> if needed +--+ | +---+----+ - * +---------------+ Header | | CRC | | | | Get | - * | + | +------+------+ | | | Ack | - * | |yes | |yes v v +---+----+ - * | v | v +-------+-------+-+ | - * | Header | Store message | Timeout | | - * | Complete | Send ACK if needed+------>+ End reception +<------+ - * +-------------+ +-----------------+ + * +------+ | v + * | Drop | | +-------------+ + * | byte | | | Get Collision| + * +------+ | | | | + * ^ | | v | + * | | | source ID |yes + * | | | received----+----+->Disable Rx + * | +------------------------------+ | | | | | + * | v | | |no | | | + * | +-------------+ +-------------+ | | v |no | v + * | | Get Header | +>| Get Data |<-+ | | Collision --+----+ Wait End + * | | | | | | | | | | +------+-------+ Transmit + * | | | | | | v no | | | |yes | + * | yes| v | | | Message---+--+ | v | + * +------------+-Should Drop | | | Complete | +------ Disable Tx v + * | | |no | | | |yes | +-----Ack needed + * | | | | | | | | | no | + * | | | | | | | | | |yes + * | no| v | | | v |no Drop message | v + * +------------+-valid header| | | Valid CRC -+---->Send NACK +-----+ | +--------+ + * | |yes | | +------+------+ if needed | | | Get ack| + * | | | | |yes | | +---+----+ + * | +------+-+ | v v | + * | | v +-----------------+ | + * +-------------+ Send ACK if needed | Timeout | | + * Valid message----------->| End reception |<------+ + * +-----------------+ ***********************************************************************************************/ #include #include "reception.h" #include "robus_hal.h" #include "luos_hal.h" -#include "pub_sub.h" -#include "msg_alloc.h" #include "luos_utils.h" -#include "_timestamp.h" #include "robus.h" -#include "filter.h" #include "context.h" /******************************************************************************* * Definitions From aaa6e4388a4b7846c0af0e403a4a4fd89532db17 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 26 Apr 2023 11:08:16 +0200 Subject: [PATCH 052/198] Remove useless compiled files on SAMD21XPLAINED example --- .../production/_ext/1001328808/plib_nvmctrl.o | Bin 12408 -> 0 bytes .../_ext/1001328808/plib_nvmctrl.o.d | 218 - .../production/_ext/1137593668/exceptions.o | Bin 3332 -> 0 bytes .../production/_ext/1137593668/exceptions.o.d | 233 - .../_ext/1137593668/initialization.o | Bin 5584 -> 0 bytes .../_ext/1137593668/initialization.o.d | 230 - .../production/_ext/1137593668/interrupts.o | Bin 6340 -> 0 bytes .../production/_ext/1137593668/interrupts.o.d | 236 - .../_ext/1137593668/libc_syscalls.o | Bin 6928 -> 0 bytes .../_ext/1137593668/libc_syscalls.o.d | 209 - .../production/_ext/1137593668/startup_xc32.o | Bin 5024 -> 0 bytes .../_ext/1137593668/startup_xc32.o.d | 212 - .../production/_ext/1360937237/main.o | Bin 7220 -> 0 bytes .../production/_ext/1360937237/main.o.d | 298 -- .../production/_ext/1426513406/xc32_monitor.o | Bin 3468 -> 0 bytes .../_ext/1426513406/xc32_monitor.o.d | 2 - .../production/_ext/1968410007/plib_port.o | Bin 10612 -> 0 bytes .../production/_ext/1968410007/plib_port.o.d | 215 - .../production/_ext/1968463158/plib_nvic.o | Bin 5612 -> 0 bytes .../production/_ext/1968463158/plib_nvic.o.d | 215 - .../production/_ext/901117036/plib_evsys.o | Bin 3052 -> 0 bytes .../production/_ext/901117036/plib_evsys.o.d | 218 - .../production/_ext/903266522/plib_clock.o | Bin 5796 -> 0 bytes .../production/_ext/903266522/plib_clock.o.d | 218 - ...uos_bootloader_samd21j18a.X.production.elf | Bin 568472 -> 0 bytes ...uos_bootloader_samd21j18a.X.production.hex | 2507 ----------- ...uos_bootloader_samd21j18a.X.production.map | 3864 ----------------- .../luos_bootloader/production/memoryfile.xml | 17 - 28 files changed, 8892 deletions(-) delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/interrupts.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/interrupts.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/startup_xc32.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/startup_xc32.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968410007/plib_port.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968410007/plib_port.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968463158/plib_nvic.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968463158/plib_nvic.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o.d delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.elf delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.hex delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map delete mode 100644 examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/memoryfile.xml diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o deleted file mode 100644 index ecf26b5d434124b76406496ebe1981570533e281..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12408 zcmcIq3v?V;dA@gcN4r`*ENNv)mLFMV6)eZmO0pG433eh`mTWmvEX#HXK`>tJ&Pp5a zL+rz{LsCKrj}RIX+>(Uw2!Rli18tg+LTR9Z11+Vrz$rN;5NKLL(*z3Pad;ox@4Itn zcUE=+<(%GgX8-x$|GoFW|DCzBub-Hnlu`<}Nzo^&m=LpD6~`P_pilIOh>(}xc<$9l zm-mWMF(xlJ_IKal+)v(j`gF^qVG$DR#OYuB?zD`we0uQF2GJ-+hex~pBi$RU zyTZ3LjNkom_>D$1T$Xnl4>>XTF7LWtM#o2Gq-)gG9}OC?S&eg4`KhIifp$79grWNB zmwT@`5*Z)5C^8b;9vg~m8yvcLaAfG>$g9TYW(Mr+f}Kp-$^ISv3x#+tu@ouT$J51h zJ{Q?Gy#1o>7r#2vpG{@*@lt<$A-$`ZPnAGO z3>4$pT#;80kMS6zNZ;%DDu4 z(OhWxJ4G zUa|}E%s}pVHc={M29`7F1xq8bgc!eM{z%a-6z6m4L_RbBihSW%5p!bC4-Q+9oS%lp z`H2(p>@p^C9#eV^;w#QOlW-Mga_WkSJ@dOOF6UF}LUtuyu;*9BVmZ@z&Cp0Zc9qIQ z?~ma()47r`{DE?=m|o1;$%w*(W+tCojHn-n;8*v_e0d>b3*QQe7W8b{c^|Udkab!+ zu@o-|zh#vnFainR)~-4q1%ed^O2jbC;u7XgxzqAPJE(B+x{Ih_1RQ=vO@-li;^Mtl z+P;lS2i9e%=&OS*2>(aIWQqX$_hVc^j)YIt2mSZf_xObfSym!nW~3hqypMwvCFyuPQ?`Zw z0rOK(F`|CB%`Oy6@sdr?5Bg}S!H>=znZ^tVvqSaFZ%rQ#(S6 zY@$^}oyjMTLD`J1pM={+Yj=8)1Jq>>2cJ=K4S~d+=muVWpA#EvNE(mi}6A_RSOvXb#k{o?&n2-q%!BnL`=U2Uik40;+mJmJ;_!fIgsgPYN}Pxb^GZ#-$q<2I za4&+I8oYDF8Veb5B3%-**`{;T#q2oxRry6)Hr zQ1t8x9mP%xWBAN(w60g$qaiD&2v4?dRfKWIF3hL2xjpDv=9tr!f7eE)Lo7)}8`<}C z=x#M4vmuN7kubm8_8`XAh#rO+EO=o)+jvxU_A0Dkr-BIcxn@=#BRa1~cAGGt*J+#- zZIYQnD`EA+u?pXT&WB0IY(5HBJ6UTnd^So*pWn2NAVoSXyHLpGkxzz>6{KP*$+ep? z8tzg(^ea-njPNr?yF&{q8k9-fTp-R`4J<`W$uf9(Qt`_ z!hFDJ;}Z5ozYHpBw8h64VSdbL{5A~uqEDIZ_#$^0^I@aqa?FY^`m`bO8! zFfrNhWehT?cH?#;O@1z3CrQ2n+>;~<)k$)n5`752ZSp~+C|8e1lq5HwzNLhy#|2dt zf-3=n+Bvy4R3$RDmx}! zN*$&o36Z_BO+Bkb8%2OOzks~%OV?M;HyMFvn;2y|S1uxb=}4GwF}lywzxP(gGpJi+C8#+Lp?fn~fIQF``&XY6(3+T4_r$+btRX34*Sv=e25EZr_Vcu$VIJIPnj8c9j z;d0*La+W*rU{uOy7hKM5F6RV7-7y?@I&izu@(Xl;8=}hETs-42-f6T1R6@QLj77VI zLT9ti2=kN^y)SwXIN61QC$2wpeE6ata#-HT{@mq#RPl-!-jzhrjqY78_v7HMB*3gj zeuv9@O!26RqUvhi>2g00?vh&y?{dl)R-+UFt|0bO&Hp+FXXg|iaPUqS?-X4xnC~+J z`$2HB7|Zhm#(LsT8fW7f%(XD@HM*`=#1kUG4V8#8xlsg|M=Tr~U-yFfM#IO-*{#dB z`EH|uIoYjKP?#Sy8W@BV&WByyF0tNnt7}QfCO}gbCg5>*U5F6(BI!{z_6`Lk0c>#_@AAE*($%N!)KD zq57j_KIY0u(f(etNl-uay}|F+cj7TBbj6i3*_E&hy&;P?7o2^l^U&DnU1J8mb3 zMDV}*9#%x7MtZjhKHHa941a|&J2p2qBZB{}8Nmu;>Wae?SBy{3iQsd6?6nbXthm@F zg3tHes)$Xs3Wp{Ri{SUQLQ6$qy9oZE@03z#^(stGkL?w~|Iza875QNi{9)gnN`7rc z{?OsE!$%H@;E!~dyDH)rir@=dl3AOb;mYT=zM(@tP>U#|K{O)K^%*`E`6ZHq%IG^W8mpliReC|k2JqF1)*QukWc4W12y^uF! zx+3*JE;pPu9sF@Ch5u z^=(MQ!Yg@3oLiBeC=~LAy?CIL*Q}A-wR|6R_T!QlwFwc$NU);h3qoc(Ri@m2o#?Gt zn9HwB6!;`Ak5)Z)L7Tl@fdQwtM|&7=4)kkqc_NsNFWRqA&%Sb|YG4pD@4zL01`Fq@ zCrmjLCGrTUe~HU6J2O&(*>3{>Ic0j4b6kCm@bEnt-y&yyKb5mv4*PLF~{yS@5C ztPf*Qb|QiejDQX{4tvJ*vPSYYU8rI?CnhgzRO5{y+}zkI+vI5Ij@?QtVtP7e)O}(% zCaNbUyz*1wiUv}=)|TegX=_m(gPJM>o$NiUxa<5pIA_q$9N z{$3#p7~*<$_RV^Sd!%}8^B7@4JJXZb2rCwhaLLs)bd%u{P~=P_j&!#YJ4n!r%O^^s z@8^xHbFk7yj2`IpV~D{D6(|~a6LO?DNPwpu+#Vu`sM|UGR+=|@RZh+_1XziTo`51R z7Cna!J_#I+Ij=@FcJOsW=0anRz|lD5)tIaF3&j$R{rW>S<{`_jIa=yQjS27A2R0WD zI;i0EvN03bm{@G9p+j}XnD?$77ydE!F2iG?Pdto{8uB;IO?U=XpQeDz|LZBfNL(_H z?;Ps$3eTyE^I7-v$~-@l%pcz#8yuYH0sdklF~6J!Eitb?_srwOBU4V=f1nAis+H!m z*rn3BKT^4PvM6*anN4?b@!=W{&q5v#saV3csmleAN@B~H49yEtBkEp@61 z8pgJAk0esZMj+#sPiM{@-lA|4Q*sdZ6UdUlv1E-iZ1zIzRNH5NI(Ml`1yc%B<(hAo zG|jNtQzuQi%kW_mtE|rnFVC#u{k@P-G3y4xb&*KjfGO+3hEXH&&sw4@oZ`7JlV)zZ<-LF%#cTYuUd$YcO)as2!*` zV?@u4S&J>>xC3WoMd3m#pR;&8ZK;EBv3Gp@l1N|WQ)7f{A)?m8mOt`ir>ZFUdU_hw z_`2rCrb>ljTCnu;avQ6ITS-VGKGqz($+%TkDi7(b9%IdoH~HQ~POS}ADC)V5l?pa$ z{LqKj@7eINtq_Xa_(m&a4{psJhx%vmu_iE6FWda>a;@z2b;)(ITdGH8NK_kRa+_cL z__TXZh?MuDz?~ZG5`A2Xp60_E^!A6<8czp;TZq$G^Q+B=^;j!!u9C-k^)w&$i&}Z^ zAJyiAr&@kc*>iUQZzR;hhqG1k^-8{KgD-W}=EFY%syxy|O1`%u!Y6`i^I;pTm2X&O zpZjCA`7qP9@{LNqI{(!>YWYOdD*2{W@;DswG#?%wI*3=Mb@hC=i2j%4w~EP^KC`aRvdpxey4gtd~yAC;=?bgzn|NAJ znesSS7Vcq*=dINxt$yWo>FPCIzqY!x>gjxB5QhK~?J?lYSIISrpC#A19#!xo$*7$}zQ8g>!F?i?W!?@A35gs_*>{DOw32$4Q_ zXn41#|CNT1YWOKa=zl@u|ES@=Y4|M-pC*Ld_ci__4O?Hjqzh_#`3b=Gz)_N8!A1k0Hb%je=k+$kQ~= z2kRQ)u!bWV?k9xs6&hZt;nf=Qbc^F((D0;&*K7C=LX7(<4e!>FFFT|^qTwer{EUX5 z)9{-ben-RaY51ImKhf~#8uAc~cAGWi0T}T<4Owr9Z`be=4Ow?c=Mfmkm34>kl^VWU zLmq~aUe@qB4R6qpr()#4N5c$SY<#-^DrwHNymxS=!&Hlq*mJojKB7~oB5yI}T31P1Xk7%@~;_cV*!k&r`xQY*U zRXo5|Jg`4a|G;Mnn^5;Oo*{(46B@sc5PsjT@!JUD|2-PNhY)dmRO1g3A|4Sdp3Iiw z3xN0{so;`(hkv1zg!+%4h%Mj^AVxyWE##ivrIxXJkBJrROs$04ZE8u?&8C)K*>Y;h zm5ryCthb+9qGuC28$)kJDoW3uuJ?Dnk$bq@!98eP@6aC7nH05IYm3~WWBgMg-?=?n zDg1HM7BT!GG{y&v^g_9WCxSn;@res5sZMgJ!#wgfq@ij(_@x}uQMJ`_MNqtQv%tM_Za)&B^Q~YM7uz5f664*3i?xXM zh+m7#YwsxVL0oQg{k{_fuiS0GSySBR$~^#rSMDRg`&=PFSMG7#d*!|goNM20uG|wK zc;%h}em1!uu9ExZi^#dp!C$FVBM!$k8tz!76^aU%IwI7T-bbI?5Z}T;7h= z_K>)J|bJH{bfyY^WZkfp?k}&iQmE=*S_26la0_b?V=BzxCe^t3uC6e7F_h{87}d~ YbA?E`M!<7#nG;^QhY;UAF4H6Tzu?ifZ~y=R diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o.d deleted file mode 100644 index f17efe774..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o.d +++ /dev/null @@ -1,218 +0,0 @@ -build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o: \ - ../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.c \ - ../src/config/luos_bootloader/interrupts.h \ - ../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h - -../src/config/luos_bootloader/interrupts.h: - -../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o deleted file mode 100644 index f5760b306c7c186b56a4fa60ab63251937812930..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3332 zcmcIm&2Jl35TEC@6Bj#e)23~p652{dErQ*(lQd0&QtBp6TNIb5AEHu?%-i+a-gZCC z?mDCrs7MGQgt+ujt{`#X58%KJ32{IOap%UZ;>a1PWoCDu^Xz;ekQixq=FM;3ym>RT z@9o3O>uZcL5X9gtY>xok0|`=?OW0XB0mtF#lc!G}DFC@dmuFY5-&R+u=hX#$RZ>!==IYvpF{{t%)#|(vaj!K~<;IpZJ7d&tr50~g7ivbjYCq&LhNsiw7)lS9 zv7;ymmt|W7TJ7Hd5EgB|*I%}RFt)ceuhMh-5$fV@-!qZ#$P^E)?lKR(&G|_4RIQ_G zZ&p>U-R}Dq?Lv#}grkpkl1*vs2bvXl9#%qYqwK~3ly%*RLMzLJ;r4^5X$C=z^=a9m zVQ*P>kK9JO1uIL9+mRhc4d1Z>xA9gG-j6W-cB3-abRDy?j*}agx475CdNr_m_b`;G zk>>jj7VX;g%d3q`1MiKt6MFCQ&~A(@+e|BVue!kXJEBhqJjcc&r{mi#)#~yPa;(_* zhZMO&)WvM7jvqrVH=Yg#Hi$G}^M%yq_=tymV%rM( zrfXA_Nwf;P%EQ(g@4IpHD)(Ei9Rgcb)9;Z!uiOW~6m~uE>pZ&8aq2Z+vRoRm1UAWD zDjqE<#goO`W0UL#J3NLyPD8150hIuX4zHJ$;!^3g(qidM`4d*2WJlP==f1d9#>Gz4 zf=OcY$(vs3c$*7gH+_hp0yUb&{yI1Tc&^YtUO*nz>egn*fDlOnP$(k7ubumzaf$pdHD003@SsXG38fe zKDAO%Ba;GoI4CP{ERzC-5xgM7=xq!pNizs)G@c^f5c}Z=k`CB=ehKdGJAVS=eepx^ z*}ixZJy|5Az+oX~8uO0+%7$$51<-j-lDKx8f#`Y_s2KI(|FY zMa@kUueaR*y!$$Kv zdWUjAy+-lBi;wK@SM+rOb%F%;5h{dCSQ#BqzX=l9LsZD?PU9lf=d>>A#k!AC7IRR9 zIRwZ~kiZ_HLiSfde=6$8AAW)Zf8U@i=Aa1c=x>vRj0E;Ij%9xv=#Rcf@;8Bxi0@mJ z#T*pj2LdD#*!QR-xsqXIcWcCs@L%u|a|oWs?^evAv2gzr%5r?~Nc*KzSj6`m%2=u% zvV^XpKk79>VlCowzr|?xB`Wc_Nb*hoX#cdP)J8Cc{qi&F1POl>gKYO9#`lLXLN4t7 E2H6uSX8-^I diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o.d deleted file mode 100644 index ecf050e64..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/exceptions.o.d +++ /dev/null @@ -1,233 +0,0 @@ -build/luos_bootloader/production/_ext/1137593668/exceptions.o: \ - ../src/config/luos_bootloader/exceptions.c \ - ../src/config/luos_bootloader/interrupts.h \ - ../src/config/luos_bootloader/definitions.h \ - ../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h \ - ../src/config/luos_bootloader/peripheral/port/plib_port.h \ - ../src/config/luos_bootloader/peripheral/clock/plib_clock.h \ - ../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h - -../src/config/luos_bootloader/interrupts.h: - -../src/config/luos_bootloader/definitions.h: - -../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h: - -../src/config/luos_bootloader/peripheral/port/plib_port.h: - -../src/config/luos_bootloader/peripheral/clock/plib_clock.h: - -../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o deleted file mode 100644 index a100bb974884a7f0530b885e0bde67efed7421fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5584 zcmcIoU2Ggz6+W{&yI$LCCyt%QNeZ1Lrrpx+pY5c!ONiHw6PehKWji5|tv0i}v-UK* zJFA&lCv7Q2hzjz;6OLa3(vR8Ox4q7jsMV zX`@y&%4MURJeDlldcCx!*~Yr*m{wgI9vyjXWc&#&S*uhn-A(F6^SEPGTnI{5y<)B= z%et#4D`wR=K0T3Mw5?TJuW6^iJL!3|WLu>*vyq-(oXbsJNUtAF9nGX0dg*ddxtyCn zIh-w=Jhhk}NsXqm*<)!(ua$?hdirW(x5O_! zVb4~F<(U;y|1KPMw;V=D{YT=roI;nZC2G^wu%`+=7ID5+7|WYgY@lv1&Rl z&KT-UeJdQ{cuLHx^KNDN6U&8Jc_r|eNCqhFbdvvE8U zFb+j;PVskN|ExlNN*3zg6rG5FB>wry-f%Bwh>T;pU0Y?y6<^1I^M~=Qhk2brXnC2cA6v#^>(81{R^z?+5Xua+ zlfdUG*Bkp>=!**F9s#2pc!!eLwj#%tlk*gfcg%Mxd(;7Cud**ZsO(n`C?Di=wgrL$ zmEPP4D#Lsv0}vLcT#CZHsR0OMU-txf?gx9pYb_b}Jpf^BG&gNklfw4-JBZ);@2-#0 zBD=QIZ1?Y?)gATSbZtj{4?Vx5eiwazM|~gN-cjFAe`wS5dTm0~Tfa>n#~=XVHf?xI zg>aAEM~`A{czL*9_FzBW4*2tB=U=?OkokSBwe&B;54Z7;xAA8L&pX?P{d{5zk9@av ziXoSV%2X&ASKWf{x^^MuH=RNzGnN_6WHLMGMz`q7MzOhCFzXfTE@Hh{#9wT8QJ|gP zMXKYEyj8=wi{@PwRlZe%-{I%uxHh%-n0sj<@7ae6h3yNqRf5C9H+Prj_l~YZ{vLK6 zCa*HOj^KgBdK3dck3zjf&+;vd#&VtUeMDbHFAiaRL*Q>QMq%6(_$LD268hT$zbNo; z1b#)}HyC5me+#@JaF}0EkoO4OC-6am9}xIqfs+CwZ7)BrH_nrLBx9~!#$4x&69T6N z9uXK}CB~_gqaC9XuFp zqncu2s_kakR_SemQQtLC*D0SC#q0(4C0xY;R+eu-B zh!>ofYe53kV2r|x(^OE^p0WEz%(w7nI*GveIy6fO2%_<8m znZHef)IA45a9#}uWD+u-mtXyI-W#B$4@mj};%Q6>kh(8{55~KMczotKUJr(h_Z`sE z2PD0Ocx)#@>b?y@FkT}N4@=aF_X23?!!ce#yid!b3+R3fIvDR7;_>=&e*7;+ncr>D z!FWadVRjBO2~zhG1Wady;wJ1?q><3E{$)W+RUC_(kPI--%kVplV18c+d@sKdWPY!M z#@T29c`%B2T;mdCevAXlK$l?GfM7r54`6USOySKb&l*_z1vbl)LBLCr*C=Rr1J3WT Ig8*swKi?7y4gdfE diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o.d deleted file mode 100644 index 8c73109e7..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/initialization.o.d +++ /dev/null @@ -1,230 +0,0 @@ -build/luos_bootloader/production/_ext/1137593668/initialization.o: \ - ../src/config/luos_bootloader/initialization.c \ - ../src/config/luos_bootloader/definitions.h \ - ../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h \ - ../src/config/luos_bootloader/peripheral/port/plib_port.h \ - ../src/config/luos_bootloader/peripheral/clock/plib_clock.h \ - ../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h - -../src/config/luos_bootloader/definitions.h: - -../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h: - -../src/config/luos_bootloader/peripheral/port/plib_port.h: - -../src/config/luos_bootloader/peripheral/clock/plib_clock.h: - -../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/interrupts.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/interrupts.o deleted file mode 100644 index f925e005049746fcb1dc0192fa882344c6fd81ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6340 zcmdUzPi))P9mjv9C|iz{)Q+9TX|hah(k5LZO0pcsc9O=9QMqxkv>(8$D z|BwA$1VFThD+!mDR^!?9>G-6ak<;<9RC+2knVyQjFuRgZYORW~wP3(AN#6 z6~BnuOy(O^L$B5won(G_arVNs2mJkaxx>2%jxt)(o|aN zSXxPLRWoDB*`nidIXyX>bb9R?iiN|IsdF4k2fNWsQ#a1>z6jJ>=YKFPy7*4_TvazL zZ7b1Ab(&oh%dC30RYALBrWB)EKc^V2%?UHniYM0Ni7V-NqE_p+t8^6!Q?o6$QL|^0 z(``Lb)mtrGi9`+aO-qNEEGJE)%4Qdn$s-Pka3`n6JOyxeS5N{d*zG`FR+I=EgXT)kU36tm>a_cdI!g{8S%=|Zpd zQmtXMURDgP6zI0>tk|veq#|G2afgUPpV?S%Yihh&R}2t^NVn}P5W{92XETn22T|;I zM9;@AmBLNEy>5Gi%H=MWWyZ?redWMkaF2^pzm5HMB2JxNMKR)dJ-}58JH7P#S_t*} z38h9p!hS-XTDx3V+GtJ?Xi@9Nvcg zoy~%U`yQm(-K51MSX67TXr^YB=biRI$_*8;9r1`nY)NnD6>~$WG_{2`=QPKhBIGo$ z80tl(+vNB~#$#>=#-^rb(_S}k1gIx8_!vO8NVTrYU+24gpg73Nm5SMn*3 zzR0NR(X>a)jMhCm=FyvsHa(j0sKRK+qvIZ}Flu@9lt-(KZV@eJv)q7HhHf*&jaIW! z=*TMqW87G4jJ?VjH_&y4UT26KWu2in7~+Q5VCW7*6W-`=F?5%q(;nJj=q($~=D5{u zGW52CIMQO|o=tN6mS{8dj*XW24X88pu8kJPxGm9P=)QnQ+XXz5Lcw!QdP#f<%OjWR zEQ?6?fvW0VJgew*w@>+jvT2`q!ucU;LJ$VDt*X|cCtlg2Qw@Zf!xgMA2)n+6#@ru9 zH-M;+>$Y0ky*Ux)t~;?Bg)-t-F;WwTgr_6J(NN@IWVLTdSP=&MkQ{|*^f@fV(LN5L z$aM5fbSk~i39%tzuQ0Rg%?s!WhiJI?!vWa;^ylcF^yvtOpdt7xc?qBH z*^Sd;UpAHsk9^`ob-IKBkR5kX9A=hUZroL(_^Gs+kyEKsr-AuusnM=ByQ)@dDHxcw zwa-`C+%^I5dFcfjILflB)$AvcwcXK7xlR{{TR=rW6u7ji{bVd}I*&#yqnJA^K-iv@ z&<7xd!^0yYuCD->vf1hQ@m>HKrwfVO7xL`q3}LY^T9wZ*2_W9y6WeWTEV2`gVfF<6 zDH_JOAUuiL@I)bzhrU>Uen8kOjR^aM{h?9efbfKHn1=34e1Qai|BQzr-`fSPvVR|h zXm+?1!X2}R)BFyi;t+&k$j8Gz6@q>kp_1O9g5wzgy3~jBU66YukHL$N4*~tBfc{%R|1+Tba4_z8 zsQ%|$xtQU?HvtHCv%zD91G3&)Z7-D&`5(+P<@&#W`^yoF`Xs<~}d(Ar9YuV9Wvv79SRMvR?vdl6@ASL-sg;MfMoL7TIS2Zj*f);1#k* z0bV701mJbDPXW9^_DO&{Wa9vL$$k;wEwYCJ-X{A6fO}*Qfql-42LawC{RF^$vIj7T zBO3+S#`{=&41n%u5g&^0N6_MAd`K1_i@#yk_8)N01}djSR$}&3W=F{4_rFo5K{mHr z7_OqV49C{p9De<=!2SjWa>X=3rUKc2m&%6Llv&6Fw%|?@cB-)BgQE&N9=M{NCH6_d znxNxBrY}VrenH`C)$nVa1~Pu-lj$65RJs-(NB>2_skhHI9-%qgLK`f)|z$(3dzkzwT4rbw-2+7Y)F8dl5@a;)>1Gw$Q zkh#}!7xQi%YU6v@UW_Ynvv-j3?Tui2G<`HaifP^U?qS}ogIV}K-phP)*^jW0@+k(% zugEzPqu)=Nb@v_MEIKJOg1(saDe*PUAp@AuxkdGqGInc4Zu)9g3*nwWjNsP#9J?mq=>_6}2mocVD zMDV>=AIXdlUzQooZO#p6HVqAL9U2|pnz?T5;J!htTCj>mt2nS_px_!cvz&3Q9iCJ20hms$WX}u~4c{0j*%fQY__o0Vt~28r)yy8y z-rzplbRDy7*9Z3%1GZ1DJ{xl4xz>xMZSXC4~cH?e70pV)I?aC2@XH$1#$&@-yV zO~c0Eyt#SP;Mn0n;!DG$V}rq{4cG8tUXBKbDRm5Ed7k6$h|7XeEY<%HX3^y9jUA@r z`qunFb*Nrxc)hUe!Ks7TklNs1QoEa#U8a0zm1Ey20VkHJjXjgoPrEW6APZz#CzWmk(Ti4C^*^_2fi; z_rd`AlI>RK4A;sp8Cee&?Z)9zBX=wc)P-8%O`bhdvx*tBY`9F}TBCLjpd`F99GbCf zK2wzDfLM@`s7O?t+DsrJnq~W30WA<%l+psJj}aA#KxOk14MNHmokpQzF;$2;i0QD% z;=P|!8B6F+sRUZhwZDnfO6a9J+z;B9bdyk@R3C<1v#!sXWu`ur8egCaOnthWm`r;F zeV;+Ag>`DLy~f3U?N4$hrJCW+z+nekiIyHMdX8Q;YDI*Z_;L%uYW5bM)Jrx0 zMBReyp;mGaKqaZ$o^H+?OdJiduPIC$1NR^3CY^T?Tc#r(=53$d!$m zs9h^EQEUpl3D1>k7^u{;SMs$EvRcfnA@8f%(;Ul018CQPO}}uYHgP?OPLAdB3XKxe z#7XTwAW6Moc$m#iokYp;Jo_YoQ_+A>NRdw+_e@Psva)zd8`G#~or#}zEp)?Lyu27~ zb4cS3a& zm|0~un983+CDTdTkUR^~_ipPUIh6xRolX%Z{@Qf|e5+&+Lk$w1iT6@znSaNS!NLB) z#NXO!-%+yp(6gJE_l!RjH_a=6dJ7P4LlOVLOq zty`{Ja}ZBTXe%JkFH-JSl;r*-jVdJMG+=&3=?O4RV(3iRngC0sb-RX*pr&X+>~=tX z)pBR7nu!c|6m1$Qr(}E5I`;FrW!fd%D$=x#iiNHv*x^QY45dQ`6P}W`Wyg^;VzOw% zI%JS&M53dB&5C8zXdUO2)|;g8_B3YeH7bxisf2svt_aiN=$oSc6KTDEDWdgMBz9$5 zFTqn4oA!&Fm7ZIr!s)bb9``F2Tysm*^?<}=Jlv|ZkVmnSY3$5MhqFp^Ms_@wj$^F_R%ba1SSntfM- zh|Cw2*6&EM_Y+v`Lu3QjQi|>eX>YE{=?{b}_-VN2ONm3)ng) zc^8pVYgIE{byOfnjXo(K2NnOUPjnE*RowR-r1ld^Uxx(enLL$=kSbR*jpB$lj*wpQf%vMT($2Xu z+`h#bB}p;4G7Lc`zNaL~h`^kD)VGiI>(TD&Gu|eMvx?L9D3cbs;-K9o=mNQl(_Ry$ z_`?#v9se4o(+|;*<|u5nZddCK*V5}g7Id@PO9u<*tC7S`0TB@Aj;O0klDkHy;6CZp zEY@@;O?Pt6*Wds=QL$&rK5KepIR!Q6@=RKV4`MkOXXtmbW>nGZvECG5&M)G+yg%^` zO~IEobTQ>-#xoSf4Uh2+9Wp@x2ZeX?&uiUDRqNM|G|lR+@gi8><$+rqGgeb|73|wh9e` zu!i!V{sMY|Jcr(kHyM>}#J|G-)!v4nl92?OU+|-yncMPs!;nuWber|^)#&LYPfsBE z$H%v2)-OCL zWymWT>6Hzi@kxsz64*y5oGGW;Q*DxtmX*vIy99rRg%>ZzFGe%5<Jo3LnEgxO()4NFx+tiY zhUZ$J>4+yE*Ja<;b49Drmt5BTwh+$B5&yG=mTJ^Esc$sMt8J&X>pS zjs<5B?MO-sW2Z171*g+#su2V?;V!RW7aXR82KD9i!V7F?SRbVths3pEP5vOh)ECvw zjM0}q;Z&%mG^F}+IFV|KCuKRqJ90p?oOhz?8wJ$3fy%lZweafTGx-wBas|(0IRbLQ zJaVp8i90)NhaQe`$+a=k2wfM0&PSvdLyhFR9KDp%M`)~939r!>%i)zfM=Ng^8a|fl zQ;9kL04vT`EUBD(mpW#o&L+ZG_Cyaig)oS{QeGC`TBT zE%@DlwU0_P?kE6+6WbLsKET>ui8dMyPU4%t_&}0ul7w)PHC2G=s5VeU}Kx~q( zs6@P@0OI40ri0icSsIVxj%pjfs1KTK4*D|G2usAXK*#l68PkW$#)7_6Xh(fW#e>i% zU$=-riFos9$MqeH>7(-@vhVI#A2iuh(05g&B*wb~?YO=&^wIoizPRWv=sSaUtULQB zwm9NPCE`5^fZ9V5137;m-5tc|F+H4+sff0Es>zUaATq{s8iV-~j|kNR_B)_?T1`Fu>L*i>sE;-8{^^Z#%D2RSrQ1>d(FBnu1#xly*(>>K<;nbFalTl| z&y_1D%Zrth`A;lwu9vJ%!)i9IX5mDk;Tm0YJMUUMwr4xt{M^F)lk+E^%NIJWwqy7O zqhX)+oR$xP>2zE6R-tM5MxkZ5t<%+0r485Fa*a;@9C)v^Zkw)SZri=m`o_iOv)4*H z$BW0yrJiBF5LMQe*H`8$`pUVD(tL5DSgD*Sc}Ax>S20T0&H1^~^5wwd>B{1ADHyfy z8a~1+^56)ihhZ$wbKKKWTPT{X-v1#io_w!=+H_psx?bp%d+ojlnZModG=T3}DZ@3l zPaAG$=Y&`2S&}#L&CeNbaSrWrXORi>w?>Yt3>2#2ZLJM@;cPLXVmOR%C zSEAJJJD%Qf93S~cNU%L)zA!U0tc49r&-eY`62G;ac^ff%PC~&sP?W;w4Lr&UN(UsF6pMzZ?rAa#7JmuZW}Jx)S!DH&=TG@ z(hxY)k^wWY35E=YU^=Gjec<^y9id!0I1|JEh$rQMyZfX9;k}yJpnt5qZyNpMH8hDP znvvPKDMt6liIUZgD{Cthw?x+FA&ydVtystRDRaP6t78j(MzBJ*!{7(X%M-iddJOiIiO9w61$QC<@2*NK~eI93e7d)AB4| zzhHEmZObLGUJnks3t{TTTW~twtGOnLjY-M4mcL`PNqlbfD;RfT1eOzHXeKAn{1fJr zkATo{XielnOw6E}oJBJQ5lzXJo)#(4RQe<7 zlj*e_a($c_B|ae0NKT~FP$o{M1*FOGz!vOUZV~fJ39*)A&FEp+m(p0{(490PN-spb zKb2X^5calsDx-!xmboP|)0okjk#C;Ou&42853JCaJ}+n*Gn@>F3QVRZ5j{saU8JZh z>1Panur{n&%G^3L5t|4mN0d{tlo~x;Ho2~JQ{E$-Ta9jFVFKU;u^uZUTW$iLh;5^A zKlu+4dW^23)xi zX1m|C>Ky}DQP+B~&fX1=!kB{VtGZrWtChmmajnu?Fw6tFCmK4nu>^Y4Y8m~uulv}P zUU8dOR`>iS&Mz?7gt&ez-3)FYNRR@Y=fRx8@|H;mO2~DOEr~=Tmk=X4O<M)#<@kIqF*yQmq`pw8B(jn$9Z2MaHia%aUlyircWqxcT-Ufkx*m+B^OYqPw$Zjf zE$?Nb^VRC9{OsTXkmt1IWm=wiz$XaigW9D#072SkCNkraS2f1-+@}~|uD|7p)GOLo z1ucIFjA7yJLgFyU#EDvAoklXr^-+hL2*bthK1h^Q9+#kaVM&c?Rw2| zEvqUItYVy|2*i-2sR$q4H!O}JYrFLc!cL|S5BhLc??Q}{^boUyAcx}{rNW;2F_I6+ z_w1jc`kwtKXlGCT6n$+^eU^T(r#_ldULRhKyAZ?de+ibu=atW5ecz1mN5KDKi2vOX z|HmQzZz0e1lSMxM4Xl83b7-(uIBUT_KE!`;h#%hBGd|5Uv3acP*hs$b>cytj=x<>I zwVeBijYb1+@%t#+j(H!cf#>^{<=sc~o{Bb~iTB3i`7RAzwYq#$>P}ZaH(_A((2;jG z%UpgB(C$~ko@a!-g(Gi^dyg1?9E=?%;(KQ7NU#sI$BD||wMU8gzX^{kT4D^NGmIZ2 zT49X01ivse92zg7I5fNnZZSql^>9{dNg_YQ*BRpx@|}?Xeu#e*;-7^0=OO-8h<_d8 zKQqSG{7Z=6W{i#bPKXoGF+Un&geAv^T4FxeI3BJi#xib9Uh?R3Ad~~iab!Qp`66a} z)!#zxaU3@pL(aQLLuc6^@|lpI4f|2iyV3ED2C(l2cw15Uv++s(Us18);qqfaai}7S zuGJ0{yYnvPk-83RJS^sjma90zs`8D9!n%z}WWk0Wxk`)tgJj`#AF*lSC)A=Mer}7r z$?Qho$FBHa;b9o^Hs(AqaGgZ~Wh4QmDecrLKWxW77>?oNT>UpYKIezWRbxRlxLsC< z>=wcEd8L5sgJBupD84iJ7|x6b^nTDN2YxchxSj)6v4W(R@f~J^5R~rY;G_OthQHS! zV}B^Ofj=9x>I0I#2Vc>1Qt4hAvU>vyp63oBD7zQIN5?&Yy_$!N$K^9Z&Ew0URUeRa z8~(V~6)4>oAc*=~gg@RR?2q@7^7n1fst-s?VUld8Ke?JDT`mm2Y z{JkC#DDrjaqW*et!e;@;$5_Sp3(%?$NO}`RR$?LqrTYzdrpuxHU$DCz(u`Qg-|s^V zBw+(VaBV5zaT$J#FB;#=k@@nOqvE>_8a3YolJG@z;u=?=;$s}G^Pj?Q0|H)a-iz#y g=gniPJp_{CNY;{a0$!2RLw4Uqe1GQ-At<~500b;VjsO4v diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/startup_xc32.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/startup_xc32.o.d deleted file mode 100644 index 1630fa9f0..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1137593668/startup_xc32.o.d +++ /dev/null @@ -1,212 +0,0 @@ -build/luos_bootloader/production/_ext/1137593668/startup_xc32.o: \ - ../src/config/luos_bootloader/startup_xc32.c \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/interrupts.h - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/interrupts.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o deleted file mode 100644 index 7974a2f0eab408be2907c6167fcb2550cd3a9966..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7220 zcmcIpeQX>@6`$Fi^R4e}$6q-+pS|SLHqiLaj@`sflg5eT6jO(~`6wwpwCvsOec-#> z>+W9cw2fLyQOif#v_Q*;ib^S>>BFzdBKey;6!`I#lF(LzY_2+;d6nwJk;dK__?eb>x^{C>yr5#W;T z=F2s=v1qw=zK)(|VVPkDL3#h!q?J9cl5)A$M6A~InI_`xrdO*p?NVCOMy&2MD{1)% z03q8Yr(LMqOkV_OqMyx&JmjjzJHp<@s^x+-memD-7W1m`d!Ss42gI^WU_vlt(2mQ| z&J{2M@IsC-opKr0=-HmX!x&+fTW|qrU(zw5e^Fo58S603#bTA|U+Ve-!~&|o^d|<0 z$>Ki-cn?|z%}8gRhW=RRcR(jhv*@(pCH?Vu9V{(F&^@}lT4)6Xh4KHcm4Er=HZ#?V~3B--Z*0(WwEYq(h95VPH_R9MP}U# z5bZMe*DB#jS!0l>4D5Tt{jt6JwW>{5x*VtrG&lVHk z>tF7MSUj_mZHr8NKco=Xa@`_N{-E=Dxk3Kw#C{u2Y!W19_PfxE-6Rb6iQo44Bx+vr+`9j>xtG!-(K@U+yd z>^PA^PL^u04l78smFOhkV%@fy6vss^akCWOox*Irb{&$pYT+I^r7#nYzD@N%kTP3W zB3o})V(&dm=s`UD`4lpU zR!>BfAeB$INFnM+3u;9OLp=mQzBy@a$ejp#AnhiBC$mQsW}Bi=n5WYDN-^(w(&4Y4UA5X=@vB9kclI3X=0M~hy&a> zCADH-z}7Lt`-zlV8!|f%Dx?D;DM92~-v1&@)-qizPL0!$59c!cocNFyKh;fEwwrAa z=}QAKagR1EPd;R<=exeMVAd^4pL@0bAT40B<>83fuuYjSAJ%$FkCwqwl1pHP^$~4| zUbtFjOUkTRjfN#(+-NcJQEgSQwveMVa_Fm%Y1@Y64uOPpF>P^LTYIIPCX%m#Gg=c? z;nl;$eOfBmORB{1oyDT!+^;yT6b?qd(fLzaMuTe|rIugpl7@>=I5NL5yD(lP@w%gJv%a--wUjG*mEZ4C1$m z&+}2XxeL%XkSxRb5Gwk`Z|MMqhAhUl9gO$!OO1h~Zmctob@cJWyq8WJTUauA4M3!B zis{C#c{tV=F_hlA;ly7dm?a{_Fth>|4z)hcEh9^UJ#ea|U8C z2fn&YR;!maV2)&MDzr*YnKTS7n-fY5htmkjHK7+ma&5FfW9tUsl-;mkJy}2lY?z4n zbZ-~&HinS&TmW5?<$JrN?*WqOeH^cyj)(V49qA9>#SyzP>EBHsxr;L`@xXo8ypP#{bpR zjjWXk2AT)o@2t2hk9!MwT|y^ZFW*qtC3(8`$e$R`j*jN(6TVU`=36yj#k{<}$>Xe4 zZhnh4&7@4NUI5+X3R9_cznTSErquc3eA0r#lwjSilE3CzkAT zwn{EF<@XTUcnirxX3(S~ZP0=+ynr@5k6v_y!>x%204E=5hAl?|fJMq;oW*3M^vifm z-@G>#8^i}Q=X4Qb9&R_8=`>CHk}~Bt+mV}&n6sqPs?)~|yLNhdS9XzK}}h+ugADsL(1&C0)%DbmW}aEXvTIN89Br{y5fgA zdA}IstND;V%-8U>d?UPgZixbdz4BU=i}^=MxH`yX1?uGdNYUZz<O4bvp!_(N1 zkj(U;a{hP*+f48q@;lkp7v(3}4HxBivxSTDSFyV<%I{;Jy(l01M5O4fKSI&`SF@*p z(DW#N{qWbfBNDx6|MWasrT-S6naDq+pYOY7wqzIDmEaTRLf9%4a25MH@^ln<9dVrN zD!5y?kn@I&I+p0`$m1X??PcdJkL5)a?1PClc#C14iM4pkq1JH2kVk51c)?bw?qlp` ztWpi`?4vg*>X+d#4cMz;{ZFcqOw@<))nUDfYRF$2*151A4{LHS$x~)hO>2y5@;%kk zp7;t4_#F8=5ImBjwWzITxIGVOmi10He5-&Or*TT9_dxa<-5(YxYW;5cGU`PAL;Ps z%Q}csPLuDb1piwI+VoVr#wN5$PVE}!%Mp*t<@iy4{4cpt$eceett(a3xZ42GCDv5P zcr+En7nRHd$^{y4FMi4fG}(Uqu14OdqIk3iMfH6Hidw)(ANfG(yAEyD2TgVgx?YI@ zs`=jY%WRg`^HtDGfX8k@{F079+YXJ}mVJB_K<2Ab?S>_fk#Mp%?S Rxb+;lB`Erh5<;!y{tHky7xDlA diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o.d deleted file mode 100644 index f7146dae8..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1360937237/main.o.d +++ /dev/null @@ -1,298 +0,0 @@ -build/luos_bootloader/production/_ext/1360937237/main.o: ../src/main.c \ - ../src/config/luos_bootloader/definitions.h \ - ../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h \ - ../src/config/luos_bootloader/peripheral/port/plib_port.h \ - ../src/config/luos_bootloader/peripheral/clock/plib_clock.h \ - ../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h \ - ../../../../../../Engine/Core/inc/luos.h \ - ../../../../../../Engine/Core/inc/luos_engine.h \ - ../../../../../../Engine/Core/inc/luos_utils.h \ - ../../../../../../Engine/Core/inc/luos_list.h \ - ../../../../../../Engine/Core/inc/service_structs.h \ - ../../../../../../Network/Robus/inc/robus.h \ - ../../../../../../Network/Robus/inc/robus_struct.h \ - ../../../../../../Network/Robus/inc/config.h \ - ../../../../../../Engine/Core/inc/routing_table.h \ - ../../../../../../Engine/OD/luos_od.h \ - ../../../../../../Engine/OD/od_linear.h \ - ../../../../../../Network/Robus/inc/robus_struct.h \ - ../../../../../../Engine/OD/od_angular.h \ - ../../../../../../Engine/OD/od_force.h \ - ../../../../../../Engine/OD/od_electric.h \ - ../../../../../../Engine/OD/od_ratio.h \ - ../../../../../../Engine/OD/od_temperature.h \ - ../../../../../../Engine/OD/od_illuminance.h \ - ../../../../../../Engine/OD/od_time.h \ - ../../../../../../Engine/OD/od_pid.h \ - ../../../../../../Engine/Core/inc/luos_engine.h \ - ../../../../../../Engine/OD/od_control.h \ - ../../../../../../Engine/Core/inc/streaming.h - -../src/config/luos_bootloader/definitions.h: - -../src/config/luos_bootloader/peripheral/nvmctrl/plib_nvmctrl.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h: - -../src/config/luos_bootloader/peripheral/port/plib_port.h: - -../src/config/luos_bootloader/peripheral/clock/plib_clock.h: - -../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h: - -../../../../../../Engine/Core/inc/luos.h: - -../../../../../../Engine/Core/inc/luos_engine.h: - -../../../../../../Engine/Core/inc/luos_utils.h: - -../../../../../../Engine/Core/inc/luos_list.h: - -../../../../../../Engine/Core/inc/service_structs.h: - -../../../../../../Network/Robus/inc/robus.h: - -../../../../../../Network/Robus/inc/robus_struct.h: - -../../../../../../Network/Robus/inc/config.h: - -../../../../../../Engine/Core/inc/routing_table.h: - -../../../../../../Engine/OD/luos_od.h: - -../../../../../../Engine/OD/od_linear.h: - -../../../../../../Network/Robus/inc/robus_struct.h: - -../../../../../../Engine/OD/od_angular.h: - -../../../../../../Engine/OD/od_force.h: - -../../../../../../Engine/OD/od_electric.h: - -../../../../../../Engine/OD/od_ratio.h: - -../../../../../../Engine/OD/od_temperature.h: - -../../../../../../Engine/OD/od_illuminance.h: - -../../../../../../Engine/OD/od_time.h: - -../../../../../../Engine/OD/od_pid.h: - -../../../../../../Engine/Core/inc/luos_engine.h: - -../../../../../../Engine/OD/od_control.h: - -../../../../../../Engine/Core/inc/streaming.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o deleted file mode 100644 index 066130f65f101820f145e93d2a6307e2eb56c1b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3468 zcmcImO>7%Q6n^8iUAK1HCT{7Ugtk(u2FmW*Ntz~sK$ElyK}oUtBZ4q8>-9R>*7jPv z>yS!R&;vJ+dgI1_uZSDsf+~=DUg0z zQS9B$0sK)Ow7EgYR!7XH3QA8I&;2T z51_EzR^8dqYGz<+b*Ev^EzTMx&)x9Mrn-c&Z>%|%=USUi+gK~D&M&MRTj%xj1*2_R zx8mTn`L#>q#mc3nk};uA>c!%e;hW9cc+oVrt%-4C{(9HqmE!cg(aqZN%mC%-oE)XJ zk;e9Y*PDym0;tv7|3g_k`F3Z{a=pOb)|!QOqvJytY<8Me@V~8;=~^0lU_ zZK&F-MOCZUJ1vW6q4{>m5u+ZiW^CMYHOp-_(Fv^%xe>UO({;o5tY{^SM#uFlRo4yB zpPKC%eo%AVaN#O&a{|}XEn1u{-|%hEFSi`aZIoYgy<0xoV3!M%m4;I-uOdkK^0wJ* zqiDlFh^p$SsZWgCaeO>O@9#06asnYHQ z7Ky2JxQls%Chm~<4uZn!qb!LMB}K;CG(Adnoi=QCDx^dbyP7G9haGvGw#-(w;aay~ zk!J;iAtjS3rxhUJusD;+XO+yU%#HN0xGD~(;jW99a!O`4`+RmLdp0*LM#RMfA1&lW z9<`)MA}jgC0fZc-Z1zP&AWHT7t>pVW(|w-lZx)cLM?76YC1zY>lKvE>Pb4}Dfst7K zy_t0NA=qaT*WU%A&@8wb!$Q|6rTBy*AL}T$zzb9#5)IbL*W>zka!sxm&Dc1 zpTo|N~rz@zXk46n7FTM={O+ai%A zx{C=WhKW98j%E6c`97li5&xMvrvFRCA2A=oIf*#07vs3ELVhUXyyC16^Wfis_a~3> z*AT`B3&(x_$jfJp^YgXN_FgnT!u(j|5B+E~9*c0&{oBpJtbzw#mv2f5-_L-;uQ=&d z-zS|F`p&|{#^Fap_v}Wzqmdl7F@|#gVnf-um@4X6OcS;$ipc%Z`O9nL;}Nr|b((uZT5L%jD{h)7}|V;qln z5Apb1bA5d7<$S+_EPWu-*9^o+V)D){L>Sv$AFyNFhj^q9!%3Wf=@X9m1^OOOyuMFk z^X2nDHt&9-_kUA3my0Mq1j>y*ihe`3I44AL%kFni6>p!`R$RT5NiTTA&1oMgsmqJn@`Wd1>mx zOeh$enTz_vzF}W5IO;FOv&m2}?%z&?L;k51!{S_Ue9CXsS}DfM2+zlrBa{NFNtH_Z z;u)(g6v>Uk|3g^Z_(J7OB3~@0wuiETLZ(uJth`mpt^*(HsdzE5btYcSUK=e9W%Z#= zeP}7D4{dBzatUt5P$?x5J~m`;T6iu$l*nhZ7>S_`V%NWCj#o3v)>1t(b8|h;97vsg$T3r+|V*sBG zj>mnM&DW@k4$)LfZ{|`-J+T!pk~0>oq;uu*SeYCrd%ubq>k#fr&T8UtXr(Q*L5CeV z9L)x)+DNHO%j9#L(n5I*huGy(Uz-yyUCmN$FXJ}KR0}%XhE)SomuA$`Z1dnWBX{<8 z{|+K|B~X`E!jII*2%LeQ|6tV(R=td$rfvLu5l{0a{5VN_9pGYt`j=t-|=QDeR~U zrE}es_f+N5dA}*|t;(hI0aJd!kS{Ef>xl4vLI$oIvdGFZ!Wc9y2My^n%aNtUxrKRh z9W^!HmgN-Y>9tfcNUmeT`@7Q16NY{C!s=ym9T(oC=qAUJfRZjOM&{tdE4&j@K3Vk< zBG(DwU6InO)Wn0sMP=vjCKva%6mmH!JWQ^~S;)h*R1<1XA@5>AE5A>%&0@Y%h!sA^-PMVvoX=-n9eURtwu>pcJX}hGz*^a+LkCb5w%5U zmlvXEXP2kW$L3ZSBP$C_i?OLk$frp(w2zRZp?rp%4dt`sYABy0t)YCLni|T_QZqRl zG=Q|C<4ts$r`hrM+|*m*`z_ogp5M`h#aMJI5UArpZkk0O;wD*mn44nZ!`uW5AK}m~ ze3V1B@G)w(@o{q7_$g|!@?d~kZ9GUG8xK*NjfZKMjSo}1jgQc78y}?(8y}-i8y}}G z8$U(eRvrpakBtXukBx_DuZ@RkpN$VwuZ@pTpN)^vV>Uic2dq3CphGquq{9|Ijq%lO zJV^aE9-;vo57QAFAErSYAEBc*K1#=Ie2k9U_&9lO{1lzAa*XfeHXfvtHXfoUY&=Xu zHa<)~8y_LRjgL~m#>XgV<)ILb+IX18tQ`IOq>TsZsa@6iytuSDOAj7Ut0^H3%h1bM zPTGYbO6TUI3ri7sUL!Fnn&e?t$A0X%L1L?wXm=rjhKH7!H;AKGv0)t zR<>i;;u#VHhVJJff10~S_1iqJ?@N_(p;DgB#d#qY9@PpLthn!9L?e1+XL*E|J4-}+ zpkl*u?jmuK_86Tboh{@nzU~{tV7mHixY{dS-9K)4+ABTXA8X)fCBM1J@!Yff=xQ^4 z+#9g^xEE^RBa%ts@Fm`{yI8Hdc&Fd$;+#a=djhm9lvt0&(b01 z9r#vig*=3XlUFaUi+uf?%NdY!u zmw3|SfzGIbi?n%B;6n{H$4-I}EW2P)_oCTF`5 zz(Tj9=_}J{PA6pC23e_+bv1C>q?~r!oEkpxYFYfEqCHgy=$g8yFx=8ub{a>u&u+ZX zZEFO^&SGxV*Qa7ITo|(bK2jZFuad_S50Q?ig9?6QJWLfdQci(WH_x1FMgJD z(}se<^l-82fhRwQp-NlqA(Y7ol87UCxY1@@ogCLA`U7=fcF+VKL91K^$AK(1wXT3bCN7Q$7)+z( zYJV9fMxQ;hx(uv15F-?sQM@K$*POT-PCqMh^Ev7AxAtSySM&3K>HjS_caj(5=ny|` z-$l47<9UNe{I6~%C^4~yiyL`g#P>&~wXAtxw8r;7YuCcQKwzzqMn18Y&LuLHWNIxN z$AwZZ_5KQ%u9rx~Xk0>BuZ!db6fRo|`CJOO3}n4HLE~b{)JD9LDaXp!3#pQCi^nil zDkpI(0D|p9-mz@)(A7$Aakr2ro|0sUc{H`wM8o})f8PK9SR2MWi6fI2wZ2A};QI3sPd@zQf7Ki`SwBasQ+TfM5(dFttM>YaF>m!)!{cz`6x z@k{M(yCgT?O@1@Yw~=M$!eZ)Kx0Al!{{3)y6jBxP3NqE+antpp^H&@%3tQbf>rUb) zp2EE^iGF0Y(Mv-Y@HyRlp+$7Ldc+>F&)F;b#C~yzr@Ad!1upvc2UaD9%u4YBnQN9I zcJeD_Nlx?>PF$A6Ew3fqqSfj7;8;se>^k=HyzbYM6So(3eREBToRi#jdUu_^rB07e z8cT9gYn>h^6iafFr%sR4m?b$eGWPhavxMW@Rj1#D4Vq}C>cd{zN$qv^?b7~0)xN!& z&Lr`B0K7P=z}}z_fly`eJ{PVqkccVxud?;ayE0) zV+_^g#F6K#VB9>Osa=?lUss%GVi)G$w-x7+>B4;b7n{DB{?o?Y)Cy=#(c@tdSx?~&TZry zh~w+)_#;pQMJAtUAdTbiMw_Wp1I;598Q#Vpj;B;ElDxLCd_YMqzo6ykSdAJVe>GnF zo~+6EBelkiuihG0U(z*!^&7n=wOs>9aWtKKl?j~Hk8F)&`=M|6OuJDG!*A#wQ;cqGYg2FE=yrb}I3g1%5*KF+nI||=b_@2Ta zEBvX#PGQ*ZQOFl>T>iAeh{Ab=eEG)ub%kk#S%qbV+X_Fd@S_U(ZivVGHx+(P;pY|d zl@E{eTMGX|;a@3ySK)gK|5f1+6!P^Bk8_K{4uw4m4U`egm6 zk9Rfh7o8FH4l0!K@cYFaDC0sL!_0v)KE!jHIdGB@am^@{@glzS%z-j)#JR#8IL7^k zIL|R6&J9My^)W`o^94r4^Cyg`|DPC9?@t&}-(K!l)E8oe|IaYOuWa8*)js%_?E#nV zK|L~la2Y@9lktMfcs(jUaM{18KgsceZ!sc{vf|r}i07u_w-^!EtBSwQi1>b6@h>tW z&bJl+Ge#aaU+H?b9A5{Piw16)IsErPndJX4kZ-+&Pg557-u`lx}d6lZB5tNje@(_Kqa%xGvHQ#6X3k| zn8~!uLSVI<18?N-SL^I}e`{pN`<2xn?|+T#ey`4M`4M(^>+EcNUMCOy7K8X0_w>LN|?orroTvGgTb#Z(yA=6Z_!A-vU_PXp#xi3Kn|alW@eu zmzv?v4ZK+AFOJWGzcigdZ)Ov9c3x~K$IL;s*u`LHtv87~-)}<3^>*Rmc5uDLI)95$ z79ckh)H3Dj{0-~Ip2z-r@RFr@OKq@GnxKgsPp%#PV{9Mu|NKUn(6PgI)8_- zw*P5^_I{$y-%P);cd)-+i@!JP{N2OefbFK5pqA-N$}XVzzrk)r=F!GGxNSPyLa)>vBR8mrW$91Y8>mLiQ&}eFMVdCdMXdYpM`fn9C=G?q~#b8VmR#N=P@zds1VV^l>jaUV9c&M;{ zXsoc`{N%*R*}PXPdF8TK&h5>W0;ldSnSpoC5B)~n93CCnH?sdhGgqrr8%~sSO8$Yc zQHels8}*96m@7MxldJeu@4(b}elBP%22Ra9jB%Ks_1&Q1F8R&;?A)=5$%Xv6d#!ti z@=eEmD9N0kn4KOj*wcsS@*~!$RVeJuhfb|LTyXN|-I3w^#Hm=~o3!i^V(jo?617L0PG`F{wDCf{rwa2rA7ozK;Vn$=baTC~)vm4LUcloPm12b`dG zZf}^YnYl$XccNhCDwS5c5%7=j~S0Z0+ zHA1`8XhhhbvKQo=Uf?&EyuhjE>*sto->mv2n|hYZrpAk>LoW!6b>D4Ni)R|aLm_s< zD-Mm?5Gx*ot>U5cPOXXUD`GRxBC@a;FaHAeaOU`->EdMDS+U{=wTGR+D|SR-#~XOI zFy>ebD$(1h@pR}f*1fXnE;#|ycz3J5f}k1U5*F9=>k-qmu6WRv5!94XZPXWqgl^j{ z&_;&si0LP`+(gQ2sV>1@snZ?nv=z1PSZWo~lo5OBT46zN`$-KATqi%>DWP0$v`STv zW+G;k;>RDDnX+e&pR!MSVblmb#^=+b$Oo_r+9Qk`DaMR2aw1}FrxBk^pFzQ*$2dK@ zsdJ_${cR9MpB`(7xX_dS5{Oyq(_<}liakPI^y$$@#0Ps2lV)Sbs;p}{sA)fRC|-Uf zEdqh4kf*?&hwtuoLCqt=R>=6w8VWH!Oc?7a!#y>f9wOqSJDvhkcw(IS93-}4u!Sg0 z#7lBIJ<|B`SwqAt`t%SpJ8rPV+8wILQBK55NAsr$(=aV`F^)qL5lk6ksYJi+WqR3Q z-H&{y>VF2)9$9ISmVFh2`&KhJX0WVnPtQ&=?I-$HuJ_vZq8Hh7Cue3S=8rP%CBB2- zk7dzmht>vO*s3Cjf5EdvWb16Z9Iw6Y2cKrzHCO=66BCU|zXXZ#4g7=M{TaP`Yxn8& z27Z#S#}a9~SSIrk5MliTOz$4gd^oc|Gt-Y1xA;f1im*Gof%ox)YrZ;}<=`1cLR7;l zr?<00|4IJi$qdOYWImBOlVPlDrHPsT6-K&8lSa}nOd_0~?ff=7Zp0cIDmH!e-J%~W z6>API;QISi4ljg^B`*+6&8>xgXfL|1wM2_+m%WOE9JiwjO)mruX>Ny68OJ9Ev>^s( zhS&vtgd4`jlxA$zAMfIZK9Is#fBU>8NKbP~;%WV@M@@}mIhR#m!ij103&A&WW=Y*A zF2uTzC3J7yru!?QI{@V!`oA<%9>}LTIZx|PJi>+1&npXt{?4POApLFG&zCP)#>RB7 zksUGk&W^}l5!Q_^NcW_Ngyw5Xvq%4ijPS3J5AT6xFdfZ&PKF%^}m6A@s9j{_N_beHxjqq^p3MrXPej+aLGO8 zO&`|(skLbP^-5zEvQsMI z+hr9-wc)Npb?~{f=!L6r-jz|M)AaUu!YE+zOW*Q)M*AgDzR0x4>iw%tP;ZHpY1%r* zocfq^OD5pCB7)}rxLG9ye9D#iGP&%n#9*7z9I1~iSJ0j(L{!`*jiT{zf4W+H&XG$zc+$(Wh;$ewLC7zH-Ck?HG*cTwZ(b9NFl8(cI>Ye;- zCPciZJ->4BEVF{$VAUQfi357oFQvQ>DVF!BKXbiju#YFlQLdahxgd81(#20!9 zPUt~y7qKuF{vkgq$76)ho0j8`5mJ0sc%c?KC14c9xTJdc#*LWx(q>jE44Fj)t25V= zRDAZxjPIbTyzd~Z?6(51nk;YGmo=T>QZXlns)`dNS-uI1s9R}~iq)d;Y7ZZn37HE1 zyYQHW|3oZ0Yy46x!r|~98s!JJM&t{r(YhxammSO|(uq;!)d;ALYvblKT*3 zI{lKKYRc~<2uZp7FkVe=p+k=HMZE!|+rEJt9ddLpQ7)>c{5}POniKKP;`bu*R5iu> z0tl4W2PI=0UiF^^lk%G4r1~NJ3VuolUA7Aax;a5m-S2eB-G^GRNI^Cw_Z-Gazu&_d zY=TC9sXUb57tmKa=(4l0M>VCI;{6bWq`lw3-XLgXkKQemy{qUe9dy}c*dsaB6z^pa zlJ?$!y@Q~UJ#^dleviJ=L6=>Hy|Zc)61-Q@Pud&B0c3(k_UP|N72oUVC+&^m`!U%R z?}n5cl1!32l@KI3A&ZC7A@-Ayn@h-%UuyrxFB#t{#CH%hijUqtRD8WKhT3R?B-*R6 zN421u@6L;fB_TWPJRJDd7+l9?~lRB~~d$dMLxl2&qu9)Dd?tcNg Cy;-UN diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968463158/plib_nvic.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968463158/plib_nvic.o.d deleted file mode 100644 index 94c5a60ba..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/1968463158/plib_nvic.o.d +++ /dev/null @@ -1,215 +0,0 @@ -build/luos_bootloader/production/_ext/1968463158/plib_nvic.o: \ - ../src/config/luos_bootloader/peripheral/nvic/plib_nvic.c \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/peripheral/nvic/plib_nvic.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o deleted file mode 100644 index c3a89dd3486f219d1cf0157d45b1169094a96310..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3052 zcmcIm&2Jl35TEC@V>fX^lcu523T>sL2GQNMlQd0I1?r?pRFsq`X&|UZ*4y>7z3F~w zcb%qC#0{ZvFB~|~D+dI<@+a_5@CR_=%%RNehqF#X_>dUsdFIV;c4pqp`|#&0>#K}0 zNQuED9L)fpmLjAu6R}B{fQ#U*J(d7+ktWa9?(fLU)m!qMI;~dasY-ReGFP3KAJ(=u zG-2za*%VD>R?&U#7#-Oc`(|LejyyFpeQSFDV_C6Vmdith>*iwMwn9`GuG2ExN|T3N zX_=N-Twc&NeYfp%TVBO^plz6j?;0J`(>6BOYfHP@{!R5}Mf14vC<|`aHttSU8+TVX zwP|%mtyX8XfZNTfD%TE-=_#%DAhvj~I#<);s9m3jn4U_(F%=KPh#+wN#jGs?&6f8+ zq(zJOx{HSEhvGo7E1uO2P#1Q(wvPNnrMPc&7P)Wl&jyMuD{WbMzbY%OR@X6T6-po? zjy_sZH8XR^RSeg*u@g!QWh-={tg2ez8%ZTJtLp|0-E~9kPgD4sCw$ZE2%lS;*bklr znrE4MBN9~umKW+ff$)R6V;Zhi|Iqax1=tT!ugo;iuD*`m>MIA__OO947S!Vg z>|z)1-Cwy|U+RUcw@lxD%zaTmmPaFQ;a+u)tGns8?eQEN2+X!4nzGU1KIB-b>+~sd zg`k7wl}#svT&@^TdNz?ZU$9)K9b4p!k=$=kiVcpeO0m@`rujnbvUtoxKC*4PUELCt zWt6SNRzBGNXuEOGF+-DE<|hJ}G7ud{I&Hbn@MyA8_GanAkW{){+8G#STkQM*BG+JO z=p9r7NGiNrmP!jlw}wXzd}BuO68+p`ibYgY2SPg)e>xx75igk z81SB;TyU^|w^IQ6whB2ZFepT^C527oa9Ir2mX{ag$==bH>4?hv(`u#i)_=TQFb=Kz zB@%<&(~UY7ciRoqX}PDU zxvt|wa~goJP+J72Ab$y1rXx9oQZffMcw&cKM;`hy@1zpG86iY37pQs=fJzGWM3Sm6tZexb zIjLC&aeSIOM>&nVj52Nw zxPyae6Z=nR7Tb%bJMKN@wT&bF21WP@ecdJ@p%fE1Pi2CBLpzy-gi?&-JRA2Q*>@C| z;?bTXet;wW21O_%kUh02M)yG0-& z(fytJdxmoQ4T^9`K!#H6IqFERBpBH}IA%xq4>;0q2>uoAWD*ie-G7hsY<}Nm)=Tvv zJIeQG9M}R6Sxnee+CwR&v505)(G9foP&tnJ2^{2){8CKx*Q0Oo0KDkUj&i4WA#3*| K=J(4fc7FmTU=G0m diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o.d deleted file mode 100644 index 4c7f38a56..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/901117036/plib_evsys.o.d +++ /dev/null @@ -1,218 +0,0 @@ -build/luos_bootloader/production/_ext/901117036/plib_evsys.o: \ - ../src/config/luos_bootloader/peripheral/evsys/plib_evsys.c \ - ../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/interrupts.h - -../src/config/luos_bootloader/peripheral/evsys/plib_evsys.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/interrupts.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o deleted file mode 100644 index 2ddb288613049b72492ea65c3d4b13ca378428f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5796 zcmcH-TWlOx^~}uP^~Sq){7ULLO*@X=W=p%fUfW4*Q>V7q4;-%(1XL|TMZDUNA|4V*d_;T{S_JePJ}5|h6a*irqNPotz{4LAVa~t--;^jK>~+aQLCr zW1k#?o{^uI!wYXeJFqrXezg0J_uTkw|JwfYY= z$)oyId?KFI$H$V>V^hg#{hs;F^@Lf=o5iA8j2(&PEu&s2>y~-8Vpke$X90VM#(`zp;0eYc49@tF=C}k)tpVuBsQ$Zj%C#JW#sL|dZl1B3gt>O zvA&U>UpSpOdpLf0EYUOyXZ*^{{QBZ}GPk(Ak(h{2#*@h-3EQX@$CF0lTw!87F~8+n z98XToC){3Jmf>J}aq1jXX<|2~Z8xl0zbz_?rRM)3EgF2YHCt#{j(ILt8*5fuHp-lG ztCmN6#Y`Dip*(9?wX;X;SWS=Z=&_SYJyt5U>IE7_%r-g37$rWNKEB?F6&ke~u0*Va zbk%7w3uD+ zy33X-R_()vWo9qSBj+yReaR^!ej0Z|JE%&~uI$v!qFyK)7HGL#t5SESat^4s4*mdZ zR#if+y5B@qnO(*S*U?VeCy$WB^u7z^pmw-=&y5V#0IN3YJAS8$adJAjZ&*X8KnGX1 z`-EH{&ruDzR#!0%Ft?YEwg{RWj5gT+ZOkoj4*O!C#s}B%w6)QJ=ScOal=8f^v4L(B z1inQMPvJui1$ei`Mk`-6A@~T&euu52OiEzCKolUsr3beO284|Q>~&I;;IaodOh`iw z*o|aEf>0#z`&~~Wv1=ujUdyGnHq#JzF-jv)M}#o5HNUl;fxsW4l#@E52;20UYyML7 z>s+q7@|C3%uKeXFAJ<60lP|8Gg1`kK4uQ5)sGiAL=1#?Suu^fg0 zbO%5LfL)Nfkf+)(ug!d7d=1#E(qq8$7zg&68tvg8 zdp!?~&mI0O(;D=vw$mG2`xjL##`Rvf31EL!qc8A$5BPni)`9&^M$AzxgsS z&_vD5d5XmicUIL5le+-43CZSSb??=9e=-w|24QIZC%rsI-;-H)29Y;c? z$KBYJB7;6UB*xm($aE=6KUG+pbONQ6%s>IN&8HfMWn;?6y6AXxWy_U1O6I!hRD?cn zm-_}7!x*6SDmR7t!&+#6Xgk=eY$`oC6m=BB;bSPoV|FiSp_%Y|!_(o_emv6-10i-Z zM?pnd?N^ZR7)Cx3#^bJE35Q*ClJDyBc~5oX!6Wo+I!yYo&?CFrPx^@Hjtc;~;>sNn z+5e$PuhOT?b$)3fLcZMxAlbjEe19QK;?v=~!gpc_`Y~~RaU6K&hiUyYc1Y!>IN_!Bw zQEXv|(5*7qc~KjBf&@2X3xO>p#6_`npoE(cL-o<-hdhVt@yQDj0z%?uAQ>DaccvsM zGe7wGJ`AEk6mwOTx4OFk@8y&?Hsyc2A3C}D;3S$GTOG|TnFo-CqP2P@@ z4J7xlQ7%cdLBzM{s2o9ZH|r#Fk{v?ntj_imH_UpuZDIh$J#0v4-8x%4$Zpcvs?J8p zWQ^UyP1<6(Jsi8Thd6p@g9@h7;HezozQ@=e5o3?cL+iVp4Wm$*Wxd*#uB#EO0a!_; zX7s4{;i1zC>U;%nd6%C)IAIZN7ZDUtALx#Bah@iUfNFC7R(u#Hej9-@j3hgfiLFC0 z(y_iv=?e@fdz9;NNc)r_duM$J7O$!ARFk;$yjI99gH8G%37|jhr;90ev|P&g|zfR5{eivN`wHZ`vmg-c+X(GF_ck$ zv|nVruOKabkc5XZ-d?%*KHV3P_Q!h_q v8ekFazKTLTMqnQ{ir0gU`jj<~Bs{+x;HN|gknu2`HoFie^($$FSlay?D5Cn0 diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o.d b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o.d deleted file mode 100644 index 0ee3cbb7d..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/build/luos_bootloader/production/_ext/903266522/plib_clock.o.d +++ /dev/null @@ -1,218 +0,0 @@ -build/luos_bootloader/production/_ext/903266522/plib_clock.o: \ - ../src/config/luos_bootloader/peripheral/clock/plib_clock.c \ - ../src/config/luos_bootloader/peripheral/clock/plib_clock.h \ - ../src/config/luos_bootloader/device.h \ - ../src/packs/ATSAMD21J18A_DFP/samd21j18a.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/component/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/component/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/component/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/component/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pac.h \ - ../src/packs/ATSAMD21J18A_DFP/component/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/component/port.h \ - ../src/packs/ATSAMD21J18A_DFP/component/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sercom.h \ - ../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/tcc.h \ - ../src/packs/ATSAMD21J18A_DFP/component/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/component/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/adc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dmac.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/dsu.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/eic.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/evsys.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/gclk.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/i2s.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/mtb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pac2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/pm.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/port.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/ptc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/rtc.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc3.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc4.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc5.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc6.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tc7.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/usb.h \ - ../src/packs/ATSAMD21J18A_DFP/instance/wdt.h \ - ../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h \ - ../src/config/luos_bootloader/device_cache.h \ - ../src/config/luos_bootloader/device.h \ - ../src/config/luos_bootloader/toolchain_specifics.h \ - ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h \ - ../src/config/luos_bootloader/interrupts.h - -../src/config/luos_bootloader/peripheral/clock/plib_clock.h: - -../src/config/luos_bootloader/device.h: - -../src/packs/ATSAMD21J18A_DFP/samd21j18a.h: - -../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/ac.h: - -../src/packs/ATSAMD21J18A_DFP/component/adc.h: - -../src/packs/ATSAMD21J18A_DFP/component/dac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/component/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/component/eic.h: - -../src/packs/ATSAMD21J18A_DFP/component/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/component/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/component/hmatrixb.h: - -../src/packs/ATSAMD21J18A_DFP/component/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/component/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/component/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/pac.h: - -../src/packs/ATSAMD21J18A_DFP/component/pm.h: - -../src/packs/ATSAMD21J18A_DFP/component/port.h: - -../src/packs/ATSAMD21J18A_DFP/component/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/component/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/component/sercom.h: - -../src/packs/ATSAMD21J18A_DFP/component/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/component/tc.h: - -../src/packs/ATSAMD21J18A_DFP/component/tcc.h: - -../src/packs/ATSAMD21J18A_DFP/component/usb.h: - -../src/packs/ATSAMD21J18A_DFP/component/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/adc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dmac.h: - -../src/packs/ATSAMD21J18A_DFP/instance/dsu.h: - -../src/packs/ATSAMD21J18A_DFP/instance/eic.h: - -../src/packs/ATSAMD21J18A_DFP/instance/evsys.h: - -../src/packs/ATSAMD21J18A_DFP/instance/gclk.h: - -../src/packs/ATSAMD21J18A_DFP/instance/i2s.h: - -../src/packs/ATSAMD21J18A_DFP/instance/mtb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/nvmctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pac2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/pm.h: - -../src/packs/ATSAMD21J18A_DFP/instance/port.h: - -../src/packs/ATSAMD21J18A_DFP/instance/ptc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/rtc.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sbmatrix.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sercom5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/sysctrl.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc3.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc4.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc5.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc6.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tc7.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc0.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc1.h: - -../src/packs/ATSAMD21J18A_DFP/instance/tcc2.h: - -../src/packs/ATSAMD21J18A_DFP/instance/usb.h: - -../src/packs/ATSAMD21J18A_DFP/instance/wdt.h: - -../src/packs/ATSAMD21J18A_DFP/pio/samd21j18a.h: - -../src/config/luos_bootloader/device_cache.h: - -../src/config/luos_bootloader/device.h: - -../src/config/luos_bootloader/toolchain_specifics.h: - -../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h: - -../src/config/luos_bootloader/interrupts.h: diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.elf b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.elf deleted file mode 100644 index 900ecefcde6e7dedf2e2a2f19cdc0f6c71818f8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 568472 zcmeFadw5e-x<9`5PMWr9>6J?^ZAp_B+NMCE+)+%EvY`ziHyvmZQ$P(D#~_NSj1s_0 z5p{ri=>-)j&WLrCDb~?ZMn;@7I*y*57Ur}RofMQk>Nsx4nQ7Xj&G)l*E(D!(zUPnM z^ZcIQ^V@x%oxS#6mv^ntde>U-`>uEG?pm;zV;F`+|5#E)=+lEc2$_yMU!Oz>OA@9N z14%^O0;ZCtcJWBX(|BA+Azez`=@l+5{EJ7@6S)%T17c}R4}PQXdmh3wuK0LjVF|H# zq$^r(e7q9zO2kVS%A;xG;|WpV4KYM6DPBe2MCdCKk30r?HD(j?I<9EEluZ7S5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p( z5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5s(p(5%~WZ0^%-WcyI?HHbasllD4J z>u9y>9CMXfsRt3)s(HFP+i{@!MXnJkI{F{QyJ}8VLVAALpJ*&5&76iLi5Ww*p4)~N zafxL#XX4y1a+Ab_A%$@&v2aNu8CuDqJ^b_iwH!ga@-EuAo}8oOzs*S!|2|k*c`1)+ z(Yf04#;M1p5 zYWrc7eItIA-Ph!YrrwAWZW&q*s_kg^*?vlg8Cqh`bN)m3a5Hj;8ry@D(f5Ww+-zu8+}~FVVRsM&}yPnL0EpLgy{1oR0>}V|0E$I1hBD zMCiOB#h)6S2|6V)I-L@osh~4cqC>pr`U^>cL@7T;$p}ip!JG)C=cSUG1~oBChXxIx zG&(}*St-6@P!CG!F-o36Vt563Jlj78)LQ$~DbKpn!O1GS#!1B22T2j}9=kk{uL8B- z4L*1IrEFr@h%0#%G2E3x47Vf@asqRL1MiNf6T?>Aow$+^@5cQuTrc7>WD&#DDngoZ zy_iW1FC*<6s7DjmWMz8xTaCT1eBoI96b*spjFdemEy?KwBz~b_9pJ>%e0@y42BFdq>+|^P+9-8)mhF1+ySeu_Zb?p zs(PMSVCu3gAU)>(gH~-3Y2YIklS?-wQ0n=C#oB(G96E1tkhk8VnJ%x<5JFx zy_N+6>hgIvrPJ>Z85oJq1%!e=`tH9F8t{RKy5>lA`AImdnOUQG)RWne%viYhm(lwgjiRZ+khfp* zTHyVbb$l14{uBRdJbk5W=4kG_{VTyatMI19n%hg`xB8dj&Gnd_{!1Dy8~txC_-$8} zJ=gIYfyS@(FG9STJXIblZ;h0)!rv#wE%jfAl4#6z)#IFhmhxBnKNUXC|A1VFnzZ;| z5a{f&9ni6yb3?#$O`EW%^Cu%a!E6PKr_bb&*`UNUlV2C}cxiqWG`Sn5%LnieHD;NHJf8 zMn!Usiskxq=%&jdL&Aw`-af!Jb4R&$PCP{n{}L)NYx9@Cx*Qz?bga;E6CEGdVjR$M zL&p;x3v@jB{AzLetDgMQs1+q1j+Hhk^u_|F>nY4oPej^H_^*8{ zIcYBMy76KyLbT1xFJgt0#s%@(FFqa#EBXCWNNra33iE%Z^iU*r98U^7m^t>? zn>mWmz{qVmpOFBmth80CK2*I&QTTe~?G8IfOFnG7~ zo*U!JdwsYYz4#cg{V7t@QBL?j`{p_6*#6u{`TU~KCUGN`ye{~{oC)skc_6}*N^dv# zd>88T*Wq1}cVofl_hBa3X%E+B?=WqVXLv(S3t7&sSbdDFUv{_yBT3@&ue-O!xH`Mx zj>WA6a=~)S&9@Clxw!xwHkCiheV>=>K=;J(x(E(=QV%X3u8G58!7%0J8zVUAr4;jq zscg194u@$H4piD&A@LZc73St8F>dBS>)v5ogjRx7(%50T-b67^AEw+q?s)=S(3*D*tkDB1(+%a~RDF!AvQxCpaD@Q*O+QEB&M3 zm>5Uvgq-Vjm~Wc7F+%R*i6j@{F_?QykV|vA=V2bx_e6U)g=fWCBX%y#1z*SJ`oDk{ z@r4Xm)*L_9oB_Q3r$Bi*%Ey$qqq0|&m!q;5U3cPjpASxuSCu4>cxU~|dOe$Mv+~5i zg4cIkOcdRNl=`nV=QQ8uvc@9R=l20~1Edph{KLL3@H8vnl-4^qg(~&;22v2*X&MKMxXkmI#zM}H2XTVu4MHZ7c=cp2iB2>M(c$hEm_1R zh;u>*B+6ZyJ@c}+HM-OD_uH8K6kDU~m+s``@7#JO#inO68q)I_ONuSqvxVE~cx6dR z12b)`X{9Z(yf3MbZ05Rk&v1X?62*)lL!7w(WXRk=%y;snkTD#?2pnr_;hsmYb2+bf z6f;%&eWXgerg9~>+GeSQoH)eH_(ewK$PO? z&`#$wShGIuztU5xxjGMB?TC364}?t3T*IP=flz|)N=r+6qj+i8HgIQRc-_Jk$Kgev z!gy)j4O|pc`j#o~;j1`yY79fuVXnXOV?j$8LxR{mvQA(oydaD>VM7?fotJRip;v z`;ovGLX<~BG#!6Se|Gu2?Qh+iZfvx@b!R>)o0>W|-Q?FKimweROgpy|(_7m++*wj@ zWuv#|>`OPQE!nntyOT_V8Us;@#sD!``>!r_ZvW`GQd8$%Qxz`rk^g0xe(0{6@0FR+ zpBZ1~|5&$tXkGc3S@JQ13~o18PZ)|)%rGl@GmLj`BgT$xCv&Hgu~S(eQ{HUN z}g4x;I#XO!$OjZ<0L-{nCm-6e>NQQsJ)q(OacwMR= zP5W$Io+EK#WfC#CXhQtGkNlc&kgP_UXd5gDN9%VqE^iXT8IknI;@+=CIGR@zmxkI! zqVMUt91T0;!c-@WzNhQ+vPk(<4vn^%+E$_%x#H5(b^Xam1eIB%c+qt~nwQE1(ej^0 zI9d*sYmY=|QF$Pm-W`|zjrjC&X0#D!mr3l||AVM+26groKOBls5PTIuig zxb$x#9IdA(F8w03(GW@Rj0-o!g&&Bdr}-BFPkK2Jj+RIB(e#UO;r0Kcf2rW*tsq2c z+5Rsj|9?IHz6S|;aBsMgqi=wn|6xL=|1Yl4Reuz#ij}r1807!kzyDi2Aq{an@@QNb zMaFpTz}4?1YDWCII$`mEeSR+gwxlho%^VMlJ#5WyMl8^8RK2lCDJ}@TCdE_xbq7}I z*ChKj{Z(|ItU7@d(?ji&jrx~WNzRw5sFj*p>4^8X{ug3)x_0Dj$@3Wsu$pbfJ8GR% ziQEXaqHlq&g$r~hfzEn~PF;-7O`!Am2(^c_Tkr0oRLmo5V^j(e);X!gvc5+MCB8YlO^WLrrZQlBu9t@&lww{S&W+^K#Bx15+#toZ3}=5Y*TLb#Qp{t+8IfEm zv0QtHpA+bsLe~kpZmhuMPi-GjJ#i(T>3T)irdbHnH6*G#()A}5Jx9EamkSBij@jj|md?UHp_B`!f*qqr^{rq-Z|s7KhgtPl`BFt!TR`2DII@y|nGrPUOU$V&(7rm|MtsIul6)_f}*?mO*P(i5G&ulAe0Luu^`zI>G(Qzd$W`y#nV@ejvlh0KNre_+Q{iJOCaBD2G8I~})le(*?rzbn@F z^{7!t@F!@)mHA<5&>idjMZs<8{ksr;Z}*x zEipPbgUT#Ux0z;&Qum1u+6K?C{ zf$;qBNMP*ua_tU;=ZE_OsgYc1v0U2&&k3nj3BceFfu}B?=BO-6$3GqW(ma8Cyp5EO z87fcyNkPa&so#iqA7+O_303+Vwm+Lt;`0HzFB6>|<_E^dP@Nsf1y;1~(b-{&)S_{* zdQAkXqBM*7aURYps)QWLsPJ=@U1d!!D(iW+SXE>h|9oD7tW}<9in-xt7;N)W*N(sjdR=yMrD&qR1V#rLyBg3OPt**<++t6 z)$v-5Az$mtPK-X8@ifm}VxG*;CnR5O_{urWeNRr=+~ktmdP(sFZ>jG#sWmKG)9QR$ z*eE?cfu}y_0fE+1Ar1#f(Gxsluvl|Xh^LrYPYKG_66a|hW7-Q#irF!Xye=gD5pC@I z%AxetTEB9zCi=eIJ=vV--45z=yh(p#XA<+YzAcXG>!-SlW+{xbiAp?%J!KVdF`d@$ zwUjuSnKYO6`t3Qh$yE2s2`Xc0nX<8X2V|E)^ZlxqUe|1b-@xpi)#iJ6Qx8SzYu}0q z^nJODG5ynLgLSS|GoL&rFs54T2LdoO=m;}&i(@Kn^PJ>jMK3Y`hTrUXTd>*~(+Z^h zR@h*k$Zs^C_ZoB6tqF$;oH|wMx%}%%DSLjBX`{8=r7m3S+YVZ9`jUF?FdKQ7`8}_} zRN|y{Rru~UYk9Z%E$Czc=NMzQmF34z%eJW-GYUzm0`*e2wAj>#u24*AO$Fa7`jkd>^Ff>XASq4ou9V6e zOX!|)IAtE8HV}oF=HI!NnP2XD!8*S;X;PY(F{)d$t!h4{Rn?f*n%J1wqH2Yo#)UEy zO%=}Ds!uqa)>v#$eu*@ykF%|mW2`}2P8OfmI*o++{KB9uN6iD@#@56cXOmk-p%ijH zo7Ci#dFlA6RgrTaUrulO_;QV^5$!)HC`qSauIm;of86XO`DNgh$Ni*;;XQh%BL(H8 zHLetj(GJ>+iYB%hdyAma!!t8RwI;WKj_w)j-}=Av~hteD8VD9?*9_r`w zC+>QV<4$+}>;y3tHWoCh#Kgg~m={j#y6v^~P1sva5GRA{(_wX=?k5G*vizS|O?UfL z;@|xrNGU(Cuio~R0LyAV3tP{Z2tDT`6Wee-@B2;udzjnG2h)AC>vzJUt+2gOPm~Iq zzn-WxHk);Ig~fWhgA^6>^Xl)FY*TO5>y}x>(7H+cb8TTaRWXZN%ZhOvp$vcjDNB0hSM{}1wq}jst<`Pqi zi+w5EL+x|#4U?iQFALfU;#ssO)yuZ)8n$qK^;$?;H3AK_lH002#LfbA1V1DK*uIJP z_dZhSSeorKGqw6wQmehG`U!4BWofxi+Mmd_m3gU!9r8c}KZEt>C7-f+4a?IL@tMn@)3Bl(%GX4 z=4`u1G-g{cf7tfBN=zx+a_4QKJ3FYaqTVX;<6em$&q(~3$VY3CR_)QS$D0-=h7sVdw_GI6?^*>pdKKh=*|_5E%F};L(0|K93cJQJ;Y5xk z)gFbP1WoJjw6V47^W;;mk*j7`s26Yt;Eneqt`h!u)np;LF6}dtmG(S$n43?2m;OQe z+qzH*@!sQO412g`T!rN^aG%FVN|%2^N(jFlyP>rIKk+fwkkWKMG=+Fy@G&NRY4Qbw zv5L#mAGFvxHMwM2p7%&awyg#`H8l)5d)n8^98RWOwrS8r5@zqUJY*%GyytsJuY;Jw z%>29MA^l0q+Pt<3G6A^~m3+EUXHkNpvYh5`^D#3AIzp3)_va|7R=t`HC0Nv7C(gDN z*{<59E4|)3QgCn1XzY(Q`)W8ch47>wHTQn&tL8|_Mc&Ru>%{ic@F>!%BNKinEaC_} zvGxj&S(o#q^!z8GDRX#_shaD<404crOdzETfWTa|cv9T^|Gwq5l{L(QbIi=p$yHfwyhR@7n=C6 zKv6gG6!W`KgEL;tk)<=dBgXr4rlF<#q?X?9rR{8!+DW{(3$>UR$b=e(J$HRIqyS4z zBH>pGeMyJ8(Bu#K4IC|dpks{?nn+AH3S9L}UACnHlxn!Mx(&=7XQ6-cg_!FJ;yJ;q zCsRuKP{}V)x79#JW82H2^~FgSYB@u}YVJczovy)Bk=Ib6u-Plel3hZm4G7@mRrqTvZU&dMABAqW66iQzh0(jB=gK1Qv7F7@dAl@sRgyddr0wuK-+eQ zK>Lt*w+bF(mm(XSc^f>NaOXD&qsV)lL&8bNk0Lhi>&v0Z2YHG?ZPIS!?)Op*zw&xa zq_9sBn)u0OJNo{x?zPKg0yvt#gSOPvg|}-!uU6M~*~Wc{wGF1U`)~#Pok}u_oQ(OP z{t`Q9lZIc7_@E|;`-fkVY+PuAAwhg#7*;6glp#Z#HKWIW>gSTh>F3D(bJ(GV2Y!ut z_e*{t|Aj>g@ejkF3ztY6EMaZXoXw7Bq@0lFyIQ1B)UT!mXkyX?hdpXawO?t%9yJMKG|e@`SV<%ucNG6%oF4kn5A@Ikal-Hq_0S!X zmT`Yf%eV)1`SCE-GpQc>5bRJ1qI%dB(K8Z6Yr4Hqx%%pPDAz3sGklU2fv7o0?Gd@a6C2&l7jHyfu%P*3Yg%}B(4i# zS2@G$KlQvc3XUT8QE3#+g2X{b!E?ZWVeoSS))%MA@$`~**a;3xR^P)_O^BNld_pRR z`rt%8(8BiFgNQ8&!pB_tu2?{G^N#%NHEe>`B3XoNZ59Js>q zg_7+hp5t>Q+skyM5A*A2pi4P^w8Zh$HwWWCP>T48gnBqqFSZ1c3G9$!hKHzqlKPfX zjt}GT-O#;K+&4qiqbEMsP?h7L$^XNNNJE}r8*913&%?}wtc z*ee`=YKU_DZ!X94JGINk^Lv!Xcf-Cyc|K~3jrSSd%N>t!nvxH5wi75nITvtj7*2(3~4{usYzHtdH7bJznii)qy~Nx7E{y%@1OHd#}<%*+a|d9@n; z8FqNnK!#ZGD`;?Ecl=ejFT&kFkvNaq7wOIe+kJ(@x1%L{hVB8jbY9;lac~|^3xuu9 z38H3bE4Yu^5-Ep==l!&y+c3v$#=9_YsD`LrZaw%fd|F^K=+K=9w)+Z?uK}H#9>0FBu(8qZ5KsMp$6GA4TGiNVQ870-YB2dV8a zL40_STHC3=badY#LA-D9ZYi#Q@albs1kpA4h!nGRaBL)3bl)LCTt65d2kQo}-gih4 zZy0=D%C&qjIg%^7?~oua96Tn_z2=M9T&MFmwHZd|@Tg6W&heDL<9T}zM+#m5pS}Pd zj&dUDnb&`bRCBGXS1w?As-=D_z~54uMZYhd(0Tfn!LW34*gCdrB57QD5S~~RlVSgT zIf1KeU-uc30@G@-;{S8yGfJ&#I^72XR4H7S}@LOV37W=R8@=A%9ZT=acLU}n%Wge)I z?o43{=%h*9GfndOpAt7;7yH9}TIipEymY>%KL6qTdVjr?Yn8}A;|QI`6iSS$whtsX)dMsdFVwUe#Av>FM2dC*H(TU8B3P?9*({<7x3NtTRT|HzZLFe zCeyaxI)^8wT}w9>%p&w8$+X%-9WB<(UJW@c`kSlQrdHde8P$db;9o!en_8q zcL>%0Z4IQ zpC~s9XywqotD=?bcP8L6zb!;c*acOZ)IF(4gK2E!GthjibZU zKqIQQFa|I0$m--5I>K$8*|OEj&=4N z52a%yYhf$D8+*{X4KKr@vhMo%4eJ(_X^iB?Dy6t7_%rQ%PpSS#NS%$+-wFPwa06r+ zO~VaKJ=&$$mykKA=Z!&6;Us4H;%RhW#;Fh|51O1MspkXXO1;a!hfo<1qV=Y}8oHn-e>(Kt zY1PRL^hf__)bPi_`vq3~Xn2ZU;~Hn$%t@Z`#zq^p9&hFvUE}S#hAd_ar)@|#QL7@0sHWMXZ`egV!eEMDZyuc-Ne?6;B&%>qN5hNPO)M6aW#*m{zZ zHMdSpc7M>3Xi!+R6(1&&vkwa?zUwefk`t0gWw?n{io%A|iM$6rx^d_}p|2jEFZ?d4 zr%KRMFGCtrieCRTI-+(c(0_HXK`F(wfKq&KNath4{Gi!xu5NMc6DH6!o($i_>g=5v zIBAi+JuD$HW;GuUsjvgfib=sd`*`GV#jT*aDyQ+0nl934{o)ffapo^at7@fo^d_y) z+&V4G-PMtppJLHfbSL(lQ~S~=-(tOGfCXKH=}8qY-QOSj7<(7gr*Kf^DId{Y#6NMB>;iJSvw_>Fo|N|cbTX-m4^6rr_T&WDiCQkX~D1y2Dn zeWnN*e<^rOeTp3G0zS`b^OoDzvK!SlE@XT`Fr*eJ^HbBwwA7i(nW^{KmfJYnGTT1w z+|(7Cr>u%zPkt5Kz*#DP zHV3z>j1=iUSugF*7{j|W(~XScoP*1$_LPmbj1)b7;TW?~{cgu?g2!-Lp|ov8UFMOH z@n(TBX6W=q&E%Ph z3Li7;osQpF%erTyr*81mIsFamKY04I)X$I%qw+JAi67s8X#5;wJaz1;^C18U>9-)ib(GiVR+y-Ar^CgYe(~fzw>Vj^lSn>hah&oaAIrq?UELi;3eW?!^C82bS^pR zQ;NUx!!CQrY27XMChNDo8!%7ao?o*{cN;UOX4RE5QLK3quQWS&y2dp5YO7Kt@4^%h z^C~gT+m>9ur4l%~h_S|XzS z;d8@zz8snl@j9%hI5mLtO`izkVrXrhwslVPs_{OBh>fzM08RiYjm(P*@!1dqPX}|* z^y0|CXVC4kyryT%P~yJ^m82YN_}?j_Uc11Wdw7NU&%CKAG?3#LghH&%r#ZSFypci( zJ+mN2{6hDh@L+F_Y208R-*64{nf@60Oj`%u|6J41!HPc%+BwY)3iTG3BDEd+<$rNm zxsq*J>do7%Toz7qy@Y#4+F!O!br;`Bic|R_l2pc+dOQBU_T5#aM9DK#Kj>h})6M_% zF0PL5!*^@eXy7k#r-^9Fo45m&8JIyVKyG~qo{0?_=CmecYGo;xqHK)x`5_ypb;Dzb zwAivq1x{ybO^w#pidt*6b$LaK&E_?cvhwLwweVcRxfscpAx!Jf+V{0ADVxT$=eft? z+~hjxx7D5PDzP)uvR!%V8(n#+Pr3AI-L9Q$t?;1G*|2(Jclr!YU1r;6P2UKAiNklA z)ZKTQ;4zTBy&!GXcC94u(6jRi<_SF*J14?64Dr-7ceIU}_&SGf2PvV5Xn@H1j&Ilg zb`>cGBGbAeh(yz>khTSgWbbGZ65zeah+9J4Lev+5`X#J^FY_|k9i#Rb6-gxru(z(| zNpUf6!yc@e{}E&z2;tbPzR~_Hc5(0X-B3+TbgpQ&=JOfk+OiI-foI7-g=Ki3?O5q( zbaXqi>y|*vh=%RpMe03Q>#MG+Mm;8mc%iCl5kkh$#{!L6>f@l15bt&$)=x6OYQ<_& zqVl$qy85HgWYo5~RW-}j*SAS$W2?DCWF}HHTIcjYM%vfVmE+ar(e(MK=Xm>9tDnQUj;~4>=CyL=XKT2XT%*OxjVJV;M_#qg?Rgbw z@ATDj$MmNvFt*RTspMoLhnPmjRD)FXZpEE67WwvA|Fbt5o7zf!IddF0IY<-Jthj1T zv2q4et8N8%-ckY8qndlfGLC?%ElTyhSSggZdig-&VXlt5Gf8dRnZ$8vzIH3)J!(zu zIi`E2f-w|mZ?7Qv%=`k)k_s|e#kX7k){7_lcCz0~slyLJy9u=~>@$-Zc*%5IO2|b^ z4yonFz_-ubH-X&D{l-#GCXj`=PlJ`Hxq=*E4jvZTtZ(*s1X^E`51$evImjGhjOQ)P zp}o@ER$U3IPl`YnsJPPkv`Vid7eVu^;%~xMX9&WI|6Tn_+)zv{v+XgGw#@ z*7ZoW*ZQrO#c58AteqK#z0eJ=>>DjwVLPw%SyJ&N8JUIQ6n(30PvZf~PcUXIxG7--I}&IjQ0sA#0JfZDjZQgNJl zk%6p7eJhnGT&EP`Z1@chdYR_^_x|BtI&-J&q%*gDC!M*gtEm>HbsvN^Y@rlRE;093 zR%g25bL{TJH-`#(t@hgcCI1-s4zn@)X3Cv;Kt92e1WF#!DmeCeMh>}=v z9@$E^USO3>mW8mG*!ywz8MFK`V1^A10&gxW=KN3+p2;Fop}~DO{s`+K$xw~hbV4#Z zt#(c1v-W4)we%C0Jnt}Mhz_%EopTZX<5p`t(y~2yYhn~ftd#QB)G`e?6_n@43o{nXj z`V&y!8EVgn*G1b-sEDn4D|C*&4#>-9cMmDt!rctd+a|8SckSZaO^gxe*Ts8=47Y7H zu?WwWQY*~s`D{tjW+*><7-KoLBbv&g8*O)$L5lCe80NgnNsD^ujy@eP8Su&v+XwM2 z4d@vP=o!?4$UtATar0a|U8KMOpMU7|iKFH5g9`B|Mt=aB(fiPf zClBq#NHh=CayW@lG}y~b|ExnHeubIL=S?X6v?mSnq@*c$6gWSiEIr!uw4erGcsf+R z9Q0cf&|5!r0&}YAs#QEJ&r?}`HM*M^ZAtsBcXcb0_gio7R;c$|E4vjb`>jRYiq!r1 z4p+#S%x3+XhS~0{tYr2Up2ljsi7#1w1|g>VL&a&`ii*8bc)t|3NnyJbrm30k6e)ZL zr6WBnrI*6{rLav3+odqA0n$t1kGjsFR>;9fIi&D@DQuI%b}3A2jvP|>4BCS9L`pA( z_e){gMyA^?g)4NVi{VyOWZ-L=A%W?ne0z3~rDM2wfZrjw77lbivM&JxIy>>Evvwyj zD=(yMg;aC_*4Ibu7u> zOiV>Y*!;%A=l9uiR9>?)*F3eSwEDcIJ8{xEV!{l#$>jJ@nQ+dQ!y=aIV2)erwoG=A z;`ezIsl*o`SZD%_n1ioaI5xb4b07Jei^v-bZ8^V_(!a~+g4$S|+nMZmRj`fP*EFwSKd}1Nasa&v_ z7{k$h7VvP}?tO^8P6In>qaZNEVjza-UlIL_K3ussWL*8HjQvI4S4e-%zxfL%uu6aI zzxku_2C(Y?yML~QV&{Kw1o8#tjge44)a&3?_9i43~zHaJ)?b9>i^^S6qEZJlXL?KrBr{WwI@m6r`oP8apY6D@#?}iiy z3?wx0yP-sK6p{iw+Rfu}`buTa;h96^fQ?hMx9U`hgSgxs=0+D}UGCPNy-zP6DypY^Kjx}9Ae>X|2DDf&nV z4XlRr@h5@mCv>fMbrn)#9kBQ%-AM)wEVwV6Zi<$|!uME^BVnT7~qqz@S~FUCT^h3i55*Rn2S5 z42-RLm0@v`$>h4#)#hT#FS#ac+pz5-G{f4YF8EmKq_YJ&$Y`+g7#N&gxe}Kh7snuO zfxw~>nHW8i~4TRb(H!d(KR#b zS4!7Ty2jFPW@MnPboYoAmyJw`SuGT1J)elPWQT%5w>3GJQ{lr zo~XxFO?`8HGGsnaNoG$?eXC>>p!zrV&34wRMxD)&EEcCAVGzirZwje)j}a@g_>R9SudS& zcMZ|A-s#@0&Q#OIb&Va`#7Sp+Rheg#F-Mj=W|h-9(qeU;Dncs8`?B*ZVIo3*@&46$ zS*T6SK3BJe6eq>zaJs(Fg|&0Th5}>TzDDGY&i+Y}IokxvDc&Rb9>nh>he(PAJGeZ) z_k^6?L58NXWMbWEb8OgDYi+B;s=jHj^*3HxyKL33&slIHv28aqyHmg{e|7_A`LBfs z&`u}%y#d!ET&~W&F@GEd_LiqfdMh#1KnINY^l=WFvels8y&$ z@|c+)^O)(-WWj^wkvNZ;Jb27Z_2tA$oGfX>;S#AgPO}yEryrDf#RsS32R=B-C^5-L zzcdOvGVVC_W+1+VMK0|92N52E4tOA<1Ad7<_T$ugnSJ%9GMr7f!$y?tnTr{tV(mfe zIB!XH)=x-DHeXbowR43k{jAbl?#0(&@GT}fpR6A-+V%Id=4*I^-3b0E_T^zWw`K>8 zTNf*2Q`-n4T6FHEIeL;HS5TA;3*svE!N*H`Y&kP-_RmGk&J6VKP6HU(XmWkj> zTe;p{lh;^bbRJTboi!4s**1+dB|Uorl0_k}G8vpD&VHxDLJF1GseVlNm91}FuBFXs z+|+1gK55l`tsxUnSq(rg13NI6kh)d(mbL2>lw{IQW16F7iC$_48#z^G=-1e$Cb{x) zB60zCT#ssO)7bJ%*KY-yLl>9hGSAHNLI(3gr%WUG;!=?kXOkgQd0}(&7h{Y~$Czvb zf4AXO^6YbT+|1zVDDaqCnSqXfb?B@!c@t{dq}zZIl5l~pkg(@Lru=F-@nbIZ=TOMssUqoQ49UTFt?8~vvUz-uF{VT1W7hvT zkQdRRSg{nR3#i|I7G^kBEQAjM^%u~4$4GfY@ZZ;^mMI$9b^JT1;?4*gD(ix~P)SGpF&`(o4iKP8b! z{;G8Cpgc#{ig=xB?+MCp%prUa5}Hgc=P@Vso=^5NjA_jR(nm}fOIB-$f>}YC7ectyy44bTGwc;9Q=<0;ddLh>D6u9 zSeyk=k$eJ+p!jwmRMg`Q4m>`@iq8f-`Zuh9?^RW)(9*91Ukg`TD^GJ@u~GZC!t_zj zGq$7|nCB;r?@BE^Zq4hV-zD<}3aivka9OF&TX6k6D(iy>XpDDoHmnUa^hcb#Ex|ln zM#>$m_&HKxMfg~DJ z%1pTjZ13s>UaxCg_L;B}qufX~I?o6S(|b9GZAYvZ`FtHs{}gCl@V<|JX#nnz;tI>0 zdrlNey-&-%X79 zJ1-4&Yi@G4VlUQg+iU&Oi!&-xx=(w@PW*{24gNX0hP0(ew9GTij1~HOZDXfDuLa)> zQSW1FEwN&^E2F_}^JvFH@?gamhuDae8Qt6aiJRJilq7c%V^rLqZ4L7Fyw(mqwVM}@ z>(MRIEiyN-j~wdIGPOEQ)uY(OY_$IKJeAXq4jSDVcHM(4EI*_1d;~ICCM2Cy%GaKa znsobGM>=N2H6EIJ|KO-9i*f&2)}XNMUp0R&V{f_p67Zrn7y9k8W4Ne&Wdt(oT7;8u z6;XQ(>?~qu8~kDlmJ}={VlBQtWbtDE@y-o*ZsA&E`+`(o&ysfWG9>LCyKKBq@!k#h((ieu@X*G0)sk)vlV4?BHeD7X(b%Hgk4O|r0-B?rQNPBNP9m$ zR5G3qm1gjyWW0Bqbz21_K`)thH{ zf4_zAgVq}={TohGevZ7Cyr0n(bn@rCPdJJh^2@$gaJEM1rq89sH?ypT8doI`BdS7i~);Y{gk8S4oT!l+(Z*?{;)JC{8%{$tjXsm%u ztlKfhmuauv--<6b;5#)tEmZd24*%l&TN4%MQczB7qUvmNEVbeU0Va(2w4e6&+!5AJ zS5V#EUq||wVnzG;zr$)2uu2D3rU+K)XzwVjQ)KdJew2?)&HxT$@GccdDI!QE0mqCO zj>N|rfMroo!fp_LB;O$Y*WSNLSp8kX>KkD7*Q>Dl9Q7OMWGC#GEC=OQ6`w*DmZvyU z>KK!~Zr~KtzL|rJ>L<;K()!Vf^&`!jYHVBAlJL!01*}DRHWPA~946%W+3pQ>pFwA9 zU+;nBhY6ZWjID;c4Rus^AH}Dc`q$A_?KMacDqbPUl=u>aBm*AVH`{h(_wP`j2OkRC zW=U}dpE}+|?F;8W(-dKz**KV6osH)N?*_+c2Ys`4&~>WKn%tZ3bZGWkzw>I~cU7Uu zcl=GjR}7p~nm7vIHLY{C=7=@LYj7rOR%^75JyxGL!?^+}wT>FcdEtna?M*eA9p?mE z&K|2G5}WT>?^x@g`zLf>qjTE$YFG_BNj{|9E-f^@Mr**EV#=vL%q7ih;1J9t#yP1R1=G>|>o+iCBNO zJ!D+Lp0CS-oj0qhw=VjdDTOobf6+KA=aQ-Di@%08b4A2bmg#2SW2QY|9rE6uq_lrh zmyDdr_Gc;~CI+BMTSx`_LMY@JVX*PX5DzYb2qoSrQ7Jlyjw0HabTAH9ym#QSkGT-* z4J+pQM@!NHJ=MpGWBoXLg_%5jw$%l>66qvMDwQyY1{T9wNKf^pV1-=k|6KTtB-?Ye z8(_PFr=SqO?o-_`y53W}Dm|0JK=v93xdE5MwGi@$GkNN2&6w%~R$UK0^R-5kU7hL3 z#@C-4t)qGlT2s0+qECwipLE6Ft!=c7x#n|xudZA1KHoDSFd!z3*vY> zd@vYM3jvA|Zws-ID6*wD86oyKctLy|V~Oqy(fIu%jCf&$&hT_D+7KEM$~tqZY(%3; z)vR}0)^;&k*vHpbW^1thh%eA+-ArMzjoy{goqjoHW!*7%V(HkPBLor=Nt3J-Et?Ya zcUvB@wbVVci7{r9-Iiiob6qxRv*3#db={7#Q}~$aY!5~q9UQ1eyFTOj{3?JZk$wCcw7(G=)!V|)&^U0q${(2i8b!A7!hJj`(qrJ6ydnb zLOj2P@5ym-Dda0H+3;%q}m+dy0y_Uz~UR~>$%MEIEaN! ze)ESG#-Oo;=WdBM_?+@P#XOPZIZsN~m@-VzZwxM) z`I>XPlbNSHSB`$q;b%JkC8Qc(SVty}_8Lg0z3|pT$1RQ*9G4u0b+^>LP?vxYziWsW|`_46Fxg71zzObCNLIuZXFi@|@! z8jUmyhMA%i@AkYAb5c(NVcYYzk%_Nbv!EF!KyovYX=HUd_Lsq9tA-MYE$16=)B>*} ze-#w%y*EMMoY&@nR&o9)H0Q)Vb#Vf8Q>uGn&70LjwO@Ez?ep7m1|X9?z$N9>aUo%R zXK3K3@X}(=lKl6r<4j0@ZFSh%VhE_SdZh%ZG9cLa^=z&?hjfodZT_-R919#;;V@bWKuq6 zswQg=pS?Kj-SmtVR&a7H)@cPl8s1GI!zkY<%%$mkyeFBOWaNhizJV1SwkFfJNHv7Z z4}OXF>!J2>V`2DO9J!a`PQ(AxwFvR?*CUZuyp)ca zw^a&_=3yhje}T$46}9#=@Sww&o3Oh50+K+QH(5GoRO9(vVDPRD?{NM=de`FdAzeSN zKTG<^-c8xm3T!U&?%jB1qvDoq`{-)DbI*FF5&y%=i}kIJYCCeG4$-A08tt@Y|`n_KWQU0Q`9F^Os%tpjN1ThZ; z5-@Kp4_Nd}(NHf%<`QaIg=ZGe>k0H74Ylf1f6mar66gTL>%y8J8b}^yj7r$>S$obs zHTN)v@4#b{UWhhibdI%e%wJn`k!0ytkQPnG1FLJ^C0RJH2>(9=zxPTE9~YBBMn6Uh zMnAaXF=DhnSW|PTV_A-;WA%#YX*$jSVedQO>ng6iXKr~#?@4+pwq;wkBtO~6UCp)( zwj=4OSXM>F7;t!2dA0;fFc3i&ynVI{FtdQOPvLCx&#y`)~opYv~`A@l1&Y7D6MmE8lw2b(l>aKgpnjLam2R9{x1-^<#YU zr^k*#ZkjvL-R5+sd0;>0t5; zl9w@G3rx6iYbez}FWDB##C@Ur9%GXq`V$WZ$FN@CeOR_>0~X<}~6t_1CQILOGF;?k%R>wye$j?M~l@XkjWn&_>c(kS2h%fwqhUA*;g zi@x>UXTJ4+9ALjZLgSzFKA+t0q?;?#ZJwQ<(&#$;C^S2yDKkR*mS?_1JI=78#ojW} zZ^e0vFZ8n4Q|H@vE<$Z_!GgTRrZbfT7BojsPc8Wp@*f;-66|Wuf^^wL9PF%37D@NAn9`EU?ubuQ^r`1d6E?670<-b2f z`>m&@)*SuK5nJuX{^5v)r{7~Y_Em9@pmV+v*q<~}k3Fu8&`sj*uP8{h@A4yD#t(YYW_QY~?kT6*@~orT30bS7=S zcDsQuLtNXA^Re-=v*+y|uC=0J>CDwa$TyFOwFdUdXfJITdr?i;iK;dRuoFf5QTZv~ z#$FWe8C#Kd2zmmrh#Eeyzw*Sh&=SFZ%Tb(~RWE$7;>{y?v#k6BZpFgiRlmb%30qsV ztzjs@E?_CaZ(nrFqu6g<>i!|aKEda2oR2fLeZiMm>S6vc&d9JsKz zd$KO5Y^zv~v#fIT!{CkpH2APaI81x$Sg!-Y)CRUBxf%GaJ%{is{d{HG%RzzPeG8VN zKIY&ZH~B1mRmN_5D{FM(QOvhtg97Z1MzNdRp9=l7Oop1+>^r=Xy*m_{J2>$WzO7Rf z;`?~X?BasuoY#CGz4S$`IGD32c@+lKqlZ>T>8_PZK_7)#v< zL%NUFX5{rW#;)POfd?@MV(On&k69gbB+WV*g2rNEJ)**(E!W>wOYYRvuG3!ZLfjtm zY`J}h2NcIK*z%tOw&AN8BPag-jvfBQ9_c4qVE@M-O|WXj{u}La;#*~(? z^BL@5;y&%)9bvdTg5Hb2LKo#(VYi z?6=$S)>`}fBhJ(7N1g&mjys6wqx+MYcMx+B_HS7?T3IiA%=0w+x4BPYj)Ogk!^@cQ zy+U->yi=iUxtDtMK;FbMMzrg3>Idqfrz-#WEWT0|q>`CCLOZVAarM>a&aYl=c7{5y z?VQUzi?(5ZKJ~O+pWoHpW!2vg_cOR)H`V#xYZ&{*<&1r9A7iuL$5>=!WM~9(EgoIm zgFkH5s@2o}R}b#$8;ql@q^9_#GtkF4ru2WyhI91LE__T_!s zcov%J`_4Ii&h4XVu$1|5C=Cm1FYujzLn!nzERr&=$+$siL+l%_Mf)Rt2kf0c0E}tO z;{}=6L-rmr3;Zwo8c9>`H|=clr>6>bS%=+NwMz>f8+s$ExS>|TPf{~6*-nT=ZZ1>~FX5$~qvy59z}6=D zC1Iv^_b6^+x*RsU)bA$G!AarqXHQT4`sVfd>OVX| zI|do(XKqm3_2=&;KhMoTKS4^l*vsoYJ(YIq=n;lBJmE)i=TBg>4LWTYLD1sn+ZJNe z{v>_74YLoWy~uJ;PPLq(H8`C;%6xtGclW|odJlQ<8V4|FqLhM&d5opBRdbb8(LVSJjeWj_4AX&Q<7)>e6M)&TI-FE2ey|3zk@ZFX&9uA zM*WQbr96&NF8`iKag+AL#&=w|LyNqg-(ugwAGB_tdk2&FvOZjCy>#un z=NlK4dtl=nV3P+<9SQ9B5~lk+Leoa<=8et6Da%cvd80N?%{XfI!4rW4jvfr*OIRJ< zpTp!?#ccMnZNEToX6S$g+2qfU-+!aMrGRCW-+y&6-q=66=p2anjpIiToPO=}X&@BD zw*~fj8-hFT-^V7?j?(HS`xt|rEUki`JHf=-hw6pa$Yr7}2pMff*ow~d1w;JeS)i=1Rz*f74H8yRE%i7>TNuo|9~;~iZravDm*WBF4!lZ zIrNC{t90@~R_|RxLA_jJh;O_bp zum*mq(}j}**A^pmB6pu*?0Biuf?tf&s=U~)66XeIrr#79+cPwB$?DdjuJKXvmKYe_ z74GcsAL>T>*F0*%mVrNv>oR;Fg|L=yh4*w9R;QxR%qpZuc><*7}d6KN9JV z43G5<4I=%(esgb?uq;SEbj{wciS@&W(U)oG1va&heZ2Dca~L5oZk#wmGlP%j1@?d2 zwz5x6eO7!ECO7-^)U_uA2R@pYoBeJ3_*D0a(^Hq7#ElOwvhI8Rh)0}V;XPKDm30G7 zE(1HV7$k=F_3aDza@1J*N63(eOcz2Ia9-(=%2O}HKUlv`9Z)pc0#X)A*e|1~S-rG@X z6SotyMQfY1VLJ!_P%NXBLv%_C_-;SPQ z>Z`dJXE64#l*M&nHt9Nc|BaQ|=Cc@G(R+sv>|4}|yLaxtdPjuztf>E9wSNIa+1TNd zh4_XwTgsos9o7$#-j9jX@Z~#hDhci&I~n@6(=f&*I!jH)n8pe`&-&R1vS>Ux=TEuA zy!3JGh0rL+7XJxp-`*S8&(FDC>~-GJcfZ=}%;?>g9l&0vhXoFtoSKC*uVdn!{v%j( zusqCsp<@7R9gHXBXbgy-OS@=f!@1(!JDz@{`Gcr|Ek6`b2Ww6qp*=;0xvs^I+kyQR zy(3S=LRbJ)^et#8xFMSc|2KJ+s;H_&y zzc%Y~niI3hD~_VXmz&tR%oua_dSdms7ONKXe<7v zak0qNum~q9Z1UpcRDVJ2jI%?_cMJnZjH0N&>EW9GgW)#K7!KvFcVWCfJvDyx)YMy; zFMQ|N$*HB-2Qox?X&j#10CC`Og*Ceke_w<<0r&Vu#$Jcp1UjXYb)_emRZepQtKNf= zCNuZ+)cwGY@TGor&7(Bq;tvHDy0A`g!HUVZBQOzKcvl6DPNbJ`9CPkrthT6(LCEyx z$(b;S55p$E3jLZhaf*dWLrQG&^V32Rma#At;*--tIC#_9EosQG$vMXitoe3iyKoM{ zCjb5DFm~?!!RLjRT6U%NYer}9o=9XK2~fI$rHm0@p#7sy#+<57AOpPp(sHHE%wVn+$C6Z$ZnB;z*7 zNPGJh`cyCG<=a{fSnPA?BoEihxg1++Vvbqzr`$s0um>aiD*3M8pTRKlFk>^r8RZu- z+8?aB4r%!oTDWuCdg-R1x#Q+@Xk1UizRd9>-+t_xtXssY3^GjIT=}O%yznh0Phc4H ziDEjVmYCu0by&f~kfeT1XC!Aqn*?(2yBi}7$wt0;qXuS4QdXK5855WfEW@|v3whDq zl~acf%^R+zwcXvY;Y6(MU&p@CQRLe-G&B|-jg0K>>y7~B8uZX!+-4(WAWQKqH_L&{m+m{ zOY#2{fsg;!a@(Ai*j^0AD$YVuosrJ2KE@Z|(O%oOvXQy`?nW<9w=(%GKF7@B^LTA2 zbark*V_)~kPetEiNotUszVOKKH_k*2dM5fv!kT zPo!t%+Lc`+orB%Ixg(L?eWQItgSo|}CF@Gozni^)aRw6LpT%pNI&wor>;8*L<*ppq z*+0}dwi3nII6Aa*4215X!JU1(R`zs`b*|jm*B{v!I(v1?$k48l&Vk$-_(xYq3$wbh zrJ1!SNj$TyqOq#DC|p(3vbtnd>8hflwW~)v2YQN&I#&}2t1H@N zh%H5B6{}^g<0GA8DCsK79HI;Zv&iV^(8$L4uweA;9R6<*iwZwHzOj2~WGphVa-eXy ze|!|QvEK24F8nNb5ZWfojb<|yQvf_MBY*S6Do*>Sm#{w|9(2Mn<;}_H_^SZ$EEnGXRsLqQa+vs*#0ozcEbxqY(+bg5lZQt29GO(v}B(i;)9AR077Z;UvuG+@3 zL@SK_7~D15w`(xcliS_fIl|0vc)V|LtSmgnjOAHRqRkrIGd>s}#4zm9UI3npa8CH5 zwG?6f+*c`r;gvSlvr zgcMAtFlJW9Ly*myKwkC@_z@f-wwa<vS`s6sBYFf#=N>p_a}CHxp3OJv(KG~U%8 zVXpUs_ER`_FEN?@1N^aw5c?5fT$T#Mnf(^Ai7@R)1YGR|G?|@4VTj=ITfg)^fd_AG zsG&X_YHw{|)~^bv1V&I1+uAGIJKC7_>jIL=2yzv+p)sxvRVXlJH1mSKsIuS}JPG`klER!X&lZzcRdEb~EN{JHL%m3)eNZ zBi)8pX8*=e2~1ak6F`DQOoRC9iAu3YeAvgkmm10lv7pH&>(8We#?<9Kblx6 zv!{%Lc|x`&2~oCIG%)+9lUzXpudxHXV-9ac0|^W} zIO7V&cVPyQ@-%*kXwc6*INoWeUJ0Ujra_r^+vma`py#x^@Z_Q={7ZWTp7nSr65bR_ z?;=Wyeg-M29-F1pAW@hgMq4uH8PviOs3o8ZVY(r0S7@knWE3KAN~Ym4Q_yPq20hT4^u*?`IN$o;GO>y5M*ol#8}azgO>7E8zmPw(#k?h9 zV)ORXn7=${`EQz_Oq*3W1B%J3x1!G_^x2gze$BfXyAF;96!wHoU9VSny}$BO=YLDr z8{FO3Eqfk4y>lI}EUx2S_t)=uYDFR^<;`=CQx5-)iv^L7RhW5%@=2WXJDtpXN=`WFq!&-1!Ic?NNt*LB+& z#O>Z0qQBdV8Hf?a8nBCL#XOt6%)%^*J{oK$7G4U5yYA!S^XaiOL&`&}h#fZ(S}Zh&-nxmo{1YvR%~O*T%P4ZcX|66nF=p=Xx7hNM-l$w z#*&KUyes-C(#-FQKevx$g@<YYMDUFD2g?A2PQxE{%uVH^#i@soFqzk5ecYQzBWO6>Jv5H(FzW&LM+u}Lk#=|Xk4KpG zko{#uF@hGd9q1Bo56byrlTz|oC|pMaw$PY8doGpC3X3&oYjvojwXJSzb+{dS*~yeD zq^A8wM7D$TYmlu!T-mpaDmBY4_557OF&LQudu;~!gcO%Bd!3TWN(v8jPVDI!1<5DH z^dyC84-kY*N$@9yWq|q8A4m#MFuTn68lY1?Gj>8EcNRaT@0L!;Gc)pGS z6h$8!2xE_x*_*sF8ATiDLssunG>AjtdWXhGm|d=j5QvBaJ)L`*U7?5&N)U$-yHe30 z7}54du)Ar86fsj0_lVe4ikPKB3SzY)W=mq(1s&Tv96{K&B!UM-BPrZB8t$IxWcF4? z!%WIeTPy1jO@Nn!*9+zo6MbXs7H)TWZWh_fYV1xYpUAXtu!q?_E{P_P+c}7gc6x6W zd{2O+ws$Qg^v&Q69Mwb_xc>n^H zgydJeb3}JQrP84Wv!7Ok6o|2t*$2}e5<;MY`@42ZIi69epennEhA!zttZyaB9V%4h zNTd_sd}qPKn8+BxT(sbkKFrYU?=5&iQ1a2pBN23j?tPUT$)FADa&Dp(o3DA@~2iVYMP@Yye>%@?uDlfr|7@KV}xK?srT%>I!|t_mgV zzeE=06_rRs5)DbC5wyO;N%sguT9U$aI>GFpr9TX8jbJ;HL5FAd5&sUf86&t2Jy?z) z%>H!>jXXwhyF#`YTePYf_po$MErn9a5I=-f#^0mx8AL~I?guNAShE0M1Vc!HWk(DT z1(_X=jEoEpp*;V5?X>ZG!F6mjZ8`N2pS?2ZK0(3XNUU+F%S$I z9@%ySNPZwPvMVy!jUGN^cQ2Zp;>b}rTQM*R zH)elcL@b?+Hrdk$>Cl7haVKaQ$ld*s&OxfjJx0c}@Die^ z$=Tt-2)e@qhWla>aocRC*V_*o8Pv_q;I|BiSjg;$jCAV4X7GEUVvG*cVHUGLWB7lJ z1kB)%Y%2IJdc)X{8G(A#iWxjCh-jIQ8%e(w!Ctjd+4qtRYELthJjoVyUfD>#4}V-E z5nk0uJ|TiWir;kpFq$a!p17bya@y0&A`r!+4iyW8tQZL5%}ISjj6@g%X*4;<@k8`* zSd1%nKA-nf6njosl+14zaL?@sM)1*#Z5dA^FNP>k`i8ntL(92prD&3pvVyBd>Ot-V zOtM8;%?aZax2Lp>rPx*6b3~+yaREa|HBTq6NOgdw{&tN+aiL0j5Tur;i@8eB&)oDd zh488@S%>WR8tx;>B<1+v_$Zn$WyI|F8Chb+M8b}ajf@Rl67KJ$=5vFQE}I2J?!-29 z-#{cR+RKebfYLF7=t`ms#8@{ObLfR@1oLNycXbX7bcz=@o|t{Jkt+KZ+9>6$u=+b= z#nq712%pv#YE#9z)EruQqfY@{(v!CjwQXs7#rHt?QlNmaE51NVl*~1 z(B*J$aX1qYb!};TrFrJo8X{BG%=jFWXU~YP$l1C)DfVrt1(ZHenb0_U<4U2nYCg-Up z$n5(K9|PY9r{6W>L&MzbW{DASNe9pwm{*Z&idqG(rjU zyjpO(h>#W^L7c#Pey74`M#Gmf&+iNF65(e>!>eO5&ugm4S<&EYm}j!!3nKWuXz+@v zs#fOtgDO~dlupYR=6PKulFO{Y-C`+>mKr;8_Pk*}h4d^3?dsOn=2qrCH=XJ;2fInK z5?T>uXs}~YOoRCKiCaoHqPlXuXyW|(e2R7uk59p!5x;>ZQT)op*x!uCzH$-8{skib zgktAKbFUk%93S1w_+A%(m1fxLAMHLxH|Q2cLsyTC42{%cLdP#o1jQ$C}ufv^1#pf*n zig_6RAHrdvpdc|3T4^rMYZ7z!qI>f@u{)-6uUSZGtORu_++vLQyT*DEYbB-C4pI}G z6so3*gt{Jn+Eu|>o}#vk}@bn%1NGxj|=s`%xc4@97yw3mhPX6x%8>l+L!0$vLr zqPI6Y3(GLQ1^BnP1vm@^D!KnhPw(93-=owi)W0IUZl~?qC8~pc3BBm;ckTZ27G3;t z4s^f#H1V8yi|((f`}HYEZgnFsdlWxH_e*XP7G@qJ))mD10DfGg0YN%n?l%0G%)SeM zgc6u%pEZ|zXQ9V>Tbf(j!&P;y%$m;&C>GxOQ6lL;S=kQViqh$YY%Or;o+!P&78+d( z9lBrAn>!FV#~}uyM3H!|L(h!TMdEo5Ju6BVi7#^K*^*w@#H=7MxLpXID``Ui$jWy@ z=1b~%t)b?onz~wMEp|8s-q`fUTEYuHBT`u*!?!ecY-840ykIe4GJ=JQTGte+K^g_T z;A}xJkET(~tfjo5T~K#07gY{L72u~bi_jKCiYJIU%vwf7s;1@`(S8@6Eg~dQe+us! z85$o>m`7O4xcL~#I`f&HDeAPgwYj4O+h^(29(-<24c_kMBba3STdG^@S~gd=Ry2fb zI-o&U*W47Y_%rlM#%By4V#bX0DrU||uV&Va^crT*NUvqC8R?suo0&5dfVNET2WURG z@o!Yr8~E=rP4WvYTI!m@Efs}@)BHtLG;05fUra@c^OsOj;{2slgg8Hx%o6--N#r>G zI_6IBmq7(Gp1+=XojD^b6>3H~CMm*6jEixT`LESTUgW%&vIHEeN$e=S>*;9tkiO7NGlf&~A1wlv<4 z`dyabFJj9R{KafVg1>~VOz@YoRSEtzY;}TvEh|j$uVY2={^DY`Ho;%Q*2VjQ@1_KQ z5qnp1w7oVpH&wIKr&*Fip^Yi?0~k(HxFq!r*0$6&hlBz@)a`iUM6(w&#nj=xLE6k_T=8m_T!vsv$#p?o zuB#A@GJSaY!ztAob$?a8l-6 zDf7!9{F{j3$ebrbXJaEF3yumiFg`)2VvH}6yh_l|hI4SMrSZLad~A4p%uyro#g&5Q z-|s~sGV=*6A1@%VcuQuE^p+7snDWn(;E2TP2IJCtE3q2>1xd{oNxgNJOlh`A>8*7$ zB-B2%YZp!{_)ikkNcTHw{A5vl8b2wXA&n3=q_On-ZekK0(Imc`7oWs;i)KiojnHjCiNaC2M6WT}@6ojN!t8HmVMd2mL&C%<37r$vQV}A!nt@SGy`%NOxq9@*hHY*jhxJ<(A^yMv25mnQ5zajDuzsh)#~*lDzb_yq zE+crxfrs^)DsudRhc#KiFt;#*(+)hWKd6FDJMgexSBc~@bEX3i>kX5Xah+p$AD?aq zaG8r|T?-{vxYei@{yY5mF|9bdOzYBg#FOdJnjcaFYe-ZhZ!#f9+ zCgBKagq{=VGts@QA^h6h72aG@g$oC|BU@o1J~T4Q9!8jX4OFcHc_`54&XJy)PUyeH z_%({}cQPPL+)xqrcWV_VkjN=w)@H@YOym?Yt4?vU5;*IbwM8+q6BuR8s#lEM1jagM zH7G`Y0%I++8Wp2}7;RfaP_Bp-r%5qaB*emAX0u`xCNN5v)uI@s#At~O_Oxw{C3mi3 zmWjOfj<)wfJ2#4LtKx1DQ5$274#g-J(UhTeG}>0hts?GuRqe5O=PAx+;{n07{=RU!yifOrGYbO6Q(-3|( zLN2@#IzMotS1!P+#$YROMxlG<-%PK>5I-`8^L@IL>YZC}?1<}^q(}N+w43`Ycjswa zR{8YSnt7S>=S<)dv}4i`-=g(_-Gd)jfz{2ubFe+(4z+aDRWU2V(`hY2D~q}iZtAgi z@^lJG%ZaV+(A2bg9fHSQQP&y*rQf0W-EHI_aQp#xi2Q?&Khxb>jk)30>ME=jhIqPM zr)0U?He;uIn5Um5_Fb~!7g=BG#LH(Ml7ZOX+pvDZgo0#FY713{+hKaetPySwl9Xz@ z+y@JZ-D>f~i^M#Hb3ad9DDlSaoL{#a8h&tN7Hx1~LkA_ZiytE(#T8EuDFcv?&#Lw1I%VhO9NYDf1|9=A{Rr5PH z0#3w@fcem4{x6Pz@s`7*w5^h8IsAXSar2)X{u~Qnb5+V)5GHB?Y>o*(u8#VIxd&s1 zvH&(e<-Z@n91CFc!3<(D_g6uDAD%o^BC-HBKkoek{4gh#7Qp5M?tZXn|J<^{_-FLn&)*2Kj^( z*e6=2WP;(SvH-T$`J|YR1+cX)Qxag8NfyA?y7|%%JIo1YmHGCG^vD9(jVJf_kozro z5I~S1u*PNi)&|c781kfXEm;6to4hg^MI#Gf>s^Wlama>OSO8n)iWqMJY*i>CgmNr^ ztx83MU{MQTE2N0=7Qj}OBF0+)Th)q~U;%8^C~7WC`2ywk|0Z|fV0c^D-kzXJh zX8~-T>m_oc1+dkYMDQe709#uXjVyq_1MWW~ngB1s0@&*Ewf&d{u=Qn69#+j{0c<^)9*s7_tfykFZ4a{!C|}e9*!qh1InhH< zslo!-dRh^r1+aB6?Oj3$RIpE*ySW&vy+@zbGQf(5Yk z>l7M!;w^x!->7Cx7Qoa}D3uKHLs(_3glri^M{U-Fl}W6a1+WDRU<%?`09&vCR=ro4 z_EO)41@LM*whh8|5&9Km0SsEEq`_JdA-fnmp_H zA-b{vhO+v+34q~P07JdpvlI;q8tlg3l_iH5NMEO0c^nnc#SCLGz(x07Qk{WnQj4W!2(!vhNoEoTd)9@oOlah3l_ldM*--C zm|y{H!2K_)sxWNf(7uTAi@HeUZ~^|Nx}k{+7S&L%0G9~f(0;*oQ?&s1q)zmlTiy`3l_j6gcN6k z6ZZ@YVB%zR8XiTbMPF&gbFxLFUN)z(#_8gF1$`HO-PD~vhzB9gGz(x07Qpmknb`u^ zf(3Am;4T~;?;0A$rq3?s+Lc26fpf#M#O>a&;goCLCAN5xJ#am&{owAvh{zXW@tgYy zeDshBm&aRpAzSn)NGsrFLC(K{Kjhq(y5RdPp2&G>UF^m@;LbKc(^W5>|NmM#6#s8c_NE;gKo3=2DrVwRu`U|lW7l(?fb3@6^<3n4(e+#}A)GsU zJ=e8SpSYfjn9M^!{TfeRktR!`>$&D)6vIAX^m;C#Fc&0})I`ViT#q3NEzV8navga+ z7o`MXqnC3LK<12>b5WX*nUrqj4hZ%ej6iq;M|hA|FP6AKf^!&MhUfe9qDw zmvc#y#}~bvOA`D(=W;IT5BTKeT!%$^v^3v^C(jD}Ou`8mqDymJ&h=#so+vn$-0E^J znT(>T%ef>C;zXC`xSUH8A&^*wtIN405kd)~yqrtYAQ;h{%ef>mQxcuaxg;@5g;bYw zNn*AnMla`*R4mOOLbnl@b1iUDNn)3CkzXJhw=~D)Ttuds2nCH^&PDLh(%ct!IhUki zY3`vbQ&u9H054%_j?1~O7TG$NbCFMEsxIe}VgfmJIoJCH-xDCIaXA;Eua@SNf#>h> zLr&#{YkJ^`Tbko?t{;Hni(bw}K9QeuIhV>1^-e86wlv4(Tvy`_>ywvrMWf+vj;CU+ zOb8 zFDNNCP+)mESDJ`j?u%Z|l_v-xlASK+lF3z}WU2fYPMwZ7d&FOM38DA~U z>2fX^EPiQDmvcQM5{xa)>2fX^wI#YVx3M%QM59Y{x}0l=h!|U%)8$;$%@ddAbU7Dw z;b}{Ax}57dB#^K)r^~r2P%E*eIbF{6iU=l_=C_j!&eEJb$rg29*+{+te_SIGUMdIz z-6Mj262IyE;~-J*i3>_3r#;bRU8YAJDi#Q-yakqcZ&Ke7BN4_x8cm8EKgO=O%eh`e zv7MzkUCwnQf~loBUCu>b3{lR~oG#~*xI0U88%uN5Adx!(lWb8|v86d(&h=xFYV>k0 z@`_ZWmvc!<+~r(i%7dl3haP^1@Tx5Ga;_g^8I-s*r^~r$mLQUyemR$H7SopIHkRg; z&J0U)8%uL~;m)u$r^~q{0triV8%y&Fkv$rub2-`X=!d_X)bv)EzNB# z%_aBDrMZozx#Z2XG`F!dm)!WJxs9c{6cS5w5A`4_rKtb8(ocmGez)`|qxT8Fb2(Qz z2+q>n#?qYpvKhx+&ebA_6HL67$s>|jz&zBBXy8zOc{vx2oX*mmF6W{)8C{y&Sela% zQk;)CanD$q6DOO~@F+Sh`pQ4zIoYC7FPqa?<8<+t1pS-%^-yVNAQ^Y?9 zUk>yM=%*r7&v;Jz`7PDV$f;~?hCX6NTRSsz@KKxgI`M4fG&NUMBfPC1D2|IIxjmKM zHTZT)E^as<8^UL`n5Sy?dZcYwepFK~Z6Uxe)>AEseyTe~gpplOgn4RW!HwKe+&J3} zVr?wA;p-mgVV=#iNPesZd}4~_sgogsHgmZ><#sD%$fGjhYg7ZB!^~5kMkMB;SY3D$ zkPCq~dB@;iL{dW-X7=JPa4E>rD`g+Q#&C79&yNHqy!VHY= zB1tYXDVS4R6MPc_<+OE#LezfRev2UQj*N_n`#YKEW=Xe1hDk2Z_1?Ql1j>SnC~otRikqJI&nA`;#EXa0dKey2 zP|jQ~&viE4)0IaVI-q|rjYzVb|Kwpe2ajOI zopW9*iWa5@7ZxoPx1Z7VFV*eU;t~*)xw@$;&Tr)4HkNQ@MMo7rMO2M;ThRt3mUi6d z(%M|v(T2<9o7C2-W;xIX^|wJ zLyxW14d@w?VnpN5_rM0@E>U_u^N5a)7 zZMcvmo>YlDLPDE6n(EOJ<3bV{m@rp7G1M9gw^yShyW^=;l(q_J_%KgAne=|znKzLH ziBRme78Z!7Q)ZhXEy^mGY4J=Uv!tiT)1!h*UdD7D)u>1%w|i(lSLb zn9EGcw?Bo*d5!o{?K^2j8j)oC{sNxVIF6hadA|++BFav*Z|8fI5GQGsNnurkOS+PO zVHTPPuHwVJHm&Vwkva66qFQ}LLtRB1OU>zMsX|*0w{%nje9;v;Nc}4fZM#0M>8Izk zR&T9q!__z}Bd4LGxeahBf2Q=))q!3>#D-yZNhSDsSx6s=b#5Rw@QzZ zQ_)o0pg3j@$*4S5P8FoBXbLI6jpQ2ID{7V3l~dQ)A=7Z@G}P5@ZkHYp07d5%IeBwh z>RMFzq?|_deU+;Z<3#J$W^~~w$)8i#)YgJ=#R-!fS4@#w3SMPu<2ygGsWCo(E_HtK z68I;STr`I(+2Xih(n>HV@C4Yl*$`m4)4AA4qK}v5rqKv%o0~FN?h-8dM|%7E^1-N|^+n+Fa;VhWO5VBsCW^OGo5kZLH|k;rIY z&p2-V6ra6he6hoQI2GK%u5j1hG2D{QmpEB|9iISR(oNcSXL;#OhlIY1A}pcLZHj#f z#tU2rWv1(pL-gv!CGtfc?!%3POPySjk`Z+bhB!i-l<{RwHk%Q3DW}hGR>pRL8%K9J zwky01H;qhez=af>7<(LhHT=T)u$%0o3q7k(DKHGEk9km=>}yB9L{RRreu5d!@@ z?J|6UbHz76eI7v$!L20Ds+T}{6Ta8sVA#1A-WMqv{rsFB-oukWg{Xz(`9v<(UAVfvjwNc*ezmuPOF%OA6020W687kurY?b zTaEWH6mKm={t?1(`uPn#+{TkXh{OuXLwQ0H6c1CwR@s6OX;(IGmZq@uvuP6^?&is_ zBGQUG!3p4+0zce}8{sL%Lor;56SVXJP|aIkys~fuBEBv%z)=vD_X-HaR$r3C*iNv- z&&8DZLp&!i4Lclf*)4GwNIs*jU^qG}9K zIQ_WjVG~dOG&pO>6RR3OvFIm250yOm`xJ&eqH5Ms)d&{-WKoz9PcEc~glb{yruF?c zSo1*@cz9@V6hq?*$VeK%nR^)PB^jw%mR-&9w1St=2z(EyAA(z7L&R0Me+V-?^VZ2L z3;l?5M%z1khU`K#%FRPgoWMOtq&| zH@%#~&?hMU7c=%PlJk4#6Fz?JvV>xS_kic((;$~K}7^i44S zvY;J>e-dsbKAXYHFJ}Db=>%Xc_7UC%M*^0@Up>7#J9kGKaGQG-UX6_Zi;J7nL*V;$ z-GE94_|yym#9hCQk%6HRRLi{xP%|x$y3y*vq48b4ZS(?nCCw(0A%+A;d}fBM9D}hlj`T(1iyyRf;x@M>JLO5}_ZwsPeBT?isSSp$Rx(R>dyE`gf$x z=~Z4X!K{&BVprxAI28izT7kCsR08O0D0vb=JX}e#G;p5EVMGAuU+-%C^Op{%Qqb=p z7&-sht|k$bzAJ)TiRn)u&x;Tr0he5IX#l<;p2+#v5pM)f%5VSVHLYnzLfm}sI9r-p%#oBbp9 zH2>pj80Px9hbh8;>M|m;dG0KT^jA{DusUQ~_^=MX@fGRGrB8)foghZHcde|9dm&|P zXV=Ql{AUpC>zz>I!U}vi)1b7}F_rZhcwDxf>%G9jRAOWzOgoCgLK`0-fl)TI7bWke z2(TX$6`jBfDjs)_%@8wRaSb;uII(9s)ZINkEN-oG5?`!>m~P6qXJlxYZprMzJjPz4 zSkUIc_=h(ui8V%_db7_m={syL%UjK;>TW|LeI3D;(U_??<{WH$H84 zjg3(;y2))<&8BLQo7~BJNrq}k5j)(;*CDiB6AJ^yV7aqx*T#YwZra(lH_wvwVY#L9 zK%ESMo$VC2U2fltq*A^334E3ktxqEYOQSfS!BaXl8W+j9$@?_?86>FKf{N~I+l?lL zbiL0$&r5d_xz)b5eg15UK`lW{?vT5_y!Jk3#g(PxQ+rG%8U^ekA`f;V$-QJUUaATXm-jyN{g)pQJ zf=i&4-*Ce&CQQeRechPU;Z6Z@qF`U5_?CM*4_X<6P~YiKp|p*l%iV(=eyB2x(2Xsa zgbj_2(Wiw5R01BiYFNx34oEfLB$h_PBxCw6N~Ic~N&yYyQnM3jJI!x`pNo*b=>EJf zet+H<-Jdtb_a&fqF*ZJeyAkjOD{~RzIjP*iU!YW`ZGQW(8J4*D?VGmw?MvMJ_Bos1 zzL_?^y%rV9EAUqtyVCd?%;(V&;`SApFS^|xZpP`5PwrPniOld-Z)>k^ZNesIjA-Iq zz&*!1faKh=k2Ck&Y#NEEkx@PNW7QcJpH3PWW$t;Z>7%K;+_UT(5HFQv5l!8lokj%N z!0y76s0y6-xZD|D@#!?mM>H^JAQPjBd!b38U8Z}9_XHl0FKz$23shzxi0xnZQbphx z&S?ABy-X1dmSVc|?KxO_q&|%lq&O?mh#Y&0Xe*f;+(6rS?8BQXB9iGdeqs2r{Ev@T8hx<}5Th?k-;ONzgJVG0JQf zQQaF%3Yhr@rfx9$U2zN^H+|3w>Nx1y5f~4rd;|@eY9R`KmD7PdG=90OmDj~)Q8Mlt z^D(5N+K9V>Ux*p9j}9rqvV~UQFsiN1p*1%(oF7&suG(-s&7kI`_$D(uyJ`J}KHxsr zw2`pOrh`zKkbCf+aWt#QRZE zFP=qJX9U-|W%-%=k`#i~2;!Qeks(s+f}R#G_JWz9yWjVeNMb#1;Jq79S>oqqln34S zQN;3ER8TQeQ)Z%-q=HIaW3Dxe&~Oi!6w;(^?>g+LhbozSC_ow-Uh8N0ox|V6Z?_(~%d(7Jmf5ven zNDb8#os<%!D!a_2z)tJBl5c_@fEr`OnTSuEiKvF8&P06iXCmUg9hPSz81fR%M9@r~ zGZEjkGZE>h^9JWk#20srCeB3S3Gz(DH|tvr-{6TjQ%~ZbihkzD6X7(Cd(GQ+sQ3 z11keewLk$;*WKu66nj1RkiwkT6JXIa?;B}*~3a3L&;<#y(ueqj% z&J5p0MMA7{AI@|-8Y)`DEzNCpB5p;LgfkYLI9B=^>YA$KLxdcP3{d5xF`^+{QpKu$ zwdc1s(^HM_+zy-%wKkDBwUEED1@AcGZ1z=mG~gH#k9Bz6;RLs$oo#WF6iKmqUu|o} z*1God!&}8M4{Pvk#wb?TRLdHp;yDtB8|oSXLz9!lG1;WASz_4qE=#Al1}3g)v$XgE;L3@4DHDG&wq;D*f{)KiK}Umb zwj$)tF)0C?VtFn4ou*MgU+L2)L7!f%@032hPa3;N_33@m*geJaeZu?*l9?y<>3yH_ z*F=3?%=cghF_)?$V_kdfhF@c$*Pw#uk9!HSr`t-hs zO-d=MPw$^CR=P9j(3C`t<&FnUdgl3w?V3y7|%{a6_NoU*@}Cq?ZY-m*FYxHRS$zJO~&_ z5a_n!^B5aESKzB-D7ez6_iysbWE73`>HY6gG>AjtgsHo~ToEA<5yi)@{S}G`p#%{- zo&HKigJ47x`t<&gB4$dW(5LrTDPooiN&58uYDLVJM5#~juTj)ow%|jUzj(O6*>hNw zMCsG}Taw5x5RKEP_n+$}GN})`qx$szwj_dw^y%G>KD~ddqCuZNjpi4Vh$g_xVGEtl z-rmCfU7jlJ<2u#YolZWHDe2Sudt4GtAV>Q2{+-?}g75K=)c#!y34NhY@3km{G@8s^ zfFLR-RFnM3wf{Yy_ltbQN3Q*srIAnMBbLJc%bko+-_+tMqWs9U|I3~Yvq{2X=6^Ch z8f}F6pNh4zJ6YHlG8I(pwOfDe`i4x&V8XrkCrR+=>6YYuvbv>(YQ&E-v9mNj|xHok`a3J z{zKj`3CapL>CyY2Q+XG{i-J9`3RVU$O7?=1Vgm(+9=-p?w5LVva#WNcyp;BRK?srT z%>N^mTop>D^yvMss6-mvjvl@LaMD(^6X?;q&yez(kN*2&IxGeh90q&5$jN=%~$|U|Gb<1$^=&*M8{H zQ;<{m8W+dh}=GxDR^td4KjJ*M8{H%eaMk>iewB4?X(xM8wiOv`Ob9*M8{H%b;Z- zJ0H3BLyx{s1m2K`(u$8<`=LiK$HsDpMnfd@=wJn@lhKlJEju+4cf6L&xK=!Zmt z4SCK-uKnocGHQ#UiS__JdO{R6nTHV>-2r;^DI(&wJg2w&p+`^MoAl@%Vj=TGkDj_N z>CppL=OfpC=+R$|1W1pb3NAkd4L$nTkPYe46A>*Fdi3uX!JtR)6?>9ii~6f<7o*e= zV(mhBNp=L?k3U|k9RYH91nrADOk7YRIZfy)5s2bZABqJ+{0Be~uSn_+V$i{GM+3+! zj-S!TcEwQQhgJLSDE}h$U28v7=hvZ)5n@<}`Jp;bUW`hh2pe`kROcnsXoZpj)p^wh zkvn1GwJ57a;-k;>U28v7=WiCN3e|Z(tlG&dQWdK6ept0jiVL;SgHbllsy&VNtM5U0 zRhHl(Kdjns#$h`(+t_!l{ZO5!Nrp%^UUl9Nt9IEEAacA_yC16alnzwqRpX9+*V+%& zd3v`(bv|#}cdh+UotFrpS;oF=?T708IU;+sK~kOf!>T_i=C&ziaJ>>b&GVC3uP7 zwe~}GUUI((Lgtc)9~VS@%IV(IDXTpJKc*1 zAr8Ld8vo^LKUC*wIN|)P8NO@nhw6N%;6@esOwq{2hQt^%l2dgApiV*p z%#<49lwo&o=ip$ZA8U$~h30D{kUKTc`vnpxy1m3wgY#&62es&q?q_3ziKXT*kXuVG z92%tN*grtD)P497n>MLSplT;TmVs2P+j5@F`9$Y5lIGy>I8OlpBiaSOV~M@H~k zrqd%9n3a`|(|p|QYn>O{_2#qqCQ#)*jMzL-&#fIz3@fFm(6mhAS!NajFBOnSwFMUV zX#)*Pg?D7I+_aBkl6VyYi5j-p(&z@CyhM1RZ-|7j&7*117Ic{EaEa$6(Q*>pyD2H! z#QIKLQVv$?KH^;8mt|5DDM-p;I!Wa@Nqq!KElphT4WlTF<}Ze_08AhYH40S6l!|N9E!Ronj*xN|&^Ar=(vdbUeaULVCu(YQ1s>WV(8@B0wE+)Zps=+K zbnMydP<h=XoB73)>RFO#}E z9o7O`iSd>)nSO^=B>d;H^)eyAzcn(_H8dKLxnfv80^vq^SGKj_^OZT6^NtXC0CPax}G zA~6gD=B=+?2`S85e~v$`yi|@6j%;HH{4UX@=u3wc;&6z6*PJ8jk#AbeSo!;r8%V3E zz~yvW1W)BnKx&;-*Z*fzoV2O#EWXF6(m7}*bAC-Ujf3WrSQ-b-^>Jx@Ri#lOL?K-^ zmBeS2DBl}E;~iv-ObhvYmpB#qS+j^>@?z8S7&yy?c%L;xl=KxKj>Az?|C}j?k1xXe zI9z48h_Qb`lAHyomOp1MSd277*Mj`-;QuRJ)h+O3fxG5bJmd!8frADjfpSX3rQdW2 z#rK=u&`yxIBg9s?(E0G(gohj8N}XV9MnU};DEGn@QpD$E3*qIc8S@Q%EfoK1oZj3W z>DwJ?6ZUkNEirzFnb^C&f>ijTvm7YykWkPz@4v$pi6(i6SwW{<-ZZ?d;Fgmb0}{HB zqMZZ68o1iWZ4m$7%%mmP00_I_3Q3fo2=Pc~oSN}CC1lZjQN2`1XE`cgo3QD)Ag)D! z1Ih543LN<^Fbk-vOiX!Cf+OX-z$_#ANUJcSfi-_J+-52< z{hNTuE4q8fp;5svF|+?3VT@aM);)^95~@Kno!W5~B5i>!tU*+M0RoYKTvYyU{0g0Z=RMUL z5$&@|XdE9iY_a`y2p~>uL4lAsKfcTn?wFBB!VQDE9ZpvLF{6ltI|{<9aLY+|h95IF z(8k&MuotU_+al`ngfWZKvdzOV&RH=wG=|x`s7u)>PCD#2i7j*h(Dqe}Ic3bEy0Xo? zFuB}FL$_ZJ1^sG&%>^jLCb-qecVic3DA=6DorCGr`UJcCWCq|JLXB4>^l&dHzTUA+ymBdE0WyAo?m^9<9OwA_A zYqC`hiuq1 zB(D9*8vdr?;+bKX&A`2g67c;ioZ9`SkwdjRdk)rKaI$v4X{@H&tp%Y1PS)->jkBqC z_kb`;A!Yr2(`ckBx*L=`;bf=&jv)r@XFzxoZsRB|&1CrRO4c7h{w-YHK1ANA`s;Is zn9?l9(s@2y-Cf|x8vfV+!`{1q*I88i!|&|9-)r_x_ufgmPTdnc6hc%IMiJLma7C(koG@2s_E&6@Sj%=^AGYpsdNpxpszAJXC?udL@|a$i3Q z@a0Ie_{Q=vv{T9NWxRSmHg*~sT=&n&jKp2jMAr)ue{bT|E3s4uiI@?h`VZrZH);T2 z8C$qfM|&9I`<)5AWe0J~t^o~ah>vTUc+m_&&YU3{?!*N<%itTw7m+#^9dX>HhmjG}c(ouIq&*~E~ZG3WQ^J204g6~wUoOWXW29gJmRz3)_S26KT zH@1Q5Ut@ZU_0T4nhbE(qR{$@%;%K0Ym|)oYJ2a+fs301EU}ppS$e?luOt~j!I?k^Q z=2SE3wt`we;Eu*sp{_%l`G8}$HE*KSsl0)nF+`WYL1Pqen%3nRF?qBl;pOBZX}z5h zn@_zR0l+*YtCF*{N)7^aGLnej12H~|tKtSz@J|Yi&tLttpx|f=W)`-<2+60g2)W4! zNvEL=NIwL7gdVj*Zqh>j8PGS7^f28NljrXotYI}E)wQ4;UkxquR_yc)^yT|heJm;V zGgZqm6JX-ogfeOk9v9Pwvjfz}rapu|bseBrBh3`EMnI3?C)8trJdC8@(duIzTm*jy zfH#m<(Yy$ho5a58&<4Ju_XRaIplbon*6T0CECy$00R5h~m2zi}vM3jH42z+WJ>Tl5mgQ))R!!dz`Nv3rxF zo>4L-&&38A9>9ZEiSQ|-hLfQP_q-MkPZe4R@Kt*amsZVp20#7u9M!Hr?H^Vd`Mgt~ z%1iXHlGl3S_K4-CKT`_D9d)-VlkTWESeEdeAE22ufRmE<*ph4Is{(^0?_T?c{=j)W z1^-FB1btd=#9VwUi$dOLq&{8)@Oh-8jo0lPEmTO;Sgd>?b;4|I-+uady(x3t*8#g0 zsS8Skcbrz@AIt~gV`p`Wa%n{2sJAL+LNAw$bDUF)E6xIqSu-hDW4NCF z2Jo*Tt$YkT-f1M>!BXaAK6ERvRFXz=8d%sY9AVAMS;3Goze1WW4Dq3%3(&K22@9r%qC1XuNkC+D50V zhU*W{D!|9Y2BZ(>S)E#7Rlf!pwt5q=`Bv+NO-eY|X;=@6!$^1*z*iw%je@*A7pYO4 zGoOYeKc%)?IPxoTkCk&B?xLzw!#B;w)b>|^$4r1tEK=(m$ZW*L2awuHHoI&lrY_{p zM(Uo3%*zY$TtMdgNb6bv_*x9EiQqK56&be%-)6ux>_$y@U^>D*8@AtRs@?BYHP)W) zOu%akCaZbCJ^*a}5?nlni&ikuGo#aR8DM;oWL~}-;|K0j=3NJKXa@v%3Jq2A`+Ht} zMy0;OwwwmkVo0zMsdX1Jow(>gY9JZa3ZDL%4uq&dKRP;gDu&~%YeDFhks*J}d3C*7 z_!Jr54b;gfzYWQm#Z^ImvMKpJidVO&ROuWLCef-7f#__cI%1wdqnx^9(EVSqLwwB3^nmV^;EHR_CZyD z9k5)Bd8@d71S+n-)o8aI(@UXI0|6Vg#HoMGpz8;rq5JwL4967)W0naZQVu%g8*oE6 zE*c>l`JM`$9-~f)BhV!Dd^vT^wKgiJ?)SJ@f(z$ZnX23O$wE*ooJG`~W-W>@!s}&v zzEh^>4fF9G ziOF}}aDLdiafn-eg1q1!BUA4mP~x{p8|3}=So3@&=~IY??Kf11!Ve> z*@o2mugH8E7q=ocOvTU8H9D~D3n z-vJCC%RL3^6JG>uPa$9TI`Vv#t^W%yD9Ys;neXYb;E+>)5Di>|zH!^2I?nW+hI4`0 z08Cy+>XT||aGV=~Q_eQ3yEm!f6g28e7`gU$XcEKgg>=IPh zRk-FiSQQqiNE9YEc)0v$TpnA*ta}gMuh7SbEAC^*A0h|MZekxQoH1qQGxrGKOqnB?`xvGUCT}WpjPlInO=502_%Wpyr;&RG zR7~mF5ppjA&g9jkx4yqWcDV!6KcEm(Rz#cVq0=Fi=Ew#g&<<1S6y_$OYNpbu%)Own zxrkKOKw-9kiYYsdxIdz5rgS4kiviA*ZeVUXu9(tuSnkJYI8%Biabr-1DLsR^GQgP- zzZALcfHQgHhv_C^JIm>TSpqiPw(ssS9^}%bSzyoPO<=+MQHUu#nz?fTXYwY7$jt(K zrm%y!djMzhrZLwGH86#p%+c?WDePwME4X3`*JY8L11hF)4RIfUikQN+%)J8cOqo{Z z_%vb)*HcZ$0?w44#pZq%aHez zn^U(5pM|~Ks;$FTbz{@4xwGbfpt^3C9Cc8)antt2`}S-Z003V&Tefel<5FuK4M!KZ zE|`Hh68}ig@EJT_b4GJ_SM%z&#+gUWoYy=<*ScR^cX!vba)<(7pyte#d3lInOcmp1B(p*?L;q<9%k#T)R6(nY=zaZz)ZyP`2x9w@a zZLi30+biqk~$1&Vr7OPC&f~q z$5koA;d%}PJ|g@k^1~>#SYqYfwG*r3r1U?UI5zwXE<)q3oj9(7B|sc<*f@#fhZ9YA zZDAi_!W8yrBd};V*pMMiQ_r*1=d-4+@F?Vmk%b6@7Z6x&B~FZ! zEKQufWe3&8$a#5RXRp}T*~|MnTk^})pGiK%so8svQ?ob3so5Ls)a+TOX76xL%^8(V zu$r>O5a*k6<9y@7`G$(Ohgo>_rEjs5+QTfo0m(-R?}qp`JlPPh|3L3H$NO9|o6l`> zyqn61bW-fQJP1p)9e4b|`%HKf@}YIU@vir~Q5|oUb-wX#cAG&m)cMA{B~DIx=NrF5 zhV5aTZ-QisJPXb@e$D9bqv-Iw^NrsWZ1*XJ7%uyB%9s-wcHp!@BT*u>&Nu$t5-ns9 z(!hH+Xv#Gp8H)3bKX z80Q=Rh)}bkGU!tSLw^5A1A{n(iSv!W!~h|X5Ykh|Z#F;(B|tde_$>wo!3Y!Q8^6^6 z%QaA(Z~Qg`tTdFua;X7UX`pt#@s}BBwNr5iS{5jOZNNxbA)H(ga{ykw9TD@Q(IV#? z|LBll8X%KYA7)_@I(f`&-9S`{I0)O|XL0I~W;^w`FR=ZPLy+{%OH+ zQja*__@`%>lX_%o^Utsq;eNBnv!Hgq@xKuS_^1zi`W^qSY`z$L?C&o0vICC)O_Rg@ z)Xq2lJ>k9J1m_z-=zQbfYXGGoop1d6GL#g~H(}oS#=qZi!7Vh-H~xbW)ra#XL+yOy zKQv|()=c1hgPtqSH~zz8mI|a6otw@#{-ddr1&{+9alY{%3(phC^pMUs{*O)F4alNl zkDG?gLl!OjiIHLviQ#R#RP3Z__7vJ%p%T9)F;j#fXbiVOlNIowV>oIbT^Ns&fDd!tF-x$p{I{wS1`)+nd zD)ta^86`i|)u?jFHi~fE%|@USM2*fn-}rF8AxV{SzVYFFV@7S2alXMxekCE+^e}}9 zh|V{Fm1|faFgo7=Hde!uRpNZ(!}&(@N`rmg`NoIyjh7+6@~ZcBzVYFFqsul_S?3!Z zxK>dk1)Jy)W}R<*INxZ}c>r7I8z0U$wCjo0EUL23H$I$i^xU|_!r*-4!}&&+Z>tjL z8z0U$nruZ?!TH9A^9_xKVl}I(tn-b3jxE|DFzF9)zM)2OC#%Hy#)tFGlW79hSJ~0- z!}*58o6a{D*x>kZzTwcN^9|H$oo{?N->gQ>biQH3#rejE^UYnThR!zxqG!VS<~SjP z^G#OXx3US2SKTj;WJf6U3(2zCAiV+qvWaRCj8rqxX*ghtNC~oCXr&Ob9LG?B2<7_$ zkVhnkgG@S@?l^&b-sZ6~ZJcj>IN$W3{bP*tjSuIWIQkeh#vllAzF`)#5+LGg4T`9y2vJ2)tJ2VjSuG=S`)#;^8j9`NoIy zjl6T?+=>)0c(R^p%h<3e8ZOvVT)I;fjv8VxU}l{aK6z!0U{SW z-}rF8As;y3n9j}JFS;H$KAdm(Y=!ep)ez?!AI>*g1L&3o=Nli+Hw&bC^g%k`_;9`% zCe1{DD|Wu|;e4Z~k8MO0xw!anzR{Tes=>}TKAdkf<{(71&Nn`sZ?>WVeD+C4wazy_ zoNo>Y;sPLwoo{?N-%xrw->~)~=Nli+H>`usH-ajb49+(icdOtAJKy+lzR}n_fF107 z>nAhFdIN$hizIjN12b~n3q09)&F;0s8h;xO>k9*yR^9?6U>n`cT z`G$S6+B)C(aK51sTAT`yO4&+y0GWA{ZW!4FF%uMLL>aUgD^qZtO>m-{pg6tQA>JkM zX8fi&oVMdaSjL>1V&@wl&NrM+5W4U%&Nn`sZ|Ve_cfP4D_ALpASAG+W6(n1a_mqix zvtr{uxKTjdiB;;-t(YygA@uVkP`!XXmPzvBpeELHNWB5*Yeh7hep;WhUcO z25B;vQPuPke!kE-A$JXUaWiJhXK*nG7mL7esvJ-`<=X&pL##uCXk{|x8Nk*9c8Z3@ z550ZXRIYQsihr~np7Lu`=)9srubV>LVFK^?p?6qF`27i}{owZvjZzK5?e(*qDG9WY zjeDfPC>H?s5l~Od;^Gi4w4}~-B~A)fMe|`2+cE!AQ^JP#Us5e4v(KR@Q%O@Axd(8?6fS1& zJX|p)r+Ut&Mu_ONj{4vAxqs}k;s5ycxk1)3^}SB(f(`31!1ry~y&WgUY&dq$-W?K= zenUf3&(7_eHgMN-!_tG|RJU&f7Fkcmis8NudRcUR$Es!ok!jmdh!wwK%l5sy4s6`p zw_zuJXy^;Y2=xe12*0)i*=6@bpcWQ5tLoF zO8{WwO1gI-%4^7p{WMWWQC!Ky^!Py_5xj}_pX-yz{lAYZ z>B;&ex?drJB-SUXa2-K1Sy-PGpsY_CV19ivPo57ZiS@}mxeg|Y^+|mbOfX5TPYMOr zCsSOXqy>2?+cfMGRK>~+0Zy7_ZpKySM5@byxJQI{A)h@9Kh#v=kR+^5lG5YqlVVauTOG3?fl31Nwfqa%M zM40^QB+0zeL~qD592m4Hv9(mU*90v}Y%}@yi6WWUVes!4MKZCol)T?JiezG!VNi%7 zndnbnDIF|w(jp8rEp34s+12t;+585Ri!vhkr&s%kpx=kvkksX?GMo4A#20`@PL;w zR2e4NgG|M4M*V~p|3d;^#&`D(9KZuiJgDjF>{i4-1n!>ajX*RlbW0Nm(;HdEsT2Bm zZy-!>lo_@drk*z(r}{$CuYrpw+N;VCpcUPLE4e2Ogz1%qn~=}49#OPB|LAbZ*oxlR zIH|q3Hz~XW7bXyFn|nI0)Wr$a~# z*cm7lCfIg)ey}pR{|s@-PCqJ9K?Qlc;+nDp1ojS{r55Ak@c*`Wl6)oc)2a%e{Rjh@ zKVz$;=!`8LQ_`HV#c+iAGqyOb=Fiwd7)N9aXKdN1lDeQ*QaED^!3zs#Y(b&4n$($C@d_ZsvtIySqU$bTco!B~DKH&Ag~$Bwz3kvzb?tOp#|{GcT$c{U;PH zMAD0zf-7J=Y(lU_bIO?GkjF}OG}lOk0BmsOJg|8mKqXp88%ZykTdo0!bEXMK>wKD# z^rCqsw2{ZsJ4RCtuF@}}_FHjb=2$Exb2Bem6r74hB^{)WC(}nqgqn?kaWgME(!d}N zx8r0pFIr-N#gX))W&?y!b~7((F)#?0-^`0z4X`+pUesoQ#gX))r3N@Cl3ujTK&zcG zui?obsAz5QGiiz0%!@iA=0&4Ln|aaEA;DbGWN1Q+{}wMds>^&95?f#En%zRgMd;;TgOuSCXya2NHZ)4 z7v@Y&T=C~}aS)vroGK6HuIu0Y(===?C~t9H}j%z1hcVb#7KJ4UD;X(SwnG3fM?` z(L-aF4`;b*8%ZyEc+6gb)S5_o(W9v=1(1)V7d;k!Ss*%+Ui4#AcY{RIiyk)((~2*Qi!A%J(s1; zH@1LGB)#Z`WLCyqQ6#|X1HuL6GuvP>FLvTHA<^fi&VTc6=7&r3(8>?X^l3s+( zJk2Xz97!+2X5OrkpgXV z<14~u9yN+P$%tAQ4%p1|rC=eFUWCm&4)4K{^dfBLap(?-q!(c`?=&zN6iF|_X5Nda zrVvRl!e-w2LMD;)xC#>{I9_$X*vXDi=ogZu>>#3%ewbJdf^q6Z^e+yWB2t2E7dj|J zEXOfaAVT?T0gy)|hl5NynC>`%JYn;NNO}=A^DajFZ6v)2n|X8(*D=U&x~j@Bi&+T} z*}99cnWt5aUZ^41%rkuuwNn>if>jkF=|$MgJ6E{MW?qENJZ6QfZ01GS%+nAPNiV`? zo~+JcGcV1H%Rq11QuA1Z&AfBrd^tFhUWCm&zGMj7;?2AWn|Zn?K;+`hya=0lok@O;L=4tG=QPOVaMcB;K zLSi#7%@M>_%Kaay^K6{tu~tR=9X8KMdJ#7BUI0M%VoU|t%wt}6W3!nTVKeV-0UmVH ze1MU8{zRF@)a&84-`NgpB zAtUSqCpA1-MDWSz8LU3Oua73$ z#u^6STgj#I1%T)F?ccPgpKBmaYHKMcIR!uJ(z5V5AQAL^VEd^~X+_0Z=*|$@-_h6C zzlz(gr6UXsQU5xyJF=Sb(Vf!D_#Lba$5=P>;E7?SX&25YVWI@Tm1+cjNAd>{a`e=& z^6=xxC%12gmo?9--|Gykko6&z;4)?shgs=J3d2Tdu!3=WBHo+4*)X*C!JOc#$e!d zukXP(d2`FEr8*;L?f|$37l_tBVBFUk&`hLA509r%F2TZHGCd-^85h17jHO5BZ;`CT zr$?C$59|p@ahx_gt_$RNQu)|_!;28lZcJC1Vxbe4FlLZ7Jtn@M6$F{G@UN_Z4EmhR z@ZnrQWkZeTdl-5!QxTB}9od4N%m}mGhGl0J>%o@YPA9)&N@-C^rZWC@R&qvWR5%tc z;1cfA$&5{M4ViW9MRd|}De9UM4X_ zvE;tfhgkw*t(m8CX1dvw8nAH8aG5&8=2RacFd1df$ZY?6J{BurFMSX8vY0ai?3^tq3ts+!YJ_9=1e6TTCFW1eO&36+MU6Cp z*tQO7Vwi)tSHfjZH*ssMkxiTl=oF-BTz6GlV@o)v?g5|=NjGu3ZsOMg_!3gSiF3h= zO+3}W*u-@jR@B5DripCC`5G$?flsDw2rg?9^{Uh7ap3S<*R5t~H&Dd(Ljy&vW3WX> z9W|tJzk^_E(*)bNqhd4JxDit@X(CPg6>rs1u@-JPbpfyvNjGklZrtSnT!NHuTse3R zy?>1wR@AsPMU7jpv4_7)4QPb3pT9*->E>+{@tDu`eVU@1@;0EaAej&? zQ({ZG#@asBahj2ITc+u@FhJEukn(ML_AqVv>wDT#_jmQSBJmjoH5elNS5U8dDldEx zo5B0=b3lKLBr%JE*b?4`5z}yQkhJKL7X3H?jz-Fh{zilaV(a z^#?V07Wg=-Rvf*JG7J1c$q-Q;vv~LT*Mvw9e^Oaad-sF(E+n`c7v>jw^|o&7W01_> zsI+XBl7fFUd^!l$`mX*)$prHz7`#Fzb5ti@4)7X)Xf6ntvI?`_QazPDt0F~xJ$ybs zXpzY0Fx2^(?WcxbDmC>Ep~r#KXgJ@w=sDYgM5c3#M3A$k9rZ1oHGa~E5EK!qZaQ?+ zIuX9YyOFz6Pf2=`#wb+{7{BqTAA%P1>BJ$Lr}nMgZ5yYf+1v)U7oUVEOB)gQg>2O% z(>HEY^=#`U0G@|5>oQQ)f{J?ovMM9)2Y`PUsqRkTIORMDnb1Xwy2G6awh*Bdr<|8H z);|?f%Yj~#F$jsx?FF<-5)vH~UnVZIVYO2drEoB>x zemeqbRw<~?K%(5A&~mo{z6hz|RKTgn!F9Fn*^LLT4Ybp}XRyZ3L+xMNhu1)u{GARa z>i4YOJnYU>NAO;L8t_jd>4(*Ms)G-!Zvk*G(!2&&OLL*_y)Oaw9MWNhV2g)JZ~zj_ zI~VaFkcQVog3BitBsicJQi6qm&qflpIO>2pibT5r*@{%R3`ME%4+6+BJ%C@WdbP}% z(G9G5(8UInp7_zH)EqwH_?lJRuXMCs)8}!V{E3jRsTKWUDXauhm%0;!N-N?-HI<5Z z63`zZOIbw9=p{%CHY2kI7n_jg zk!;}^fLwswxkw8yLgw?h_#D!r>yU{by63D#jJd~{0}JoR#Seh`9@6{?Q2ba(s!n2U zzAAkiPp<{X0{T0kUqM>15}7O>7ipwwR z3Yj|$cHwi#FxV><^h8l%W{7N;0M5b2We3R$>N9ZJFD(Nkdy;*GM-?R3PY{# zM}YB$pQ~Y{H8OFNzNXr{>BaVC<9hWyD#-9NswL`glPA(V+&H9ku zMOu(WrV1CMkY-uZMbiOgcUwFk7Y&9%0)-bY0AMy~XE1F7<{4ZR_YbIEPv$5%3iwxn zhd3NZlp@BTFC(d4$~~FlJcXZ)AY!zzSr)tKB|s@b!$HGi#ustH4wso4UiJdK5dKg@9>F&*X zg5Wo!T86nnQLWAL7QakQ=X}s2hSzIU35{+BF@Og!-pcA3agEc0E>*8`EY&QtN4;9W z*}nB16veYxShTfZs$Za|dW1qP2((;IFJR1?KY$~L{xXr{57WqSnK1mrV)9$g)9x6z z?QNNymdmFPpD+?y>`z5Ner5^q&jMT_g8W6~XxY7~@VS)M(;Q^OGb&@ALoHkO?8h+? z1eK{QD{gDSu?`5*N{@F(RVrD5Xpx|18+Cl?kxJIF*d^KvO*?ku_5qvIPxhx%il5ht z<3>00=~>cDk?`qO+D$CCDR2omk%}4|2O^P8HSIWoCUDNn2a~*(}A+5sqw4?4?z<0N| zkbeznHI6jb(S5!tUvcx%nPwoZmS$sby&vC_kC%|mnE;=TR5ukB@hNsB>S3QAz?X~Z zn+u(~CSWUx|RfN!QnnDZ|MPxU$~npf$vwT`+`-l4t$`0YrJv$lw7 zAyA)*^LI$Ud6JHQ?~)rQvsLUnhw9jMs_|-Eg_M6oW+ne3FUZRQYZiEim9vF@z__z~ z!Qj`!85w!Cb@t-PjdTjA6(`Bn4F1eY&XWFpIpBwo<}rQ>D>z%X0-!sP2Dd`jKgi<}RI%k#X7~-8x^fYq0CxfpjdW z6~FOBKkFt@KW77W0BP115Zr`B@sBO#TK~NOe;sLX1zI&y1DddO@Ev#w<Qn965*$W>wnVk)1@ z+{=J7xl=O8&A=5?`BLIG;fl$vB^Q@h#LaV&`x$0_rt%g~i(BN4QZXg$R_Y zh3Ja!>tvFcR(X4j1b?rSNn-xUU$Ve|$;l+Kc4P(SkiXB##JIG~X~H6NV*ALoEC|DP z#8|DCpS(8=p6y`i>VNMO8pf?G`xL}YoC7ZIrT8iMow&8-j}UdWg^J6G+fW_{AaOej z&~d}%m6Q^R+(qS!0PqriF5auci}An;T07R^aTM=U*?$8Hy9GgeYgeZe-=ebQfSs4% z7}zE{@og3m1kLT8t$^&bkYv!s{4SeM2d&KSw)ye^$6@0H^`&hyo%kM=rBtz+%AjjS zhZFBt*=ryO_8yRzs!y@yYMqcW5G{*0%1Kb>lCIX49$B7@?^W^VK;ft3PpB}4M`Y02 z-MPw%KWSMw0ZlHQ_|Gi>&1nX~Q#Kz2tvDUM#fd*{HIPIFAKcfC!(>b)V>?z$W` zG5(9l5_4R>wj>BB{Dh=gWoeY-E+U!$`AOD#&xLoQgQwOUvzn6j@Tb}Fp3i+A1)=>E z7ytI2+P8V8bP#omU6x9a_mAd zHp^Gh=y)&Z>ZFR)-~v3A+}TwvL%=H-s}nxQYx(>FQZZ*y~n zet4dqX0+?N9Pf9g$(4EX*^c*m?ie8-l_zg*YlHA_n1)s5;j7lRu5`TL8z$B0ZKv+) zh2teQWw*jG3C?jCg5I0)6Tq*ui_cYmT$<0%)XqHzu+7BxeEk;hk1y37(n)RGzIEGR z+=SA{L~B6`#5eF*xr_yKsvO&?FYvq+uOG> zkc(|^nIA^m+s{MVbl&!MT|Otaw?sN2=fAsfC0#P^Bx!s53i7EU+uQA?XBFAr@@+)+ zRAC7tJCcwawzuR|Y)e26x)tW)t&q75){1KY$BS0|l|Rw-<+^3)s{e z+gr_s`T@+?-f9@cALPouT?X3nvC;{So6t=e-2EhoEKsvC!)xdHMlt4PL zz16@OeZMz15`EPT5klN^Ea`CoL)1-ZIbmqGzz}Ex~cvAEkb&t zV<{U*2e!8w2HV^4m$;XILord_I7F7n2hxGVtMHn`UVlIpQGxXej?)&|#9i2Kf-&w_ay+%7Cw zq_hogzL?nH=7kg+T%E&x)d6*2gL^+Xaaz;?bzp<50i_TF#!B~PP7xt+gY9Y7u))<_ za4Stf9oXPfjd+NqFad3ZVe&&`_LdS*jUFrkbzp;gtw3tg$r(@wHnTynI1aOw-_c3Hn@ACTUc&_4Fl@H1~-Qr3`;tUU=vUW zHn^O3V1sKk+vvasSM%Nsj~rf+OQrl!SCu`Gt&(uu%`<^=i5dy@VadhOHn=1SOh6sl z;A(yV>C>!fgS&AUYfT8q+TdzfATVo#t6|AN0_xBPSMy4PeLkQLZE#P_l3#i7z5#V; zgR9Fn1U8@!ZE#PQf=vPXqz$M;8(d8~4`3Tmhc>vE2=Su8m=HO%!PRr*5)0#02^(Bp zzAcb|I<&#nWGjNfHn{&H3|9pGhu`KB_V?iZZ^?J8B`z+ z;Vv`T1P8C~Bv&F|)JY`EhJa|7kmATukPdLhA52P+?N6T-B9`NTD)0lB2LX`hCdY=% zM3@6Po5Ufrd4QCd=sGmWy#>k`WuoiQAom22QGJN6LxWsqF+~BAH^|j`N0-bSn*mN7tc2?rp*~Z;;EZaLpU!YKVthg6KLl$dxY{803b$xEJ)MExs7!-j<=1 z#nE+Wkjpm@VT;fGd~_WeAHOSR-$u=U2V%X3iS7Z8v!O?YSkgG8VA*zk8LxbFV z(EvUWrPmf477a)?O4{CxSsP>!3ldpo%4fL9WK#D!9SXb!d>Q zv3CG_pclH|g@tf21*1W(#@#Kr!O?YSkgKuZ2DaEBR|^S)+>j%Pt(5yeQs>z?$@@D0 z3!5L|_+pTo#c`CRTneGZ*=@^KBFNOB=sLuVRh%AW&|<872-n#JXT7nCbB!J1pBMNi@EdYC z-H!_qC+3VRj;=$4Ts~M31^F=1b!d=#P_Whd^w1Gy{Ir4%7sA$5kLP!T8a0BS4Q~8F zoCjCZzsv;Tb<`M@=F7|kiMWGBlpYhzcp0`vaNg+-?Cdtj`IsFKC0)-9H(Y6 zIqp!kx1*L}*gY;ms@1FfJJcM0&Nl(lfHYAazMx&of~s@UBo^JJhP{Gp4+z#FO(qc@ zX>zFTZY3WwJm29n#P#E-AB)?gQd~y(J>ah*L8Hv#H449l7KmlVYM4dPOsxwIIQLAP z>47wMF6us`+%}*~)v#a-phqB?26U;}Y`|7PdXXmMTx^^?gZTr^UM%s0)yC zd-oi`ljJn)JsqRUzmI~Ba;D^!iS>TF5Wf^gBV_#g`B>&hqCLoOA^4-yBMT<)wmVhrs+7DQ1@H$*gKN}>_RdqGqINnyij{vP*2m)m3-v8{ zPkjq@eXoG!OJqAO-;ksB@9M{XP(QYd#zCXEe+ZT`NZvfOH&a0ilKy^C67l1y)~P^E zLYmB?*ih2y8?S3v4a7=|bkqbjtP1^M6CfucO{Z<}9bg~h&z(rBR=IUg!~WslkddE< z2%WCnzo1F=zX#?33hqa8rjJ8uqGSAdm~{2ZMf`onlVJ~U>(eI#l%pZHoCkkLBxg?uKXcJl_+;QPx2xl&YvrI@pL>c&}&G-pX&(y zWgNQEXN6K0p6Y6Q$cu$Tur5SH)QS<<2gu*@7bozJe-VgVkeXx&zAQt99i~af)hjZr zn4i55j5q67U-hbx{Sd_-MVc+6ZGby}uLf6!~&jpl&3djiHuTLI4g>pk}b^-391Zk!I}p-=Xr{h~2^VcEA@pGD~=y}@xbiP=G9sscL!fQZ~gqVsyQ+e?vw;8ZS zHoy40$T{yqJm(0)sFFT_s1`7WS`xwE7SztCA)1qL=FKxSz?Td-hnxw?N*w=C1v=Qn zfJzL$LUsyPePll_{uXzZ*e)eHmFaq@PA|tsK7B))rJrA^`%BB9a(WP71j5!rA061! z-<@9*Q|A;$6nkn>U*?QkM0hF=3BfGTWM+b6M`6eQUi=Uk<4-k`Iyl~0ny(5|dl7@} zk$Mb`dv&MdY}f^pA81=$Yq>apDE=gPv2&u+s_fcq{_wRPSXZ5oT9GKKKJb_`1h_?&&6E$0;3_B5K`35ep)$-J2E zw(*|IHGldEoZ+q*!2fbkJMBF^YmRAe?P0U}c4-UJ_|M}Ll!_nK)6>?~;>2!`k5=)O z_#o>W=vm#>;lw_s0HElraPQY{S-o-lZZsMn_`uXtTR4)oXY=-bY;4c=y{9;_M^ON< zK54%OeH)S{~j{||C(yp|M%^iv3h$ij-}YP zy?@4PL}+VSKjYNd^|Kph^y7{cBXtnBp0;HjGiKE{)z6$cXNC^aw()=52ICqX*=I)Q zo=yAr&A^Z>>@)5qsOP_Rqp=!q_4co!1zqw#*{B=5L-+n$lJRMk;wbxfZ%M}Ik1WGT zJN%X;*5a{2sH4fPu7oEWw+v+;k^6>buTi7djyzt_darTtHe;a63@s>Ig7NJmujKlt z-inm1!g<&XNK}?R2C(cey0?IHVe2tbTkZgmpr2>likFyPHpNnjK#7L(<)nHNKkh3Q zrT0Y_m2=wk+B=Wl?YN4ot?tUw=Ui;#$-LDgh*SJEdv?=#h_g>SEXoAB*I%)5@8)G2 z_wO`-eSX(5t?(by=+pfU9wL8?&Yk7kXN8nKJLp)g5l+x`T$gOW2?DW=+qyL-7Ib#E z>dSbr6!WPNBm%o#Cs{XWTit9>Ua+pKMN|2~(qq6^XMzA5o~>(FH|T6=vNLryGTBC* zEiu_yI*aX8Dchv8DU+S8v!y|IYpY>9jMs)|n%9P52G@pJ7MF%m87>Wza$L^Q{D$Ll zuD+}Yn%hjfMg+Enl>yEb(fE-;ht1~LR;ny*SFofTwYQRNl_ujFPRaRr z&5o_s6!DsK6*zT(WKEtVmS@%I#Mb5sW8g)?jyz#JPdLko9i1mEfSa6Hr^>zrQBX5v z!Sk|9Wkbvv$a_wbeVXE@=*y3e&W0t~+gU__V|D(|Hh-ipL>7Ygodj{E^4yl~>{z!- zyoGTvEEmJ}{I@|E>FxO#w&!05Z|X|6=VREOrvy}!Y|qEAJ+A>lq_^i|*q+yrWW??H z7`EqiJ{@s;K8EdioiEpV#l}44$HsibjrkZh<{yU$*wa9s8}l)2%*23zq@ zT5wF0cXhVvees{ia{7)WG@=c=>#||~ltlyvv9!w+dD>zS%VG1bjlDga`}Xzj-QGX2 zXD=4-iuTT*iN)g(Fc{Y1Js%6V;Kfa|(vrSlMY7P&R*iVkB8;r9ovrj>ZeIfv1Y5O{ z7O2)0E4$XMcD$D@%E$|pH57OymZNg9MQ57QvRv2nszszU;^?(9slyV%B1%g>hZcCh z#kq@6daP!cChR)4yR+Re`JJset#KWl?d0Czc&}SbdC44dc_Ws)PqnRK+zFbH*_D5OGYM^O~KRRZbqJ(zMYU!7b zUuDT-7A{Kh$5?n=;7gCu+{fD6kq~fR_x?DG2nq-)-mkWZq($fo##?w=;Kw$vT)M8q z@h4btxqw^Ou36T;90oG6oPK&#I;DNvdk0M|er+uN7pNnX41N=ykL`=>^43)=wK{?q zO_wl0qmJMus|`cDYNfO47q)`;X*pjFvtBgt`h_Z=6e?7I_}qrAz;YQutniTD%_REea1Vd2ozqTY{Lla zTD5d(hZBCx0+q~E;m1|(5wL^JmlW(+*R^z&6JBbm0z#WRS}@uHK4ih60k;VFpDj2t z;8p?uiv^d+bQWHwa^H~woD{MZEvuWmRyyJ3%4n$E)}`TBSa_waOvA6V@G4uIhF@jj zdQuEOp>lUf%W6rN?}p*kR;;ExoV_soq=nBmaOs5MH5NQaX0h;Em2;&Pb4iBBA~fcN zpHil`%yUZncMZD9;ipxc2hk5ZCmN~3r?@ZHv9_}t!6Q1IXtWi&0Hp0)RAu3bJTZlg z##lIRjA7Efe3cW8wQ%T`@U`neJkA2sd7v<_ws2_N5DWA177mRYxGmi$SMya%z689WJUSb!`cz;RCE4FWk)R}_G* zhwB6ZrHo0@vvu#D{r!V(9k$!!=V45Rj*4ceko%3%^3JuGgrb=$rwup2w;FJ6BT8k; za4Vjtqec~90)ix8wXP~qCN9ABu%?o)d*OpvQ7-v0=JJxeJflOW6u z?mW?4P%=RLJr0$f5`IBm7Glc_r2WHP)4j~O39_fKWy<0`VKw;q-ff6Txu;rK;fqp z)~q;?v}b!`@8EG*@&hk^E%iOUH1#k5EGmEd(`hL>Oohf*u&z}#`=TilJ@;#{JX)kwK zu|A)%@)~{q!t&2KMY`BGsAHEr>%~*h0Q%l@Uf71MGOdf}Eia>s-`Kp-#S32U6Gj)( z_g=JhnZEaum;066yOi#GFI&9nd#`x8gT=af)#6Rxd(F%3E7sL-E#CCK-+8&+#kzWZ zh_2o!=!&m`CBOG_pDNbXo3=ehSAVd1)A!!;a-S9Y>ALUz(bnIP*X6$c?L&0=wih3X zolWTSFJ5>lcG$Eo-?hArF8{;kjV}M{wMwgDCd!bmD${#$AV}5RXu`c5l zZ*&Qp`_09=bS>WK((`jY#k%zU!Q(ja2an^>&wZg-myvJhdOeOyY~JWH>F2&&tjmPRjL}j*-iO`@U1t37DQp&MU6xtiMwjI_Z*)1_&;6fbT~^q(BujpbHkORAb(iWn zveM7J0p|EV)BSX$#hZRQ%Fi8NtlQBRZ**Jb=hhYLc8tXv-H!Eh9mTpGXXP<-Wc3i; zj`wp934OKJAdUU##ysE3eUay_L`CdxoF;W3j#) zEZ*pQrk`6`tnWsPH~OCC=av=gyUF5>zGwTn=3;%%vGN#w&mE%gd4BHEVtvoI^hVzc z{M-}8`d(=3EA(BhP%K9eR_G!>J|6pKWlbeV`r*%^(DL@i*40i)vp@M&jArJ#oRSuQ zG9N(YT^;Snwfd7e1v3ZAHh(fFk@9t2&3J=ay1v^fS?W)I2kJ8*yvjNy%lyf_UHNHg z&|O{b$M*s`Y*g})3MXT~t>k{phDp4To3);jOPS{jxqQ3EN=}0|l6Vu>>mG@c5OzjM zyn*YyTk;U;@#d}bp1g@9@y5MKwCI<7h2`; z|7x8q`6TmrwbtcRCDWM4OSR6ImVBD!KW$&Khn1Yn{B;(emM3lUUsdi#sV@^@)fj8U zPVzIBq+A}h$+f=SmBr)o|-QtZpzoc??f;Z~?vaQdk z^DCC#sPhh+H|qSV%^P*zIYgcR$MQ4k{F=&X)R@)O~Q?`zGLx5S^uVT zHO0#MuC31~>p@Fzl=VHEH_Cd*=8dwxKSWs%+wU2ptRJY{-7+JVTV*|>3hNQJV_~Oi zkg^_C@qOq|W!1?asqkqitGspXx;5SNoaEzbG6$~C&z$2Vf1)O{>uJEOMko32YBJR; zy><}OpQ`wEKx7g)2(BDXwOP84@9kqGxYV>#La?gu4A-uFMJFkxrpMo6xzbc`_&t_` z%Q>P-a@!3BvJ9*ahb5Db30E2mZ|`MHI>w-cn^J0r!6&jqaqzL&y#vlrrR0s%d9s^f zFJyx=^z7^3Gr;hCsa=LakTs$?ss8jRDH1tJ3iC5$# zkeXDDZ#`>}mAY`0v?9r%loh=QEW}`ysO%yQ*C*^`ywv&O8k8IHTdB^;%4eYt(V4oW zf+)ro6(LSU#(eKpdZ}~W(~%#^N=NBq!HVFEgFZ&9qzN==^C)Qt5>F5;I~6zlW%EDw)@a3jm>Agbw#3jHW@viTsY z=@AAtD2QshGS0ww<~C;1>N@0t;$Wf7$ld!-f`w*=$M>OJf`v25%!qIpdP-KDVKO80 zqKG+KW|SGz3EQsB=y6|1IatwWd-K6UGgYQoQLxa=nD{-cAjp=5n^^%B)8}M|4`<(l zVzcJvNwCmtMMNS53$qK9Sg4FZCp&%^Zw2-RWlpf;T}+~~wOKMnu+UWl&W$#^hBN=46f)0=^J=sxL$FjWP*8z4F;Q=<3Yjul9VcOQ$T z)Z~K9uoHyFVfw}@&y0m)Y@XPG@M1_47DJ$iA$V>yR08xQ*4zo`8YHKv=^gv`ZIe5< z8|{AhgSfA!!GM*;OD5amyJO>6{7OLoWk_)t38QppA3E#4J|oQ0;KZ1I6y|H>batN8 z(XpxI^c0{^AWfM->AGSv0k}sv&VLYi58k;{w+6NXxDcsWWL;-l-xeCwm^x>nPM#Nh z8PaK>S8wL)oTcmh6rfil={jd?_TL5IUIL}gIYy8pAqaq|llxtHlg;6%BRJi0+K?83 zMs?BXr>{Kx{yo_yq4d%z7upD%j+^0lO1v>H?JhP(8Ri)AIMY)9hf& zjrb$OWKGZGmUpzT)g9ooM0^Ex)`{9~P@=Xv5&cG;sh@!wf32jSQGOcKDBNjT+G77yQpd=qKM6OroIc%$0>AUp#zH96HQ|I zU{>dV`F#g*)6s=!Ov$ixHHcTfX}cgNvVSA$=R`0eS&TmqBdHH7w`n<`(Gp08RIC@n zT{nL#n?HB}bRS%Wsl{}GWpIF?rce3^EK`xjf|>di#HfWU0(uJFD`YZT2E-9avrhvR zb-+fp4Qd;@Sm!|rcqVgXBN{j1d~iZyg3oiH6|EXBff(rqGlJL<0p z^0*P*9qCL;bSuiv)6>acYdLY;4Cu8;^R)H)UuRKOZZrBIfDQd9$GgG^wEAW=oC6TW zzQ%ysoY|i;RGI>^SUax#&Ht9C(!GvzJ<^fjt$2gyPerZ+=|8|}ftKlEc|D39I!3t*D4qH}A&y9|fr5&u@5fg!>~P+H8L5MWAq&Ud7*KoD9z* z5q~b_#dFGCegmM)Jcx7vWmnt?0KkVFdyad9e=)&gl`{CSFnUNu_y81NU92IK!#AlQjemz!MDG7PZk z)*>CxwY}T-zz6<=POLLtq2ipm+QpI*`B^mlZ0|3kXkq`!7jNB(vleL8iSWZHhM>Ct<(4I?VZ76k@0=Hr}w`v`qdNI8MlAqSEDB$K1Nh*s7?2fa5Hfe zZU%; zg%XFgPk+AvSqa9Zpf!4ZDbI3B^la(J>Ga4CNZw5(ZixR72u}yeNqjE(9W+JfHaUr# z%7}D)wvQ1f0%{`eghApnVJ3n1BpW0ralQXB>HyZYHb_q5W-)u`r*y&wxnRw=zzq?L zs0lP~-719ja@>lMY+0g*0f~A#m$t6!?1G7253DwmDRPC>{AxpCw`TMlRGZ9)$#I*4 z$3+f_Cg9E~V@{;l;ka{+Oo_;b$#LhFXfcCGhskm0mTN#Vk}x^$+|fFpju0ltomcXt z@GEyx2|09r60$ENi6STnLe@C7?xNrhOrU7G36tX<5o$ID#xObVkp>2FNGD-(aLjUE zAOd$Wrj6TdfDlT62$SQs7#IX2Ov2>2tp-@Gff6RiZ8N}1Ln$nm8eo+M>M%L(G6Su4 zO7}--m2%exBk-*dAsh|XKleFqN5s5nv?xrDdvr)JEy_vCl~mAnMN|)fvB-wWagQ-D zgvs%1ft`$EqP%g=FdH!AQsr(6PM2!+ZS2i5CzUcxj=R~@N`mGXCdb_pen{{^no_%4 z$5Q(eCMT6(1^yxYFqxWCi7S!GDBLa`CdWN3co>jKhskkI&oC$T$$PJRhOH3yoqeAL zb(kFY8v%pdMhKJR-j&T4+v~V@7kb+P$Ni?sp`&fVM;U~^C-l+FX@jf7?)`=fZlwv6<31QsjWj985;(%-xDSoF8cK-ORHFw=m>l=vG2anL zEjl^F?Z- z3JH_rB213vl?MBKm>d^ja%i=QC7g=)4U^*{OpY$wP+`O5xCoQO$Skp%rV8{)8z#p^ zm>f+y4`3T6$3>W&uL|*^3bagZSLtxTDa8xBViaS{$VRBp?Re8J=Twh^Fy^An89Oev@V}T8h zi!eDH!VHrGwc0Q_F2dye01Ox=hYgo7IWEHFEW}-5m>dGpGZ7}|XF`TBIjO`Yl);3_ zDQ6~?;NaDrGa$hQ6I`$EKW98d)!aCsdld2(`W z$V`Mekh94&n}_HoOpc2%IgEKX!i33j5hmv&Afx&aCdWmX9A+^^0U|+hT%22}^^Pv7 zAvm|vbV$@r#iSCfYD7Lvj*BokKNYSLCdb9OmCOoP36taE+)54ca7z#-$3>VNc~?Q0 z9G@32fZnvF@-Y|ZR{k_aDT~A8xCoOYZ%h=nI82Ukw#6eh<-m>kx@Fgb!MmJDHXH11Zx4GxpzB213P-U003FgY&5 zVNjr}&THcXC-b1Suw2$SP;1hJKJ|3~UP8z*^R=Y5Pm$&YX(K*#xt6G%{@E(N;U?v1Wk+trP%Y@W)ss$RWr zRd>5w$DG7Y1hLRhkZpUowe19>;>UwQ=myncdm67Z*uCVZ+dew4V=Q40!wDv&C>h_1 zr2HUUjlrpC;4md?4HhRQ@87Zo;XwEF_U`YO^9L;RiH0N|vEI#l_w@IeJ+5GqLE*b$ zmju$GSOffO2`0yHrr3#KN_aNKE*Js?(@F_}w76HI(IP{DV0!!{AVWWB39ImVIKF@H zo`F5sN_2v@3Mx95NTTF;v*#Zy)xad#8DNhD83~pZ$YbO8?b*M#x6cWd7sz8#@2<^G zuwuAYT_TeA$)H_R)WG4v50<#|A;W~LAd#o{)`OK9f*hZv+HocQ%cH^>6C77TI7&pak{TR8oak5$Mk(v~0y0v^*^c|s zV4eGY@Yj1UPrFFYh7#W(xq*<>gZg%qP?ZP8yQu- zths#^F8<~u`=)Vw3Ah`)w9!&pgKcmb-3v=Ku| zMMXVFFZx#Ah@oVJfx&~6o5cDg*pkZlaVVFt_94mA^exDz61U^GO5Kg$GX4NUj-g7H zhfT179$#c1lB|$Xt?fg`=j}t1BQ#j-LkQ-(3qKH&l?Flk5F!TKha^WDwAhEZDw%bU zMvW65fEecHB}ZpCS}9IC>;%Tx3bc+J_`-;sb!0+n7qLUm{msY~I1lS{Uc>zdj2#VK>OTtQ4u?@jFm%EDMLp z)QGSH_Mee_#HB{&Z<5SKsZnO8#^fl)oz&=YjHHFPzo=l|k*YGqLMLI*f=!Ky|BV#{ zI1u;-RzLUv2sR$2<5E;O#fC{kX?2QihK+{|SEqFRF!oe_s25K$GKfoS zvt$Yzk7As8{*_KN^VjCc*m#sqN)I>YAF$l7?6)*Cv!k8uuQ-7>`_^epnS&0~b|q#}JFZ0U^nL#TBuv9+}E zC~X@3F0Pdd1H|%KPzfdSQPGdR&(`GkwHnjw@k*)M%Dy96Jn-dBV*oKLFpa9E@nI-6 zmPNy~S{{CiJlKbXNxOaE>u0Pw$}}XQnXWWUgY+8KvC6b5iKR~rQB%X}co%CRiW7@Izzu>kk6=Wr+v0!!DU=sTb*xN5pxT*-W7nn!LDskL zGKV*G@b+8Sl~R=q<2pnK4w77&P4HBktgFOP2yVS@u^d0N~GBiRQ3)e=cwo%n`xB2ADyQ)pBg=&viyiF7n+)h$1DfeH-fcj) z7pNXKpl=nZZl9&w_3s6$2Mp+?0@XtX^lqN2;TZ!m3ein}0u?yUNo@K);d=?87obAZ$$Nz;$Q#WJMEKY#_Bz887}@1owrrYB6T=V>gPo;IMX{vY<<1iq^3 zTpQo}jC&_1CnF(1fIygpgq)lN2!nw@f`AM$45A`|Oc2dv5)c(psdKH0wbnWn>sU*z zwN|aQmR_w@Yn57SsZ+UXt+lqFc5tfJ?|I&}_HdHmz5Vz0*Wdkr&5w0h>v`WbyldKf zt@ZAAX$Yc^*U;BIuB3(@^0;2t&`&+C_cipI$7P_au`j&mawYOKs2x!B zZDv@+?tna7;Y4iAYO2LA1#&T*hb;G`wD!E*{+@){(;N~u8P!7X_Qs4U)MMP*CgtD)mGgqD0lLmeL1^BOwK zroBe;&DBtq5EB~#48%o6{19c9T{NkQgn>nN5*T>zX+K=52wbiBl>rM zd>c+ge*vCfz$F7nm!eNc9Uv^n`}Ccw7rKbh^j&riMP}aebsA zYMv{>k|FdQR`$1Cu0(-`9MNU$E=N?1U5f6E-H##92XJcaI%1E-gL4#|h+PBEk#Nba zh)%I5q8AMod%G@Im7-GY-5NStLlFB)4Q=$eZr0E#9#@erJ+-VU0n$op=!+iL91Y#! zawS#{5Zg#{9I?>PD<nFg-Dv(+ceBA z3a>mGC&6%)*go8X1wkL~Q`Ppjw}xf)QL!9b25^=7ogFXX>b53kT@;aGnJe*T0w#IC8*k!W%UFW_XtOgMes`jNzk59h+r$vz zJ^=E5SAs}W;mY0zMc(fsAhUt}JyN~jC6OlI?|z2JLgi{jzu#4Z##Vk^(a^&ZD>bAW zzN8sXyYqozvS6|92-~A3VY0Xga2-l8AI=b_tA%L?nSK|}Sl}@Af}u;83eeg&fGJ>H zPNu1m>|Qc02Ye+ME{B_0jljL|+$}Nq+QpmROyhROxFHfg^$0z6-vJmpe}pl0pF3I4 zUk4HISvVQUhd`C7`$Hh_!pT4`T!r^rhhl)_(a>b2`RP+2u5l4f0C@bQBu zLU|g(K<2(Zp~)Us1WiI{j>mO&L_sS&t}8UO$>X|4Lwzn+;!X|e#!ypt4l;nAB}K>7 zeby8$dNpL411F+q#kA;~fNX#h(RahM3obbwNl^6Ps;qp|0bjeSwFDoz1xYT`P$qIy zg-LGI(0C1@g1R&`!{g$mZmf+Z9@k?UI>F;Qpdspms>)8hHb8Wlx=%+2_+$XWxl{M8 zkY_KPh`q!S`)5F&h7+;>0?#{e$*U2aVjoi33=sQvUHU({g-B9Qnx%JCxY6Q|X=ns` zqV5+5HB_P@aJ{8VKi}i}n}!-Zu1HiR-|BKDMrz1uaifI8hJ!z3Y^B`yhcmtkb{RIK zu(Ha9lVP(Np5x$DjGc%9U1G*~ES&Lz6XQ!@_<|GTyYSrS#&{4hg2vU1@oqRfW2(;M zcVKwci81XM>?y*jJf1-e)3~28!jbIxPK-0aunkU1bq72*yD<()sSYwmUL^YzC&n+p z@G~dI2k`ubG3M|^``$3+;BN!!&+Lq3^iM<5Tw)bBU|NQo%O%zWnnT8WHPD%G()!!s z>4i%^0~WUa%g7ehJD~Lsfy$#je@|Hv=lJ;Ti&0mWHN!Ttyl>(&MVs zP`$@BPeaWvSE61+PU|Q6Kwz1#P&~dew}y@6CQw=CTig_qZv*0N|A>MDr=jG$%~wzO z@9G%8&@s?eBbdS%<6|dARAS(_!8+AgFk!*OS%r{Na}}0IT?BSWy4xk)3L{yf$@3g? zkcn)^Z$qH}bi6cyPC1TObe|m1;YxOaN;x_em30rzGKuinK@p%&mE=Q#5pK{CAjX~O zT7xK9yC=$AA8Uo4Q1i&M)!rqfGE>+1^Hw;5=C4CDywz5 zP<0bTRE1&zsFQ2-l55gXuZB+H z2>%go-Ukcug#n`DX^r13Bw{WIXUrV62n+w!I0Atyor1ulp#BZ+yy>XBBLK_=WfolW zWuRUhaUxPb zj=6BE;DNnN6K4TA15T!i8{xSgF1a2_u!h5kj9h&+%xB|PP+7zRMP*m**U&T#p)+2n zp=yuoY7HIZarMtsX|;G<=WFOxkLywmUF>otc#91Sp({m+els$_2Okt2uLV~nwCE2* zrtiav=m#9pe+}e6;Y9T48qEA~$^A%zqVw+Y!JnnryVXi3DGI`dn%g&EzWy~SlMalW2|t9y+A{wH3YF6G?ehTnl!Y?<2t0FbsiUQ z9%AzC9@mE&+Uas7;uuZ-7RTFbr7HA3#pEmWbwTW$=_>!emjuU)KMCI+xH|`|Y{JpN zh;W+8Wta2EE$}0~&01`MJN&EVmZEn;Y86;=HkN5{-)Gl1%LLsOZna zRjZZLJE3LV@ivb!4wJGdVJyWg^O#QEUz!Kp)E^7YWa>Xh%0H3RC0-+^r^iAoKQ)U* zQ0Xwg?4-UMua$5tdrpN@_AiIZnfmax_yPv5npz-;vV`kb6y3KdUf$h(a*bOrn0$1) zyuroVVi?CDx|vhyBz%fWcpK1D;HJsP6*%;C4NWkGl{`PV0pzRTs<{2X8>yMbfeifi zg~GD+{{W!p;hsUEWoh^eF#jB`>`9=qG&~3oySINttEJ%;pzv|=2SgUCZ)tb~XzVT~ z3az?*VxNW>M8ERO&mH^$4-~_kr7K}C-Yjm%l>R1)W!_WeRKhIPcJXx>TX0ir*j;9Y zmXl*PfHF8)72k^Zrtt>Fo*fFuX6RM%%Ygp|_Y;&*L_Zr5b}{1HKt=SA;2B!l1H4Yf@q28@mgn3Tko)K1lOLG<++ zN_bqBmSB;`HBv+CJg)H?YInI3Gd1LhF3-3YWPnYQI7D}zan~G+xdBeZz6%r)`#~W0 z!-?2jC-DQtojDd+vyg+Q$u+g0@p(tn(T2^>(bBh zxau{;JKA(w>ovs7*$ClPuR}wQ*hZ2gh=smfG5HG3XWS;;+ivob;D}*wbCSpi@vYT2 zPwROKkENh`Xt7fH$J05p|47WmN?p*g*F(-S?qW_~50xS~HBG$}Jc`rQeE@EOoAE{* zy9(HK^ncjAjcy8uq+3ex%arP+wYcjCRETnC3I zof7FHP;^B(kd{*B3Sy=)g&AP3xB*3xxq>hTA7RWDUz?)`%zq%|hv1~=Yywq!&TBvp z!AZ}Fpxy&;QUEr>FhoXtpRqH`lzL|+DEF`S6r0nb)ASM)4IKD_9~is~1AriOf? zFCEOaVK7(sV6NSRxxV0X;f*!5$IDzn5RV#)?#vaJL!OJ_MC`{LvA+l8J8&ZQui$wB z&J{a~UUYb|M=Gjc>{1Q+#9lC%YxQ8Rw!vJd4d%MU7ldqd{u3&wzn?8N` zB;*Z?e0amcXg2>8RBu>>_*aR^L0&UHK^=VzS4LD`Gw9(E@mH35!y<*R8TE)PRNosG zX)IH-qHzjzAh60C)_m`^+j-{}trf%kQ7~eLM&mJ7gwI)!h{-n+S2qF*T+l=9!uw>? zX^p;<2gaMm*=z}-RKrd4IAxvxqu?6Om{)^zFSFt^v<8aNX6YI?igPpd100yc;NGZv=(HLiR^Bq-B>` zEreru(>TOTFst<=6PeYr0AmN7FlM!L=IfzdkCd0gNgvO0mb$$_y5OXbUkT6UaLE!R z!6y5iDuA!Ma8{cKDvS3wMP(mfqM>Z$riz%{prHvG0#}EIW_eue$EviJd0Z!H=tPgJ zS3^B6SK@pPIh{d7-+>G;+j6OkS#9S6E&9EX>25d?eSstTK_JhSK>hp zIiky~_98OC3X`Hcvs&Sa*olD?v3ne`tAWgc6R|hJvjHyoKB80XmsBO_6L__mDuIDtg%Hw)jLrpGM;*T0~#D;poXjSMd6qB#e zoYfA3%5Hj#mjp))A)SQmp(lz^Zw7xkTbM5dZJGsbyg5-hC5@kjt!_{zg!vjJ3QK0{GCY_@7>iH7iKI9)?0cw852sLSKJPDAH- zTz6{dN{{Pa4c+E)C7#fbQ;Er<(W+EGc6pM=Yv^S+rNl?5drFon)pJ2?hhkx?bOmMK z)R~B3Z7Y~(24`VftC5|KYl4-0?_0R2w-dLZ2IVCXrcAskd@a;Bkyaf(em3`D{{HBE zYz|zYHXR1Pqps=3?QX5TJ@^0t7Q*!FDwokziTlNgXvjB?a$ZNff|Yz7H8)}t3lv#3 z?*l7V%_x!C6AUk`#q3L6!PfwX%CO-FKptmH5NR=7*}I^~<17I3z^YJ>vj>?b8h9)s zOGWt}XODr##!o65r}XDEq?@9I1s;RMP3+v_cX!bK36N5I33iVGcfei4Vxg1amYVx=qfiM(xo5%H>hA#BDUe?gHE?44@8qyW5M1L0pFOcaS zI1zmZs3Q9CMjR!=iRiQ8nE{u~Lb?<^8<7W#K1SzCwLUG>R1MA25JaD+A?o~TE^Y)< z&J#VZ4>i=|amCQj$@LkJD^EjLxm<}U8gfLJN5y)ih6jBXM0Xw)CqSNK;Y94aKoPOe z1acaji2Y@Fu7ykXBRa*l(2E9(y&F`PYm}n0#V^&+bPYl5y&9_VxbD)>8jp+H#Y}69 z$F)#Hr+Zw>H1s)_E3t8a*r;bTHw*ne#pIismj{gmhX*s#)s)~cBzLNK=M0|iFkvZu z=VhGjco?lFxDCz(SLaQSTU(n?MrbvzW`!zsNpOs)QU^JyEN+8hFR{7Q#aY~sOSemc zN6~K_FU1ki`B3__uJ=nCNc;l4#8)^kBF- zRA1>ud{cf;r|->x{TxcPgeolRUG{E^4Eu3P00r`lbCzSI@Ll!_BycI5%rEmuH4gF@ zucDtEt>>2|0Pt2!81qYPnI2^KBHG<>(%UR-Y)Wr?5y-P}(%bSjV-|!<@*SE@bMjJm zfV`-oT^d4vdQC%nJTATfGvdu2SBtHh^*ja#uco_yG{9H#s&)uz|H#CHtuF}w7 zU9QBf8gd4iOs#hVG>jtd+G2i*qDJJEVkTvR6Va<2(Ki5D11F+i3D4zlNdpzn0=1#u zm^KQ;OIrw?rXdulP(zn^TnP<*+2eW&#gYE6paG)4tR*<$rNL`!nA59X8b+Fe-gUVW zSsHRgm-(d-AQpA_b?29RAQ>ZQ>HuUbE!VQ0 zp{T5s<27`thEOTIV1%W=(c{{sp?f^8dAjsJ^0-)PMtt7m;s*JlL5!bw{_2G4%DmD)Ye?6VdiqoK2WO%v1V`sBE4AoGGxj2Y0$;!yMx6f{8eeOdx4 z3hFc-(9k(v8c%76+JcHJaY#c9;)!U;=zI$x)`jdT&eQ)I$a58(h@Ei6-Vfw{I1&3J zc>WBRoB}e78bL2Yx&w+@rDYqTs2rV(HB_P@RLb!hn(uLSXsE&Cie;#(YxTH_G_=Fx znxdi4x?G8B4LM?~cj)_(!`pB#gHhh0XSU$g7cTjX&ig4h)x<#!sft8nBTT73QY=2H z`TD@|#YWZ{mYt3Q)D)qXee0H`eGUAaj$hI}8Bn|Hv}1cV+$I#l@KHjomPzxu=r>P2RP+C|o0Y=?MjtfhT*ojtIqXx^oZ z(0?wTHE=xHUFz{ci@6rx92({qkl()ZFxcV9^AWPERv&A9AuyIo#jqCYD<)QNctbJF zGQ^WRY_OEv%W|$;hhxhPBe0%^JLwo$ycov8H#1Pc&&?kJ%YL}Bt)R*(YbQLcaMXma zvS$S#DA!3$C1AXbdN+>_*ne50*Gbm_eiH6Kkb$)E8%XpOxa8eH*+h4PqM9jjzlL;W z%S`z?Fq}l7{Ww$p2~baAG^FZBi@qKi;9*YDF;hOhT8q9DGVOp9(YHFH-vHzqI1zn6JP*Pp`;i3O zayB9l7JavtV7a1FbbhQzp&B&=(f4Yo*W2gsMhh+m-o`!aMTsLdzGLP$C4SmJqdPqaxcDWMIXvh&82b<{WEcCAx zlW**CqT}#j!)SilKg%g(E%EnGIP=(m{r+0rNfx6TYT;!6tUzad1*&XTfs@ zTrvR`X5NGZ2Gg ztbDjCF8>PQ!D(0&5C5bXHL|Cn_q=x4@&%*Ggl0bk`jb@x0rVwXbosyLes`XyO%Cy(Pmf;#v=}E^jTz?jcvij z`m1vs_`p_Br~agWmN|>ZK?@ftxTUp&_bI65{gJr70ad-o`&=D2ru*nC72Pk@La`fE zvwd@W2Q4OuaOz?N{UN+z7MM&lNNp#bX&X#JIe7+5vGiapccqq2!zVd6OSgzIW%D3p z`T-JHxI&)5?@ANlUIOpw-_hOOW0>EKm^9YC9}mnQu#Nd%vPzwJJtPNSzXkfAaP_RA zhro)X!7ThfIrX#0;YmjS^ix2ZiWVIMmwW^~9IZ1!=J>&6_6i_&gf$BCO*c_I72nkn zw&(~L-s@2urg6FpCAu`kB+Jp48(2L>0I|P|GMGPACzU-wD9p=gZd}efo!sl0~=k|RLzQ);Z#-v!rBHly0nsr@dRG+0>)F*vCcA&TDi7p zQTeQ*s_7Ne%ZrkU^4W>1^4Ucv)HJLpYwc`mZGoMN(wU`Au#4BcwWzmsdpo~YD@s;Y z%&M4uVo_-)OzLj#FWubKeq>*FTR#At@3ysXDdh`oDeQ){9=T{vSv@~=+uT{S7~#IM z746Nv-OXFud&*YSFRxj+zHIx9=`#{#8007WiK}Z?)F#UtYZup-RZOp(US2-4tZ#E? zOR{`(*^cIlWLeD`#j&iss-{fkx=l=ubxmjHCYsTkw-MvTpc|mAt>-i@Xi^BJ8 zJF*$pf?9W!b|!i{w)Fw)-@2`{3I7kOsm;C3TaVn_+qr#aUukDi>6W6>RpmvcZEf4S zpXXp`FXg}b^-o4Y$Z(GsO?@ONM%GB$mB*?@n8?P`k!sLst@o42&~{_9L@ zKbC{8uK%`gM`uj6i49|xj%~ZZw1T_w%!cvJZCx1kQMn=C)Y#m9g;ssWXCAgKdE@Clp)QqSeT0u-)@8lLi za}XxhLc8rN5zb%=Y)`E(tGv(5JqN>8>ft~n*RGDB!zgQLk^KC#P+XKM;#xzC4A)r7m2Q!OU?$?}!ooVunFyu(ZGJI8 zn_v82+58F)viTJq7UWlGAw~|zqQh-|$`}!wU(pe6Q8)t{(UH3UhhSikhRclTsIgap z9mcaFp3Sdlp^oOe(k(hVcr6%%j^#Eho)wF780FwM+Z==69R2{I^kLJ=v#&xp=Cj;p zn&LS@sWsXRu7tVN?asOyKAsqlGPNEUfXN>Riih*0_w1q;hDFQL4)tA7?7G+!k~! zw^_x(=On(JYoEaQ;`^oXm)-YnP3ggfem|j{0q`yeAdw1&ZZ5a*#*IT zL<{eW>43AI}D4HAM=)3BcvvVYn^b)Wp{R2@C?*Oh}2vf zLbEGJeI0(&)Z@*}F%Kb}UcZV4hteDBme*tmqbi{pHdGOZwJ>-yglYuAyf-DoRgwqUXjBJ zfC{oP9j>4nlnd~3c`{f>$YNw9nF%pij*dLabh4@MKDl)zY`!sUnB7@2+h5nk=Oean znd5s%rtmJjEBqcFonv1Pd)?%me+n zD|8;Pn}Cg8s67QM;bDc)B7wuz;1ExO=bIpY-6M|N4($8DG_x_*tHJ&r_bRMp#N2Qy z4rbvtqA=!6#PEbjj-wD4gRl#(Xa~41hARe>uGiU8udjmo5}YymQjl3|qpyUAQu*># z%dH6!ljh3afXh4?IZ~*i=Mj1Z?o2P`Dbhz~fTax17)=&wk8!4X4|1SO8xcY1Civ*m zMlp0be01s4(h%aA8C_bTjnJ>*qe~kZF{&nE2pZo?pyT{|HS<5X$ogNfn(1wAZtdYc zng6<_3}#OEFMc|D;-@WTz7Zh9-?5ZA#0Y=yQf3&2`hRaJqt`$)EAgBNw2xTHi2umy z=6V!Y-kwrcH$MTIvbqT%9|0ue;Jm!K0K!p|)f37$KSn6xyum7y{x7eMFN~Vc$N&KsbFXE%i4_xei3;~?}w!{2AI3w<2H{xIHMm}w^`w-$qx!9eD zmw08vmvwRRNGX~ucGFT8yMn95Zj_5%D!XNcWL02TJ$y}6H@jo8OA;5mB1%63B8q9G zbFsSz;TSV@demjvgj7S`=r9KjWU|}l3MGpvNJDB9;aKdFke%`&|3MviTOVRWn( zYwH?i_^n=3)3C<3k~JfBD{Fn>KxB2@n#P4SYik>7*3@B8)~v=&p=*p#q+!*>3+Q>05Y4@?~(Vg(ojrkUbA0GF-v3@FeUk zJR=2~z=bCXsSD4@2u+rSXSx~532#J>v8PcC-I$S4*_;?yoGiNs#4MIc8js6EF&Q2i z9b~i+$x$mZ*8Ubemb?0ljLWzU2_jDR8JHL%x2v1OT z`JA0Ug3sOH;LGRIVi`;orFNFW#iMuwO1^vfoLy_r;PQ=nWvXV+@5Ky&i)IlE4Sg$h)c&)JJLT4W42A(ds?tE?`OL|;B<*QYTo zHR`*3&OXK_%)53h_wqS=bsDP&V8C)NpR?C#3?_o&XMnm3(WLUm8U@ZZRF|7}ll6>b zD_1Sq%{dH7ro4R4Zi%S+K+W;;IlIlKRVr+DWV6)vmNBe-xqQwJF@yLU_@UD|*`Yrm zFao#g=*#Eq)2(70k6Y^UIs1%kh9p0E0kC&E8KT|U_Zd-LK4(8*Jrifl9>e}_jvKAl zupjh#+o^{AJsm>3s>|o>hwS}G375|S!C8)Be_sP}6r;_s_h(ao2zxe`d-EVrD?=j=miugI)cZ>h`Y>{oN%LEYlYG9<&x=j`9aZWCeG zV+8BV=j`9cIrHH1IbE|!!+ukD;}&D2$)3Vga^;70mHRU4Czm){^COT(kyNN}FPajv zarqosM(fMxY+OF4`Wqm1`J9c*=MIU4A%S?e1h71XS%UFKDPUt17Q@9vUCoA#%jZ;D zSxDZ!e9p$@b1&slioDT>y?oBb<#Q@-VzhJloQ=!pK9q=+qtPdw%jaxdKBri#06Uk@ z*|>ZzHjKH<8x3jY@;Muq_bfrH`lIUASHsra>{)- zAMIQ|XP@mvtrtu>2ri#vjiMz-V`j#1z~yt_lwz+R?TmUGm(OvS^YS?dOc*vUpW_hb z<#VW3=khrlm(NW=&b)k%g3IM|HZGsL0_F@N#ph;T5g3IS*C5`>A zI6c+i*RqT~VB_++>1bB=VY%*rSHR(dqCf%PJtSHG<#RSJpHtleMfP7lXXElYrh^$> z_jJCE$>no4E}!EA7njfBPOr_Kolt4PgBw1>#^rOW2GB>n%jaxdJ}1lZVsuDeK4;_d zx!0xg(E0qA&*93-d^MMBCBb*an~lro6s2c$>g97bE}v7B9Vn`E`J9c*=c*w9ABfUx zoy+HJTt2r_2p95BGT-HMHZGrI>3R7abN5|7XXElY=E2M7gyb(7E}v7heL_pUe9p$@ zbBcNosHvCF*|>a8(H<09>g97bE}v7>M?iHhpR;lKoGK(PpNn$@QA%n55h_gKB#bpH z=^LH!aAWM-HZGsr13>j+3{PA>$FSGeg{@eQ*l>Gg zKFT7`+t>)5t=f->jf|^JpOCCVVxz`>gg6+amUmtlE7VbZ=Y_Zr$wZn_DBW> zW*#^d%NU!%brnmDL!gYJ42sG(EH2fJjB%Oj@}NT5f=D?P%b1YEL~$zSr|DC%jEQ>l zqs7vvVi}V%ekSZ~mUk+aF$ zhu-&gSu%H-p8(ZM`Gz&v4~XzLuJ;^jmM^VYZDdB)*5j18uCadYLL*Cd^BUK##a2W% zb{3BIE%tLF4R!05u3oxorI8z1zIN4WTsp49c`A&pi#1DEuUWciwJ|KRaMh|c%dvG> z*U-3VMXizV2O8>D*BiqlYnHC4L!1@$!ch=eSJ$v`70&cVsN|Mo(-C=KcVk^$t*}gW z22xg*Ie!F1V&0s(S8;da^at)zlt`T^Ju!*T93xkRMvObYXF7!g0X zs9{m#8q^DRl6t7i?arSox0iCAy-Xigu_%$A_EXb>T0`-xI!h3EKj zx8RDFJCMe`DM>BQPoW5crgVe4hK5xQjjNX)UuP5<>H??c?rl(1GAE>QmkuYhcj9DL zQIr|Oi4Nf|5@5-m8x@8*$$|F)o`j7?y%~f_s}p*sle6zda^c_Q2 zImL;4H>i`%1|F(3Dka%gXuYn4_8RYRIvby#+||p85TDAQjKW<#3g5x}8OWOx_*D+R zDaksEo@0V(yYZ4WRVUQHV`*1Q>ki($fiYxm4-}Y`E%-R1Ps7vzWF`TlL`7KISJQm* zN_|1rroeEMvq{h?*HXtq0ZIm~LUsG5nSrt`n1$u?Y{NK*WqV}|zFxt0u>sPQ8JMtt z1oZ20IHxu<12P$%)d4}^%E+8wg^7|s4RB^rAme`MpC>*6rJ@s>wREwuIO^6M$qWRR z09_1M!J44)F=IVWgRmJ_cq=162($_0O>oAPdeGmOilSv+{7JS~GB^G_OHXMaqYNMS zNVcaU7FtJTd#~n@Y%c+NF`Q)kASedz7n5v9GcvQi737=Yj4986J~-Pn)RW1dW%Sep zGH!LU{VrmC2Tr6d(HxTP0iaL8Nw!H)j0<(PS323g3Gy3o#*`(X56-rUx$);K^sEVF zj7I&6w4Wf>$8eJExtc?=&FjJ|4xD6rF(}4foozZJQ`+eum%tfQ_JW?0ZROSI6+{++ z8GSU~Z&Xa^Hww!qY&XUik3nZ;V^p%?$#tx7DeMZ3o%yLTU({S*R9rapchU@@ERl(Z z!ApXWGt~hq@6hG@zL(FGr`$3hrgX*(H85&rcT`(r`haTmh3JIJTJi^GDSP?MS?w)5 z*cIgL2iu)`G_UM#X&mlyxxUHEFgKc+a)xja zs@D5YFpM7~Yjb6hBiKfB1_ev+ffS%nuuUrAKLL6H&T!_LMVtGZw_+l~jeqzs=+pjznx#?n!2`Dz~vf$B_E$=n&;@!+a}Zvi5G@04)pVn?D|X zL?nJ|8Y5<4(htKeEC5F}+|5XO5o+^Y(Ysp)QY~C{l4KUF@?9ji9KQR&NO2QJ@lqNg#4CRBwmpTyXgXtEJ|k zxd$>;4I$M=zNKS$w^K!0mjGd>8tX(XSzfjyflF9z)j6zf4<_%l)X2H3fr z@_;6YEPOgE+^FNz(E!oR;sE!}F`12^KPJ%}x+ETcq9Ev2^1Y{!|{;EGhZGHnXRWCt_ zzDG|X68JGZl_l`}5}sR-hidKW1fbuLX(l{>A=5&5f|JnxnyJF5TmmQ?&`Vyt<$%Tl zs&0Tsy8XG1=MX&1&ZvG0MPWai(uSh2ldyxxOsqSIzdJbJdo75V{8Z#ExN{(q`4hK8 zESSO$@l}8~!d1t>!PG0K!o$?h2j{>XsuLiVvY^MqBYm+A9`?n`ecE%6iifdYeLtX; zXyPf4Xqu`fV~HM*O2ujhE+{(>A4tQgkBQCuFwf9sCn8Ht^I`bt;w20<#qhoXmowZ( zXfANN+~K5M2_Id&h@s!XM;DvI&>4tB7az~iCGgSZ<}pMyGP>LXhQ0wGU2ZNz4M>45 zcQixq!$%h%8(DVv&sOsB`JI`8B`uq)FhS3r{2G1@O_O7c$faAKkF(G~-KXuz)dh1{Re6)*btQOn0oi zX`6PNzG|9teqPtzOwT7V3Hhu+wWjPUpBjb#TB>7V}z%$HEMknG30AMM~1 zn8%5pi4vq}iv0~Jb_yv!6vLhe`5#gYyBP^Y!=WPk^C7$mV2MnHA}o>d{i%F7W`xGe zSv_~&M6oP|R;+2*;u|971WgTCI6P`=?QQICZr;`-Uzs|IPt+_yi}|+TC5;PkF0Mn9 zGzn_?{x24(?KC;~Cl;IfY>%_pDf(g=SO)5BMehhQrCd*E%gP_YXWkGxTXrmisd_qF zR`IAX4m0yyoh_@<;-?DG9pTZoH8YnXDaFZ#HA|NXsy>*lPi^S~l&*^D=xkZD@)V$T zwyasBR2Z5w_)MrO{i~8*9$Gd5U;Hm9`gh>bBM(RJ)Y-D;S)akHtWt-<=fQ?mZL4H7 zMx8BdzQ#}-YF&xWmbE~Gew{6=MuRAnqqAi#)EElp>TFqyH0amavT8Nx*V(e_Gze86 zMprsp)?$qo8N(jNTf1ditE|^W60Ngk)u%BmHR{vZvW~F{r|N83tJ7FLDLPx$I*n0h z>rbG*i)d1LW1$Fz75a|$e&ce}YO1J(k95^mMkYCq}nt5h!wWwyY;dUn$50t+Qo4o$(z3T%9fJfc>l>N@vUZ zna*43Y+280!IaLH^>bYcM`z1AnEkxOUZ8chtY2ooDS*=1vR>55)p|Nx)~|FTp3ata zDD8L=#nIWaUd?Go-FiA()^B2CW&HVcwyfXAIrI2+wyZaGH*SGm9(xK?87V)ktC8za zwvoiqn*AV+BFWR)vY@j?7Ds2xg3gv6y`qf8u?wB8_1Vl7+9purqRtkuJcU8g1Q>O; zfQ?a@*4eV4v!&9?^6P9_(AipxrN^i0Y+2CRQgIWm&Xxt8tzLy-F7WAWSiT*<|a9>LiyU?CT^Fq#$5w5!P<}jxgKNgE)G8tc0BY zbd4}E9tV`igjBu{K%Sf&8!{7N4&-d|p%ca?k=EI=ptE%&D#Ov)vY@lo0MWG0mIa+H z1~ElBI$IWWwp6{NON!2x1)VM3A(1;P#ttznPiM=5&epAxs_1N4(Ai>8QWc#o3p!g0 z(K=febhcy_OPwux?ghV=W$Xb9I$O8qvXp+EEekqZeD{!K{W@C~bhcEtK#~1ATNZS- zn9dM7TNZS-_`n@PXUl@lma2gioh=JGTeBp4bV%xKSI$IWW zwiKmjfXug!j*}4}34AR-MptJR;5C-aOS4(tSvY@lYJciQQvY@l2 zXhZ32Setz_ptGe4Nu4c@AWA9i51lQBDV&6%v&Hap zPMA7d7Ie033`a+2%Yx1p!>Su=oh=JGTO$O71_~dj3`mmD*_vj zY+2CRVxM$%wk+suu@I^_txnuQI$NX^o17kH&|<9YfZq;r)+;tS*EmD`D}rB+-#CZU z{qRU}0>%Wt&Xxt8Ek0PF0yBipmIa-yZlUVcL0XnM5*ko{x5`!8uprgVLW~@Zr46?) zf=8)brH#nnp~jtBF{h1;tBnb)-Q{Bue9}9%0_>@3S80VhnosR2ZFH~-j6ugtLwY>x zs|Z7b9lyoqckw%tKdd%n88y@M>ON72=1eN$$;-`-eGE&q^A8X$TkN25O z`nZfQAtkUom6bj|&QxRp;}~g3FAko<_<>lieTeau-d!x;t$A1PE;d|aDSCIYg5Woq z0QK2sL1D_%XX9Ftxew51BhvtVw$DRKmMUNd8W(nVcNhb$JY*CE|Hw?J&vtA9GI8|T zxLjr)N}r7t;OVomANlp!C>~!k{hJFk-ey3bjfoyspG~#_iv9X*TZDapKAU12N}p|k zh&))IjjanS52^ZWDw!00HpPe8giCVfEyET1Y$TlOga_)g9gAE;q)w!j2k5h11ixuc z^xvWceYU#=wL_PBdo0jr`}_zDWn}>7{~!8n(U4haKMJWV+(WXxksXLiLSyn(eXA}- zWUNL4MtaB`8U9a1iLo|hNSfo+-VIVKu>S-!i%H6ml)aj!?(TlPA#Co!&@_vKj6CU5 zR&W_?FFlzBJ*Z;NnTa%Zd8lFS#L?^&IT@B7ZIKj6@f}oQ4nZ7pmGB|{zWxHp2FFIjR}^TDS*ns( z^lfpCc3f-@mrYXh6~vg{-qnNE9duvHc>G)?9qpl>9USXJ@Gt;?IJexhS z(e22Fd8wJto?aDX&%MmdWgjr+s9aT})7%P+iJRAt(^((f44cDEhVcpOVJ{T9=1TPA z%(;wSxec0CaPx}tpd$e4ky3&tGm|9LUq_*KgXYwkXwm4dsU(qpbc9oV zkulhnmvSFr*09{OrI^!nMfLZdhEKep!dPO;F-uLA6uMRw8tNOm5!ZD0ba!-bIn9^F zU(-x>rTxc1QJ}#vJ_q4U3bsgc`)h)kJqhqpxZ2*<78zT}%rHNetUdz%K53fL+Qlas z#@^r3_4dJ znsRlkHky8WmW(j!KouN|SNv0v>@xH=)quB`umKwZ9s{>hdd=|&KLVsC$9R9pedbD(6SKGY~RD((UH8n6W#+a~SG@!JsE({g2?(p(+b zVN_x)Lj%j0A3N4C{s?xX-kI^$L#R(KE`uq3Z>Ei(hBEF!vNOPr$F0tD4BF02ut?To zfBW@rZ*Oj0gs(&SsJkdrj#6l%>20{_Op0^HO0n}`UR1(Cx(?_{IJYdgA{}aQy%BSL z9k$($!c|L*N5!vWq@_=bv84lhS{kAl5F5Z`R4A(|P-Of( zfwUfDZu7T;Bm<~{MzLRq6h=LhIWyyL#bCaKAQ)eUTSCIpYk>s!ytr%W?T+U`@f_T> z>{)n{r=zrRGJx+wasmGAhckad36^mH5}x- z2`bi18Wrz@g~OF^K&q)ZA)^H=vXCw#j}po;GLR)op(f1HQO-o$`^d*@^6`qSGey5( zj+I756X?vbe^8Fwb$vQ^$co<`$5&IWQjq>4Q+Vs=3L^Z?vn zK{g{3IrX%5cH=R{_b5D_=Zzyc?hKR&ZVhMhd%o&&!;->r6A6yZmvwdc8K~AYne-kofNJa37WGJQ?mFRLZ5+~ zUj&kL^>v(n)|`)8gJT^Wi`@sj3DChBF+wlGM;9N(&>?KE(8Z6;LZ}XJD0ErV(h!Qn zM;9AQS}x+y#fur@1rT(xLZ)&Ge00!$L+DNT=yE19^i!lxmo|}Uu19)w>2q=rx(-}) z@!66)e06YXlOyXzQ*B7A$+?Ci4rzTk*FdUgA`QB{9OnNG_~_E-W+HScd~|Us_j@Q8 zUHk~-T;})Fr z_xsDy4L?mgZC`*4e}{J3ON{XMYNzD{5$T_=opue%7HUUcDJIOG0Ggth_6Yzn(ENR{ zrW$A_!pCe>C6lU>wHHJ&(A=OVs+96S)(zX@l+K=VNgKxO+r{Qjk~6m2|-N?%rhNkZCZH=!s$%G+wp;x)t(^vq9Mwc88z8& zp(^uDU|FfApR!U-KV=Ovu$=YZHvM!WQWpcu@5AF6SUwGfM%hvfEGsN!(-sDnA4fcQ zH#{28g2hXSP=w!Xvjo36`~kw)VKbU%-;A(-H$0j@j8!ynH#|CA!Gm_gqXn8U^lo@` zgeJ>wc+8CEgnxh>Gm`kxO%olJ%^X>rEc<7`(^)2I3clZn?I@UIX0)&s9c$-BQ8ifS zbTo0X6&;t6rq~^$#nJI`rjoKB9xV>O223}jm1Q1-M6&#!ku$*0$oc=_J|nk=1t%b0 zh>^oFYq-6iMUl_Qtr7W7BZ(HEH8QS7wrhIY8a4JLuwx_JXL{Ny)X{ur8Zgk@%?vCU zSRRHIhi71!eUIJ1zx56S%VZj0U|D@h|0!GVFtB`pnb5%U4D7+V29`M%n1?d3%(`ZY zvC|9#%M=$|@2-JmcGANcSZ1P!HLxtByx4DGxlY&z7+6+pLm5~eBO(tru*{A$$iT8n zCdI(A;)CWC2RHMU2@D37Nm%QIQ?}k=V42!_AyOR!%Uj?#%{+5W@0R|?nwFLoFeuXA zj4y)L@S|C*!l!u)TE6x^3;tmpcwsZAl^l!8dk$~O&%ottvySGp8W#4ifZl_Hg(^vT zK(Y%rcVUxZlx?!G3(mp^op6Oak*Z32RDx+Q0Wc4)K)(1LRmX(QV@6=TF*=uX*-fBb z3kP|Jqtc8e^Zxzj_&s}t~eJ_vSz5+e*(_S8FO6c!;c|61j z|K-c$fA39kfc;yVq5X&L-=@4bx~6X(OSe;yMTjP0$6}fa`%S{`Wagn5XXpTHih zAfi7XRSmA*FyhVGk^H2c$25_Xg z_FxGa>5R1;zSstMA}npSy%FII7FizRehqqZhG-A=T6m(K20dedIqGQ8lS~bIN&agH zNb+YH7Hz^(S-|ebPnxGePfT(D(&0XzIjy#Thj0dykiuXm4`+C=2}`!PHX?kb*@g)- zbATn$%t4k!GY41_%}li-XjX_N$u_e>9mp&vq%#liGLPY#iSJN0Q;dx0 z;%FlynSLW9nPTl!85u#QDMm&zU85qonFEZBsIcG2NT$!cg%}y}17d(;c;)~jBbly| z5tZCfMn-boX{E6rX8XHfMgT5uzc`jR;2_rE(YoU8@8FYy8F$1bV6i67wW@n9#jY0{C17Mf|bqhw!F$1c=JjLjk0aaju0#DOsKowZ1K-UbY zLW_+2o6rlz3}_Qx&!SM>#>*QlZq}zUEH&y=DTf(Q!qlK6D^C=_yE={4LzVKV&kU%- zpi(Y9ycf}=^2Qp&J(Y5p0ew`mRYvcca~P6LwHZ)VOw^n<1Nx-Utvr?*WB-Q*UiUHGT`?Fb6tSF*>^PegeG-0!A{!>j5Xh6sO=S$cSg(^9E zu4DewLUlm-5}jL{|11??3X*Zme=ZTEB&yASs=N~jiuq3^SQUa|{!^7=9+{Q-&y^B; z0mhpEzs%k!z#^8N=08<(wUEp+|EUsL9`%|3JSfvbebhDo`4Z|D3dl%CoBzBPJt{~+)jPVRYyMMrNaW6n$qF$mWg8PZ)p45t9GS^fUGtv|N~*5; zPlZI#Bm>NUrgQl)75rM3F=GC6B$}0dIMw_o-#8>$zbZM+f2wYQBKuXzY5tSx;I&8h zbiU=d=0EwM#cWnMg!xZZ1L&iv=09aMQj8AinE#~JS4<;?m_|BUyX2@4rj(&duI7@h zB>0VNLX})mdI|@d|5TJ6D5~H5=Tr#52ch&@zxmHOLbwnF?1JE(zLoQgLGzz1Jypq> z`vCKw%!8`rLh_dks^p5cPiTY9e=6!dpbj?wsb~)hZLs-IMSTQRzxhv9NT`yha|BUJ zY5x%_OyMMqXCvu85$TWyB|q*y8-Tmo6Mz) z`J)m(ZSO(&PPnO3gvZtDX3wT+TvwYNMM6)3&;gE<;Jk#M2YLaJv*5~J zN8ktWd>2mF(sDqorEM;v>Wyl6+Q^W<#@1}!BCT@|EL$21k(l{cx4P~b!`2yz zoymN-X+Djnd*eG%BlCgIg-eKbl)J<;%=?`BOSqPi?$^-z^6AKk1$!L%u(*3R(S90j z_poV`NsyO;T)tBCy`%Y*oi#_49=Te@-Jc+|JlDwb*SsjtWPf-5m=xPjb)t((*@-ShGUvioUeAv8*#h!^ z4dJgc`5A7>Ff=-#H7M!QM&fdQ?`C$WqMGboGo@#COl6|8B(W|@tV$H5)q33Q7RaA2 z3ybl`G}CEywLl9!^S$^&iXpr`*{8Nziw~+0OkYd@58G&O+{!)zExj~tv9r*@Otp? zo3pVKnPMyFzq~oy(icyco71teYcH*pAF-8VtGnN9-`#Jv+(W1CezTps-?T^F{TAj% z|J_I`#a52oK`k5ozPsPl#ngPM9C-Je%kH<89Ke3^}i9)aN!?DfBca289A!Wb#ma>yCxUjKAV%Mov{pE1B3 zarXL27Hc^yR5b#UytbCJ0pVBxKfe3lh^fMGCtbMDXHKi_T?l6}2`LQT64A4<*H5+( zX`)M0ikHoQ)@A2R`_pu3R6VEY(m0o$%RRtHBEATOx*VuWvj+k=eQt+&4mfT1{x{oy z|C{aJ|0b$8-vOsz^+xrE5IaxGMQ?)pRB!$h@v@i=8!Oc;4oPAbhjHFPK+3Gm;>59z zi!oED`&^byNVV7)_=H)j-XsvtVhYk?@{Nk9-jL4`_DYi*(Ds1i8GF$2j6L9Z#!fw+ zv7O@?d#K}?Xoz(mm2RRl4riIaX2yOs5eBFx!v7DaCK4VNydUvGj2w=Ihudqgz*1@= z;Q=?4hX>tI9v(IJZ-|$wCK4XvhVt;}U=ZnMhX$O2_)Y6@oI0lk(j$NyWa|#l@Im)k~*;$-Z5SZ4v8BqqF zg21#6Q*uv1U|6R>3W_tZqha@a(b|U9OV`yk!Y+F(gK2uFATX>m9hrKkATX@M4e^ND zG=gCrwLK0%4C|;8g(A)=2n_2e$cm^_5E#}`KrAAsATX?>!dVezSmzm}&Qp+R=s5V| zWAMWpob({oryww_vk%L72(C{-U|2^bqcLq*M`0)q`5ePK3PgeAz=KB?Fs!3M6iUEu znD$txF%*oLoPxlxj$+JHpqzrhu#N%?G^Zq4r@=x6x`uTWYmt$6HMSJQunsL~Mx0X+ z7}jA}TGe+70>e6lx%op@bqWH*I;mdYE8oj|`~oj%D{ z_WrEq9EK!QZCFPY6E&v|>zpQZD_=^zWejUyPC=p}W)Qy!KXf{$Xy`HohMVqb2n_2y z0wkhNLtt2kA<54%tfMnTyR+wery($`(}zu;2u?#_SjUYfhIQORieViULc6Nd5E#~Z z7%9Q94iKJ(z_5-2;wT1;{p`=)BZWW%cQm!Ba{NG#DKw=%4S``Db-O$oQcgo)Smz4a z(JVp_meUXz*7=?w6VSNJ)gJAuz0?@=hQK!JgHERUrt; zey&R~kIb}7bTB&z3j=}T1sHb%{4zUNfJH330mC{fxmrl3PeWi>M^(u3h;teO!#d~5 z^iUsBry($`a|P-ad+11pry($`vjjZ~+n5-^`ZNTFbvWnK+LX$TGLd|jBm z(-0cgQFG)1-)RU9>!|p(>NJFgbrc(Rno|txd`lAaPD5x|M@7Zvv(K;&Yt%grp<$f{ ziRhh%(6A1NdFp8h4eM|S4>%2>VVxf$ft1q_8rG>mt9Yj&G_3PeVZ&)iG;|)z;GBjq z5Djtgs!nnr!oE%-K?(w<&j~B%7Ti989>me(VC+Gz)?pA+lye$F!#b+o(Is8OI=Vw5cUDX^#H_s2 z5E|BbT2htM5E|BDP*Qab>nKE@hS0Fit7_UZ;`ICq{92YVVp!*CY{aCVhS0DM-#jE) z|7i#f>!@ylBKuE6Xjq5o3~?Gl!#aH64sjYn!#b)4Qcgo?Sf^UDM~8F_>s%mW4mb^= zVI4J>3_J~?VI4*38E_gx!#axMKMkQ_onJwKL8l=!tivs7KAcidLugosr61xngobsP z$55vsG_0d&L!E}uu#Tb*J`JH^9Yq`JG=zqA6xDwkLc=<$kTk5r5kx7a{b5*#VG1W< z7}jC<6DQ2m5E|A=VmLadAvCPRu!#WEEgeeR@P#KUUVOWR#h!ckn!&VPYLpXCf zry(?~!#?SrhS0DM3!#d0sS|g=X-G6g%6OC0qYPS%l^fxYhB)huH#yfhL;S~re+R$# z$_(~m;gRADI1Qm;9X?owJ`JH^ovVeaR~Kp7=1JI{#uk9@jwr)U{g%KU^eut?-}{yz zEkBr#)Wf`Z?VIrEZwb=#<;n%rzxOQxE?zrJhD*w~1nC9A-H7LYOAw1^{S4t~=$H5% zZ~hv;BlrV^vBPF8&pr{`P5y5QV)?_krXTn%L2S5!2YpKrE6{|Yza@x`&}3~{CzcaF z9XZB+hhpfpW^7b8b7XO{>`Oq*VwoVW;n~)~Rc(wGwqj%LpTOgNOAs5E@i5Y2?Wivg zjM(@%Q;`*nV_PRy9K2rQ!!*u#>>6wRd|dU$_GILKY@|b9qOliuqTs4GGWqrMan;)w zP)H`~o*N8d8s{ZuLen@4u@9~E^KsQ17tG8GhO|BT=m9=A5uRb zrg50)(E9nf>P>A^xcd3H>a9W8{rdU1>P@i?($B|LZ_`BN0s8s4>P_uC^+)s-a4^h* ztKL*Ho_;>AdQ*Iu54b32-ZJ1|8i#}?C!C_6kE`AmBG(Y9&Q)*y@DIM~?Rr6@p-Zr# zG7**@8d_oU!7!_H*pYE2iIHA337Yq^gWKO&2h*PBvk`OoDTZ-7-1%pN>#s;-auY%` z3*hO6=Z;bETm{el@EB9v=r~wej(6GB@+k|B46{tiP`?|76X0%TVvLFMRtVCU4$JtO5^X^y7QlBV+^3+!mLe$~_%N$dbX_uIh8oNk`xn+OY<3s;bdF z?ML`_m3nY;v?G^$EBJzW>T5dvS|mNKy{o;yeRD@6Y~FAiyI<4?wxJ+j7|C6Y4^f6c z!c9H2QWffn5r`zGvUeBU4Tj`7z~TJoe%~6&hF%J^juf$A(0FQlKi0whauvNOq8sKt z!q*L+li^B2c&M1)7L3PzuE~V^G}JWtbrj-R)Ldx@)$R@JAuobZIq4I(HWJIaP}EcQH{xKkjE#?qXnJ}oa=m`^Vriu z#yuTi4D2~+I_w?nX~&T*xTK3*3ePC8mtG0a5%7#b0gwT{NiV%YL**JOHzwZ>Xco98 z?}w)j9;5VGvRnp`207V=AQfPguav^B_M5H_dH=6Q!$#(Q*F@ys{Um-wHPk z-Q2?x>;Bjb#z@wR1r|4<~!zGdUhh-vY9_5SN)CplZGBT|lf^wsJpP zSsCUrZ$&?&i_eM7G|gYeaVHI2W&uM-0;kK&w-G9Vk1lIcWY*zN19M>Q$IJj5U3@N+ zSqmRsd|nnpTj8V298TIdkr`d~REGGLOqVs0q5lJ%E^`<|KZK7iGcRI%KY+n&e6SGn z-ar1)_vYT_tw(O|?c6@Iue1|qY;7IgoBK;QH?<$x*WK3t-vau#;)a5uIGeZjlwy20 zpIo}FZ}XN`unfp;OLCH+d6wn`)RzV&xn%v6FqQ4->?kF!(9)Ln z-m(=H$=bSgr3;T*ldLFRwrZh{QM$anYuk>pp7!R7WOHdpdsAN-epIlmuYViDObE)C z?fp1v{AcF2YT>dnY2vc&GfO+my1LtXpx>bfCI0*Ewdjs!W1}jZx-?QhO4?7?=Ddm{ zn_6L)1#TyYsWBe$0>n?yb3b=28 zIx5>RE`xKpRtZ<*4R|#?9jEwk)TgqsCO8w$Jo|V|1_7g4xQ<%6wrElLtfH#v71PU$ zl8N%!iK_D1MJLoWtSD>6Wg9Imtu3W9OPlZuGIfua=I-ZjOGlrMX%0snN)9iqO@& zdljfg5B!v~slB7U|Fk2wwxbfd{*i9n*V|l%d`qiJMID%ac463@lQPfX@JK!0z|%TYW9*M9gK+j`1pwsqn*S)meX z?(Azd0&eh>ZSB1$H_8L$)D<( zqAB4D!%7KP8nzqm=-J$Aq`5(sVODFWk?tZayb*JQn_Jqq8yRkpRu@sAxC^xPG`0Z9 zbb+SUDqQHnYH_Nfxw~t-k?le#NmK&1>AW38L0Hng0;v(3(-)b`Fyjx%F6a{D=b&OLSN)Tyddr|RCi_rCCEUZ!2Q zp-(k zQHs~xgmIMOwKQQY#k?sPO)1Vw45&2gYK*EBuL;8{&1%Bf%Hv&)5td@Yxau?y#tlyM znwwT&xaDPT!hlOLCp9%;(B(5%ufotvv9HAdOtDs8i!qqTyBgy#W=_ReOmR?``jCe^ z-(*ekMmD!os5P2gfw?Dx##6^r-Iv*;x;#} zGR=9s7I0hgxh<>A#E@&J!`6^zW9FoMUJE`27MQ>Kipforaos&7#cUySYQ(&DJ^f}{ z#JggO2u=@~aGPl@lUH4{(R?k%Zf;Wkj5NP_;$(<_y%2l#Ml&;yKV|YYTQ{2X3-Xbn zEljv}{fg^0tXg*+771oneu9}D@?d*&^Q6g}@Tm9&1^LiECrp5D{QS?g&1P-^Zj+f; zh`SzN4mKASNNIM{@20EQul=T(UqGZO7Fke8g!*H#g`wD0tJbaBaP^AKQ?4)J-E(TtEA@(HGQHVXobmp@+w3@C$+|?#qfIZ1{7vN4Y zJq5T^&60fXwNp%Q0dA|gv;cRaSsHS22V?Up+-zHaO{=*qOt8(|JjoJM%(6ns__=a= z))iCCZxu+!YV-0!>`A7t0DICzv%C;{in*cydrFJBvJiWsSrM{VZTaT9>o&skSBBgz z^sZ*JD&#rGa#eyks|%!0X>o!R%~gfcC))Ihlgygqr9=PK1=1%?GS?JfPnl%CQIPGd znPk@Hr(fGL(Og@AJ#nI0m(SiXsl{9uvJq!+#k6jfS>Mn1M=Bq{>hNwrl^Jw9P)W(Z z$NxdQ@XtN6Fo^d)@RclH$KwwC23*2#G^KMgBbW_e!qk+_Nz%7mQYCY~3#h_RKfn^+ zZ0lQh#kIJmI(N|jkle!GbOS6bo7BLIyi8^wMR6Uo68~1ZOTe-z)z9JfNd@kR^v&(C z#NxSFvyyW`7nZ6*T!0lSiHjFtT}q;T5f-B)db+Rz72*OcJ4wu6fYm06MO|29lDKd# z7M8-vVmT?CEY^_1nTvHJiCK%VSR}Ey#|$>bV(bc2HY0N??33!a_exfPJ##S4#^o>N z>=#kiUUB8BwWjRCDqd6Dq!lYxZ^Wky3z?5Aw=sBD79^j#@-Rku>^x-q@D@-dsQ98T= z`_sd;ua{;9i$9%dhS^Kiji&6fOzmKZaQku4VW_}PFCNPSrEyW!BZ0|q+(g;rh4JY{ zOH=3ZX|^Rkzc@aPGf%w#XJK$9x~5*-$CEVg;#mt8$GlEc zj=qLF`93sd_he4LEa`CeEAB~@{jTe75hu6Rl9vuvjS{%`cn~G z#xJ4;8skuuuy$qN#uaPub^o&e6!9688Pe^=W7%_2szh?T_%Hj*{*qwD;rujrTkUV6 zBq`4&y_BDHBcJdr``i2koj&`nm}bgeiBearUyt1g+=RUGx((>9zl##30&FO112)wb1+tX#=A25XT4d#+-ulNR5He7h% z{czbdLx>n)XOtp*v}_GG`{b5;iQa=(dVt)1Pu-+fW`0T~S62pm=$O_15$#pJdDRBK zoM#tLxcxqisaO=O|Hf76v=WzgEXpoe+;{P; zUi|VhO^ltKIR z^C?@ESyW`1b=bvQef1VJ?nXR{ZZeYwWHR?boS&NHj>%o$LDo~QU_#wq@Sni>K>!NE z-g=R_cMevxzkx03{Jpe%jtr<@Zd3Z#w7aIeQg(a#%dyqAWg$l2B7AiJhxF$DM(M9) z?`;mpliv{I-rH_)N=hEY|I*AR{C@;c#(&^G1{CeR{Xbxol>8O`mu9|>|8D?9SaY1< z-rMcSRe101PbB5|dv7cgdvEJb?!9rJ@#NlHv%^VOQ?t-dnJJgsY8dC->gW$-TGcX70(I+WK7tH#Z|`5|-rE$|S77grX7{uA#%t=rdvBU@;(Kq`AkmeAtHNk??6T6WbD0t9h_R;w7}jQ z70d^~G0Bei-k4Bm?@imS;NF{f5%%7uo!om%w!|j?-?I1i&7{M*`(XFpw7XM#Z)v9P zy`{Li_m*br-dl>Rdv9r`?!BeCy7!ji>fT$5ne4r#65QTfimiKZX{OzK%VX=_TfmO@ z-hzZ^?=9dL*n107(|d1)lXUMbo#r;!u=f@urT5;_Nq+Awoe=N61*!RaZ$V;u@2y~x z?!Bdxxa*Ycy`@vrdvEFV0();(Qwz1^aFZ=6A%;@%s> z@A3BD9v1mv?@a^u(4wX@ipIYOO0a1-E-`g+jr~E#Ch_<&u7|PyA7)UH$Yql zn`?guy3pntW%4%Hl*!Gt8?cRy*Bn+}-D)yFF3x0r0CBfR@;*1$DzT4t$~q>V!n78= zwmJ@Q3SLJ4aq%d!Zo}y|K>Y^%ZuyUkCoo6R-R9Km@xF9%B_;Sm>G!AjE=87Wd&v ziQ)?f48gL#YBe5#C|*!;HI6eiIJ@R8rXi|5YD z_BG?n7AsfvE$v&4x4R~Y?KdLJb%6c^5qnkeNeDd(sB1@+YWn)NcohTg!lpEUOfTLD z#t6$qs8${AU@W%GiH>;{7%P-Xx0_Hrs|dde0LFKfx!E%x0ONiuxyDKU2#i0rlAie- z7|#OG15GgZezdJrupJ*Y?z>>t;!74UxM0>Iehw0E@?*|9PaO5XBgcOQoHB&1mXgiV zSI(2BE}RUvIbJe6=y=I+rt_pj-~oHky$=JDayn-%LFeHi8%i-KF#dhYQ%7bxYF%V5 zy71%-_l(L3F@FV~o5)0uoxn(c>po*P z0x+q`L`L3EasJ23lZlLa&iq|GBM%s2Co;-ifb&_(lZj09;e3hmWFjN)+FkhU5de8* zBBQ>IzlX2T0EWm!#`+)HZOqevp=%IEujFL(6P>Quk!C1=Lt~5Qo?EQkC-BLi=fJJS zFIUNgKtd*g;UFaNzw}kiUO3?^1~6$taTOSKFH-jeiN*gDh5i?S8Tty!xENDeEjm%P zflzHAMBA$vHN)3khnHHB`v^~v(y!{?AK*(@fKz&5r^MJtKFWd3~q$=TyG%^r9>mCvSrK^I6nx8nL3 zFzG*h>h$3r^(~s88T7LZ#E*NyB-b9ilF7SZ@;5Y!F3QwRqr?ecLG?4g426>K1Inlk z7fjy-isu)mM)S*mLq-RmzJxy z%KY*M>~MX+-&5kxP0RE$jM@JOqQc(+{A9v*_g6=hb(0C{f%l`@05_SCHwx#C%EOR9 ztN0x7=HmQ(@({Got{jVUHsfp^U?@%51$YCrpQ9*cYVd?@N#^?xW1d)R%sYUOP{?X*A-u|M1p5i4 z(IPedk8t1fTgH3{cpItNT4SCEIH{>3^$w&KeHXJ4;O9u4J=~bb0h#T;jXD&WMIv?b z6G|ui38hunZ(RLFee0;?27E~qaMvSrDZAdqZ!qACNqrYw+^+Xm$_Ks90Ci&bc}m=S z4aK<6a~gcRv=smH!q(@FQe}JrVjEzFtNO4kCFC%1JTN|h|A_+2Q|D21P---{E8Qqsc` zpq_^buFd}o26BeKST7N32($h(SpNW!1@LL)oR5#EeGTAa7Q4d7EarAGi}Y2HTmf(~ zi@e{%`Mt`Mn8n*6e}nVC1h@q-$DG9c-F=3hrZk{)KGS6&KC$|Rt*Q1Rd`(`75BL7)WC;89g)r%1AHrOlKaOFQ3SqB;^>aWH!m9CM z&riTPu@JTc(zgS`5cUT+|9$285cV|Ap9J(5!rn&OYs?dbu<3gcg8*)A#SnHs&UXQ# z5VpgGurqKs&abWZyAUSaD1>q2%df2@goT{CL&ptaPowxJXcqTj!XW2E*n3EQ8*m~a zY#)}fMP|a{-%JSm^zT!DjyHc#evbN={~Wdc$k?y!#$4eqUl;lo^&9YYcXa<4zL>GU zca}N(wB>jrWes5L4>4Sfdg`*1o{BFogr9!?l6^S6Z#6&s^aXh8dx59^lX|L{Vlv}S zqnEA+%n(oAFERCwlb-q|_f&kqYtyE0egUp(PIVy_Tdt2uP*q!STl_To=@vkH5LKTz z>8oFIUtP80BNE5%cJ!?wuqmxF#2_X|(1R8Q#FTz>OE zoFYG=`vo{^W8kQ-tE0+~`NB`>qdNdw#80`IS!DRjRVV%QOT13qc;$vKBAzw{Zu;%V zC7#j}lWEEDBVaEAxc6?are>e?(l7bEFTX$j1%%VKz)xHMRQyzb3LWv3vGgv$PKl>~ zDDiatNl*Q9d+Lg{*KJ(&1vqMZ;HW7_Y*h$w-QYcpLEkNx0`-px2Dzye)^q1qo2AvQ)5c^!b$f# zN7Z=x(Md=Bay#l5bzf?G;HQmG(ogMesdF-P(TAOz>ec?(_LEopU+P^c-U|8x7N>Uw zUi!3nsos+smnpvm4=(`r$TgJSJMB5?rC;t~`bAyr?+M&=^G_H|?X~{6OzSr6oB|#b zKg|ruj42;hSzLZvd3V{6OlPJBuWc2LHkFk#!8E40&J>qVul!o&w8{l|2cl$>Au2sf zP+2CkU|0s{1J1ztd6jtNd|0NkQpL$1I4H9@d$8Vs<6jy_J_%E`b4qzml=s?lR?3wx%-E zjd~4fMV6wnKb;MF=mc-t*;S3mIc!2EDXCG+t8Mi%thM>n#+qOXntLKyQ|)}5ikFrK zRu!Sq$_lo`fLO(XVNvUqhgGvpGSIhO(xPm=ib_;`Xa?OCv|p8NKlGHgANoq#PZ$e^ zX$w}{Vr+j7PB;3eH)-q;C2=#Ao)WoRS?F%?O6Q*C&OHal?pYDa)BP$3!|~yT!%&sb zj|Y)Y7pO)`b!BPd;e$mqVAMcowHq+hIb^swy9)j`JacxHj+SAiGJ0xt5DoVl&`50V zy7Ztp#hYU#>f=##s%-_EIwH)EXMl&nU1q?723o)Zz7lrI`Bh9CspIY-X@uMP zidm02BX;<}$MAAktjngA+0lDu_6typG_rA{ELz8@#lUW50iE1`gbe znt%0tw?+J!U+hZY&M8{n&hgut7?)xH6tCKW3O+vbx37&2;XJ1Ilk4$;vK-~~yPbOAU~>beka zoF`vvox~S3+*^eiBxO~d6_&Y$R-FX@?dW~Hbt>(gET%gc}D&x-oUM5*I zoQRd5FLyjSrPfMu%y#vYfx>B`+)Y*k-DH&x0{JzsiaXX-*7fb6Fb4vJb}KqC>E9aH z4@2Ub`#~TJC5?va0@B^XoD0|p`I%fms*I5ox7Nw2oNoWCn99Rm*AbGM)>Bh)qnjUT zz!|{|IV$m!GhK%VPVkwdnZ~cucy23;mvC-ez|FYcDljVIC7ip05P7+RNJo-?{cE@U z)xqg*bU>mK#&aWctY>8f2 zj*Nw{SE*@V_2CL3z^(;ctQu$MAqft4b$O1z9+7Lg(j_u8j4w?t;?C9Ux(UH`$$35# zV;C+0ZMG)o<;FAzKHlQkbpDC%LZ?*}qB@h3AuzdsVq>O+S3S|pIu$iy1B5l2W*bF$ z&_6xQu9r+-3-jRt=dfY$9qdqpF*ALWVgT^^A~NCpu*0}mYzrB-m1kLvGJ-5`cC0p1 zdVw`4l%EsvP_Mb^3%z;a)wR1iyfDm$Z+eF^+87H$b5Xima2tSqxu`(I zy4dmj!hUgz^O+_xX#q@Rx-u!%H9uA|;gw?)&t#qthZ-3J-4tArKaMNiIIb!@jt7Ox zl5txd$JD_(+M_E|T$j29$56N680Nx3En;YOSc~C^*?utN3RM?vr??ABtjrm#Pt^eL zu0L(_oEFFXhID-XiWC-HL5~!PfN^?q>D=hkFoa~jvJE36ip@F7>$ehT#tW~}@x}6( zFh3%iyIAIhB=38PUY$i5(fqA2WqmbfF#wM9LkC$?LGB#*dpabH4-2A#bCZxWAq-CE z1yL&uW_ApTp?3JT6tZEL-Zq=)#!G1&A6s4Qn-m1o$@$@FN@y=WZ5tI2^QXmS>oA@k zO5qC*u}msz&4^Pa__+H341c~`Y;9+93_C7kAj87>q2(^#w1w?&%&b@@igL4kGlg>x zVxPZ(IHwY~6nIy0t`|*O6ranCYvJl>d*MRVBkc+EwFl_c3v^yv7)haVFCt%}TUZl% z&Bc|tKew18*_cbhIGQTB-DV7m*@=*!CUpA4S2!bw;l{gjiSqJtAwU4i+C{Yw|u9B_kl0h0Ywx0Xe~R;nB|Tn z{|YztU+Fd2ZnYE3im*0Xmz5K&t~R%vStT(Q>Q=i6CRjLM<#>J?`pipdJLTlh7-eq8 z7!c1x<%K5@cjrmklHs!=o;t9+rbk875AHd+siWFW9Wuo*e~r$9?xv@k+lJ}XP#ez$ zdh0XTFQ`k;1$yfJx4TzF`jui<>>ugJ4ay3k?GE!o*vH; zZV@dZ7K>*$M~rgwpSzhU0y;B9OJ`+`IgU@C6}rD2Hf{=1KZn`8k!kPCd^MaI#sxFO zIWEDN@de6rarE4%Jm{X_d@}IU^Bga@%5O^XPUNPF?R2R}-WF2qroZOpQtaH->fG?% zaB)-PoO_6K?xAj7gauNv0>Fnc!i>r4i(VbAp6cS&(P!?bA8F;%DiX>R7J4A&l5L;1DG*Mc?L3^!qYJ)Fj7x)Usg zyt-t4!ggv4mp?j@%?cX<-?Fn4z72dA*h$u&VgbYpy}Vu1c~*%X?_BEmWiu}F!kHQ? zoiM*!r!5SbQ43uZ>b5<%2s~ea3DvE?@Doaotbq!FPM_7* zdxS66GER#p^k_lADHmfID!h+iliwU5pwRR*@g_J;x6LXmG~c z%a!rzCk${?4OgoD1eOUwq>?p+xJ06rCLkUcD9;(!TtG9PuJSqZ2k^uKK>&C0l8K#F z#HDTGowmIvheDQzn|fh1kO<^Vo0`lh(}Ia+dZZfN_O)~s?B&A@cb$z(+2&!iYNpf3 z0dl?!O!S_M&QetyokLR*ox_`9yym@t0mW6&_Mo=)oOJ)mvoeU?p?oT^&5O0^Wp#AN zjxIkxnN=59d!(bW7e$lY4Ljkh}JZHhMWLbKOTgBGL zA^TKa1*h-Yq|=T zDsWdJ@3_*f|RooMy&o?e5gQ!E9)Iu7J@O`DxHSm3+^?|Dx=fDhhDIwC)!h9GcN(jijX_CmLeW-DOn>Q~?kP!;cz66ZJqzSkD40#7(h zS(iAuA;YR%sX7 zN4Cfx>nBu+dck_EzqOhho!lHvha_Gadk3^5cD(cU((u9&o1{9SvU#Je(j=<+aFhy0 zE}SsyL_bo+ejTYcYICWTwq}yMS&c~K$ITQP!@K5F^K8Z5K@f3#GRsM}alhs&gV0kz z1RJEWl|d`B4vavFo#>P#`~;P9;U_<`r!SBh*?C#)bs94#?q+EwU4^-8W!wF_sN>ag zko&^0%+zc(pY14@%r;^sCcD*Xyknpd_M-HRwaAts5nHX`^)fw7JezB-{)6%*p~qXt zYxi9d-fi#D8M!kr(U`761z2Co+7=O8YysVF5g5eR9>@FK3&VKb6+K1FmE8chvMTU2 zN`6o|fjwJ|CjIZy(jRP33~`sFLv_(LENp!ZLA5c9p$1P~ic?7sM+3FaO?;<>xoj)f zhr|8U;Ob_COTgpAanGe(w84$}uOzW$WP$!nJ&_cd2#@4BhpRka{L4BrEKnX6X9KuL#lvd_ zbg$m+;ciLvm^yb$qNmd_nZ`F&PStzQBj{Cn59Ku7O44ol;DYBX;nf9g(rtO(`a#&C zZKucAGmY`piJMX(%*Ghy?y;QUUPi3!NV6E=%Hbyfkw@rLN zcALp=w?yh<#|kFWByL+?zt0{86JT>Pfwctd$z*9CPTj3;+_AlJ&)Jp8D-W_JbN)&1 z$ol~*(?e>2PQzeKFD0hC0PXKLv$Oo2B4MD-QGc*o3Zu>SJaCECHxQnYHDPZ8PLmb-bH3Ajbw*5^9A~&swX>l)C{deyXh0Em#RrZbTG(;?X;%9lN|`76l|S&h=wS zq%;)ZrmKq%jJM~-GEs1B3Pm}Fn+wFU7B^TXhB2r$SQLc!8q#+Anx>wRbTN0TZ9Zvp zEc`a0{r>fB)emscLDJ;iIpPxjm^aDW*r>SQjQ^oV?N8j&O;T&sy z7@+1Byq%E5r7+6lrmDX_!b3p3I>K|0V4(t7(EGH!M;-0Wj754)#R=hJU#u$ti+S7K zp?Q~hIrfykD2Wf0dZ&SG>b_h@R7qIom-SKPEwr$A9-mD|WgD%#^B$kU(muKeyu^jz zVENzcc%M5ge~#sUKkGrau&as}hFB4DY~r~Cw>szP;QVQ!#@(1Wk>!7ZPIE0jynwgz ztt%http}eH>j->aU%N`=(ebB7p72Y)*%Y^VY1ksk{TE(|`N5X3^B)q4n;8!^v0dFQ zd+~eRuy^b4D!2ZY?%>k4I==@7yB!yr`3XJ*-MHpHF4qfN=8 z+&vPaQ{unG2bvh0KJx=j1-!Apg}RN~8naN=IR%`~-|h--`7#J%x$a{o?!7a@$^CcF zY>JdYdviF)@s$9(qD^jjNkFvY!i}zIf6%#t#KzTv_>AFb>q`5 z^QY&9y01A-5D-uJezP4A?!q`8ipRP8kv~cXx=|91wPd7z?h9kR&`qyK^Tr++(RFX~ zPBrREm*Ae5Z*q>#@F6U{5dN1x=C}-v-oddK#&PhDmU?F=zC1R(Clo|@Hc#{%JBRkT z5nAV`}hujG^$e)2hc*>Q9xOhy}Y=4Gf>|}fSSGw$;M4=YLV^GOTgQM52(0++# zl`P3SO>WIp=DK)5zWY zN`dz7w}C5s-(aPjoD4yW))i=RG&NfsjScVqSJmQfG5OhDy5AOO)RaJt*pI=&{h`3O zhr8x0)Xtw_QY$q1eU^zXzC7yxi&CLi*$MC08DZ=_>0eoQgyu6g4|5?WzgyT@2rcom zz$Y*To@~jqgWHy5$T-2UY$pWw433S`C%sZbh@J4lwhX=&m%nJ1#ofPlX-4kYzkYRX z^4WC%%aPV){b%fXG$M|ctMSk?AY(c=18q@~=q^C9+0d9%L5k=x83|JXm8NR!^6jRq z;#l#B92wIA6Dxsg|9iOU1b7V}1%UWzUwfRc1iXHyUbqPKmX_`FOWz5r* zFy^}&d4d}Bn*$$#w?_@UYSNgBW5-6E zx#N}{B~wOwtxkeC&`CGEWJI1+s*!5K+>SoME@pAQljF8IPJ$~W${oljRmQbgzm*=s zkAAD?#dY z0HlaM_6ej$eO(fW#sDNciN^q%ozyD;WGDJ>0Fff`K0u{N{UZQUL^DwlO(3-ZfCM7e zP!n8bP}j^eu;h6F0>XX`wWv1%bZxtIqy4g-2p}4790MXX~xZm+tHKs8s zfig6t$jtS5&3AE5K%WqgP}=ty`}hUh=fp4CJ}0idQTpkwR6j9GIg(IUqDnxKxqbjK zbHw%LJbe#<w>Pk3zlQHiC*f7K+Zx%Y5l_~Q+04+^Kk+^k5S%zXCidZMnM*xa-=14UlQxF|9 z#oBDn3^hUxL9-wOOR7LWUy- zYNl>94LOn}aypHt)J?l=s#CP{o5tJ;U^fxprF1#*VWopv_7QL%2f(eI0)$C0o)M;x z@Gg;B-2vKp{`^)wCq#^g%#LSumVvPf_QpDwZZi0%rS?r#e@r>1;nlE zVrTY(mZ1Cx0JI>{hX5^;ltE@TEl?dm6G$~^0?|mHK&nv_h*)xA^I2xK2zC$+5werW zmC}(TMGe8IrNv^Ou)A2CO8CxjP0NZGtW>|Y+tz@=dQig~0FDXbHv#DNBS16(BvsJ_ zO1Ruw{wEM9T)kSzvq{2hSW1_GANW+Uam+z-`{3A!StHNf{^4L>jw>(aW}%BuV^T*Nz1p_)e@gOHe>3B z`AXKC8$LzC8Juc{+JIjl&`pkxanL}qqPyDz!KmUvQ~8NF?$;n^*ic30Zl56(iMl^n zgHmY{U8L=O2NaoR-&R2#GUl>CvzH!#Ih~ChWbt#R$a~31S5VWQKrQN&9AUQxPSFqB z<%`?;rqFkzw)UNna?9unHp)@R=DgmCa(ucYzc}BRmjJYy_!Xt=iMK2iexs{dA-xyDH?=?lpRvz#Ey={ zj%*#Y%>W?S61^{EmdKUZAtkEfemq!XLsCFzQa~>Ys28oBM66-P^b*ZdF3}w25?v%@ z7m*s%8ybTv4qFRQ9IYfDWg>v5p_($fLb(4JNUqo&^iC{QgZc1QS7OKI_amsc;e@FLdN!Nzota z)WjJv#V$)ylaC(ZkHMM682|xwNvRSYqHD4Hsg4 z44^^8qm`~DK1=BaVon&4NqHx8w*g=#(Ow~Yi720M8|5z$p$;M^6s=utQzW9D6s>|j z&Z0o;t?JGksYf+|$f?VB-TdAi51m^8?7ywRw*k;BM7INQ*Z12w5<8Xu5l}UXpg3`@ z(9JpG5kj}*h-p!gnJAXsA#_u2C-5!+#v0LX0QM}uog?v}@}2d}8oR0079l^#ue1b~|Y&li!{HjF1XKA!||tB%_K9)S80T@E?K6ryVY>P)1lAP6?j z7>5%z9aPgZn9@B&4*+x^keW~<2}Df*O(3;Y^!E_Cf;)0a!G7pxxKt|yu;gu&{33M8 z;3x4ifX+iadWcORF&4lC;=L|`#D1GV+&k3fAh8U<9K>xfQpzAP2fzg4tV|(6vZdkh=uU`sMF$V3`Kj5GH>J!W>jt|IIHuxY{ynWEPFFJJMy?}lGpRNY>yT| ztbvX3Xdd@NaEj0xu`Ju?@;vTq;Jls3Ws}VV#2OZZ)1Jq5tr*L)IoIaNx^`p$x*4VJ z2C$0`0@D)Gq09j|<{<$2#G}wI8RHj8dXFti08~o+3IOu2 z0==nZEYGvmXwqu{rKaQFl6%WZt^<_wv=f{Xo^1sTw4APcOL)3NghU1$p6v#dntRJ} z>Wa~7usv?KZ9u#Oz(+GSn}$gZxt%y;Ygx|ZhNzvWsUG!h0hE}V4rOwrrpVa_oRQMu zek0DtqZR3qC5C6t3ib(gP!93L2?e1=M!1MKK&B1ACM0G!;hL6sDF88xXq%8dPE~mA zucfv^fVLH(p3cT1v&AGiwm9=JO7%#}Ym)NTOCjAGfV8~sBzNdd^sn~;!39l5oQ_O1 z+EYPO6qmtu2?*0qv0>!MNJ!xu21RD`0LLvdYz`gi1PXO$bvv7?K2)c&`jY2AuuzFn$^pKLy)DTlwgXmg9 zG!no?C~>2*iKvh4YA9N!%7~~tf61ynM8zW{TT_mh8nKihQf*i=Ap0m$(Uc>e0DuTl zlaO7Zr6ElXUloO&N=kt~@zmiB`kkcny*g>!1cTa*4}=u1Shq;>1gY*autKtL$vzmjGDQybRO^ z_XyTE4cH?a36O;BRGu_UX(+nYjRzKtz#v&3o5X*!Kod3GsbOmlM~n5%-UGN|@pI0nkW9naJUj^bTjV z!>Nk+Yf6`%U?_JdK?8p(*X2oYa2*i^8E;#_)%BIj>&Lt>*!xL}@1m&Yntq~{j4G3? z*usi?t}8jgQN8-TU<_*MW#W3Vw!1Lb)xzP=Tbo~zfA(`L%UMYr zx0|2sqPuXReAM@GObwbQPFQ{m?%)CFVZ=L>_7QvMa!i^4rW4YjVLQ*mWc9kQ^8J~W44HO5NVF?Fh_Eqs`Ucg*9OoA;x?sgiDxT4nz(na zO!6;g*c9PG1@izfkLZaxB)f^81*mzXs34f6RmDo=xJEM*Y36Jqo^>U$*bR`V6ZM}i z(Vgh<(@C+_u?KqCJ&B0F&BWq1Bbg$o(DNwmJt@&oM3mTv)Q44qNNw`7Fijna%C<^{ zdx%)~5-w}Kvt&dhuT6@j(OyQ8Mdth*wNQjK%hls7%MGrk+374ti)?pA28$MTPG>kT z=VP_9`mviyXv_F#1dD{R zNgCAmY{>LorRFw4vJFsVT5`lICFhdWK&r%>TO^D}CEY8j!FU@AplcJaR5~19Y*Dlw zp0q;RC;&R0XtI!5qUp*d>Qye$Qh@q4DQYgTLZH&KB&mal+L)&!N9yaEK*a2tpgl}w z?x;iB2msrfm|58##8WMwSZ(V`tO@*ap-;~`weQ`4OKJeyhIqzip=({bbO2i>!_-ei z5>GG!n5revWut&AhE3;#96}ccDfv9S?&Ps%W^zow7)ym=5=T45y@Gy8V#o2 zfHWIWAp!~|?p4|s$`&Sngz#~_3%m#r7*H&wrG*+qsB5H`?{Y@5h@}7)NqkW0s7UhH z3%@Bxybq99WLjvG2z71t^1euV&T0UQBz{ckT4$2OlzR|>qKNhbw0TJ#&;%mpFVybT zy$QguNxT<;8*fSOPFIq{w8$NxquJK+gNnz6IswIjSkS=%xfgD^Ph1oa@&nVkQD(Tx zfGbn#F#yyNy(MHf5#?h8wCneSPf^yI_!R(R>JcE#-Qx^>@j6`b16XU~SCpz8dg67|X_A_$)Z3k{mq53mfC zu|QUv_yYi1`xBsQ$&)2&6tas*$*ikjF{F(NwUk4Md8m=NM(E^mqTAprw*%OG#7`*g zA7i9u%IpBZWFm^>HyMTQ6QK?wClocAl)zMd5dMIb3!0+Xymvbua0gVG@{gyFE~_%f zj+x|9rV^iCuIW?9`1!fmw0{rL1~5?5@Qk@nJa`Lk`U6-`;#ZW81_x#S8UTBUD3Y${ zV_w8x;ATt#rZLY!@@Ifxu()2L4ekIP+2Hs=o5VKg_@G#c)Y4@raRl&SySp-V^pIn> zY~ON*Z-p8@QN&HUyp$w&P%@d@@m%md@@#NB(Lq3L5WUw4@o9gwdZjsbM$Spgv;B_g zikX8Ro(Eu45NDN6H3g*>17H$Shmajal#k7zX38&8AtEP~_@EX~v4tYmNu+AKLbb{6 z?|Z8-A^|j%_yeVDiMOrhn7(Ou%4$S4B$gu)b`#AMGE1~j$ZjIdy}r$N4vk|@BQhOC zlwmc~HK16Lh;3LP~uWnKobiLFSigm)wE08j}rO9dS%q0C(XC?TRqti*XC6+8=I zBNM+1KqjJJST->gfbAMax(M?;b3bRrh@S@_t}{1*N{Q9N=A6sUJMVP>)`0jvrK1{9 zrU8Ibi6~OI22{`vU}41D0LVmit7Q{YL4g`Dcc&F2&WczUa}%hPn7P9Z$MSE%8vv{U z@f@YgT@79Hs#LwCHsy#L0A+|S8!>s49&6KxCj@Ctpj(1-r&&iwHBy+H_7O8D?Q^-v zcR3Ej$zD)L6HMD-x3{&(9NL1-LqL(4?Q<>v4sQ4XSVQ95l=iu#hHwFspWfN=m#07XCZ#sbLiCL`@LFbuba-;~KjsYFZ(<7(f>xX2wR- zHe>X9^G`o2{iok6odXzMW!An{1mZOE@a~>dFOoMLPtuis26ZC1A4jR{gpAn^BkmKU zCi(^rxzjwiC_}mXMKO3s6TOwO~4k!0obm@ zdzG#y-qb4mu}+ql@=pWMx(^Np7Ij@1^|nF&P#N^;w8eiHLpNox~gUgb*NjalnSs_ zqUU`t5tTCDOLXHCmsUqq%1lT+2!Lvqz!prEvd&BNjP(*xDR+5^?m1qnSEq~DASdo4xn+^j341dI<0WgJVGN9OO{&tQ;oA4t8ZU*a3VP_xt8saw~Rf&UM zqUVs8h;+Q{CAwep6220&@GVHpSJfNN@1U%K-_C2q68In`dAL82)!plT|`c(D-ue?@br_R-1`7Ny+&*+4Jv)Gx|Bw) zk|0+JbA4d>#2*U1QLxqKZ-yjK-$Cd&$0)St7669}@hbrI3Q@f@b2l3{3%!&e-VA^Q z(S9Mji4G{2=qcqA;n%e&OEf~rZX*7QGPp$esb-MfL}w|NXo7NyCM%Z+KQc#IqS?wN z+M!(6%d|4-*mhU*B7LX9&RUL}kJ%h|0;q;KXb!dmUg#p)iKh5U-(z|66*ni>OS- z^QCl^F6p1HMEpZGH~Is^GGT%$x*ZvJh>i{-j){y}#yCI#8Hi_gBlSU%=%o7-5JjB? zi)ZQ~mEh>cZ|wFj(Vj>|Mje2nYS@eUY%3!DK?(Xzu(v@b12?MJBVM@Y zLoXZ^`I49Du7xU9=Zi##P`&isR_UD%A{)cX2iX|Lb6gic3dBA{c#|Y%<^h)1Qg}8{ z1?^4&0u-~@BeM+(?g!W+CjqBXu*fU5AY%T)bCs%UFFZjdTD^m2^`46OEDf9vp=87gy+D11%Q!A^ofv5nBtBZlZ@E|K+CP0j4}YJ zMqKA5mTdPDk&b)3M9%|WqQ{j$ycZHBs+uLds$?kfvX@x$xR;1Z`M^u`yyPW%LLKE` zvl6HPOVB3n4kf00i6uw9L{!Q$FVRyz#p&n?b&wvv9Z!$|(3wOt0NR73W@-XauTL=j z9Kl4D_5nXy;smegR$Pq(pn<3cpn{}^Y68(%pWt$Gi|J+notL=$Dxqs!Ix%JL1VB3x zMe@v$RVW2-7r_pqCxq-KdJ@1q9XV3e5P8;NFkc1)EwJYt+%N&qFyj3agsu+_qs*fK zWFw+To?%v=q6b8@gXlFOyNO;0sA;5H$BSu1PF-^Q6qhg%`4A8onlTj+o-FyYp><=y zYEyP6(C&N*vOZS!;d4iC(L=y}~sL@xNQm+1b;OGJ)tz+Mi3YL+lHzmz5~ z(NpUsqEb4&M0b;yh)P)r304B7umm<WiN4-YUq_Dm?h$<*MB_zY zFVR9F+ljQ4UgM875M|Dw%3KnWHRE(v58nj={)MG|J`ndq=3xM3h+hJvx};_#Dh~jg zT6O?Z60^NT&q^=hU53T2_7dIOy@Yp6N^F6|D_ROmcsjq7{a&KyelHP~@-r{d{kWHi zN_hY7=yhQg=FAMWlHz3%!B#0c7}N%}bZZ_$H~5x)vxI+Ta*kX@Cgbq9|p+M1^AE%WuFB)tYj$v9$48CQm2;F zPyit1ucMHv5tQVw{D?py=b)E}N~s20b#x#054&^m;}V1R6R*4frZAvNVW>4kD)^yt4rf8K$v>GHmBwk5BoK9u0s+OMwU=wJgk% zYq018(ASA;uNK;m1w>tNUj+o2_>9->0A?aS)DdTrHbeMIpTc)sCg9Vkdn2? zIUW!wcel=I;nR?M55N&b{DI`kE<%n@DHGQXz)M9#mS~M-6R%gct18Ah7qJ~~ozOv_I!WSvkT@vP_<#}c zlR`J=UIad3`NSVsKJkY_x8#UF7P=`%tR*E6Tk^G<762_FzDwzvuzbo)0ibP(C=xd) zE>Yo7Gr=c7jA)&Z-RpsvBUmW%Q+SsHSSImar3==cvTFfQO0*83Ws~}CO(43wgvp{0Cqp|9YQzfh^c~aExJZ{`MZcF02)mEw$k2U)%Ys7Z%7IrN(X*Z z=;j=;=14U1WxGcK)JR;uQE0D`8x*qvOedbNbUiU2X9B;`SqB{4A_%y$&9MVH(0D|9 zh3qDJ7@(~}>McoVC+eIkT}6}?vYlulibMwzT`6Qc(L>55+NWHihm}k8v~r1Pbl?Im z{)E;h^gsCv>SCd55_S0$^UMdpTZwKKvV-V0bA3kMa%sg6WhgP`jNAsRu5hX|nSqBY9|q6};wJ$?Z@#h= zivs|Ag80y7LLav$oO)vBe-D6OA$lL6frC^%lp%p=4nPw~U84y^yLp?^XgS1igPQ0{fVM6v z<`3>%>!er@=2-w%lDJibvXg;kD(Q+lG!y0k#2nyfm98Z&pC$Z8C!1jAdLBUIfZh=@ zOLY19&Nx!*0GL9Es4Vsgs(aUFfzSpk6kXgM2J?t0@y|Z7hGf4DVEu?ch(+N3ZSYh; zFeI6e?1KR2BYqkXh{z)MQf-VP;G;_WzB7;(PX@mXfa(*C6EaIQ9-y@(#r#oq@Yvh! zxJ?K^R-#RS{8m9Z_JEip@%BvH5Yy;R`_C1GSqdfBL45!4asd09c%{;{#Qgaa@Ee?Z zR+IeOh2NCB2Y5dqXf1WMErAe)pA@0ar+^MA=~Oz*;@tt-w=UladKJKQ;@6a}CEjwS zyui9A<1#wTOm70vP(;^24lPc!7NCtpiVDK6KtFbZML<@fH9{_Nih1q!41m@UA6B}S z_ywg$6Cdpq%MPY2WA;}8P)_s`q_BTL#0+ugA#3JE2)zTKXSPCu5G*E&aK_&)NyM6S z6sK62g|D2E_oC&y+L)qZQU3|@zz&K$35d2H%S4!3kBU^5QY)<@;@y%Xdq0q7_6xC$ zR~|0lVVMpWpNiiBxdXWgXc(ehLS9Dn2SRocsd|JxJ?e3vVg!JFK|E6FTH;2f>xucw z5M;)>d@-h$`2dtmbV$f z&7(J(QD-)iM^*6NL>~#6CHh3UL{yB>N3>SRcA^KAOLRcF zLiN4!Yr|z;eT*~#4o5s5X zbV1{f*GzUcp^BiPf@wW&v!EzP(u7)f0=m)BF%FDKX>ZTPlI|?B$KNzBY!CAUSM7Me zXh5O{DfTF=GEDb=hCDu7g?TWqVarU6;SVh!f<=;cW04O4= z1>`HDG9G~!^d}TFjONL6@-Va{%^qv-*T;ec=J0(i*|A8|Bk04};ev!DYpm0&@ZH2; z8eI(FU?twKwD&3ARqq5aop_7VKApEj^y#C$zI9CgmBHH-0H1%Q(X@nZnk z`3%q-mQ8$A*{RpEn+uBS9IQRC-@v!GYAxp_K7b>$l;9k^okP z_<+(rfY1=i><7SEh$xcpEEL)%LY+iTsMD9^8bZqpL~oW{S)w~s0nvTRC8DliWVz)X z&7~R!YGTdNL$nKk6-Orb0Em5nRO@9VBc&>F%W<quE~oOfnA<_pFq`@iNSYPS+cZ)uMBxGE2K_B$p4=&n4a(pNE%Fl1k|Vd_ zhC6^=No-^Rl1xF%SHU3wNDmhs=u6E*+@!Skbe#GjiJf-308yQgSt6<$VE&=xAI+|k z98ahsH2{miqE*CIO7po4!@vRlXyS)Zd(h0CcQk@iX4>y9!EaTN-U84v|F9&-6V}!V zkft&(fb+cLOmNB!e)j@DVnNz#EV3GJ4g^ShjTFGS9IQ{_V>8&{EX8w{!B%hvhv_u> zKATRwN9eoTiGKzNWqDqwttEI4Xjl39pce+`q*nvN{5)rMTpp;?13W#30?~>xlfAd3 z``(g0ppORUAAxQZ4Vpe4^p@cKHqcsvrbGNV2TM!$$9(Y0%+h;HF1@#eG~3M0@TAk- zvt805kNzaB4x#z?;QVQT(?|L>IoA~f>5*c+`h#mTS03AIO^^=p;1~;f8~`JOh{ht= z>;Ymqsknn>HJGdb#PL)R8Emyy+n- z2MC`;lk!;;zCxR46|(xH1=Lgk=6xbHws#N6XN22J^sJDbL@z3r=p`Y$h*%>SOVlZ3 zClQ?@xQK?F!~_=`s^$EqTH^5-T;Ml?)FbusEE^KdMf3B^wcMJd;p^ZS~Eua|G$>Dyy z7wIz9u~-5p3*uV=c-@S}ysqRCAQl2{tu27UEa83t*v|v$d*e&1Q0p21xX7XhPBo}g zKR=*0@W|+iV|-gC9M^&gM->$Q&s799a^h?r4V?o&9wSxg1QRQ_Yk<}&Nwf`6Vs5zQ zW?yiWF{yAjEBvlzbQVRTt`$%Q8{sT~Dn=eX{H*2}LqUuLVCo_o1>m>Y+AbJEWOxKfyCO@=7!JX01)8JeBA|99*%L1)2~jzu^<^ONlo5dK!yY7N zBf-(xIE=|4-veT`DZ#2O7Ip2^{4*u%ppw27#1o!iXBaROP>FHvdxZLa0Vp#A@8D)K zY3j%McQ=Nc%c(}24w*RsgcG8LfB{%cN$ao{YHm-`Z#`@sYDNzBORrellQ?HjVt5b4 z?2#$f7E;$&txMUYbZ$0+Q^4;qIrk=?+VmR%okZFqiPvkBxKcRUpl=z@+2q{O<~K{( z?gV$v1|JJ>=cLC02BJl8G-oplPbUN-r0EQS2u~*mBBWWPK*Uwh6~sys0ufhNCjv9& zfE4P6|E|Lv9h|#*;_YKrPg`{vYp0XNG9sE;jAqD@m=Az75p5Gb3BErMKGEYswi7)C zC^6fPnH(t^4re5KS;%EXj7Xw}M2Y$<5$nbNbM?b8X2fE5LJ3i$kjseJtD;1zF8>fV z5yiphVdMF&Aa?^WFz-ZZy8$5SL9`Df(K7&i|I#4#(bN|-h1R{JB+*eJJKhIUo3ljx zl7Y=ivugoRN?RM0q%C^v1!BkuM<;rw9100w6LEmxBgI?%yr8}L4l)uTMZ~cxQY1LE za6jOtBnuckwn5izqPl~K4Nz`2n6}Y3;wizPIg$p?YDSiW1J-QXKbEH=SF#E0nqQ>A#(3s_5 z+$zi@UZD4{1dCmZMoOy0kR(UB_^*w}j+v1#+MCiPOlk}J%JhJ-T9^#ba^OtdnZ@xE z-}!5J&zOQp2I!?wgVOcH^Xaqw?Ca=itet2q%JEAUo{SSS+KH&br$IJ4nsA0jB=U0M zqQeS9P5PJs#;pJh!gqm2NrBxgdzX^W0ab{PcQ*meR&qYjRwefXJ)`9FK<_B|F3<-` zegsqt>p5KmjZ|_J(0C=M1JP^<XLFN$@O~c|aQ<4<#%z&1{M-eooj&V3=+hU!aH1TC@;u2`V zHX>1#kex(ZmCGUUkdj1?2-!t+P`Rw>Q6-6fA!H|!cG6|+r0D<@LBvX8Oc8BTF41No zyV!$!luNWvx%+`0Q7+L_$|ZV6xkS$^m*_Uwvfx{67&U_LsTX` zei;#c0bHUc0}|VTLIKdTc(pWP_rXjZ-&xaMRC^_L z0z;0BISLJIsPLnc*oDR)c}Q@Ryw9P;LLk-KT?bh^jz@!}{iy#`Ali>XMx?Q}`#z9b z4QVSo&?lpu*(?jPKy(w3M7IjrLG+ArS=|?uOnNmO=#6Ly?cffgaR4Y|^Rx=tL6jQ) z6oF;@Z|lpmGC;BX2O+iH1B}(?V?Y`Wk$=D=p-YCU_BdUkTyu%4749wo;2j0NJ@ zfx6j1tT!bV0_zCqWQAE<_yiGqNkWG6Ylnuk| zJD$b20^b2ZoY@Iv*FZ!ME0=BayplvO0S036JLK50V|^oXJbf8Z3D(3hRmYBf`}7ex zI?zY}bP~~t%FMSQ(U40Vs*A0Avq}+d2Ly_F$|Xb%vNcojv71JK8gYhSSX2io8_XHG zoshm0PzAoqlluucL#5HXk{;@!gR+OPIN1!O4%)@|wO_bhhk(>UyVwWnf7!(Ux~77w z!_yBw#4NM~M}D*%z*%%$j&mKh*%v_Skjc^-`U)%}S}SA+tx@j@;!pN@aCOLJ6MxA% zUx0?FJe=^N=2ifb5=YLm*1G}VCN7oAdk=E$m7MMSfDQ;5__|*;m7$C2DjY`iMplcf z+yb5{H+i}Cf@m8+S0(>3xW$2Wq23C{_vFnb;nL70MA!2Wb_W`?9CSSZF>3_SI3-(w zxI_XM|K%tuF2*E^cQ|lH;9|_trKato(WmE_nK_Y*s7*=ymm`Dvv53(C*3*fk>kKiZ z>#Azb(oepIN!Gyh}O%mK5vst9J>=xdwL6furse-6Uz_kYzO$NZd+JGnpl7_BR zaud+4O5O&vLrGeDpOQo@q7*$84N35D)B@N@Q3tkx!PbeGu5}`&YnF(KoO+;Zhl0|| zcDI4l$_5Ukg0!FoV0(qp3FMVP>#uHn8R~4@lNph$^(nL()mIriv ze?$|~AGO?`k(yp7r{LAsw z#u@-Z9A`T@c)mWx zraOxrrUUY*S7gRo?DVBElQoJAK~JlG{=BKy({YmWR3hPj+WCB2ext=iqX9+cz(l8I zH`;-E?!Z%au3XA#d-8L7T1x$QG%wS5X!_sJaOr$zBFwMl{HM7tedNuW&R^5Xm%DU< zle=7;0e25KV?C`!1?BNU7PV(D`hnrW9SpBU=1`y+a`WVJu?Tu>hi!gdW&Urwk91QzB zvWoKjt~}s3qMhhRFAsvAQezIGA$Q}-ptcX|b}RRU#SIqEv3QTg&L5fH7WjE1&iNef zGAlRL;$Dl1P#o(04}b3JJp%2+X5lN~w^6_zF9R2ud;hbO!~IivSed`Q$$Iiv|JWxh zao!HhA8B;uI83|w8-SFX3gsh#`HR3kz&n@g^AzD#-B%tf-ey<1Pnw$9*7* z%+f|@Cm+Yk!tWll?QOQ>W+r4tK@a=y&=%c0<1e}}FMkte4={fMXEZQ>KxYOpe>jJ@ z7S6sMm=ETE49p)}+6K&DZfXPO&mHmnMT`(GbKG$RM3MP$v9pV>vmXVIpK#m({4nZU z3%uzzjUlhtdhAwsL&kdp=~E;3Ug|`Jy~b@dvsI`A7b#%U=hlM{(v2 z>nDe1YCPim)@(1nBR3V8@4~TczRmbHFyA%Z1AF;y8_)T^HLvmcUN)LuJ{rLGcgIc; z@SFec%58;yG>tq5z7qH@YcJ&+0DS)fiw^m9p*0B_E=j-3=(z$rfPapH|Tsjxh`RRZC?_K(yg8jeo zVVBNDcYgk_{IN^tf*fJeA6ma>f8^2|kzV0bUH!lDm`mS_bRD@Wr1@+A)TQq)nEsPL zbLqSQ2*;=9zXG=?RVyzBW(4Jrz`E^nz-9o~aPHvsKzPpe|Nqb4w*bafTxZ{_@vJ3V zk|j&>`>`uOFktUW@&f}a+42KyNj8pchztfJUO{N*kIwk2W+V{Art{G$ko*NlFu%pHP}6ElK|GJ9B6D?n<&{$3U7tV_)4pGjr#8 z=FB-~&deOaV;%YZwRkubM|*5M^7rH=MvHSgel|Vw^W=$6=iBkbwds?8Ck-M0P9E1f z^6N=F){#Hw9AX{$aq^nv$Gt<=7j1hB<|{npzsW;e_aNHjF+A4&H~11hKgTlz=~(v# zbk-%H^C0hR>&!Zk#~`21GO|y}1JbydyeRo}&W+YRgZaij zuj2PK%(JubSoi3qm<#bdhUa^Dtb1t_@(7-3n^6}$KgVO;ree@lOkAt+yc5q+JkR0z z4xXw~$Pjp_LdwI_TxP#QTTB7H!LyX{@L0DNew*+#;5mrLx`*-maXe4psSL$`Wg*Ih zXWAmfT#Por^8g;}!r_&OQ;e{VF~Vn!63%Zn;dvLH`|;eFlm5p5+h^?(n=5vlwV)1o zn(#b<$2!7S;MtqwZ~N80ZF~#ozHK-+Pp?2fQr;qOZR1hiqKrkHA&ApDz zw&9_?brAh{0&UJYkMh>n@SJXXq%oWD*zYKBk%zFbecO5xrzt~Fz9P?UT^=UQVmu{y zn($c1JL)^|?8C!L?5%qR^Wdv^evD^vXxzRAeu&S{@f4Ej4BWta;MNB4a(KwoS@$9M z-;ZY={KEbs-yuKJGRkz6?!E>Ar3Kn8pjiLm7+m+y*?9=g7OVFUS)U=O}yGd??RR zc3@ocw3O#~9kvZ;*(t+Oo}-Mz-;`}w2lB}FW^<;=>(MFCQ8uuSm!0y0Q(kU*5gzNl zbu;#g;&~3wYj~_9{34#0a{MU=QifrlkT>!UffnJR9Jmk<j-50zwg4a@5w{|7Q51w3qdy9p=!otRX2yrI_Y4G9+>+F3L_A(0VUyL|R zJJ)~UBH-P{FrC1|Inp|NpP#+V&-x!meBSey>u+!7v)A(3_}@od-p7~g-vmGAYcJTd z@wbiP&!cU5QtM-Qcs8qb)<0P=(x1oC+H-Kj@#)`$_&np*I(u}jJ-0U3|1*fo6KAcf zK{;3+d(LdGe+BJ+_I%h}{~3sX5RY~C z;MPO%X* zN%-@zj((rPWACYQ{*Wo3Rlrj`yxNJkRLwzuS@$r)d4ZL^y~_GOGKRmsit16M^F2J) zO+y;IqAJ(_2Ka^Z=QrW}51k^Mb??W+8<_Z5cM!jM<=tb!WBu7Ce}m^WJoy^qA$V*! z!=4MmN)T3swrCHv$MXn#8P7t5@v-ivnJD*c@SAvewyAaB8^hlo?P||;weep?d>-hU z>)#B&C-Ce;`aD0?y4_>=+v8U4S*tew3B+ePbNzX`sXgKJ1b*A|Ozn4vJ3v41@S2xz z;j!*x=VMO6!#h@fj>kIQo$|S5n8)z&MiA@n9K+vUnPTrtvGMOkd|suJ>u)bVu{WRC z_!E#HFGb1q=QSp_JWOjf$`mfwwWkQj&~ZEje_NO9Z{gP~e5`cOmjCIN|2W$5n|NNp zGa+G10lpN!AFaap!@~pRt$XJf{`SOud)&T_e>dX4f+yGCo}F(G&bRUZ8*zDJey%@H z!MEjMT09CrT&``^CfoxNb0{=ECxx-{bR;^ka_dsVW%C)vh-4sm%wa;|?J{Fv`FMbr9_z?k@~kkf6Hpc+4^5pr*9q>zLtffDYbzOdfkqkPUwx zeasWS?D1aKfA@CaP4MvaF6+Yn-68)Kw_=Rr;dwih{n*DZo<#);^MHGJqIj%pg8xB0m+gf}g?h^cc9M2E& z&{}*29%~i<2!4M756${%1@KK{l1CEmci!z1mZwRFLiqg?{HqMtIf-%W9wq;z_Q!6VjWm^n8OxsQ*xzh_>%cn8I!A8*hr`*A6#c^Ah5f>KGY|1VqGa6>q{!Qg=Y4o`9rF#R zVZ+0Ix#_M#q;+_9-4zPw z?+=9FD1M(8g1Nr)PzdJl;~|*qH#Fd~&Khr7n3nQNFgnlwpW-6!o&Xk;toZSGVsM}> z(bm`7(bbvg9_kxx+1uBb?(S=CPYopcQv+T7`%(j~-HEpDzP9VUwu^T65A<~owDv?h zy1G+?yL-CY2Kw6eb@lHaZd+cnd;juyRn_kPF8prW-PPOHJ=C7s-P4K)y{R+%c<{iW z7ZkF;we7mWME%Yk^;m@bvLiE?`e0QGXw5g3?3M^Z7t zyVV%lYB_s!LY|(jj!g8mDxUyY{m*b*yzcY^FF&GwdQ(&ySU%;5SDz=!mPy2)pwokI zZ#!VVJrw%(7bCv?vV2>PkLRl&=keq6M8s$25p~;*z9f3srl8f&ZiWVZ&bs=UX3Nlfb@H5exvf$Ho=CtJF=I=(z!ZK>ZllX!DUX77Hfu0dMR zN8ss6FxC=NAnZU2bl1>K&JX5S7E0Ts_jx*?6B!?LQF8B4S9f|@S1;%J0ROrCuWE_I z0ny6CAq^m2AjyoQzF@G(5VSm<74{dN50uc6L|G&njU==mDa+$=y_v7S8pMc|=@N;$ z0Dos!5zV4{Dt=es15_Fda`AN{uBVWcFVK}Jf{rw47Kxu1;f+BwAuENSn(EI&*rvGl8*_qxK5Ak7L{3A! z6KyiG%t5q2I|~d$f8Rj*e+BZhpyOm0B&x6r!f6B`(AW@euBoc0Jbz{m*?YnC*fP_b zoDDPRc*OL>4uo|@fonj-5oGgs8K+E-`u*c3Z24$u|J6yt{^=xPKR!v=9hej*l<_^AP~z4_x>4#c^Fu-^F@8pnCpXqm%gQ zcQTT?Au7?z!E|+TLQp{YE3zOh+B>+dmWM^A?`g*(4 zeFI^p<{nPYRcwPYLke7X()vfOlGY*Bp+AKx7O?$}1e78`%sangy*6o)x7Oe*XgXk?Uqlv*V?^TEU{ zZh9Z(=^zG}%6-^N9nc!umZ|><=CVqeC^2}dmRGF+T2{%NkPpJ7#PIun1@@t-)2V@h zq5kyXIGedW1x`EFvOm>^K}zw?QDSPZ)SnC4EtiovAmpI_w8??zrH0#5{p|aoREE^k zEKXenA~emUF9e;o7wSvMbwc3#ap{38@b`a34+KNQ$k}IAw1Rw{ZXHMu^|z3&jq)DVSPx zWcP~dYT@)SKh4l(eqISkHP_p5rqbA5HBOp*_GJM|*k_`5IXPiuXwLtQy`50gB-T@o zhVI7mdRn^zikBr5SpFY!mgWEPGvNR63z5+ZrpF*j2nFTvkvG;dfC@G-PIX2*=ee(UZ1|ssTshnsr2=I1J@WC%5y)jIpV{$?4F}sF9$Db*{^{j81@``fd%BRoMlcSZ$wvr%u z?n*t0af(YIaIR!Z6h!oFvgw9q7J!j2M2so(bzuzUj7%dKg{0zVic2eT^(sY&MiE@u zG8AC(E-x!9E7vmtOpfX)7wY1rdY&qb>S>iwiN-aBmt|2sBMGRgQ)J=-bs!p1lN7X1i#fS1pNgT;9l$I&D2)U@@1}P-kIwPLniZVS(VIigq)B`t3)3GL6 zJ?EoaR1p(V*GKXBLngFH{T)Ig>eB{n!NsiwXb+M9> zt8NXV?JC=%S0iFeTrX+X1yOv@?+VbdRd~T7COgTYWh%jvyBHb2kc>l&a6eE26$^!O!M3*P$a;=FO#Khc!p# zedV+!Cz)8W+A{Xkd)bCFqR6K?ZRO}1gB6yX3FA!WobhofC!IBON&zsK*g`Y=m~pbE zwk%37t3iG3E$ObF6ev2nZN$3+6c3 zGpI)86R1KU?W(PW+IuOUnW^i8+ zDdlPxLTlr3U7`k|;sG5{?>`vTh3fk%ju|I!62_Ixv)pf@WECSOln66OZKAeZPg0-9 zT8J64oQ2e%4TBn$!T)p4AL|x>HXP?{;aB;gi2!rB`aP~=xFj)_L$k8ncJ;^vQ}1__ z$vRv~2PZE*n^WCPYG`j23Zo;B=mMke#iCsSC=6y4(8tJpp*k5q)Jp5Q&?C=h%SGPD z%AnlQ$Syry-Jwj=fDpZcCcZ$uTcL>%+z16QiPW69P8|acS1+THP}!oWX^e)*mCT;2 zf-BN`A@ZQ+nqUED4zpOeRxgz--zz;8Kc<(m`0o?StC2la1VX#7ZP1GmaXv}u5T{a3 zV)HY8G5WC@1*`@df(0o#*2rY@CfokvJ|OkaLEFWo_jP1BD{)xQjqCiRUc&6xp@1?e z`PTri29RpW;taFGO+@OaC>itEUshHTq_Zkfhu9|!6%J!zoz$)DiX1F#KrZSJFhNHn zot-i@kb6Nj*of6w6^KV-kp^T9@S-4(Z8ERPblHRs^YwX*-1U3b8yb3OFXuMEQ%#DO zDHNkTqV}VtYEpxab|7{|G}b z`|Xp2-D|=~6kLMbn5I6;fU-vL$fj)IB$7H&iN=p=tc}j&AdiBVoR;TSdT7+BeiSg? z_d!#P1s$-th=_%$KsCOfACpA`7d70hkNC&*-*=#^~|VVR;8=v0Vk?twV*b?L$7a_MTMF1IJowTt-@?q zpaaNs^Suu5<<0W5NPUVFI8tWHN!G6-c^JTgNIcRA`pcmS#6{8O>4JrN&L%WMmEHrt zg1AoH8`XOtSIlc*Mqr$7`XC%=)AM{`96?J_+PU*J^e`yx`eaZ-DR(te zOQPJ-W>oJ=P(v&X08Jx}q)Lc6Gg3jm?=SpjG<=PEA6Uz2Ld({~QOZvW>8$9+9D~J! z(#Vw1Cy=6{DHAb*`WwDvP69ah~}%$`iN7m{`97fXkNZ0wA`<%#I~Um zW1Z3sSH48djHszmJqbSZxE@+oU)E7||Flrf^NkYNF1*uNJaj=7{fay$Zl5@Q^hqU9@Grcutoa~H6(lj4}5 zQK{oPp$3ub9F&55(-xUNm%PH%i%|Lt5UB`6#Jp?eT^f12Xdy6HpO3;0M|E=pmn|zI zHD!WN>!W%rdbPR(UhmM`kc9l)C4m(f3?yk4zzFl+C0yc+V<0D$LSAO_!P`gFzGjgwll!TFGT~a5bP<4Z0(dOW)`t=3)t+BvVlcnCO)cf zp^#v#^c0S~>MBII&qY99|9E3Ol8iKKe?~OKEXpMPt%%|Cj+C*M91#hWsa)q{URefc zk&I}uifCj`2QXMx;)mb~OOp_?av{bd=gb=0=gR;A^;hUctMse{N62heg_Tw?w&Rc_ zvVqfzE{y86YA+N|VDgz_b(st1&?$&4X%w9ZYwjvp1r8fZBOevYwn_PFP@yKSjDth~ zyZl|btki20Os#9n$iN#Ue>TXKnlQ{R)YC*(pxL6}E()O!jO8*@9|(FM(`i6yhy_#h zG_seI)eRg@iv@R3(`yYGAjwt5AR{Onhiiu$uADy#g&xci6F~%HxOCxz7EX8g?n;A) zq{dh4icO>esYr+@k z`3ZJ%kceNf5zCRQ5Pn}3f(`*Kua7nfl_yTqTC@N(#Jnxs==}Xili=O6P+%x;*O_Ub z#;2vpQ4;;qrja9+HX}7m<15*j>5ts1*2sbc8m27m(fEpz-AGvqmhssi=O~%5G~!f5 zSn_ZxBIu?@U1YH2z*HYYM?pfmeWeTayDhrmJerO8Rx! z)uFt<|8>LdG11N;=J-(Vq}V^cByzBJ%#vjd2rpZmd8X)Xb*RMj5o>oqdBM+M?GB(D z4Uut-hU^l`q9MLVgJCQH*+-6!fmC4HVFpWjptX0fr)zMKhCVWUU{jP%4F?9U*#jg? zmud^{*0rsNQN2PD>qZ(1;)#-zhqZtAxQJ3pEWhPg!Ov9S?Otx++0&O$wXj$Rqp(@|LRpJvi!W3ZSd zhtU|aNg@h?sSu43%M_F+iA*EYOHv!De<4@RGfvWH2n_U$K0e|vy`1= zy#y7g^7S9cFr+;0M?DBl4pd~aulYkVwv{awFfNCx3+Q_QTL?7vS+ONsXMR)E&+Mf#2Zpt1>^D6a*xSlf)m8e10 zFWedKVM?kH`!*zXRR`N~mmWZz@+3M<51_3ee1jQgrN|^wc|iUXf*<@E@yoBstXS}L zG$o~iMJ;V!jsCxu)zgTE<<$i6J6HfRdgxsN?$kgwg$^8zm5ekY(>heE999ZcU)2b2 zU7AEIrYWP+WEw?U&k~`h1HH)d+$G_CF5dP6@R8!K z5ou+st*!dns;!3{D`GVAbI_g<$dBO9fA{7NDeq*}8|Y!`#Ey*m362jc?9F?hC^uvL zYM(6mP+cEG6zG0d#kt4==^Sb<*l376LKT>fG#W9J-AJtl3S%lWYW@td-`c5KUl=;Zm<}^U16^ z&1P1k+OTygWV^2ls-2zlzn*E%qhuRyaCSO#=E~yeIll{);z+2qT}_;*fhSrVzqn=> zYIUqCzx_1Y`r-zC=`o|;+ivQOBo|6E3VTojhD>?i8^i81hc_NgQbZK)pnV;TX3vUQ zN2Y8i**H5sx#6UuN5<4ZM1!22k2DhunevXu{vu-%pUq68r$&_uAW>KunS!s|jh4-} z8{V4-5ULA>kdiBg#tq8`v(Xu?Rj!aKBh!lC*%;X};=U0kn->J8ZaOPmKaRo4nNCKX?#p!~fEt7jrCi_&;i zep;`{)(G>gMD=5n+az_3`+B|tTZg#_bAcP@JWo-biztb>%DQZ_eTZzQtal<#t*D|g#mO6OoFDRL{GUlsb)HbQk^#SRHkI$~s!JO)$ULQVX%pdWMlcfkY&qxi33 z(F^EK%-cso9z`GjlRi5c-p0BCy&hyPCCt)*q)F!q6L6HnQ88eCh zK6uSw6Y@7aEXqin+#*#5)iS$+{~7TVrZuea0o9J(Y&IT$Ad}Gd5y6jyB)n~8j-Ftp zX=)m9K~BlclRwp;n^3VtouZ4eLP!02Mv~yMpw6^2hG?>K08xAjMB;^zl(2wG3&OeR zA9!)Ki>t$n_%miS$q>wn$W%*&Yh?byaD}QjBZ~6i8TEsprFIc@0=rlyG811?MSY&0 zevV$a05kwH`4rgd6h!8U_8vdNSxi`%<)TPsnW+f46fB8z zDT6Cr6sjSYOBgIb#VVyV=}Ra7I}Yej-sN-_3BpWr7#_~LmiJ_5$sNqU19hUoMeGt{XHfq*qsU= zXxeZ{hVe}YALeMD!39~>9DjxsV*qnBXYk2UmBA;YDg)pNP2kZ%>aPNYMxxwLUL}H( zj$BoyHv-Y$0(q(-CM1pm6pza=@8!XJO&~>4P>^v!wvcK7ZWA?cl8b5TpM{cfa$14V zSOaZp<|U(sdVKf>QjclsRe-7-k;=e6GL2fA2Sn8EZ-;~c4_Qfs5T;%sQLpfmR|Yo6 z39;tl@Qm7GtdZf)8IHOE&L3RcuH^cUSySR<9t26|--47SnU7Y&j~p~5dW~P#((0dct&Se= zFzE1SFt#*}WH)Fu1_i2;75GF_FJ=?Oq?P@q%(Tbjn$;Isg{n11UXJVELUTb%Aqgf1 zKrUtFIfr6Z(JaM_X#vc#;K%hu^9HNO?fxPfQNW{=gq>+Q$ztxC4cmJOGi#nc)T|NJ z8LzDix}jDY$2BvLl2$*rOp7$5s1riCyIk@`xQntE_9Ue0uvi(hKvLqbmP`LUl z^*Nlp7f=IQmEf9gbq1e!%C>qxkpoM{WKK+NxaeCh1n6Senej`r3#SNbCn^=Ncis7d z)%ItB#6XQ+3fl#;l`zVp7Ia#stUSeA{Q)Qrdpc%VM(A_ndLsw*J3tZ{(CFS50tT~B zYf{z&${AFxOmKJVe0VQ`PP8(~(}kcjVqX%S)`}k?a);Dkpqb;1BaOEXGqUX!OcBzDVN7g7?DUZPmu&&vv4P!!|@Mh%Bn^$ge znP;=BzjnPW;?nEV%cg6`(aTOi<8krohe6RQbu*Q3PSb|m|n69HhL1#=76W5&o52E2^1g0R6(i8Gcm$Zj)+ zHfL1D&M9{5WU>>M*>bnwo^#k)_=NdgfH~YPd@|fEfUKoou-Dl(6{G2!c(AUzJD8QL zsWZpg2rciR&|L^-XDKkVQYib%E25&2fEr|)2!`Y_DIk(qnzw~(#qgE^*iK?%xF6Od zcsB;`TF2>3l@G8KL?c7aI_8b77A8PUFa26SZ=oe@Jc!pUJei#tAhQ4DVH!bvAC?>u zbstpF9MAJ$!wKCGnDJ#1IfEfzefH)kSqb$rG)UwoG5yRXnXZ;~C(O{8Od+0P?VH8m ziY}`PJ8dp+^AIMQI4{TBZf8VVugUI7eDw?x<%G;tW`4%ckxbq+TXG&_tlm!xUo{mf z8BCjO%pydEa?Gjic*wDOl(Ar`j4;f%{=p2Fz_X9l2?k?v4#Dgf`^I8thD+py9qMTl zk?Oxfve)@!4X6iTD}dMKDmeJUg1}ObybAall<8dI0E;45W+rEzvaH@aQ3^)AN_cgL zrzEQ{2iq(585W4-9C_Au3PRCD7TrsZSN0#&T0Tif*2=mTNNt_89~cQNmKO1IvoTq0 z0F3>%U&*#t`>@uawxA^C$7m~kuBt%lNj(G7*j$8H86I^8yOtXZR?C5i$#`T&kSl9! z)^NBqM!xm}#%;7eHTSxftK*Q!Fz2&Hcw!Jc9$Qx~L0+&B1%O1-SDN#XU``C%@>=2C z=kquCV>LNxZ8@*6m6{hJH+lz)lRPhoD!>TNg+O+w^%x1S88hLoQzQ(og}NaWd)?Vi z9sTeUxYYoKi0u>yS#vfh2ERP<90oR4!GwTz>^Vs+rTF`! zQzij9N!CYUQEiiO+IuO*2f6khtT~v2uB4JY{aigD{13WdM%t*or^Iluou0B(1M|5Q z%k_JaMpsZmjS>y!pr5`aJ3Nm;NTW&rZ^rXzgktpZT$e?L&IqGr(?#c59*5%|*%$#o zo9O#_GwfW+qxscGF;H|Y(hS>uY_i}sMp#tE7wG9E@(|)VBV$=(E*@ejIcr!Zk-458 zxqylT?1ziYl#R38Q%IW6GYClYIS(x}G(Y$m(EJBrU-m0O^T(b{-b9-3s~0iwLHvG^ zj-FkTJx)}~U`RXkyXs#d^rF8a`(ayg4|ahBWFEBVhj|UM-wEsiI4D`Us1kmP1jx-< zRc_9raT%==xksu{LGzZcu7tjYShGf$(ep{6&D?ekR8k~b>dObSTA>qDi<$y2Dqc=8 z$(<}NGEy!6Seyk9$`~hSfg(N#rBuMgE?G_8<~2#Zp8CS1zMf+qCz+`CQ%-)r2 z^}O>0iOgXs({U)nsyTWd#2&EXGXtq*mxx|a^>9R1C3O zs*S8ZiU3nVQAf#@556h$Qv)!SJTevP>NwN}1?uZq&quK(39c^~F>fm^N9&B_kB#z} z6c`IT*{+fZ_&Kv7h`Jp*MP!P!cf>J!)>I8VJALKWOG|en&Zn;_D>J0UW#y%nFf$t0?gQ z$qi&!;eQWQDc19kVcaR6|0<>YOjapbM2pbhL=oqykDG9!(JDxMNbI}N_)vuo<^?6c zXOxm7(tqIN@Mx%3cifPa7LYVXq|I7`vtiLdmi{)V2b!GT$E6z+ED%LC}AE1$+8~P6T6v0(FELtgy_KJ&l}%+h%)bYXQcbx}oMk8P(mu z*m)hNAQ4FQkB2fG0lTF34b+{Ks1E@5eDw&n&KC}%$9@YJ8o0w;csH852NRRV-c>ZX zka>lZG)SkZ;Un*hof07JM$7B(X2ti~lY!i*#GY)?5KadYbqTTa>)a9%Z(dWM;#z1p z7a%{E5M?S+)8gqyLpKcv!P&%Y_>&^74fqSH5{jj0bwX{6FJf^vVR0RvAP$K@B-|W{ zgLyBf9_|+bJB;y@;bi6@awV31xwttUgFN75aGJ^M!O5J8^pQmTuh$-aAMNZUv5fYR z%rS<*f8UrH0)XE*?O|T!RHDfLpmZ0YC?Flr-{|N+=uFmp6{Z{6oi;k%I6dv5AsQdR zDzRA(fw_lzHfl&DO1C@aY#kZWQ@acFwTB! zqFI2MlhH3uwW=T9vZ($jRG9m4>cV&n^Y@swxpq^irc<}tMcpb6Awk{mfZ@fcW%)Lu zbBz}tkU8UG3Rl6()fc6u!(wr@Szmza32ItB1KdGaECwz3%>skrXwP(zfDgyfYv{e( zz_>WJj??U$rkN~JuW4V-+B9l>ibwV!F&Qf3#?E!X%{l5`U=DQKWLP+Vf?+AUi2FTf zRq7RxjqwZ2nG5CiAhYy1n{rO2AUD@o%GJ;R|3S~OrGn9^Y-Va4kIXTC8jiW(bAp~< z5cHI6*p*{Q9oR*!j-ijywLsy=Zit8VL~q=L#^ad4v(xmda6S;HH=Z}g5?fwjt9}?9 z8bhplkrG9=U_U11|H%X(G;tU#JBaOdB({+1(H=iU`;1C#Z$~+3#y6eOVi2p7jmUHp z^2}8oy)Fz_7SBI6R-OKGZC1kLM<^Nrg*mw~(De*c2Q_^VJanOY?(M%i)b!&M{0#c> z=474?0BeSFnR#Jo2pfz^WM{G#|H-Y>%8#=%WI}958avJmwSxGBW7I$=X;BS<03u(< zm1t@x2e1cFq+I-EAk`yU&7wGZg}N8ogR75e9HyC*KXH~e)#WqCJ31iOs$HU+qE5-= z1SV{oz6?pt!j|PE|AOP-0{EpPlosHV@@Csn%8RAd|0#m{0)SCy;Viw$P&!iXU`etJ+kP}H_U z&PP}7u2An6+aaq2fDxIj>?@pIkgvKq8&t#vW3S*QVM*!xgJVn#A1w5#5T#MD@atwH zlbG;~^^+FZPJ}r@bd2@2`E&8}0I&9HYT(yTkDtRsL#N zL}r&h%j_|yo*DDWtXSDLiDDl);(&76Ny2E--CdirgNJ64yfg#beDE{J#t}X_MvaUf z+T{Z)k4HN+*E*$w18rJY8Qf+1oTEtP+Xcrf##>b*{K{=QW?U!dv z>Ap^sS;+5#2to^acr|Duu-9DwB6;lQ$1+DG97HyB3b^(*z8sD)Hv7?O6g$~NknFKg5#=UawY?I zagOv6y_Cjz4>a|If{ZqPB7$F!HaXtCI#XOd8y=ZeV_;HG)7}i6*dw?hULW$x$8}yvnaj|y%SRpc$ zyU>5l#^v~Is870!eaz8%YGdboYakMh4~HUmi?~aql7=BTBhry$~Sq-GD$6U<63T2M#d02#0CWYkQTD z8Q4JLENCIZe1l~c*_y&34#;kh-E26b8A<%<&G8CR&b|d_;ezzwASBrqvb!0Fb@Tp| zTCFqFDhMh8g)~-v)!V~hu>OjQ?v)!@+D>gX%#c=)Gq;|CZovx0U zhLg=@N$CUIYCk!M?2Y9(XOOF*tyQvyH(Hqu13qS%li@PIDrK(9*rC73d2c0J)hw=a zg5lx~P6NVhS)6L-mNtAlpVVgH*-6T<}JbuyG#qQ8^VHL!N zLpCj9Eo%2j)XkuQaMxzjR0wxP&Yj0K3~(K60nu3LrD#;l!w?#AgnzK8JIfraMQM)b z7mXEvIq6H1BY8$8n2Z=tEK_a5)3dPVd@rn;VM!Kd3_IfbQufIT*=<@1LwvFx6_IOX z$ds!o&0v|-4mNF79LRy8-HmGm*bBUIi$@$_F)?#ucol5?anHq?44$313hn+P!8T?&?G~L1C~RGD)jCNh6UVJVK`YL(&9851=*u~Q90PifUBzjq9T=Ywo)nX z)40eE249^ECNQcRv0XwwUB|d;0BB)`!#b1+%~jqk0|}wo1Bt=Ga7f~3MF*-`Gz~+* z9Banb1gl9?8V>Pup$?$BdaaQA8L%?&#DGU^$$=$zLbn2q)TlK7pj0U|4(X? z4wY#`#-`OUeU+;xQ1-KxX+*8TW=&Eej1!)bP1941P995Dj^k|3N=~|{gI%n?1Yv?l z2QI{RV4QOZ(K?9@Uh~kZm8Mmj^@YF}7^{}XGo$KJ9#eS;s#+a8A{ZzWr8#T>X4M#j z#CYx<6IGg_$Ubh&Y-jSJgGA44#~gy|c{9aoG!(PD|uCrRrj&Omf;1NJwNDP4vi?FR~?y99hI@M^=#8`!2ar^D`Oo}Rt}aTdyUC;aFN z)HO{a>|h!zQjIw2LP6=SL9C#|!G3sfFg%K;5C%s1JT=0HHXjuIi+M7uvPD;_A4AkC zsiG9aYfQOF(yU_5dVgGZHt4%K!>Yz4uCiguoTsU*BI$;LM`SCo6NQnQjJ)_PkL~#T zKE5L&4h~Q`3mz+2?e#FCQ8+(S_~wl${3}Ft z-skz4K{U=CXkd6eb1-gBYNoJqAujEMbTS!N`AF+M23d=ZgGmUdScuSDr>@RMRkIor zMpaqf`A@9FLx|($DOU@k^Qsl@6@?HOyzT8)oN5}a->$~RVkWvBtUh+)Hbj~_WrABy ze%EX>4yRyJbYFMkwjFY=u%)huEZ&6!Q+ytDT@e|QmfS4IUQ>*osfHV*%VtJ8vE>+y z*py@i`2rb+IJPDjfT7yS#Zpo?xrJvDP`lJzTUxb?Q*fbr7<+AGGoL{z?9O^OtOape zhdFK+%^jR38@-D;zKrO8WJ`v@IPn&A6)dcf7>*pl2rE^ep|EJqf5jz7H^QD8O!v7E z4{!_v(3`A*`csZr5RX|bGwV_-s*9z>q?p#T*!+UmkKTl&(ZyhY=0wFu-oN#$-y~--8jpa z{5Tr>01skSL%f8!3?gcg<;I$CLz{n_qhhpUd*%3Dqxq%kXR1A6stUpqC409&eK#-W zwCC?`Gq;&wf3Mu~gS&ayGB}bMdYMXH1?2&U{(M>TkD&_e%0?OARd+FLK18(3fjAIC z{OOsIJb@>K+z|*t*dpKSaFo)j>28ulGj)V8ms@K|8DTBNmKYHuQ;nVPL>5m>kk*hd z8Z%)sJAA=}ndz;TWkw%NgBk#5k0{%w?M&sXj2WEL2XQW#O1^{zC*@uB>$mLW1^Umk zzvnE#O8{7kWGq&i=ZP{%uF zKQfN>g>2qBn=LnZCu9O_DG93Kig9Ni5Qz2>h8C|8PI0o_U@u;{vnv_RAv6mN=E`9q zAf9Fs6J}IAt(Ch`!M*r3Om!Z)OOhIQc@w!R>YZk<(sSn;>bgRBVqbNJjuX!(<^PB& zDC{#qqC%Hq=(F!52Id342^L4udf&HmLS+on{dflJLN( zBf9N;n(eg3Gn7#p$DUe?OH0*lRBV)!M?^|Y9lD??sGWM7;SR}Dv*md0RX|P|&+O(3 zHK}Q9TrkGD#5DAbwNV}%3W{G0gBNB1c0iKjLBvL@XD?9$r-nP|en9pIOcphIG+Ln| zfOTQ0ZU~aa-g59yw2w(b8;MqH47I7$?;nC@t8%f}ZGn1`Q?;Kk2Rr>hh)B<`9}#(7 zNW@7b|1pVH4m}B9p>w7rW#r`J2ncA)DHkYDY6X!q&t=VOISZ9xu^xnL>?KC%3$lrp zAyeCEAAym`wH&J7M6RrnHGbI@Fjt6IMM(Yk!V!G&6%LWgx-0G4kmGs!xi<6ajSq*)13-bIAmdIWa!kwswJRSz4`;-^gZ-tgtmK-Rfa$r{-Cnvu-i7Q%J7SXd( zWMHPE0IU(wKTrT(2;ZwAHF1HjNeBU#5lIlZrnH^!W{?9>86HOISCN9rVMfSg)-qii zgXc?#68chJ3JfoY$#wg=ejigZ&oSlfp3d%6pMXQIg6p_|xoJqS-r|0Nn z5aQo~4Y7bA{8u!X4J5SaLy@?Efrdbhrs#{Rd9Gw>6x5h2b+gXrxy`d!n>Cpm(wp9f zcI0Yi1{Wq#?aUHN%R`@w!_-j|TC*6+X&MZ)wqA-`0JY0%2$J;>VxllO;YteEJ%YEa zA;yLG1s07|m?qj=)2&t2iM>Nz-R+6Jtvy(BPYm~TFQdQlUDn<;kl3=kX2ZrSmaV&V zXU+0u4VSG8zF5}O)jKqtFy>avU_&vOz#ju92Gc`(F`F@^mag8ev^nS4jDkHW)O-Od z&IN49A-){-s&FW&p0B4s{eYt^aYvG@5^>weY##erbq<8i6wKOy)e7>SKB7GEGZ9bKJ?)&WR!@T%?@>TMg0 z@9@xZo~QF(+K%FUFW*tb*T{*fm9GPnTc-GaX(Ruj&AaE#s6-s_QQ0`u@#D*!~Z*Dcc= z+SZMAOPHh8U8f@IMPLY?x*fJ1N|2f7_-#%>}0Ym9W@00oJ{zsMtszkWPg8tD+fYAd!7P$|E{>+k2cp7#aUiY{W%D@H2{|r%)sF4_UL6emw58 zA`LiZ4_~tw(a6QDDn3{yG57(ZV5o5OkYVLbz~47S zTu8iO#JHntc(7xz>kO#zos_IH)YwpAG#%R=4QGfFsd5cy<{Uv^U?wmI%`eLLPyT92 zio?8(?=zSRVzF~#RSROV$|W(#i>f?&-+lMVqWSSRvB0CK2cD#L_os_k;1N!)lzZS; ztGrFOqP#yW@)yNG7!$F|n7OxkNQPF$8$Pt+uRo`gdfQ+}AWsf<^e@9bUHiIv$>4yc z84u@!iP&&H6L^VtW~_mPm6`EIrW!|Is8yg|WDQ8&gl#ZnjMS+<@ZM82{K}ZLyqRo9X?adI<{t?njuP^xu_J89kU2#-rdRysY@OuP zF6qRZ{iyWQ{lC8b)P1)4>A|+M)=yxzg$ptxM>>c-*R1`8=(z~G4wGARrkh09eoRR1 zE%QHP@8B$tCQ7hAe9-U>{3(Ubuw!y&lum z_}dT)zI6IPxDoqV#KqwvzR8W)J(x;e7cSxOh!Xy;G~%H*3lRrWt?l6g9vV@=PfG!z z?R-;4%HZCCtOmTFYFF5GOoe%Id^s0`u*sr$x%L-epWzL0bwg4(sW-XbuOH}2XASS8 zBbxQi?e{GDGaXA;cd>x5=E9zNSa9WeSb&jP?7MGHzn{6n3<~~qYj<}R6}F2miNOO{ z=nPRdp>ZLFRg|p&DqM_K!0kqJfmX8k^g$T|Z`N!vlF&WKaxTK|19sGhq;QAcoR0Fc zNZk3rq=#5G%o9QB9+%R+S>z*^yyc@0SvYJez@{#>Mn@Gk^+CTpc`5Wgup=l`t#N79 z&%ddynnggCqg7YXeB@l{zPTL&3aT|IE^07I^}r6S4#mE{8Txfx`B@s%ljrM#rNZU( zx3;$rqy`5)`)=v$ZAlGxrCYEWf6(h`9lXx#9OxVB_qJWOeP_#Ntp0bkc6Z&7@-|+v zW7m$b$JQ%0uMflPn=V`581~qD#g_Fuw>O2oT3R3lw~0{!G8||<;I*`vWwjP(Z6Nuz zrn~xjy{4hQ!Iteqy0xus-u^1bB+k?gnsy?{BJJmXni6>xADub@hp=L0~&N)3{`UU-VNmq9|HLwE= zX3E=)ruZ8fl`p zaw2B1>Fv$E9epl?w!I#3y>&2Dg!=uhUEQsFyHlntTi4k#?Ca`CZ$Xo-Z|!ay>Ne=Q zy>BRu1(2QVS~jH8skXFjGkjwMP^+fa!Su%7G%yXl(AsUgi+w2=;`)GbgO1t35!lz= zjzck8y1QG@uY!jR&YV-y($v@2?+r@x1;xCidk9$JQrtYaJvE4;*-qU&NMtgFg{O-b zphl1gt0^VxX&r7ENU`KD=FVXt)A~O46S~gyr^K~gD+M*92e_Xe8t6^6%g6~;BOBK< zjU}TpyYWKM`o3N)&)Y`c*=N6FZv`c>gUJ;)+@yU&18u3zW~{LB1wFQ7WanUqO?O>O zkR#hHC%e%ySl`o*8uzqz^#UhYWs9X|D75q-8ARCMMGFH%lm^+&rsbqBhkAQj`@Ob( zL%r9vNLWsXXX6V#xvt)!jG%o8IZ(t+t-bBt7$(5R{-LzDx2spEuET#aKZ76X?us099&5U~2f-c4w zq|imoMm?s941wKDuZy%dhlb*yt${vAv=O&0)wMsh0Y+}QBr>Q8T0&9H-WF0^6D=UOru%mG_4jr6bsjKdiyhnsT9gfYT!Z<^P&`*AX%ELG z$W)o`YZ2~a44wf4+1b*1JJ+{tyn?enf33gl@~u0)jlI%VgyFw#ebaVt`^Fs`w_mYw zL$!zZ`pdSoY*=@x{bJnUD>}0ED%j{V0eTB(c4DTayjhymjX# zP4$;ra6|phdL-DE>TlVJjlV#DhmYIR{dQDr+qsRi#kRgd@I2@+ePjKG?Hk_`@%dYdHMPkdd}pkbudZLA%;wys}y`Ho%o^K~pl8|QREu?$-Rq<3RekRw3vY#Po9 zY+v7C+RIS$mVP@=yLlsAl;XA2hMD_epda0HNX$h8SO=j}A6 z`e`AX^Llc}aFTg&D__Zu-YvGFNkS9RiL+KwUDN?A1~uK|$|*TzGDei0!=v>e5U*{Zt)dPP3NY-qxY^0W#vQeXGMg=eO^@LuTtU4w zijgbp*}TG?;R*)N?EzLezmX^!w7BgxkN5&LY-msrD}rXFIJ9$E8s8PHWoK(A8aLA* zsQAv|roOi8a*$U1O~+B<3}{w}SY(pS8FATU$@OGNMhgmc=6bM`SW&h)D|XtoJ0tcp z&nv96r+p?;#h#zG;o)VyeW_tg#OXwOA7r+~{#DC*61{yL{eeNfcj?y4qxCzYHSy&& z@v7HnefR&{+U^Y**T4CF+j7aamdm$ptB2BPef`$Uwr*Yz$~Z{5+6x73uYYSxbxQ}% zQW?_|j2AhzjoY^(fmC}}M~B4Sc^Q47Yf25bwxwTpRQlCw+%xaq-;fCqt8AO{UooP{ zfv|bUj?I^Dt=~$0%-AF2Y{i1+yAaPW;CwIdU~yrQ!0__QyF3q?=uyL?@IQPtmI=oQ zUkm@$SRBBCukt-%x?FfF{Fwh*JapxFMk~)<@IUcR6UK1DbR~HBO&G2(&Oeg(9^bP5PlbqAsGz^*j^hD zFykGbw-CQ=pNy7nH{v}EL>ny~#=jE*^KQz76aG0CnZ}C$Bm%Cv#e}mQgpce;-A_^u z#(Nd<9t4gRpClgJa1JcLp3Y9MzW6R*@Q`72jA!d?zqu1_wKn6A<~Q;9%}Y0WUX6rh zaFp%Fu)BhBSYKRzMBh5$o$5C9*t+5w?~2qH6IWSw$rmPkvm_0J{|ux5a1wP#-Lk&l zP#is)fBQtH@ept_w_jN13FzpjvH5YIq?y4L=Etx(DDw&lGx=G6cuART{aFu*f2rp^ zj=ZwUvA%fD(TTT9P3-sOI7vR-SN8j_!INdJFP`y^NTwy$o0^!mWIlALGU8>*JO{81 zyHdh}cCIg`1(z2N-%|6LRBK)XGaS6?*IV_)<86KJe^(C1n4Lw)@ODr4i8w_t4GyR5ibX;;bEwe9vq zZd~9XOThA4e8Ep?%W&I=!!}47nSMcWUBBEfVc9r-R4^mE{V{A%=8-tZKFsxB8_Yr0 zKU|im#LtX38}@R)=k1oTOgU{ByuH;Y32T-xDVxxQ+;K&C_e6|Sj8zOtX*a@mb$Z^B z@VCIa+;3UGdl1*d(W54xP+J9QF}x)0c?O3w<+tBH2wT-A$tP7)PuJ zae?r*oH@zHL$Jh)2Jv1_0YC6Nr#4PN0gblt@JT=u3{Km4M+3aE z@Wa8Fx8FUQgI6}*wh*qcPA>;-#Cj4w;_8^8UC|)yYdDy64}NFWE0|-Mez;GV-iwnl z-&}@t{cPM|T!uZKHuS*4-XSwLS-28qBOSBwiD5IoSx0_f(&l-0<9B`Wg!lLuyf)9( zt)6$k_-Am{ezWHt**v55e;RvQlJZT4_A`%sY_$mc+dRrK7!FDNOgq`I8E^Hx*K+c= zVMnjE^kC$7Pdgqi6Bb1}EXRcF>~|qt4UJL8`5O4vcutwvcDem>2=jhxN-t&t6m_-L1 z?`6N^`5a3^<-kwjXKeV=LmB*Gx^xWVH-ytGz;g;s&B|wE@sgvHZZCLO{vDv5tQX_H zcp>J^k#SvG?TFhS8Byk}v~0f5BF#G`Zm93FX!&Z_mb~Bl5aL_9K)hjjcq8|c3G~nO zmks0f!FS3xnJ`-q-sYP>vTa>G@tL>wB;mZE^5s$5!S*q45KPMWHsi+DnOEjLH}boz z_OWH;C1_ug@@Msn!#Cb7#{AfqVO*wP6A1c}!={gIn^}KeFvZ`w{=7|UQ^=p~$aHx9 z(;o59w4+Un*E6AOTw1whA^a@T;Ds`%w#+kxd5=t$`A*uLe!LZCgv<1~=Rrb5=e&9G|IPXSy zXk?$dacaxOg-f*_O5rEVr$L&6mf(qT1Q{26M5r9n#`4t{Wsy1`li- z^ZZqIiG}e~+T6nJq401Yv0Nw0fD4#ws_@&Ei{H_oZXO=O;qM6lBnW4HSVjx4#_upb z+PL{>3;t#wGA@rwY?ip8euJ9Ah9fADbF#vtEVIq)Jo(<>Np2Y#?_T`jiEYFKTQ}?f z!jWuzV!n*e6WK13_@R6O+i;$qmX`i^{UAbuO_!&F?GELaTdpX=R#X7TQ^0kJ7s_V? zWsY!r`%cfg58wRzcF&uHymQlJ-bWG6(`VR^>jIfKHy+#JQN-iX9uJ%Zhu1+;&;6GD z{1U$9=?zPTZiLExiPaH}EF1G&I1PP`ADc$bO&h%#(xg+xh3s= z&;*N*qs7~ac>Bf??;zrFcT>KUZ|rgKAmR;=Bi_@9cjy%HSl(9=k6UhtYonFF9369X z9O)zxk6TQD@*~n=y1Nk`ML0y6QNs@+oSPmdj1hh>!XFwV96{cb_(R)&Lr2_r9+4O0 zzKB0Gw@>1C7|#Iy#^tua+C$=lV=m=A!NDLLA*VbL1h_{7KOD^ ztQX;l89>505;9JCxG6B?lweZE14mJ30Q^$Y^BFJYfmshZB^v*Xhw`Rm0Q^!i3xmI^ zu;ne4aMUWwAIif-4mTm+!e$apPqr|r1aQ5`!XUVC!^IW`L4rFz#ljefaNu{Nd@GrW zAs0D#CcV8)r8az)zz;ciw!lAeFsU92JJrUAFbB8E!Q=)&n;bk};G+(X3jC0RV*)?r z;7Wm?cklv%Uv=<8f%D63{)+^j;o!vrFLCfW0#`Yhvkmxb2cIkOS_gBagU56EL7;-$ zhtKN-e%RsfdV%k8@iz$kAqQ_1_+AHJBJeQ>Un=nZ4&Eg20}kFS@PiHp z;{*3G2R91*kb|29e%Qfa_TY{?m|TYEJ>p;}#NZxv@HT-Tb1;MjxW^p~1`h5s4&EW~ zU%BzRQ{W3+_~il@xc0k3;7_>rd#k{|6F(d zZ|XJZlt_k{v&}FAoDzTPALx|VA#dt_=#;O@5)HP|*BiJ;{3#b2xL4kD4B8<+gjqPQH_|DQ;*g&~Gr(^Xf6D1}iVHGu zlp*MpHz;rFRq2$MmN)e#~%@bwmly|-PVbBKfu)yU8Z2&`PgcBJV zZ{>lJCT!3K@Y@BZ{*X?I6$gG8v;lmh_`l@fn*^p#f=+p00^xXZB%SgO$@`(*@&bH| z{5WFJ2=HNnsUxCO-aF*Y^+h@*5+B;r!MBS4oqObk@OR1&>V)Z(cbmK^+tVr0bfWzY zngPCD{Ha@}Q{KDeO`e`kd3VTrb-TO(-zh(ycJR9ermRM%y!XhPYXWr2`z?7>XGf<3 z%Mj{Z4g6ktbIs1c?~^z6%?AE$c~ehl;Jf8bdm013U*25TH}D7K&2=aP|Bk$=hc@s% z@}_>-z#o+NAqRg*;MW}dVS#yO5}lG28nc#S;NKO0>L(0*Ox|4UH}HM(USWm>zQ12! z>euL$_j~f5V1^0c2Lz@Lh)#JQkvG>O=#=-Mys5jRQ{G4AO`Q;(@;)Z-mmU0Zfhlv- zDeob9Kjh#~2pkMMgg-1W*Cy$d_xtjuj*CvoDxlF#82FRozsC$ygg+uM*AeNI_bGXE z9hFW6oGjNy4g6_&b8W=HkI9?zs)7GN-a8%qxWHU{rBmJ?%A0GRbjtgTypx6u0RAI^ zX|qD7yeH&Mn-en;iTFfob1Dr@Sx9n`N;Jpde+`)e{O97|WJu+_kZL~oi3g7z9#P%9Q@Y;)Bc4{d4D5su07Hz?{DSJbviobeO=y9IQSa^)8>ax zdEb;bZ9nLg_jmH%=HO=q=DH)D^8Q}lk2?5U0#lDor@ViVcgfB20{oo(pgxdJdEb^d z^-6Tg`;NRR`_n1!ALY%pDmvvoFYjO)0Q^q^FFjSNrY8RR z0#i3?;H3f|a_};Nk2*LmFm;wDenQ}T99$*vy$-Gx_;4>@>+z_gb( z;VT8EU9f>y2~1mB179F8ZDI|)T43718u&tiX#;EEiv*_4tAQ^Tm^Nkx=ISqOY#m%H zFl{&JlvgJ(*F_DyM&RSF{A&e%#KHB30GQ~|?)~T&Q}Nrsk3-Z5DnxB6O6wTyf#;NLZ*Kn4~4V8 zz7&GLm=pgQ!p`qUzxX%&uHA1w$OC`M?=8RT0cLwN2jPUVnZUF9Lf?yd#d*+Qn$MB! z1c`59mT)D)Q#t9khtgyE!y&jH@s9`kKBm6~@RK>|TbSwdds`k4@w*W}T)#UA2afHP zTYuKq%KskZf2Q{}`+=uNr1#6>^QrLn{W;}j`K)~DdGD9<9qh6NeE%u&^AMwk`uhVp z@ac}P2SzEMrGK8c(mz%E{IdCfYLxs}2lNXom#57CY`4c}M=6h;zhMn5^yI049uq!Q z`<(6aePxvL+4;%yR=wfn`Q|9)vGXxjD1G9)oi9D_f;YT;-yNlVc7FD}3#EK^eum}2 zDa-fE;`=M3l*jS|o_Dd7$LbS2=o3i49(DBei8q`+_zDFGoSmO6zY9*{l!acdfSy<>mSzSw!xHWBi4V zzLW^PvFnRyZwa^SJ+#WW1m6=TTKRzayD%=q&%4?iMt#0f1fEK>K37Y8 ztDp6}PYC?=Qk(wO@;%n0183r6{nNor->xTlSWja9R{!jI_Y1saiH*Nk(pwvX8GmO8 zmiB0|@sG&&PlaHHTY1#;7RmUs`e)DkxWr%kHv7GStv(Kx022Ouz<+w)0`Dl=gK#-M z@d2|u+k*8uT6`0(a_|y??RvB4CA{Ck_k=N~@O?tU?fNM#1b-jlgw1%|AmOWBdgpqd zLpawHNfLeRhGBkoeUZCk2;22n&)X=lwGW^b9K-E;tmj=Ku(eNs#jL<~J)hS3&mcd- zroIa$+^!#c-kLXjeEti{W1XenR{jO0l>W8rHMIPCqxq|sM=76Ozkp;;5ykTdFlJGS zJizRaZGeq?Sn%DhN6@lnI^vh6Nr@T%QHj3?uyKz{e7oM@{lDVA2R^Q<%KyC5LW>}6 zZ24Ot)(#egG)dDo1;n;#q0tmV6H0-?%VcJf44upj^QTP!F@+Y&AJ_7;F0cX?Eo+sk zML@*`DJn}>i)E zT;Ftkg|NQD^bKA3N1m%C{E5*L&3s)CBf3fWL$-gsNy6)VFkwEJ^LP1b4gaF>`Fxgn z`i0-VutanGI{!p;oaqnk_~1CP7oATdI!gFY*!JGgx?V!`ki@V17l_UfTK6xo*TDJH z{Xs+@c-QTZ<^A4(%Ks2e=Y}SDw7%$kA=(3xU*`*nju!d%Sox0@ev_pq2!F0ab9#Js z%RILk{oDTVHYp#SABJWm{E2H7KU(6~^%TN-3hQsc_J=={@VZ`0Sg&RNvK|fp8R0Lm z`Kgikbp3>|e!}>Twtst4@VcHrSWjU7CTmZ>6TZ%$VJ1Z4)Aa_zdIRHkTKw+?uk)Ei z9~QjMw_^9T(7HZ^o>jtcweme7;dT8KIT8M}tjcF--G4y(Wk0Bw1W_#25On9!M zUtPb1XJO*A_Pz61Q;Ro9?0NO5mUC$(}XL9&cgY`+KSsvX_K=fJRuj|wJKP!CQ??H%|!|y#;`IiY_ z_Yd&SXy(6e+s~VYuj{is6Uh8v8wq~=Q24svfan(C7lQo-OmqHpeGs0H@aI~4J3(mO zuSL`<^jOP}PzUUT>G6oiqloZzKNr!*gEoye;h8q!k9*hcd$5Xq>wX(P z1<3k*fID+}E*E|2{t==Zg`etG{*A)d^(;OOAmMF$c%ay`uGiuA3kkn&jfQ_)!s~h` zT3+G5X4|7Z!q@e3!g@K!KVa?cN5a?jAEIL={n55RJXX@z{a{305}s-`{VoZAqC<21 zI~&Ea)_7-4@H$3J;C{*k9w!t;4R^CV69 zQ%f|5j~}4)a$1Y>OMuSq&;HYL!S6h<#FzZOuS9ctn=#%o&vHp`my+0T$NaI@CN2HV(i3Y~>e)ulxJ(6$atA zH7UPG__|+=uwRVB@3~0%R|#L&bBW$3_PEp52Se-r2clm}_%7Q%GzuNJ^bDcs3&EPFP zTWH3#~reu}%mKOXg)hvcI` zvpkDzegAJMUtOPvr!VEZ+m`P^(%$HPCc=Iu4u7ki&-fP!ulvae`^lKU&iY4p3SalD z5%#MwKiJlZABO&p)!%vVy8iC3qCZ`K#rRp|*Zn+%{XCrigM#&5rn!FWepkYNSLW}Y zi+|)tsY0Rey+Gspl;Cy0EMH*4c->!upOU|=ixr;}yzW0mP6WShx$=jEuls{}R*mD+ z{V9k};(N;W2YrIq{eVbW@UQ1IzAeJn{jr4ou^iuy^OSFB-A{!RWWv||<9teu@w$JU z=q#bPTKj4jTKA6=oh`KPA17KukH8+7HuF16gg?!O|1kXwe5S`D9gjZzuG{N>Rt$zeoO_gnzyfxKW@PpY6s!@~jiQ?)N52oA}O9ep>jtADgfro5TNRiSk#P@Yg6k zP2^qf&@8X+rzN^w!f)?a{OuB6_fHb`PjdVV?E1jN!tcCV@gI=*yBwP1k6U`8@Us>4 zvLOxspAtXz_t%;?bA;COLqtait>+bpI^K1A^2TUhOZ|uLPbBP5Y-hHonE(6zAO}{- z&sbZ&wbEYl*=F;6?Oo5`p;hvy`xOcM6(iuEZTs7orF;vvzkONkYxf$>|0uDaHyxVo zOZUGL_P;W%=Na%hREcluSsFeseBGZ7&sg{y?R>eR^?VA^`R}^EPOZ>awf!8r|DUk` zpX=l9gvw{=AzOb={$JnUv6Yi@?EA0n_gGXR50{Ug7a^P%=>XrQS1{g*|EenCbw3+c zw!F_&;U5(2zb5S0X8qJVG^gL>&?DJDqx+2s`;9C2-~7Gx{jcfojtcpz*@K=J;v276 z-Zm@WzY2Y#olj2vujl`7wTG{cKps7hML3Ve^4$Cp{3B27J^R{xJm{-k(!t4j@0kjIHG9?bCPeqV z=jHidBgn6w-y)pf`rj_UzqS6nJc9h{c{0LzviCZ_e;Pr4yR5%*y!T$`m-bg%HvU~T z`|Y#&J>fmi@3;}Im|y=cNee zrMP|np`D*G^m^+*o<<)*d`$B&+N0C{=Jw?8-5)q-1oEu2`mcM>_5b<^+B-e3f&DXo zbAJC`eR?C%XRX!ely^OU2aX_rn{57OyzBX!ID-6bw)ty%*YkJu2=X^}wf1rU^*7h& zAr9({&;DL}Jb489)$^`|^RC=prR;p~Pu}zV&#%Zo``3Ct4>$6AXIJp6`4bziW~K6T zn9Of%tf2M&9fI_g{t@d#&#z%WpLc#mddy#A+w)T>20q`v(}njQZrx|T-p9kY@H4&9 z+Hd19`^{9uKL}dy){TD=6Nc!8)*Zf^EEd9Gi5TD+UL9}{U_yo*hxpqDD%3<;S za0Kz`eH*-yoa0;5rSchiowesvg@1#kKRPVEpN$|rz3%`k84};dqNaDRl(*i;ft`QC z-yT=~4a3qKiF|sW2hpb`zU2vx@6*HLd-|{B|9S9dVt>#gL@^5YA;|oe-7oY#i9hAg z%wKc0rgx~+pY;wc{2}GRN1=071g|8Vwc)ec&JN-r8 z6K((c*s%B}k03t1e*inXB)(hieEwdMU+<$JdR+L2+x>%&3xDg7%KV)0cR4icPtSAX zJmj$cY3c~__mqwAd5M3tEsy7i$y+yq`1F1Sod1>herV-=WmtT(M-bn38~zUx-yVmq z>_6s?AU?g{f#_9_xiB-E*L?4 zdcOqG8%AF?zBh)&7au`t@RZcmzQe191h->MPB zce(X<#tyUpD@PE1gAG4!SorlL2tVHT7l#ZBfBOi+7i{=R!@_^LB0Sf3y*~o$zuvbh z_|^O)J^v3+MAkp`{6Efj4NH&9!}VXkhxjMq{4qCyH8_v_Q_$WJpX_4#S^7`VuVl@g z$~8D|vxo60&#A)y3;hxFT?jl1^c0-8AA^k#cjwIch#KtQm<;;gP@ks>{tpxZ&FhUk zq?&;B#yZeG+9MPG6mLH0+i>2hPw;opxuD(n9Tw+l3%r!(@ML%#*h=ixZM2{;dT#-Zi%yaN6_q*pKL zJxvFWL;neT887q%??}*xE!Frx=0!mBezwsP-z=&F?ds>F6?7};B7~hR@x4vwgFYJl z4{!0S!FjbfXx`6e^1F;K0j5# z@1{!pf2LZq7c>aJKOF~pmx*5Nu zuA!x%U3q&z?*xyZ@idxNfgXqWjD6I4>nrfLft~~VJO=n0oIiRPH1E$c`8$htfYy80 zYeuc2!?CybPQ=IdQbRMmUx3f&PmTSYM9+dw2Kk>tCwTlVms>2p-unY+H@|O#zB6X- z7_S+1J?)Q-J`H2%?}OA}KkuQOaa4K!hwW!7=)sSh``c?qT|y0@d4G<{ZwH+M`YYI< z%isB^!G7FxnYQ|UoqW(2V!siJ5d7QeQqT`u`+J{vBj{JI)b{dKx&`z&tVf#W^f+i&-mVGd?d{Xxk13k_+iOPML(hSJ665O^ zB)(6P2YtKY|8xlCvHEQC4hEk#;(t6`9}WY3iPir{ykkN0{E8``Mz0a{b8ECc8s)Ws zUTfQb3Ecob@2585&!yX(@HOb~?*cv8ZSM518Fek)1A5HS*ptWdQWyOe z_3MKue>78|r+7aCen>lhH60L z^SiQdsRkuE4fKsk^=JN(nn0sJXSmqsX`qRP!Nc}?7U&1HevR5e%RrwU*l!KagY|*_ z9P$gbAphgM3~0CfE(85o+e+Cmmd|#vc zL4OeaTfNZ#L63n>!G4hj%5Nt90`wcfeuOC)ukHrT_aPa+M}Gu8802>fzKrq~Xg;sc z_A&wI^$!?dUfwko^wlVcajVUEy$1LBO#%O5rMJQt17>R?vMme@%2D z^RHCp{Ei&CQ?_)*cSTQAwKf|F(Ic;`3suciUeZvTHZXt(|PEa*wlkFnPedbfg}*#i3z zdHU(T3j7a1Z$sStu>PI^{kZjK*3z#*f706HSnnm!S6!(7=S=Ty&|+T_et#MR`?%2d zSO3Ci-RPAB&zy4pKSOgsKRjT*9aMvq&jRh{-v?cUGrmLe+e=qe@c#icpKk#h`uqgj z9`X4SLoepN=wYb(f@^Tz`{AMPuGGTHxK${{-_lF zBj^VZH$Pk-z6yGhwde2Bw?PjgJ#-UdKifgii5i!$hOVKfL9e|^+v7jUH;Oo}t@wWe z;YL&N&q4W#{m}=!3Ft^y+xGZL`XK06it1l|i%tja+Sd}$i!agnht1@Jz76?7HI)3M zL7#*0C~~~Jmo5X%_hoSVHvyyGYe8STTFdKqbTjA&7h_B%`pVN+K)=xu*bl}R-vzyG z64fHO*u%r1k2sfaM&S4_qo0C)(bk`XyeqAxXjdN*(C6jUf4Ga9L63odu|UE4BZGD;Mr9q?3s6}v*w*dO#3)KG~qH91O-G=gpzNX+j(C0zl z2m3Yp{w93`bSu)IFX?}u9sqsbLX7D}ziE0D^ryj}EBqhOuR!zt3ot*F&l&P9Be#7T z4MS_U`K_ZvK|f~e|54sapy$m-pTqWxS)E0oc|E08;;W_eKp%Xu_Qy9-8uTU5$H|iZ zPwA7OdHvBt{w84kaV_Z8w){@=t_SV<1Gj*7>&F(*Zu#5~n&;DueqVX#5zs%k_HmH+ z@1O^)Jk9hg&~xJ2KHMPRHA>j}G0}Sq{Chx~{`ClN^br_KI{xeXK=b;aN$;a{Ea-=) z!vEfn_0dhogZ>c0vwmxEzJ4y~Ypp(RrsbfISPG_;&!u!R=*Jg9pF(HpGSIx!H*USIlnHJN%tgs{rdXm`lkB&`hD=4%6Rcacd^$`rh76~UPrsTbGX>k zO~>FHkawmMf+=elBq;~ zdVeyO%f$MU+35qZ8I99d&Zw)epWdBJ%l~zC)A3&_**(2C7Mq?;0uh_uTsNbxVS1sj z*xx;U<*bwXr>8SL+3B%dAz7FCKaD@l@#hNpLb0a@qPW@|i23e5NVr22tkHHXDD3Ms1ALOzUPI_fB zR{Gr^E96p2W;3}0esj6`{TXB+lLMI;h$XUY-W&y#k}DLmK4U=kN0V&z-I+`wm5Ig^ zIX{-kCGe)Ln90vCz3oV(<4Y3xEFwv`=ye{sHdQ8XP-C33{kNU*xub7st;R5V}kQ<+TG2P088d-kj*^R7SNtFWd9N@wB; zE@eQP>u1iSLZ-mQ>%`SmZ}L$rBvUMXE`wj`UcV6SPI0!D7`k)5KR=23RX7tdwk~j9 z&x^;;EcSP1OtwX)z9{QEmGTS8eguj3XAy08G4C5jJduy(l3A$U&%-pJc3PE777~6p zTcf^WL82*?F`|MV=J8LzC6$QgKy_rJu>^5p`u))~%$G~C9pqwU9i@O7m|P+#Q_c!& zE0&AZ&6+WzfispHsLUHsOC*mAVC}KOnP}Zu)I7l&dJ}9jRv7+`MkU{$%;!y$*lEau ze@3Fv2CM9V#*2AVW^CmM;TPk{mHFfh)W^Eur=MSuMENCG*82shsjPCErcP=L`SF$g zale4#K|2{uM7xuIF@<3LnK<6`7gPD38Au^t>^47ok^}jke3BE5=KB3ue>UIK$YEot zOY=$n6_;O$OPCiU6s`P4^Co|}cICPJ{T?UL z74Z*NktEt($gDy%c*W}CzoKIPAu8q{M#cPVRg7a4cz>cl)|Z0C2)v`UaBEi*)t0^s5 zJg>z@@B8R4*m7VrMwN(@O95uaf5i}_L5$)ZLgO75El`W1x%lbPVyfUomhb6D3*DP4 zCWsr6LNvdE{Q_eEelg9uff+{QeordeixSEw<3%)!d1+KSbG-$BF=9-{&}wu_?Vle_ zub_^>d}k63RJl?X!&>tT`?G~XqjoMD&OxH!rxS^I z0xHO({^BpoD+R^fQKxN4Z8Yu0RH`G9LsyqLJ(ub49O#6cHWV77VJ$V@QOCk1EoUum zu(?9>gB+OtDBbOM527Wac?(Kqb7m&J7!h-C(3*C%EH;Y*fSZ&?(}G5G0OgYJ&YP}_ zbKY*8rqj{-_LZ7&7~TTz5_=QrM2@u%8$|KsFHPhSPk%BUcqP(BS|ub3t+`8#xpua+ zl=80tNn{D?8oyYafB_7)vR^4(9cp=E02Z*g^-O=!!g=j}N9*|ugPJ5J0$b{VJ!=QT zmMT{22hD8{nyy}m7en`xhHGG~Q`!jp<|Mg3EluRQ(P%D4w}HgU8)^lm<08B%hQ?Ac zl>1O|vIXw9!s>!v6lG74zTO5abck4JT#9=i;fQ6U}vfHeP23+Qt2&B$2k|ikAmicLI>;z@uEA5Cj&1e%{nMERS=yS zSWqID&A|>~DY+HUo#}Hs`jR~bHZ!z3v0_R_8l~W!1L*v@@nJ{QbUFyRu(gy;bj@&6 z#3779PW1H6rIrq6-#MVYasmpRW%cKy(xJa2)4l-+HO3OTbRyo?7St^|cR{CvM@=&g zm1(L;J?5Yf%VO+codNa;=b@=l8(o--!aBq@p)$1CF~sSKa`T(8NG2e#lY?)zy zb2H0TFsE(h0v=&lw(s{AxHN47EETtk;yVVW##SaGyXm5u*g#N$hU;K2ojm}*2QCB5 z9o|2itm;!V$trD)%RmX8BYT-JQPZ7q&EPhtqjMg5VQF;yzzMTPf#jsYfNbdH5r8We z42P>#PcD%_al=-`XY%0?#ELm|WCKPRX=LFIwRg5V4Mu0Q7s8kZM^wzsW-^cd%(Mk; zqY%n?F=+p}Z!EVpjNrw8p?s#8izWPIoZ1&#HJi3;rlrqZy11otNt^3sumT;+X~Q_h zq|JiC)lK$SRB=b?E&V*XU|P?f#^j|S7Pq&}!}#Nz*0u$p#APL4eL_DLPiM0E;=r=< zv5Ohj1f9RQTHM@-BV!Ctx(06fgSRcwLadMLD|;6(-k_Z~IbnYrBPI3*%S=($1A20T2F%HXSVL9R@i|shpn@pFo#qI;l#Bm);8pROT>J)Yf zUC1c7Ci)2WGO&=xe=d0M!%0IGsCfxIke^_n~vX! zDhZDlt;Pz{6iBPODghR~5`$$-7NHj?cUu?0U4&~Zh8r}!otbPVmFXQcg~e8Gr9UU1 zV7~(11#+r!`stPZND}?LQzAA9Pkxw2t_8KKkkI}*mdOr^Li}t-rtyqZDT7n-DY-EH zg#%e+JQ3%%k=u9~{{~}LR2wzxpffh5R`R=8E2bK@pS7gZ&7L1LtC%-~Llp>aG@)%8 z3LtR_i>Y0B3ptz81RFD7nNksUFXltfB|l(I%rznJnTk+TXTeG zpdJdxDdyiVgVWM9SWumfbJm(?uhJBnV;^YOq~p?BJ70YceZkduAx{UMIiD6dqdiUC zH>GXzDP}2c=c>MF!Hn(HBa*2o+sZ9T@X)g4Wnq*NOTYn93zr51z9=k`%e*AGl!DQ< zDG(W~+jxUQGEP=daDh!31G6dgG#1e3z9Lae8DCR%XR= z#+xxEj@HqP;?;PJt;S_a3>6lWbJE-+X7z!%=f*f$3OeXWt(Ol|M(GqXu?$H#tyDWA-MW#H^X&^B70l zZxOqQw#M(5K}Q9+J%WIerKn-yEz{3eIN4abj3|+-FiIg;`sJ69ZS1H8Yx}E~hn( zAyiUEvv3x~gDrJyX4%GgdTd6e1u*Qy%n$aXNy6Vk&iw7uUzKij#mZO{)oFKGC-WtB z^Oh{GOAI9A160R@D4}^xE!hq82hH6G*W@~9sVw*%td9j06sI6v2@5#E@|WUx%`5ng zT$&N(Y});o?gm=|RYMWoTZL^blwMnxFWO7Ym5ma%|Z0eWN~DUVW+H96lth8ugbcPNJAh3=T=;$NJEhS zvQ`O$yGR4X;GC2(lIci8AV%4HG-HtlBTA$p5W!vbh%^KOh%(vvkj0xw1BBs3s;$OE z8Um??uaZO>1L>p-DO)XxGzKD8tZhUZ13}AX+aisDl%hEldLbWa3s#Ro0AQZyh&OgyQ;Du~Po3aiwBL}mmMX_pbf%9}CN zp!<$s`HWvgu+|ose`zKt(qyeH=s0Xc9%-_6HmpyHG#N1>O~|t7Sc)ka8Ah6_*ACaWEn?gMxA!=m?f4MYmEym80s&OlyMfR9|FfAaJP-u*0AT)~h8#TkRcI zP>$LFl{m8kB?NP9ky(M{k}H`;jm!$9wi%6JXlMsuR2u`X@=aTq}eHpG(&2B6={Zy)I{gZgx(fxX7G9U3Der+>HAI>GF{|sz>9yijwE3)}+YGM&pq=sx09- z-fd(~pq|K_a{0@~IFUIjxE(bHqZC_ z6j{-ENxW4dE#3|c?b-z#A1m^(Atjhv+U1iLU^v2?bymF7Lbmy~qW~~f2~x_e1F@?H zc8svkvZG|o-HsuvO#lLDHNr!)U{OQO0Blu@QM|EJyKMvfKtb^JR0$Q+IN;dw zW@o-`p}5OyK~2AaCcQVHtN#22wb(0%6$Z2sltM>I`?mQtNJQ6Af?eg z*s45RDNLT+Q87@eJBxD0ieRh0xN4$Wv)>jJoteDBt3V_8rCQK(V5`*?E_n4SzA>U| z>yQAc7L0Z47A-KKgP=VSmb8Wq?Al3wbk@P$_<%sF17x3vmUvSpugoUmrAnz8N4v*c z5XFwbR-xTQ_%~Q;4uMQ&%EmOy;JOO&vFigP7*&E+E}oggYl!Vi2Mf`@yn!9Ric0Km z4?|#8Ldg&epmhP5ssht?q1`UqR|0@)#1@rrR<*!Vz1TGlyi;YA65H4G2m+K;r1My1 z+t`3mHI<@tR{Jp8Q=M5G6&FdSGr+a&3j2!MuGpDP0EVl_S)2vmYREQ{ftEBs&g?4S zfxhrd)g#mSx&(svsvm^%Vr?LtkvY<3lVmEL!zLGe07c+>M* zuhSM~yIE63z(8<}*de9n(mIt5)~j?@se#qPb+#zrt;$wvX?4v7Oe>i5(^g>h4S`S@ zhR=f!BUYV4ap1FA6cpf7c$v^Dvu_C%EpTim=P(JOQU*kbwRTdtmgt`+iCpP z!U@~w1xO$eerd7Db`{WSU)EHDT8VuY;Ho^9i);p)?7-DBvgMDih~?q&O$X+N0D+i+ z$c@%><6chpvtgRYDJtF`hc{ZAN_*$3((bQCKr6dhTE`m| z+-yHZbJJMz*kn_Kyi(C+2dlhMk$K^m?b<8=BQ!)dWm3mNJ58t4A2wPS%oaWS8KqrE zh(}Ghe9aA0aVmVUB?@nB83)@I@X87r?7PD&E2-Iv#8No^mG)~vN64e9@EphR%hoD`O?JA%Nl72mpKrI`l1B?35Al9r{}J^+T+56sD6HxFJ6 zs}yJwWNg%E9WkrvvVCrtgjEG-t&rxnk=-)mdP!FiybNSUC>4&gkR8Me2&IjR^{XoO zvI3 z;A#Q$(F~A*#Q3GnobFR_E3*1X&fEsKCc1Ws(3L7c-gVO{xGJ_P2!VtB5n!s&4wJ1O z&TgZ1o@_anHalP%UBxeXy5$=_0VyfN?0dm0)qu1HprHaSW9vgz?3@5f>pSPNV#6x9 zDt@UufQWcsMR3#imOD;-_JL(a2rXl?7M!OvIlzlLEt`}qE}6=!hu zQQo)lLVq)__V@eKDSD9C;r+n*&A1D2q2Vk({2M$P$4@}(Z)RzUI9BXf8z+5Z*Si!|%HJ6dj_=vna>#zPu>`Yn zoa^A)aGw+7a7}=HG~Kj=+Y#U{x2RIOgTUcGk%R9;Uo>Gq>Z*eKv=blS!?PJU$4qVh zHaa-Ie}Qq+s>Js#2Um-8`(e244vz18Vq9&N_?~ree6LLy?hOaW_XULEYG7bmZkq$# zEN~pI2_%#568jJbO-mF05{RFIKDrI<*0^x-of!bk&M$g zI8OcjCkMAEh);PgZXD`9OhN3P?+t82J6;WUbkLk|Q_&7wdkAi}gX`P}uEW7C+Xt@8 z!SOu@Vd-)k#$|&)a-U5Y?m7p@_Zo!ZZg+5f`@ntI!SOw1Ve$Rg!DaV><9nu54!&0* zEWVc=+`v9?T$mak-+K}k-vkFYv=7`7z^T3Py*z6|?4ZtxZyj*!LU64Pj_>gZ!zCQt z`hDQ~o&0S8ZUfSVs_X-{JXbmKodz7&BUBmt=9QYI4fnc(<9i{)aEFX3*}<**z#Zq{_+FZ@_|9-}eBVbH zZn=ZQU0tELOC8*%ec*0%aR0my+}9l3=6&F{J2<{aEKH8yI=C(S!2Q9&@x85K@r^;_ zuJv;3K5&OQIKGE3EWSDicke!M3mn|H_JLdK;P}2w_OIA(_0iwm4sJH$<9eh##_I2a zgBusr59PTyz9&%i!uM>lpI8ldr-QpGkfR#zyAJL<`@sF&!QHuBf;I6YL4)$m>Y)BuC@01d5Jlb*GvEwO~`}oc}eKda$Ik;`O*KXTs)p5UYaQuDXvGY8+~n|ucDHO7GMUZ-NJ91RX`=OWBqEQ0>3;6CBt z25`^xz{fq>R0Y@R;3i{IWOAD)ceGXJkMDC=Irux_4=ncN?z>9d^$xBc_j%Qy<;k61 zmAE?{9M4y*Y4_x=#Y)_R4sILnbKG_|%A<-Ld>_2#kH3q(XNf0w8CJ&kqJxv~RpG+1 ziB;lz+rjZYZxhe)_)<{H1X#=M1Q&-%rNc20e^VoKaPuA9 z#AQf#nJ0J5Dpcb;-@)N}NnDm!9anI0dw|;$g1gSa?K&TA^!c9L-CddPRtLB30+h!E z)p3tGIQ~x7=H;H;O{wu|6@A{p@%OOST!?lCL>++7ZizoR_Rjeem@eD^uH@i9zx#XQz!)=ucDzddj(2c-f!hn*4OMWR4({?E^yfX*aVs6%*j}{by`J0^ ztWj!te9pnG2W~xZYZQdPYNvNOxQTtRt3Hp09Gu3-_vEX*8-Uvof_vG)O-v%bq$l4_ z(I_=OjEQV~>w#Mzf~$3K2VIQ22`{c5-^U!>I^foY;1UjQ^a|MTit6#Lad7-Sv!M_i z->0v7;qQ*US%FhMf7!wD_tpn6DOyma;IHcCZU?sqxIMsStKfDzxaIx0^Rd4=?*BWu z9l-4X4#j65P51q{P*de-N~7P$L}@kLR0nq}aJPowS{xjIFK%?EdVJ?NxD;?H;NmuS zCB0ni;C2GH6S%G_xN99;Jrq};t&ZE|;MN1TJ_PrD2e%ivy}+T_w~y-Y=MJt7i!E)J zRLAXcaGQbK3>>;c`)GV)4=I%gu9YRqRmUCg;Fj^dw;{OG9o$ynwuaz(9o$&lYdSVx zp03*Sl@5--f7w-mQ#t<8!F>m~?*PZwtLmfiJ?h}bqhgFNz`s%u{%U+LI=DD+ap2mk z;Kq$F>F-|P?hV0x*ujm);?(G3_4pbbTqkgyA-F{jZWC~ufNQIgzdi@I7r4D4xSJf@ zsVi|0>q_|dRpPs&gd4vGxHTcT`%5_50o;xd+%pbt;wrS`tE#8_M+dhYxaA?Z4@@YP z2Y*j-QwVOlgX8ZY?y113y)1NaO#^7J2CC<;!@*q++~vS6sG>jL!EFO>TL|t`4sP@y z>}9Zed|z;I{5{4+z|D8kRXM)p;BEl!2H@s8IJNsH9NZ4zc7)(wc5nw>ivIG_>hZnd z;M#y|3&D-4DV5s|z}*mnJH)~50B#3x7`EC+<%l@AvA9=w>}Az)r#QF;z%2;DEpu=~ zzzv1qvJUP6;2sFUUFzWYJD9JB;BIno{5|TX%d5-rWe1l9E(_erRx2exY@37I0^Anh znjM_#?-ve^zni%`1oxtYn~eL_Cx6nDZ<=Y88sA$Et{u4c5Zpw}F{yvB2DmjLxJC!Z z-&y_+a5FSf{N*_K!5q7dZx3*LfNL}?`B&@5Vh2}?d+}?p@a!G~2C5t@99%na?IE~T z4sHmzp%C1S4sI)OTSIWSIk?{d_nQzL=2oq|)$KP?$^4$sCPT=aQlm~ymLUA+%z!2sw9Gs?mii0~5xD!Kg7dg0P zz%2{GUF_i20Jo+Br+QiK;I;y{wF0O4`>ca|3b?02aGM?6*wtvSR#%tz+YYV?xF+CE zpwgrH+u`84fa?NoS_x+D`FRJo4!Ct8xOW`fR^YaV;EtM9Dz{z0?Fzv)IXHao5ufm` zp1-9IZW?gYLU3sZ*A85J2<|fuj=vW?5Q4kI!SQ!?H-_Nub#U8(+a7{@)WPw0arcJc zo^)`BUxj(Dt1vHGrQH7D;7$eZ)DYa^hnC8t3%ITj+{q4Z4RC8JaHE1ebT~Nvp6=!f zoZ5ZD!SQ!;cZA>u92|fDc5evodI!hfwVk-8x?aBE;F^JJ2JRR~e=5gg4vxRuy)*>J z-wp8)o|jMxz!iX-?8G-Z`2D7XTMyj&5Zu(mO7U$0Zc7MmfrHx)-1ZRM3J13vxZNSR zs~sFZZ;y|~c=9bV6-D*3$-zwqZZdF(D+qr_2frV2a81B9h2Vbe;M#y|3&FkM;Nrl= zLvZ^eGg=<}J>ttNa4N^K4vxP&ya6~Ak$n_b@8Grow*@#fb@owtKjGlE0k8*m5N*h=;7UmV;H z;C6)Io^o)zfZJ7p)BOF}!R-cacLh%Ma@dija@z~s-U^(?H^afb3EZ0%IF0XY2RHT_ z_&L{<%d7Df9Na|UCWhdyad5T3)mGp%-J2ZTiNKu*9H!vy!)*#bUvhBGz%>Im*0AJX z&EJC#ZZ2?hLvX)xaEpLjRDsj{z3SlFfore8X}Sj=RVt5Vz%8r5X?zg}*9BZx2yT{x z>jSPY1b2pm%L11T!JX&e27ns~!Cma&hJYIi!CmU$)&aLJ1b4lITMyj&5Zvb-+|9t< z44mqW3t0914F`8CaJN?AG|c@DZX<9TLvXts+$P{Qh2UOvaGQbK9D;kp!CiSF+~*5D zn|D`^iEvi5zkGiI-?PH}q{`^x>Kxp4gGAS1-lrOFzJvSf<@g37<^`(Z&UbLfV7z(^ z#;etEmpQn%F&=yyR=elT5EhP!t8SULlF(MNIr1Mm}X*Z=?k diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.hex b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.hex deleted file mode 100644 index 0c5189c63..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.hex +++ /dev/null @@ -1,2507 +0,0 @@ -:020000040000fa -:10000000f07f0020857600001f7e0000ff7f00004b -:1000100000000000000000000000000000000000e0 -:10002000000000000000000000000000ab7c0000a9 -:100030000000000000000000ab7c000035860000de -:10004000ab7c0000ab7c0000ab7c0000ab7c000014 -:10005000097b0000ab7c0000ab7c0000ab7c0000a7 -:10006000ab7c000011630000ab7c0000ab7c0000a7 -:10007000ab7c0000ab7c0000ab7c0000ab7c0000e4 -:10008000ab7c0000ab7c0000cd7a0000ab7c0000b4 -:10009000ab7c0000ab7c0000ab7c0000ab7c0000c4 -:1000a000ab7c0000ab7c0000ab7c0000ab7c0000b4 -:020000040000fa -:1000b000f8b5c046f8bc08bc9e467047657600009f -:1000c000f8b5c046f8bc08bc9e4670473d760000b7 -:020000040000fa -:0800d000a84900000100000036 -:020000040000fa -:1000d800f0b5de4657464e464546e0b585b0039036 -:1000e8000e0001921c000eab1b789a460fab1b78d2 -:1000f8009b46c34b1a881b889bb2092b09d8002939 -:1001080007d0c04b1b68c04a934202d2bf4a9342f1 -:1001180003d2bf49bf4806f037fbbf4b1968002917 -:1001280006d00722b94808f06ffabb4b00221a60c4 -:10013800002008f0cdfab94b1b78012b00d14ee115 -:10014800012008f0c5faae4b1b889bb2082b00d9da -:10015800e0e2002008f0bcfaaa4b1d682800b04b6a -:100168001f687f1bbbb29946ae4b1b685b1b029393 -:100178004a46a14500d2221c92b2a9188c46aa4927 -:100188008c4500d962e1029b1b041b0c6246d21805 -:100198008a4200d98ee1a54b1b68984200d8c2e17b -:1001a800a34b1b68984202d89a4200d3bee1954bf4 -:1001b800614619609b4b1a603a04120c914b1b68fc -:1001c8009b18974a1360904aa846934200d3b2e11d -:1001d8008c4b1b684a46062a00d8b1e10722290041 -:1001e8009946180008f010fa012008f071fa4846fc -:1001f80007303a04120c073ae91d08f005fa032201 -:100208003100404608f000fa5346012b00d0a1e126 -:100218005b46002b00d11ee24346d81ca21ff11cee -:1002280008f0f2f94444e31e019a1a70a31e170a53 -:100238001f70013c5b4623705346002b2bd07d4b2f -:100248001b889bb2002b0bd07b4b1b686f4a9342d9 -:1002580002d36d4a934203d378496e4806f094fa64 -:10026800002008f035fa734b1b889b00724a9b5894 -:10027800002b03d07249674806f086fa6d4a138846 -:100288009b006d4940465850138801339bb2138038 -:10029800012008f01dfa664b012252421a60664b93 -:1002a8001c68002c2fd02500584b9c4202d3564b7b -:1002b8009c4204d33c21ff31564806f065fa514b65 -:1002c8001b68ab4200d3d4e1002008f001fa4d4b83 -:1002d8001e68a61b012008f0fbf9554b1a68494b0c -:1002e8001b689a4200d8d1e1002008f0f1f9504b80 -:1002f8001d68444b1b68ed1a012008f0e9f9ae426d -:1003080001d24b4b1c604f4b1c68002c2fd0250092 -:100318003e4b9c4202d33c4b9c4204d33c21ff31d0 -:100328003c4806f031fa374b1b68ab4200d3bbe1bf -:10033800002008f0cdf9334b1e68a61b012008f0f9 -:10034800c7f93b4b1a682f4b1b689a4200d8b8e193 -:10035800002008f0bdf9364b1d682a4b1b68ed1ac2 -:10036800012008f0b5f9ae4201d2314b1c60364b82 -:100378001c68002c00d1d5e12500244b9c4202d3f7 -:10038800214b9c4204d33c21ff31224806f0fcf962 -:100398001c4b1b68ab4200d3a1e1002008f098f980 -:1003a800184b1e68a61b012008f092f9204b1a680a -:1003b800144b1b689a4200d89ee1002008f088f987 -:1003c8001b4b1d680f4b1b68ed1a012008f080f9c4 -:1003d8000020ae4200d39ee1154b1c609be10f4b01 -:1003e80000221a700f4b1968064b186800f0b6f90e -:1003f800002800d1a4e6f721064806f0c5f99fe6d3 -:10040800aa13002064130020090d0020740b00209b -:1004180065050000b07e000060130020a90f0020d1 -:100428006c13002068130020080d002078130020aa -:1004380074130020a8130020201200209706000043 -:1004480099060000a8110020ac0f0020b84b1b68cb -:100458009846984201d88b4222d9b64b1b689c46d5 -:10046800984201d899421bd2029b1b04180cb24b2c -:1004780019188918434501d8414516d2634501d852 -:10048800614512d2d218ad4b1a603b041b0c9b1865 -:10049800ab490b601218ab4b1a60a74b984697e60e -:1004a800012008f015f9ff2035e1012008f010f9c6 -:1004b800ff2030e19e4a1268904690421ad99d4a20 -:1004c8001268904206d8944523d2404500d82be1c3 -:1004d800914219d29849cb18414501d843451dd2bc -:1004e800914201d8934219d2944a93491160954a8e -:1004f800136061e694450cd28e4a12689042e2d9a4 -:100508004045e7d84145e5d3012008f0e1f8ff2050 -:1005180001e1012008f0dcf8ff20fce0012008f0f0 -:10052800d7f8ff20f7e09a4200d239e6012008f018 -:10053800cff8ff20efe08449844806f025f947e624 -:100548003a04120c2900180008f05ef8012008f09f -:10055800bff854e6002008f0bbf87d4a11887d4baf -:10056800090159188c80118809014046c850118822 -:100578000901591803988860108851464d1ea941f1 -:10058800c9b200011b18197313889bb2002b0cd039 -:100598006f4a138801339bb2138013889bb2092bcf -:1005a80053d8012008f094f832e66a4b1d68002df4 -:1005b800eed02f00604b9d4202d3674b9d4204d37f -:1005c8003c21ff31614806f0dff85c4b1b68bb42f9 -:1005d8001fd2002008f07cf8584b1b68eb1a99468c -:1005e800012008f075f8534b1a68544b1b689a425f -:1005f8001dd9002008f06cf84e4b1a684f4b1f6845 -:10060800d71b012008f064f8b945c1d2494b1d60d9 -:10061800bee7002008f05cf8484b1a682b009633b8 -:10062800ff339b1a9946012008f052f8dbe70020b7 -:1006380008f04ef83f4b1b689633ff333f4a176864 -:10064800df1b012008f044f8dee7ce21c9003f484f -:1006580006f09af8a5e74346d81c621ff11c07f07c -:10066800d3ff4444a31e019a1a70013c170a27704d -:10067800e2e5002008f02cf8304b1b68260096367f -:10068800ff36f61a012008f023f826e6002008f0c5 -:100698001ff8284b1d689635ff35284b1b68ed1a47 -:1006a800012008f015f82ae6002008f011f8234b7d -:1006b8001b6826009636ff36f61a012008f008f85f -:1006c8003fe6002008f004f81a4b1d689635ff3500 -:1006d8001a4b1b68ed1a012007f0faff43e60020c9 -:1006e80007f0f6ff154b1b6826009636ff36f61afc -:1006f800012007f0edff59e6002007f0e9ff0d4b58 -:100708001d689635ff350d4b1b68ed1a012007f063 -:10071800dfff5de6ff2005b03cbc90469946a24647 -:10072800ab46f0bd0020f6e7414500d2d0e6ebe647 -:100738007813002074130020740b00206413002029 -:100748006c130020681300203d060000b07e0000f6 -:0c075800aa130020ac0f0020090d0020a7 -:020000040000fa -:10076400f8b5de4657464e464546e0b50e00d74b33 -:10077400994200d90be3d64b1b68050083420dd385 -:100784008b420bd8d24b00221a60d24b1a681379d1 -:10079400ff2b03d0013313716423d370ce4b1b683a -:1007a40000209d4200d9f3e2b34200d9f0e2c94be4 -:1007b4001b686422da70c94b9a469b4667e00020a6 -:1007c40007f088ffc64b1a6823009633ff339b1a41 -:1007d4009846012007f07effd1e0002007f07aff61 -:1007e400bd4b1f689637ff37bd4b1b68ff1a0120ae -:1007f40007f070ffd5e0002007f06cffb84b1a68d3 -:1008040023009633ff339b1a9846012007f062ffba -:10081400eae0002007f05effaf4b1f689637ff3712 -:10082400af4b1b68ff1a012007f054ffeee03c2198 -:10083400ff31ac4805f0aaffa94b1b68bb4200d3ab -:10084400f7e0002007f046ffa54b1b68e31a984623 -:10085400012007f03fffa04b1a68a14b1b689a4286 -:1008640000d8f4e0002007f035ff9b4b1f689c4b39 -:100874001b68ff1a012007f02dffb84501d2964be3 -:100884001c60944b1a681379ff2b00d0ede053469b -:100894001b68ab4200d256e25b461b68b34200d9e8 -:1008a40051e2914b1b889bb2002b00d14be28e4b43 -:1008b4001b889bb2002b04d08b4b1b889bb20a2b4a -:1008c40004d9e7218900874805f060ff864b1b881f -:1008d4009bb2002b17d00024804b9846824b99463c -:1008e400002007f0f7fe671ce400fb004444434487 -:1008f40006cb06c4012007f0edfebcb24b461b88b4 -:100904009bb29c42ecd3002007f0e4fe764b1b889c -:100914009bb2002b0dd0744a1388013b9bb2138009 -:1009240011886e4bc9000020c8501288d2009b1851 -:100934005860012007f0cefe674b012252421a6034 -:100944006a4b1c68002c30d02700694b9c4202d3b0 -:10095400684b9c4204d33c21ff31624805f016ffea -:100964005f4b1b68bb4200d329e7002007f0b2feaf -:100974005b4b1b68e31a9846012007f0abfe564b0d -:100984001a68574b1b689a4200d826e7002007f0e4 -:10099400a1fe514b1f68524b1b68ff1a012007f040 -:1009a40099feb84501d24c4b1c604c4b1c68002c82 -:1009b40030d027004e4b9c4202d34e4b9c4204d372 -:1009c4003c21ff31474805f0e1fe454b1b68bb4223 -:1009d40000d310e7002007f07dfe414b1b68e31aab -:1009e4009846012007f076fe3b4b1a683c4b1b6887 -:1009f4009a4200d80de7002007f06cfe364b1f68c2 -:100a0400374b1b68ff1a012007f064feb84501d27a -:100a1400314b1c60384b1c68002c00d131e7270097 -:100a2400334b9c4200d202e7324b9c4200d203e794 -:100a3400fde6002007f04efe294b1a68230096338a -:100a4400ff339b1a9846012007f044fe03e7002079 -:100a540007f040fe204b1f689637ff37204b1b687a -:100a6400ff1a012007f036fe07e7013313716423f0 -:100a7400d3700ce7002007f02dfe194b1a682300f1 -:100a84009633ff339b1a9b46012007f023fedce0dc -:100a9400002007f01ffe104b1b689633ff33104aeb -:100aa40012689b1a9a46012007f014fee0e0002029 -:100ab40007f010fe0a4b1a6823009633ff339b1a83 -:100ac4009b46012007f006fef5e0c046080d002015 -:100ad400781300207013002074130020a811002044 -:100ae40064130020b07e0000a61300202012002012 -:100af400740b0020090d0020ac0f0020002007f02b -:100b0400e9fda84b1b689633ff33a74a12689b1a6a -:100b14009a46012007f0defde0e03c21ff31a348c6 -:100b240005f034fea04b1b68534500d3e9e00020d8 -:100b340007f0d0fd9c4b1b68e31a9b46012007f08d -:100b4400c9fd984b1a68984b1b689a4200d8e6e096 -:100b5400002007f0bffd934b1b68934a12689b1a51 -:100b64009a46012007f0b6fdd34501d28d4b1c6097 -:100b74008f4b1a681379ff2b00d0dfe03b689d424e -:100b840000d9e5e0b34200d9e2e043461b889bb2ba -:100b9400002b00d1dce04b461b889bb20a2b04d807 -:100ba400844b1b889bb2002b04d1d32189007f483e -:100bb40005f0ecfd7f4b1b889bb2002b16d0002464 -:100bc4007d4b9a467b4b9b46012007f083fd00201a -:100bd40007f080fd631c9a0051465258a4006250ed -:100be4009cb25b461b889bb29c42edd3714a13882e -:100bf400013b9bb2138013886f4c9b0000221a5157 -:100c0400012007f067fd674b012252421a602468f5 -:100c1400002c31d0a246694b9c4202d3684b9c42c3 -:100c240004d33c21ff31614805f0b0fd5e4b1b68e5 -:100c3400534500d31ee7002007f04cfd5a4b1b68b8 -:100c4400e31a9b46012007f045fd564b1a68564ba4 -:100c54001b689a4200d81be7002007f03bfd514b6c -:100c64001b68514a12689b1a9a46012007f032fd0c -:100c7400d34501d24b4b1c60524b1c68002c31d025 -:100c8400a2464e4b9c4202d34d4b9c4204d33c2182 -:100c9400ff31464805f07afd434b1b68534500d3aa -:100ca40005e7002007f016fd3f4b1b68e31a9b463f -:100cb400012007f00ffd3b4b1a683b4b1b689a421f -:100cc40000d81be7002007f005fd364b1b68364aa9 -:100cd40012689b1a9a46012007f0fcfcd34501d206 -:100ce400304b1c60384b1c68002c00d140e7a246f6 -:100cf400324b9c4200d210e7314b9c4200d211e7a8 -:100d04000be7002007f0e6fc274b1a682300963314 -:100d1400ff339b1a9b46012007f0dcfc11e70020ff -:100d240007f0d8fc1f4b1b689633ff331e4a12682a -:100d34009b1a9a46012007f0cdfc15e70133137185 -:100d44006423d3701ae71c4f1a4b9846994615e74b -:100d54001d4c27001d4b9846154b99462368ab4202 -:100d64001cd33b68b3421bd843461b889bb2002b61 -:100d74000bd002f037fe4b461a681379ff2bedd0e7 -:100d8400013313716423d370e8e7002000e0ff20ef -:100d94003cbc90469946a246ab46f8bd0020f7e716 -:100da4000020f5e77413002064130020b07e0000d7 -:100db40070130020a813002020120020740b0020c0 -:100dc400090d0020a8110020ac0f0020aa13002058 -:020000040000fa -:100dd400f0b5de4657464e464546e0b5c9b000afcd -:100de40004000e0007f0aefc050007f06dfc8a233a -:100df40008229446bc44634400221a80b3780e321d -:100e04001a4215d133781b09727812011a432378d8 -:100e1400617809021943a3781b041943e3781b067c -:100e24000b4319785b781b020b439a4200d091e282 -:100e34003379043bdab2152a00d994e29300e44ae8 -:100e4400d3589f46b3781b09f0780001184305f086 -:100e5400dbfdff207fe27279b3791b02134342d09a -:100e64000020022b00d076e207f078f98a230822ca -:100e7400ba18d518f11d0222280007f0c7fb2b88e9 -:100e84009946012b00d187e0d24b1b880022002b0e -:100e940025d0d14dcf4b9a4613019b1a9b009b182a -:100ea400595d8846eb18597809028c4641466046dc -:100eb40001438846997809048c46414660460143bb -:100ec400db781b060b434946891889b21970090a55 -:100ed4005970013292b253461b889342dcd81900f0 -:100ee400484605f039ff90230822ba18d218823bed -:100ef400137193780f218b4301210b439370b178c5 -:100f04000909f3781b010b431b0110880f210140d1 -:100f14000b4313806b467b60ae4d2a880132162347 -:100f240053430733db08db006a46d31a9d46e84681 -:100f340007f010fc0100684607f07cfa2b88002bb0 -:100f440072d000250120a44b9b4616239a46a14b40 -:100f54009946461cb6b22901491b890049195944ce -:100f640053465843404406f025fa0135adb23000eb -:100f74004b461b88ab42ecd8162373439bb24246c4 -:100f8400902108208446bc446144200004f0c0ff42 -:100f94007b689d460020dee18a2308229446bc44f7 -:100fa4006344063a1a808b4b1b88002b37d00022ef -:100fb400002399468848874b9a4605e0013292b24d -:100fc40053461b8893422ad913019b1a9b009b18f2 -:100fd400195c8846c318597809028c46414665460f -:100fe40029438846997809048c4641466546294335 -:100ff400db781b060b4319788846597809028c461e -:101004004146654629430129d8d04946023189b26f -:101014001970090a597001239c46e144cee719006e -:10102400012005f099fe5ee70126a5e71623584343 -:10103400a84680447379b5792d021d43454407f0d1 -:1010440081fbdc239b009c46604485420fd84246ca -:101054003100200003f03afc03000020002b00dce8 -:1010640079e106f0c3fa06f0d9fe002073e19a2173 -:1010740049005a4805f08afbe9e77279b3791b0203 -:101084001343ff20002b00d065e113333b73bb7a7d -:101094000f229343bb72210030310c3a0f23f8180e -:1010a40007f0b4fa03237b730023bb73b2781209ed -:1010b400f3781b0113431b0139890f220a401343a0 -:1010c4003b810823f918200006f022fb002042e1ae -:1010d4007279b3791b021343ff20002b00d03ae14d -:1010e40014333b73bb7a0f229343bb720c3a3c49d3 -:1010f4000f23f81807f08afa03237b730023bb73ca -:10110400b2781209f3781b0113431b0139890f22aa -:101114000a4013433b810823f918200006f0f8fa2b -:10112400002018e17279b3791b021343ff20002bce -:1011340000d010e111333b73bb7a0f229343bb728f -:101144000c237b730023bb73b2781209f3781b0161 -:1011540013431b0139890f220a4013433b81214b5e -:101164001968214b1a68214b1b68f973080a3874f3 -:10117400080c7874090eb974fa74110a3975110cd3 -:101184007975120eba75fb751a0a3a761a02120e9e -:101194007a761b0ebb760823f918200006f0b8fafd -:1011a4000020d8e07279b3791b0213430020002b8e -:1011b40000d0d0e007f04cfa03000020012b00d946 -:1011c400c9e00b4b186803f0b3f80020c3e0c04635 -:1011d400a87100009c130020780e0020507e0000af -:1011e40094130020acf7ff1fb0f7ff1fb4f7ff1fe5 -:1011f400501300207279b3791b021343ff20002b94 -:1012040000d0a8e015333b73bb7a0f229343bb7223 -:1012140007237b730023bb73b2781209f3781b0195 -:1012240013431b0139890f220a4013433b814f4961 -:101234004f4b1a680a609b888b803723e35c8b7161 -:1012440007220f23f81807f0e1f90823f918200002 -:1012540006f05efa00207ee02500183510220021f9 -:10126400280007f005fa7279b3791b021343102b97 -:1012740003d9102272710022b271b31d31001631ec -:1012840002e00133994211d05a780a2af9d11a7826 -:101294000d2af6d10021200005f096fd2100083129 -:1012a4001022280007f0b2f9002054e07379b279d3 -:1012b40012021a43f37920218b43413b192be9d8bd -:1012c400002ae7d0f11d280007f0a0f9290020002a -:1012d40005f07afd00203ee07379b27912021a43d8 -:1012e400f11d8c250823fb18581907f08ff9b278e3 -:1012f4001209f3781b0113432e22a3541b0a013253 -:10130400a3541c490823fb185b19186802f0fafe61 -:1013140006f02cfe80b22c23e054000a0133e05482 -:1013240007f0def92823e054020a0133e2540302f1 -:101334001b0e2a22a354000e2b23e05400200ae0a3 -:10134400f07907f08df9002005e0300002f092fcfe -:10135400002000e0ff20bd4649b03cbc90469946c1 -:10136400a246ab46f0bdff20f5e7c046301300208f -:081374003813002000007a4448 -:020000040000fa -:10137c00a81200201c000000000000004c100020ef -:10138c007f000000000000003e130020020000005f -:10139c0000000000cb100020010000000000000045 -:1013ac00040000200008000000000000461300208c -:1013bc0002000000000000003713002001000000b4 -:1013cc0000000000c4120020040000000000000017 -:1013dc000a0d00200200000000000000481300204d -:1013ec0004000000000000004c130020040000006a -:1013fc000100000000a20000aa0f00200200000063 -:10140c000100000000080000e012002014000000a1 -:10141c000000000050130020040000000000000039 -:10142c0030130020070000000000000054130020bf -:10143c0004000000000000009813002002000000cf -:10144c00000000003813002006000000000000001f -:10145c00090d002001000000000000009a1300207c -:10146c000200000000000000f8110020280000001d -:10147c00000000009c13002002000000000000008f -:10148c00780e00203101000000000000f412002052 -:10149c001400000000000000941300200300000062 -:1014ac0001000000020000009e130020020000005a -:1014bc0000000000a013002002000000000000004b -:1014cc00040800207003000000000000c812002077 -:1014dc001800000000000000581300200400000059 -:1014ec000000000040130020060000000000000077 -:1014fc00a2130020020000000000000008130020ce -:10150c001000000000000000a413002002000000e6 -:10151c00000000005c13002004000000000000002c -:10152c0018130020100000000000000060130020c1 -:10153c000400000000000000641300200400000000 -:10154c0000000000681300200400000000000000f0 -:10155c006c1300200400000000000000a811002003 -:10156c005000000000000000a61300200200000044 -:10157c0000000000a90f0020010000000000000086 -:10158c00701300200400000000000000740b002009 -:10159c00950100000000000020120020280000002f -:1015ac0000000000a8130020020000000000000052 -:1015bc0074130020040000000000000097130020aa -:1015cc000100000000000000ac0f0020a000000093 -:1015dc0000000000aa130020020000000000000020 -:1015ec00781300200400000000000000b813002055 -:1015fc000100000000000000ac13002002000000fd -:10160c0000000000ae1300200200000000000000eb -:10161c00b01300200200000000000000b2130020f4 -:10162c000200000000000000b413002002000000c3 -:10163c00000000002813002008000000000000003b -:10164c007c1300200400000000000000cc100020df -:10165c007c00000000000000b61300200200000017 -:10166c0000000000b9130020010000000000000081 -:10167c00801300200400000000000000481200202d -:10168c002000000000000000681200202000000074 -:10169c000000000088120020200000000000000064 -:1016ac0084130020040000000100000048110020f9 -:1016bc004811002060000000010000000000000044 -:1016cc006812002088120020481200200000000040 -:1016dc0000000000000000000000000000000000fe -:1016ec0000000000000000000000000000000000ee -:1016fc0000000000000000000000000000000000de -:10170c0000000000000000000000000000000000cd -:10171c000000000000000000000000000c0d002084 -:10172c006c010000010000004300000000000000fc -:10173c00000000000000000000000000000000009d -:10174c00000000000000000043000000000000004a -:10175c00000000000000000000000000000000007d -:10176c00000000000000000043000000000000002a -:10177c00000000000000000000000000000000005d -:10178c00000000000000000043000000000000000a -:10179c00000000000000000000000000000000003d -:1017ac0000000000000000004300000000000000ea -:1017bc00000000000000000000000000000000001d -:1017cc0000000000000000004300000000000000ca -:1017dc0000000000000000000000000000000000fd -:1017ec0000000000000000004300000000000000aa -:1017fc0000000000000000000000000000000000dd -:10180c0000000000000000007d85000085830000c2 -:10181c0000000000145500003587000034870000dc -:10182c0034870000348700003487000034870000c0 -:10183c0034870000348700003487000034870000b0 -:10184c00ffffffffffffffffffffffffffff00009a -:10185c000100415343494900000000000000000012 -:10186c00000000000000000000000000000000006c -:10187c0000004153434949000000000000000000f3 -:10188c00000000000000000000000000000000004c -:10189c00000000008813002004000000000000007d -:1018ac008c13002004000000000000000000002049 -:1018bc000400000000000000901300200400000051 -:1018cc000000000000000000000000002222222284 -:020000040000fa -:1018dc0070b5bd4b1b78012b3ad0bc4b1b889bb20f -:1018ec000a2b46d0b94b1b889b00b94a9b58002b3e -:1018fc0003d0b849b84804f045ffb44b1b889bb2e1 -:10190c00002b0bd0b24b1b68b44a934202d3b44a9f -:10191c00934203d3b349b04804f034ffab4a138865 -:10192c009b00b1490868aa49585013889bb2002bf8 -:10193c0000d167e1a54a138801339bb21380ab4bee -:10194c001b689a1ed10700d5abe1a84b1a60abe11e -:10195c00a64b1968a44b1868fef7fefe002803d1ad -:10196c00994b00221a70b8e7a1499b4804f00aff72 -:10197c00f6e7964b1b889bb20a2b04d8934b1b881b -:10198c009bb2002b04d1d3218900934804f0fafeba -:10199c008e4b1b889bb2002b12d000248c4d8b4e8f -:1019ac00012006f093fe002006f090fe631c9a00c6 -:1019bc005259a40062519cb233889bb29c42efd323 -:1019cc00824a1388013b9bb213801388804c9b0086 -:1019dc0000221a51012006f079fe864b0122524258 -:1019ec001a602468002c2fd025007c4b9c4202d31b -:1019fc007b4b9c4204d33c21ff31774804f0c2fe60 -:101a0c00794b1b68ab4200d38de0002006f05efee4 -:101a1c00754b1e68a61b012006f058fe754b1a6804 -:101a2c00714b1b689a4200d88ae0002006f04efeeb -:101a3c00704b1d686c4b1b68ed1a012006f046febe -:101a4c00ae4201d26b4b1c606b4b1c68002c2dd032 -:101a5c002500624b9c4202d3614b9c4204d33c2137 -:101a6c00ff315d4804f08efe5f4b1b68ab4275d2b4 -:101a7c00002006f02bfe5c4b1e68a61b012006f016 -:101a8c0025fe5c4b1a68584b1b689a4273d9002090 -:101a9c0006f01cfe574b1d68534b1b68ed1a0120ba -:101aac0006f014feae4201d2524b1c60534b1c6824 -:101abc00002c2dd02500494b9c4202d3484b9c4214 -:101acc0004d33c21ff31444804f05cfe464b1b68b8 -:101adc00ab425ed2002006f0f9fd434b1e68a61bfc -:101aec00012006f0f3fd434b1a683f4b1b689a42ea -:101afc005cd9002006f0eafd3e4b1d683a4b1b6892 -:101b0c00ed1a012006f0e2fdae4201d2394b1c6009 -:101b1c003b4b1a681379ff2b00d1e3e601331371a9 -:101b2c0064231370dee6002006f0d0fd2e4b1b68fc -:101b3c0026009636ff36f61a012006f0c7fd6de733 -:101b4c00002006f0c3fd2b4b1d689635ff35264b48 -:101b5c001b68ed1a012006f0b9fd71e7002006f0b4 -:101b6c00b5fd214b1b6826009636ff36f61a012070 -:101b7c0006f0acfd85e7002006f0a8fd1d4b1d68a6 -:101b8c009635ff35184b1b68ed1a012006f09efdab -:101b9c0088e7002006f09afd134b1b68260096364a -:101bac00ff36f61a012006f091fd9ce7002006f0a6 -:101bbc008dfd104b1d689635ff350b4b1b68ed1ad0 -:101bcc00012006f083fd9fe7a90f0020a813002039 -:101bdc002012002052020000b07e0000740b002086 -:101bec00090d002053020000641300206c13002028 -:101bfc003702000074130020a8110020ac0f002045 -:101c0c00701300200c68002c00d193e62500314b9a -:101c1c009c4202d3304b9c4204d33c21ff312f48d1 -:101c2c0004f0b0fd2e4b1b68ab421fd2002006f017 -:101c3c004dfd2b4b1e68a61b012006f047fd294bc2 -:101c4c001a68274b1b689a421dd9002006f03efdee -:101c5c00244b1d68224b1b68ed1a012006f036fd43 -:101c6c00ae4200d366e61f4b1c6063e6002006f014 -:101c7c002dfd1b4b1b6826009636ff36f61a0120ed -:101c8c0006f024fddbe7002006f020fd154b1d6857 -:101c9c009635ff35124b1b68ed1a012006f016fd28 -:101cac00dee7013b104a13600f4b1b6809330f4ae8 -:101cbc0093420ad80c4b1b68094a136009330c4a2f -:101ccc0013600c4b01221a7070bd074b014a1a604d -:101cdc00f0e7c046740b0020090d0020b07e000018 -:101cec0064130020741300206c130020080d0020d6 -:081cfc0068130020a90f00206d -:020000040000fa -:101d0400f8b5ce46474680b507008846bb4b1b88ce -:101d14009bb20a2b30d0002006f0dcfcb74b1b88aa -:101d24009bb2092b00d963e1b44a1188b44bc900b2 -:101d34004046c8501188c9005b185f6013889bb285 -:101d4400002b00d170e1ad4c238801339bb223807a -:101d5400012006f0bffc2088642358430a2103f0c5 -:101d6400c3fac0b2a74b1b685a78824200d258709b -:101d74000cbc90469946f8bda04b1b889bb2002b27 -:101d840004d09e4b1b889bb20a2b04d9e7218900ff -:101d94009d4804f0fbfc994b1b889bb2002b16d08a -:101da4000024974e954b9946002006f093fc651c41 -:101db400e300ea00f318b21803ca03c3012006f0d3 -:101dc40089fcacb24b461b889bb29c42ecd30020ee -:101dd40006f080fc894b1b889bb2002b0dd0874af0 -:101de4001388013b9bb213801188854bc9000020e6 -:101df400c8501288d2009b185860012006f06afc73 -:101e0400824b012252421a60814b1c68002c2fd055 -:101e14002500804b9c4202d37f4b9c4204d33c213f -:101e2400ff31794804f0b2fc7c4b1b68ab4200d311 -:101e34008de0002006f04efc784b1e68a61b0120a6 -:101e440006f048fc714b1a68744b1b689a4200d820 -:101e54008ae0002006f03efc6c4b1d686f4b1b684b -:101e6400ed1a012006f036fcae4201d2674b1c602d -:101e7400634b1c68002c2dd02500664b9c4202d37a -:101e8400654b9c4204d33c21ff315f4804f07efc47 -:101e9400624b1b68ab4275d2002006f01bfc5f4b03 -:101ea4001e68a61b012006f015fc584b1a685b4bf4 -:101eb4001b689a4273d9002006f00cfc534b1d6832 -:101ec400564b1b68ed1a012006f004fcae4201d209 -:101ed4004e4b1c60524b1c68002c2dd025004d4be2 -:101ee4009c4202d34c4b9c4204d33c21ff314648d4 -:101ef40004f04cfc494b1b68ab425ed2002006f058 -:101f0400e9fb464b1e68a61b012006f0e3fb3f4b92 -:101f14001a68424b1b689a425cd9002006f0dafb2f -:101f24003a4b1d683d4b1b68ed1a012006f0d2fbad -:101f3400ae4201d2354b1c60324b1a681379ff2b29 -:101f440000d1e8e60133137164235370e3e6002003 -:101f540006f0c0fb314b1b6826009636ff36f61a96 -:101f6400012006f0b7fb6de7002006f0b3fb274b1a -:101f74001d689635ff35294b1b68ed1a012006f0c4 -:101f8400a9fb71e7002006f0a5fb244b1b68260083 -:101f94009636ff36f61a012006f09cfb85e70020f2 -:101fa40006f098fb194b1d689635ff351b4b1b68d3 -:101fb400ed1a012006f08efb88e7002006f08afb6c -:101fc400164b1b6826009636ff36f61a012006f0db -:101fd40081fb9ce7002006f07dfb0c4b1d689635c9 -:101fe400ff350e4b1b68ed1a012006f073fb9fe7cb -:101ff4000c49054804f0cafb96e6c046a613002027 -:10200400a811002070130020b07e0000741300207b -:1020140020120020740b0020090d002064130020fe -:10202400ac0f0020d6030000274b1c68002c00d105 -:1020340089e62500254b9c4202d3254b9c4204d3c0 -:102044003c21ff31234804f0a1fb234b1b68ab4226 -:102054001fd2002006f03efb1f4b1e68a61b01206a -:1020640006f038fb1d4b1a681b4b1b689a421dd99e -:10207400002006f02ffb194b1d68174b1b68ed1a47 -:10208400012006f027fbae4200d35ce6134b1c6034 -:1020940059e6002006f01efb0f4b1b6826009636ff -:1020a400ff36f61a012006f015fbdbe7002006f0e8 -:1020b40011fb0a4b1d689635ff35074b1b68ed1a5b -:1020c400012006f007fbdee7a8110020740b0020b6 -:1020d400090d0020b07e000064130020741300205a -:020000040000fa -:1020e400f0b59db00390029104921c00002805d025 -:1020f40083690593002b01d104f002ff984b029ae7 -:102104009a4262d1039b5b680293029b9b891b07e3 -:1021140069d5029b1b690593002b64d000220aab8e -:102124000f9220325a7610329a76049f3b78002b15 -:1021340001d0252b61d1049bfd1a0cd02b00049aed -:102144000299039805f050fb431c00d17de10f9bdd -:102154005d1904930f953b78002b00d175e10122a2 -:1021640000230aad52426a6006a9543252180a93f7 -:10217400eb60ab6013707b4b0137223304933978e7 -:102184000522049806f004fa7e1c002837d12a6838 -:10219400d30604d5532306a95b182021197013070d -:1021a40004d5532306a95b182b2119703b782a2bdd -:1021b4002ed03e0000210a20eb683278771c303a9a -:1021c400092a67d9002926d12ce0674b029a9a4242 -:1021d40002d1039b9b6897e7644b029a9a4294d17d -:1021e400039bdb6890e70299039803f0fdfb00284a -:1021f40094d0012040421db0f0bd013796e7049b06 -:102204002a68c01a0123834013432b603700b6e7c2 -:1022140008cc002b01dbeb6004e05b42eb600223a3 -:1022240013432b6033782e2b07d173782a2b39d1a3 -:1022340008cc0236002b32db6b604a4f31782837ea -:102244000322380006f0a4f9002806d04023c01b5e -:1022540083402a68013613432b60424f731c3800b5 -:102264003178532606222c300493297606f090f90f -:102274002b7e06aab618692b2bd038d8582b77d0ca -:1022840023d8002b00d1ede0522606aab6183370ed -:102294000123f5e0434301219b183e008de7012310 -:1022a4005b42c9e700230a201a0001366b603178cb -:1022b400771c3039092903d9002bbed06a60bce7ea -:1022c4004243012352183e00f1e7632b27d0642bcd -:1022d400dad1221d0a9b059224681a062cd5214fb7 -:1022e400002c02da2d23644233700a255ce0732b40 -:1022f40000d1b9e008d86f2b22d0702bc4d1202391 -:102304002a6813432b6003e0752b19d0782bbbd1bb -:10231400552306aa9b18782211371a702ce05226ee -:1023240006abf61808cc337001232b61532306aa9d -:102334009b1800221a706be05b06d0d524b2cee75e -:10234400211d0a9a05912468110605d5054f0a2511 -:102354006f2b24d1082522e05206f7d5a4b2f5e765 -:1023640068120020b87d0000881200204812002066 -:10237400552206a952181370221d0a9b059224683f -:102384001a0669d50122134202d01f3213430a935d -:102394001025002c03d120230a9a9a430a9253232e -:1023a40006aa9b1800221a700b9b0c93002b03dbcc -:1023b40004220a9991430a91002c05d1532206a9bb -:1023c40052181600002b0cd0532306aa9b181e008b -:1023d4002900200003f00ef87b5c013e3370a54217 -:1023e4003ed9082d0ed101220a9b13420ad00b9b21 -:1023f40006930e9b0793079a069b934202dc3023b5 -:10240400013e3370532306aa9b189b1b059c0e9315 -:10241400294b09aa00930aa9029b039803f042fce2 -:10242400431c12d00e9b32000299039805f0dcf98c -:10243400431c0ad00a9b05939b0735d4099a0d9b2c -:10244400934200da13005a1c30d1029b9b895b062d -:1024540000d5cee60f98cee65a0693d5a4b291e7fe -:102464000400b5e72b61d3e740cc6a680021300053 -:1024740006f08ef8002801d0801b68600b9b059342 -:102484000e9353e7292206a90123521803980299af -:1024940005f0aaf9431cd8d001350d9b099a059380 -:1024a4009b1a9d42eedbc9e70025f6e70f9ad31885 -:0c24b40005920f9339e6c046ed7700005a -:020000040000fa -:1024c000f0b5d6464f464646c0b5a6b00023259384 -:1024d000249306f007f9d44b1b68c01ad34b5b79e1 -:1024e00098420bd805f02efb00280fd002f034f8ec -:1024f0000024cf4b9a46cf4b994681e006f0f2f884 -:10250000c94b1b68c01ac94b5871ebe70022002168 -:1025100002f0def9eae700229fe00027a3e00027af -:10252000a1e0be21c44804f033f90fe038797b798b -:102530001b020343b87900040343f87900061843eb -:10254000434258414042c0b2002829d03b797a79b1 -:1025500012021a43bb791b041a43fb791b0613436f -:102560004cd024a9200000f01bfb002848d13b7967 -:102570007a7912021a43bb791b041a43fb791b06b2 -:1025800013432499380098473ae0501e8241504244 -:10259000c0b2d9e7013a501e82415042c0b2d3e7df -:1025a00024a9200000f0fcfa002829d12499380041 -:1025b000fef710fc002818d03b797a7912021a43f2 -:1025c000bb791b041a43fb791b06134311d03b79db -:1025d0007a7912021a43bb791b041a43fb791b0652 -:1025e00013432499380098470ae0249800f042ffea -:1025f00006e09121904804f0cbf8e8e70134a4b25a -:1026000025a9200004f03af8ff284ad0259f534618 -:102610001888002883d0874b1b689f4200d17ae737 -:1026200001218bb2984200d877e70a0001311301eb -:102630009b1a9b009b184d465e5db0464b445e78ee -:102640003602b446464665462e439d782d042e43f9 -:10265000db781b0633439f42e3d11701bf1abf004b -:10266000bf18744bff186b46d91d00230b7002aacc -:102670001380200005f0c4fd002812d102a920001b -:1026800005f0d4fc00280cd102ab1a886b46db792c -:10269000192b00d95ae76b46db799b006749cb5869 -:1026a0009f4606f02bf8624b1b88002b00d1c7e039 -:1026b0000025604e13e02b015b1b9b005b195d4afc -:1026c000944663442c331a785b781b02134330d151 -:1026d0000135adb2564b1b88ab4200d8b0e02f009d -:1026e0002b015b1b9b005b19995df3185a78120252 -:1026f00011439a7812040a43db781b0613431a78b5 -:102700005b781b021343d6d12b015b1b9b005a192c -:10271000484b9b181a002e32002111705170023a5a -:1027200011705170283300221a705a709a70da7042 -:10273000cee705f0d7ff2b015b1b9b005b193d4ae1 -:10274000944663441c0028342278617809021143be -:10275000a27812041143e27812060a43801a2c333d -:1027600019785b781b020b439842b1d302a96246e9 -:102770002801401b80004019835c9c461018437858 -:102780001b0262461343827812041343c278120676 -:102790001a4313789c4653781b02624613431b016d -:1027a0000a8894460f226446144023430b8003009a -:1027b0002e331c785b781b0223431b014c8822407c -:1027c00013434b80f0221340012213438b702a23c2 -:1027d0000b711d3b6b4400221a705a7003794279c9 -:1027e00012021a4383791b041a43c3791b0613434d -:1027f00007d02801401b800040190e4a801802a90a -:10280000984705f06fff3b01db1b9b00db19094f6d -:10281000ff1828373870030a7b7003021b0ebb7049 -:10282000000ef87054e7c0465413002038130020ff -:102830009c130020780e0020507e0000346e0000b3 -:1028400005f050ff034b186026b01cbc904699461b -:08285000a246f0bd5413002064 -:020000040000fa -:10285800f8b543025b0ada00de4693464a02520a9a -:10286800454690464e4657464446e0b54a0047001e -:102878003f0ee400120ea1469c463e00c50fc90f4c -:10288800bc1aff2a00d177e0012082465046414019 -:102898008d4200d180e0002c51dd002a00d073e089 -:1028a8004b46002b00d1dde0013c002c0fd0ff2f60 -:1028b80000d1a5e001231b2c09dc20224946121b6c -:1028c80091404b460a00e340511e8a4113435a4641 -:1028d800d31a5a0100d4c0e09b019c09200005f0de -:1028e80069f9230005388340864200ddc4e0861b71 -:1028f8001a0020200136f240861bb3405c1ea3411b -:10290800002613435a0704d00f221a40042a00d085 -:1029180004335a0100d4a3e00136f7b2ff2e00d1e8 -:10292800a7e09b015b0a5802ff05400aed07384300 -:1029380028433cbc90469946a246ab46f8bd002cbd -:102948004fd1fe247a1c144200d099e05a46002f39 -:1029580000d000e1002a00d1f1e04a46002ae2d086 -:102968004b465a46d31a5a0100d402e14b465a46fe -:102978000d009b1a0026c5e74846002800d183e7ca -:102988008d4251d0002cdaddff2f39d080234a4602 -:10299800db041a4391468de7002c45dd002a3ad026 -:1029a800ff2f2dd080234a46db041a43914601238a -:1029b8001b2c09dc20224946121b91404b460a0079 -:1029c800e340511e8a4113435b445a0145d5013601 -:1029d800ff2e4ed001226e491a405b080b4013436c -:1029e80090e7d41b0d00002f6fd15b46002b00d160 -:1029f8008fe0013c002c00d1c2e0ff2a6cd1c44614 -:102a08006346002b35d080236246db0313435b0209 -:102a18005b0aff2787e74b46002b23d0013c002c9d -:102a280074d0ff2fc3d1ebe7002c35d1fe227e1cda -:102a3800324200d089e05a46002f6dd1002a00d1d9 -:102a4800a3e04a46002a00d16de75b464b440026c6 -:102a58005a0102d54f4a013613405a0700d053e7ae -:102a6800db089c46ff2ecbd063465b025b0af7b2bd -:102a780059e7ff27002356e7464a361a134041e72d -:102a88004b465a46d41a63016fd4002c00d025e770 -:102a980000250027002346e7d11b002f2cd0ff2a52 -:102aa800add080235846db041843834601231b29f5 -:102ab80008dc5b4620245846cb40611a8840411efa -:102ac800884103434b4416007fe7ff2a97d08023b1 -:102ad8005946db0419438b4601231b2c08dc2021b3 -:102ae8005b465846e3400c1ba040411e8841034307 -:102af80049461600cb1aece65b46002b09d0013993 -:102b08000029dfd0ff2ad1d1c44679e75b464b4480 -:102b18005be7c4461600a5e7002a00d16fe74a46de -:102b2800002a00d16ce78022d203134200d167e764 -:102b38004346134200d063e70d00c44660e74b46a6 -:102b4800002b1ad00d004346ede6ff2e91d05b46d0 -:102b58004b445b0881e7002ae1d14b46002bebd1bf -:102b680080230025db03ff27dde64b460d009c1a7a -:102b7800b4e60026002b00d06fe700250023d2e63c -:102b88004b46594616005b1aa3e64346cbe6c046b9 -:082b9800ffffff7dfffffffbc3 -:020000040000fa -:102ba000f8b504000d00b34b1968002906d00722c0 -:102bb000b14805f02dfdaf4b00221a60002005f052 -:102bc0008bfdae4b1b78012b09d0012005f084fd55 -:102bd000ab4b1b889bb2ff20a34210d8f8bda74b7c -:102be00000221a70a74b1968a74b1868fdf7bafda9 -:102bf0000028ead0f721a54803f0cafde5e7e30085 -:102c0000a34a9b58a34a13602b609d4b1b889bb221 -:102c10009c4204d29a4b1b889bb20a2b04d9e72111 -:102c200089009a4803f0b4fd954b1b889bb2a342e0 -:102c300013d9974d924e002005f04efd671ce4001d -:102c4000fb002c19eb1806cb06c4012005f044fd4f -:102c5000bcb233889bb29c42edd3002005f03cfd12 -:102c6000874b1b889bb2002b0dd0854a1388013bf4 -:102c70009bb213801188864bc9000020c85012886f -:102c8000d2009b185860012005f026fd824b0122de -:102c900052421a60814b1c68002c2fd02500764bc5 -:102ca0009c4202d37e4b9c4204d33c21ff317748a7 -:102cb00003f06efd744b1b68ab4200d386e000202e -:102cc00005f00afd704b1e68a61b012005f004fdef -:102cd000714b1a686c4b1b689a4200d883e0002045 -:102ce00005f0fafc6c4b1d68674b1b68ed1a012060 -:102cf00005f0f2fcae4201d2674b1c60644b1c68cd -:102d0000002c2dd025005c4b9c4202d3644b9c428e -:102d100004d33c21ff315d4803f03afd5a4b1b6858 -:102d2000ab426ed2002005f0d7fc574b1e68a61ba5 -:102d3000012005f0d1fc584b1a68534b1b689a428e -:102d40006cd9002005f0c8fc534b1d684e4b1b6826 -:102d5000ed1a012005f0c0fcae4201d24e4b1c60c2 -:102d6000504b1c68002c00d181e02500424b9c4256 -:102d700002d34b4b9c4204d33c21ff31434803f028 -:102d800007fd414b1b68ab4256d2002005f0a4fc66 -:102d90003d4b1e68a61b012005f09efc3e4b1a68a9 -:102da000394b1b689a4254d9002005f095fc3a4be8 -:102db0001d68354b1b68ed1a012005f08dfc0020c5 -:102dc000ae4200d30ae7344b1c6007e7002005f051 -:102dd00083fc2d4b1b6826009636ff36f61a012021 -:102de00005f07afc74e7002005f076fc2a4b1d689c -:102df0009635ff35244b1b68ed1a012005f06cfc5d -:102e000078e7002005f068fc1f4b1b68260096360b -:102e1000ff36f61a012005f05ffc8ce7002005f074 -:102e20005bfc1d4b1d689635ff35174b1b68ed1a73 -:102e3000012005f051fc8fe7002005f04dfc124bfe -:102e40001b6826009636ff36f61a012005f044fc72 -:102e5000a4e7002005f040fc0f4b1d689635ff35b8 -:102e6000094b1b68ed1a012005f036fca7e700208e -:102e7000b4e6c04660130020740b0020a90f0020a8 -:102e8000a61300206813002064130020b07e000009 -:102e9000a8110020781300207413002020120020b5 -:082ea000090d0020ac0f002019 -:020000040000fa -:102ea800f8b50400ad4b1968002906d00722ac48d4 -:102eb80005f0aafba94b00221a60002005f008fcc7 -:102ec800a84b1b78012b09d0012005f001fca64b6b -:102ed8001b889bb2ff20002b10d1f8bda14b00220c -:102ee8001a70a24b1968a24b1868fdf737fc002826 -:102ef800ead0f7219f4803f047fce5e79e4b1b68a3 -:102f08002360974dab4202d39c4a934203d39c491a -:102f1800984803f039fc944b1b889bb20a2b04d8c1 -:102f2800914b1b889bb2002b04d1d3218900914877 -:102f380003f02afc8c4b1b889bb2002b12d0002478 -:102f48008d4e894f012005f0c3fb002005f0c0fb22 -:102f5800631c9a009259a400a2519cb23b889bb270 -:102f68009c42efd3804a1388013b9bb2138013889d -:102f7800814c9b0000221a51012005f0a9fb814bce -:102f8800012252421a602468002c2ed02600a54245 -:102f980002d87a4b9c4204d33c21ff31754803f098 -:102fa800f3fb734b1b68b34200d384e0002005f0a9 -:102fb8008ffb6f4b1f68e71b012005f089fb714be6 -:102fc8001a686b4b1b689a4200d881e0002005f014 -:102fd8007ffb6c4b1e68664b1b68f61a012005f0d8 -:102fe80077fbb74201d2674b1c60674b1c68002c0b -:102ff8002cd02600a54202d8604b9c4204d33c2129 -:10300800ff315c4803f0c0fb594b1b68b3426dd2db -:10301800002005f05dfb564b1f68e71b012005f0fb -:1030280057fb584b1a68524b1b689a426bd90020c1 -:1030380005f04efb534b1e684d4b1b68f61a0120da -:1030480005f046fbb74201d24e4b1c604f4b1c6843 -:10305800002c00d180e02600a54202d8474b9c42b4 -:1030680004d33c21ff31434803f08efb404b1b68df -:10307800b34256d2002005f02bfb3d4b1e68a61b21 -:10308800012005f025fb3f4b1a68394b1b689a4213 -:1030980054d9002005f01cfb3a4b1d68344b1b68c3 -:1030a800ed1a012005f014fb0020ae4200d314e70e -:1030b800344b1c6011e7002005f00afb2c4b1b6801 -:1030c80027009637ff37ff1a012005f001fb76e746 -:1030d800002005f0fdfa2b4b1e689636ff36244b70 -:1030e8001b68f61a012005f0f3fa7ae7002005f0cc -:1030f800effa1f4b1b6827009637ff37ff1a01208e -:1031080005f0e6fa8de7002005f0e2fa1d4b1e688f -:103118009636ff36164b1b68f61a012005f0d8faca -:1031280090e7002005f0d4fa114b1b68260096366c -:10313800ff36f61a012005f0cbfaa4e7002005f0c7 -:10314800c7fa104b1d689635ff35094b1b68ed1af9 -:10315800012005f0bdfaa7e70020bee660130020b5 -:10316800740b0020a90f0020a8130020681300206a -:1031780064130020b07e000020120020090d0020fa -:103188008103000074130020a8110020ac0f002058 -:020000040000fa -:10319800f8b5de4657464e464546e0b58346a94b48 -:1031a8001b889bb2002b04d0a64b1b889bb20a2b12 -:1031b80003d9a549a54803f0e7fa0025a14b99468c -:1031c800a34b9a4637e09f4b1b889bb2984219d273 -:1031d8002c009f4e9b4b9846002005f079fa671cff -:1031e8003b019a592401a251f3189b889bb23419c8 -:1031f800a380012005f06cfafcb243461b889bb201 -:10320800a342e9d8002005f063fa8e4b1b889bb2d5 -:10321800002b0dd08b4a1388013b9bb21380118879 -:103228008b4b09010020c850128812019b18988006 -:10323800012005f04dfaa8b24b461b889bb2984274 -:103248000cd22b01524699580a7812094b781b0167 -:1032580013435b45b7d00135edb2ece77d4b012256 -:1032680052421a607c4b1c68002c2fd025007b4be7 -:103278009c4202d37a4b9c4204d33c21ff317348d1 -:1032880003f082fa774b1b68ab4200d389e0002039 -:1032980005f01efa734b1e68a61b012005f018faec -:1032a8006c4b1a686f4b1b689a4200d886e0002066 -:1032b80005f00efa674b1d686a4b1b68ed1a012072 -:1032c80005f006faae4201d2624b1c60664b1c68e0 -:1032d800002c2ed02500614b9c4202d3604b9c42af -:1032e80004d33c21ff31594803f04efa5d4b1b686b -:1032f800ab4200d370e0002005f0eaf9594b1e6894 -:10330800a61b012005f0e4f9524b1a68554b1b68bf -:103318009a426ed9002005f0dbf94e4b1d68514bdf -:103328001b68ed1a012005f0d3f9ae4201d2494bd2 -:103338001c60474b1c68002c2dd02500474b9c4235 -:1033480002d3474b9c4204d33c21ff313f4803f052 -:103358001bfa444b1b68ab4259d2002005f0b8f960 -:10336800404b1e68a61b012005f0b2f9394b1a68bc -:103378003c4b1b689a4257d9002005f0a9f9354bf8 -:103388001d68384b1b68ed1a012005f0a1f9ae4203 -:1033980001d2304b1c603cbc90469946a246ab46d5 -:1033a800f8bd002005f094f92e4b1b6826009636d0 -:1033b800ff36f61a012005f08bf971e7002005f0b9 -:1033c80087f9244b1d689635ff35264b1b68ed1a87 -:1033d800012005f07df975e7002005f079f9214b0a -:1033e8001b6826009636ff36f61a012005f070f99c -:1033f8008ae7002005f06cf9164b1d689635ff35f5 -:10340800184b1b68ed1a012005f062f98de70020c2 -:1034180005f05ef9134b1b6826009636ff36f61a40 -:10342800012005f055f9a1e7002005f051f9094bf5 -:103438001d689635ff350b4b1b68ed1a012005f00a -:1034480047f9a4e7aa130020e2060000b07e0000b6 -:10345800ac0f00207413002020120020740b0020f1 -:0c346800090d002064130020a8110020b2 -:020000040000fa -:10347400f8b5de4657464e464546e0b5824600243a -:10348400a54b9846a54b994643461b889bb2a3423d -:1034940000d83be1e3004a469b58534502d001342f -:1034a400a4b2f1e79c4b1b889bb29c4204d29a4b7a -:1034b4001b889bb20a2b04d9e7218900984803f0a2 -:1034c40065f9954b1b889bb29c4216d22700934efc -:1034d400914b9b46002005f0fdf87d1cfb00ea00a3 -:1034e400f318b21803ca03c3012005f0f3f8afb20e -:1034f4005b461b889bb29f42ecd3002005f0eaf8a0 -:10350400854b1b889bb2002b0dd0834a1388013b4b -:103514009bb213801188814bc9000020c8501288c7 -:10352400d2009b185860012005f0d4f87d4b01228d -:1035340052421a607c4b1d68002d2fd02e007b4b0d -:103544009d4202d37a4b9d4204d33c21ff317448ff -:1035540003f01cf9774b1b68b34200d385e00020cd -:1035640005f0b8f8734b1f68ef1b012005f0b2f8a3 -:103574006c4b1a686f4b1b689a4200d882e000209b -:1035840005f0a8f8674b1e686a4b1b68f61a012001 -:1035940005f0a0f8b74201d2624b1d605f4b1d6875 -:1035a400002d2dd02e00614b9d4202d3604b9d42d5 -:1035b40004d33c21ff315a4803f0e8f85d4b1b6803 -:1035c400b3426dd2002005f085f85a4b1f68ef1bfb -:1035d400012005f07ff8534b1a68564b1b689a423a -:1035e4006bd9002005f076f84e4b1e68514b1b68d2 -:1035f400f61a012005f06ef8b74201d2494b1d605e -:103604004d4b1d68002d00d13ee72e00474b9d42d7 -:1036140002d3474b9d4204d33c21ff31404803f081 -:10362400b5f8444b1b68b34255d2002005f052f85c -:10363400404b1f68ef1b012005f04cf8394b1a680a -:103644003c4b1b689a4253d9002005f043f8354b94 -:103654001e68384b1b68f61a012005f03bf8b74288 -:1036640000d311e72f4b1d600ee7002005f032f860 -:10367400304b1b682f009637ff37ff1a012005f0e7 -:1036840029f875e7002005f025f8264b1e689636c4 -:10369400ff36284b1b68f61a012005f01bf879e762 -:1036a400002005f017f8234b1b682f009637ff37cf -:1036b400ff1a012005f00ef88de7002005f00af846 -:1036c400184b1e689636ff361a4b1b68f61a0120f3 -:1036d40005f000f890e7002004f0fcff154b1b6890 -:1036e4002f009637ff37ff1a012004f0f3ffa5e7f8 -:1036f400002004f0efff0b4b1e689636ff360d4b8f -:103704001b68f61a012004f0e5ffa8e73cbc9046cc -:103714009946a246ab46f8bda6130020a811002086 -:10372400b07e00007413002020120020740b0020cf -:0c373400090d002064130020ac0f0020e1 -:020000040000fa -:10374000f8b5ce46474680b5050083781b071b0faa -:10375000dab2062a26d89b00a04ad3589f46a04a30 -:103760006423d35a9bb20026002b00d1cde09146b2 -:1037700090466427b9e09a4a6423d35a9bb2002446 -:10378000002b0fd016006427e000001b40001e3005 -:1037900080192900fef7b6fa0134a4b2f35b9bb29c -:1037a000a342f1d80cbc90469946f8bd8c4a6423dc -:1037b000d35a9bb20024002b6cd01700160051e0a6 -:1037c000874a6423d35a9bb2002b24d0d38b9bb25d -:1037d000027812094178090111438b4239d0002344 -:1037e0007f4e6424370001339bb2325b92b29a421f -:1037f00011d91800da00d21a5200ba18d28b92b23c -:103800008a42f0d1c300181a40001e30744bc01811 -:103810002900fef777fa724a7423d35c002bc1d1da -:103820007633d25a92b2297809096b781b010b437f -:103830009a42b7d06a4a7623d35ad08b181a80b2ec -:10384000c300181a40001e3080182900fef75afaeb -:10385000a8e70020d6e70134a4b26423f35a9bb250 -:10386000a34217d9e3001b1b5b00fb181a8c92b212 -:10387000297809096b781b010b439342ebd1e000d7 -:10388000001b40001e30564b9c4660442900fef74a -:1038900039fae0e7524a7423d35c002b00d081e769 -:1038a0007633d25a92b2297809096b781b010b43ff -:1038b0009a4200d176e74a4a7623d35ad08b181a17 -:1038c00080b2c300181a40001e3080182900fef78d -:1038d00019fa67e729002000fef714fa0136b6b29c -:1038e0004346db5b9bb2b3420fd9f400a41b6400d8 -:1038f0001e344c442b781b096978090119432000b8 -:1039000004f01efb0028e9d0e4e7354a7423d35cb9 -:10391000002b00d046e77633d25a92b229780909b3 -:103920006b781b010b439a4200d13be72c4a76236c -:10393000d35ad08b181a80b2c300181a40001e3018 -:1039400080182900fef7def92ce702781209437887 -:103950001b01134325d0224a12881205120d9342ef -:1039600024d01f4a7423d35c002b00d01ae776338f -:10397000d25a92b2297809096b781b010b439a42fb -:1039800000d10fe716497623ca5ac88b121a92b291 -:10399000d000801a40001e3040182900fef7b2f90e -:1039a00000e701000f48fef7adf9fbe60c4a64237f -:1039b000d35a9bb2002bd4d0002416006427e00019 -:1039c000001b40001e3080192900fef79bf90134ce -:1039d000a4b2f35b9bb2a342f1d8c2e7c884000053 -:0839e000cc100020ea100020c9 -:020000040000fa -:1039e800f8b5994b1b889bb2002b04d0964b1b88cb -:1039f8009bb20a2b03d99549954802f0c5fe924b14 -:103a08001b889bb2002b17d00024924d8e4f0020ac -:103a180004f05efe661c33015a5924016251eb180a -:103a28009b889bb22c19a380012004f051fe3b888f -:103a38009bb234009e42eadb002004f049fe824b30 -:103a48001b889bb2002b0dd07f4a1388013b9bb289 -:103a5800138011887f4b09010020c8501288120179 -:103a68009b189880012004f033fe7b4b01225242c0 -:103a78001a607a4b1c68002c2fd02500784b9c428a -:103a880002d3784b9c4204d33c21ff31704802f0aa -:103a98007bfe754b1b68ab4200d384e0002004f02a -:103aa80017fe714b1e68a61b012004f011fe6a4b1d -:103ab8001a686d4b1b689a4200d881e0002004f018 -:103ac80007fe654b1d68684b1b68ed1a012004f062 -:103ad800fffdae4201d2604b1c60644b1c68002c99 -:103ae8002ed025005e4b9c4202d35e4b9c4204d3f1 -:103af8003c21ff31564802f047fe5b4b1b68ab4246 -:103b080000d36be0002004f0e3fd574b1e68a61bb2 -:103b1800012004f0ddfd504b1a68534b1b689a4294 -:103b280069d9002004f0d4fd4b4b1d684e4b1b682f -:103b3800ed1a012004f0ccfdae4201d2464b1c60c8 -:103b4800444b1c68002c2dd02500454b9c4202d3c9 -:103b5800444b9c4204d33c21ff313d4802f014fe03 -:103b6800414b1b68ab4254d2002004f0b1fd3e4be0 -:103b78001e68a61b012004f0abfd374b1a683a4bb0 -:103b88001b689a4252d9002004f0a2fd324b1d68ee -:103b9800354b1b68ed1a012004f09afdae4201d2a4 -:103ba8002d4b1c60f8bd002004f092fd2e4b1b68c5 -:103bb80026009636ff36f61a012004f089fd76e7ce -:103bc800002004f085fd244b1d689635ff35264bf3 -:103bd8001b68ed1a012004f07bfd7ae7002004f051 -:103be80077fd214b1b6826009636ff36f61a012012 -:103bf80004f06efd8fe7002004f06afd164b1d6887 -:103c08009635ff35184b1b68ed1a012004f060fd4e -:103c180092e7002004f05cfd134b1b6826009636e3 -:103c2800ff36f61a012004f053fda6e7002004f041 -:103c38004ffd094b1d689635ff350b4b1b68ed1a78 -:103c4800012004f045fda9e7aa130020a7060000fb -:103c5800b07e0000ac0f002074130020201200205a -:103c6800740b0020090d002064130020a811002007 -:020000040000fa -:103c7800f0b5d6464f464646c0b5a2b0c379082b24 -:103c880032d89b007e4ad3589f4682781209c3785f -:103c98001b0113437b4a13804379827912021a432a -:103ca800013a92b2784b1a80784c01000831200012 -:103cb80004f0aafc2368764a1360764a934203d834 -:103cc800102003f0fffc0fe0202003f0fbfc0be0ca -:103cd8006f4b1988a220000204f050f86e4b0022a6 -:103ce8001a70122003f0eefc22b01cbc90469946d4 -:103cf800a246f0bd82781209c3781b011343614aba -:103d080013804379847924021c43013ca4b25e4b9e -:103d18001c800100083122005c4804f075fc5f4bf0 -:103d28001d88ac4210d85e4f3e885e48301822008d -:103d3800564904f069fca6193e802c1b574b1c8081 -:103d4800132003f0bffccfe7554b98461888554e13 -:103d580080194e4f2a00390004f056fc80252d01a9 -:103d6800514c32002900206803f02ef923682a00fc -:103d7800ac4663442360ff21300004f077fc474dd4 -:103d88002c88414b1b8899461b1b9a46e1191a003f -:103d9800300004f039fc434652461a8080231b0148 -:103da8009c4664444b46e41a2c80c9e78278120981 -:103db800c3781b011343334a138043798279120273 -:103dc8001a43013a92b2304b1a80010008312f4849 -:103dd80004f01afc8021344b1868324a090103f0b8 -:103de800f3f8142003f06efc7ee702f0cdfd2f4bb4 -:103df800187017236a46137193780f229343012290 -:103e080013436a4693701f4b1a8812016b46198830 -:103e18000f230b4013436a4613806b4602225a71e4 -:103e280000229a7115236a46d371107269460020e0 -:103e380003f06cfc58e7184b01221a7054e704f0a1 -:103e48004dfc1b4b18601d001a4c04f047fc2b68f6 -:103e5800c01aa042f9d9104b1b78002b03d104f0eb -:103e680073fc022806d104f09cfba220000204f097 -:103e78009bf939e7002003f0ffff04f081f933e7ed -:103e88003c8300000a0d00203e1300204c10002047 -:103e9800c4120020fe5d030037130020aa0f002083 -:103ea80046130020040000204c130020cb100020f3 -:083eb80048130020e70300009d -:020000040000fa -:103ec000f0b583b004000078c0b204f06ffb854bfe -:103ed0001a88854b1b889a4241d344d9834a10687b -:103ee000c218d2790133c318dc7924021443804b01 -:103ef0001b88a34200d0b4e004f006fc002838d1af -:103f00007a4b1a6893781b071b0f012b59d09378b3 -:103f10001b071b0f062b00d172e0744b1b681a792c -:103f2000162a00d17be0714b1b681b79012b00d155 -:103f30007fe0704b1b88a34204d16f4b1b88002b82 -:103f400000d084e0fdf7cafc6b4b1b88002b00d12e -:103f500083e0013b684a1380664b1c8092e0644911 -:103f6000200004f035f85f4a13880133138003b052 -:103f7000f0bd5e4b1d686979ab791b0219430139ad -:103f800069180822684604f043fb5c4b1a685b68ba -:103f9000009e019f9f4211d801d196420ed8921bdc -:103fa000bb4156490a604b606879ab791b021843e4 -:103fb00001382818082204f02bfba1e70022002377 -:103fc000efe71178090953781b010b434c4868212e -:103fd000415ac9008b4200dc99e701006820085a69 -:103fe000c0001b1a013b9bb2d8080918663109783a -:103ff000c9b2072003401941cb0700d487e70be083 -:104000003f4b19880905090d1078000953781b01e9 -:104010000343994200d080e704f064fa7de7db793e -:10402000092b00d07fe7002003f02aff04f0acf852 -:1040300079e704f0d1f8324b00221a76032003f01e -:1040400061fc002004f00efb04f0c4fa1ae002f058 -:1040500021fc2b4b2b4a9a6089e7264b00221a80c1 -:1040600010e0274a137b10210b43137383781b073f -:104070001b0f012b0ad083781b071b0f062b22d0a6 -:1040800002f008fc1e4b1f4a9a6070e70278120982 -:1040900043781b0113431a4968228a5ad20093427b -:1040a000e9dd0a006821515ac9005b1a013b9bb245 -:1040b000d908521866321278d2b207210b401a4141 -:1040c000d307d8d50ae00e4b1a881205120d0178d5 -:1040d000090943781b010b439a42d1d104f002fa3b -:1040e000cee7c046ae130020b013002064130020ba -:1040f000ac130020b4130020b213002028130020ba -:08410000cc100020175600004e -:020000040000fa -:10410800f0b54f464646d64644024500c0b58846f7 -:10411800640a2d0ec70f002d49d0ff2d4fd08023e4 -:10412800e400db041c43002399469a467f3d43463e -:1041380042465e02d20f5b00760a1b0e904646d0be -:10414800ff2b12d080220020f600d2047f3b1643ba -:10415800ed186a1c434694464a467b400f2a00d90c -:1041680074e0704992008a589746ff35002e54d162 -:104178004a4602231a4391460220eae7434634009e -:1041880082465246022a2ad0032a00d1c3e0012ad5 -:1041980000d082e0002200246402d205600adb0716 -:1041a800104318431cbc90469946a246f0bd002c0b -:1041b80027d104239946033b00259a46b7e7002cec -:1041c80019d108239946063bff259a46afe7002eea -:1041d80008d14a4601231a4391460120b9e7ff2234 -:1041e8000024d9e7300003f0e5fc431f2d1a9e4058 -:1041f800763d0020ade70c239946093bff259a46fa -:1042080095e7200003f0d6fc7625431f9c40002349 -:104218006d422d1a99469a4689e74a4603231a435e -:104228009146032095e73b00abe780240023e40395 -:10423800ff22b1e78023db031c4245d01e4243d155 -:1042480033435c02640a4346ff22a5e7200c24049a -:10425800210c0f00320c3604360c77435143464389 -:10426800504389193a0c5218964203d980214902c1 -:10427800884640443f0411043f0cc9198c01661e4e -:10428800b441890e2143140c2418a4010c432201c3 -:104298003cd50122610814400c4360467f30002859 -:1042a8001add620704d00f222240042a00d0043409 -:1042b800220103d560461c4a80301440fe288edc5b -:1042c800a401640ac2b267e78020c0030443640201 -:1042d800640a3b00ff225fe70122101a1b2800dd59 -:1042e80058e762469e3221009440c140621e9441c4 -:1042f8000c43620704d00f222240042a00d0043461 -:10430800620105d4a401640a002245e7ac46c4e76b -:104318000122002440e78022d20314436402640a85 -:0c432800ff2239e74c7a0000fffffff78e -:020000040000fa -:10433400f0b5de4657464e464546e0b5abb00500ff -:10434400002004f0fbf928786b781b020343a8785b -:1043540000040343e8780006184300f02fff04002c -:1043640000220021002000f0b1fa03f0f7fe02f071 -:1043740045ff02ab0022da8084420fd9002c0dd015 -:10438400002398460f339a461d2702ab9c46674488 -:1043940002236a4613716d4b9b4699e002f05aff63 -:1043a400061e36d0012703e00137bfb2be4230d328 -:1043b400380003f055f803f0f3f8b842f4d03800ad -:1043c40003f04ef80100102204a804f01ff938008d -:1043d40003f046f8012103f019f802230193380091 -:1043e40003f03ef803f0dcf8b842ddd0380003f007 -:1043f40037f8102204a904f009f9380003f030f862 -:1044040001994b1cdbb29a4603f000f85346019322 -:10441400e5e704f01df903282ad008aa0e23137136 -:1044240093780f218b4306210b439370012c1fd9e2 -:104434000223984602271600444b994643461a0124 -:1044440031880f230b40134333804b461b881622bd -:1044540053439bb23e4a3100280001f059fd013715 -:10446400bfb2434601331b051b0d9846bc42e5d23f -:1044740004f0eef803281ad008ab1988102252422f -:104484000a431a809a780f218a4303210a439a70b7 -:1044940002221a711d2302aa9446634400221a7050 -:1044a4005a7008a9280003f033f90028f9d103f061 -:1044b400b5fc2bb03cbc90469946a246ab46f0bd39 -:1044c40002f09cfe844200d868e7444500d165e7c9 -:1044d400434601339bb2984608ae0d233371b3783b -:1044e4005246934306221343b370013003013088cc -:1044f40052461040184330806b461b793b700023b2 -:104504007b7002f0a7fe02ab991d013008800222e5 -:104514001f209c46604404f079f85b461b889bb2dc -:1045240099463100280003f0f3f804f0d9f80600a6 -:1045340004f0d6f8801b0e2800d92fe7fdf7beff44 -:10454400024b1b889bb29945f2d0b9e79e13002019 -:044554000408002037 -:020000040000fa -:10455800f0b5a5b06c4a6d23d35c002b05d100f0f3 -:104568008dfd00232393684db3e004f0b7f8664b44 -:104578001b6fc01a654b9842f1d9634b00226d211d -:104588005a541a6701395a54e9e77279b3791b0208 -:104598001343022b2dd0042b60d0002b00d098e0c1 -:1045a8005b490b8801339bb20b8001af00233b7141 -:1045b80009336b4402221a7000225a70b278120929 -:1045c800f3781b0113431b0138880f220240134361 -:1045d8003b80bb780f22934306221343bb70022211 -:1045e8000b20684404f010f83900200001f010f89e -:1045f8006fe0454b187f0736013040009c46604409 -:104608000222310004f000f8022231006b46981ca7 -:1046180003f0faff3c4b1b881b051b0d6a461380f1 -:1046280001af00233b7109336b4404221a70002246 -:104638005a703a880f2313403b80bb780f2293436c -:1046480006221343bb70042269460b20684403f01a -:10465800dbff3900200000f0dbff3ae02a4b1b8823 -:104668001b0517d1f11d0422684603f0cdff6b46e8 -:104678005a882b881205120d1b0b1b0313432b8022 -:104688002b7f6a4612885b00eb185a80200001f0e5 -:104698009ffd1ee01c4b1b881b0b1b031a4a138033 -:1046a800002001f0b3f8dde7174b00226d215a54c2 -:1046b8001a676c326c3999541fe003f07dffff28ac -:1046c800fbd0f11d042201a803f09eff019800f021 -:1046d8002bfc23a8fef7e4fb002812d1239e300010 -:1046e80001f0f6f904003379012bf2d0002b00d148 -:1046f8004be7022bd8d0032bdfd02398fff71cf809 -:10470800e7e725b0f0bdc046cc100020b80b00008c -:04471800b6130020b4 -:020000040000fa -:10471c00f0b5ce46474680b583b08046160001936f -:10472c00634b1f883c01e41ba400e419614b9946c0 -:10473c00e51888b202f0a6fc4b461855030a6b70bc -:10474c00030cab70000ee87042462a71120a6a71b3 -:10475c0042461202120eaa714246100ee8713178ce -:10476c00297200290cd0280008300123d9b2f25c40 -:10477c00c254002a04d00131c9b201330f2bf5d138 -:10478c004c4a3b01db1b9b00db19d3185918002347 -:10479c000b72230018339846904410220021404697 -:1047ac0003f062ff424b1b881801c018ff239b02c9 -:1047bc009c4660444246102103f03eff4346197864 -:1047cc0020230a009a431300413bdab21923934287 -:1047dc009b415b424a4251410b4343d1230030334e -:1047ec0034495b180022002018705a709a703b01f3 -:1047fc00db1b9b00df19c8190200303201ab1e789d -:10480c00167001325e78167001329b7813702a4b49 -:10481c00013213701e0a56701e0c96701b0ed3704c -:10482c007b5c427812021a4383781b041a43c378c8 -:10483c001b061343373464181a009c72230ad37274 -:10484c0023021b0e1373240e5473194a138801335d -:10485c009bb21380052b26d8280003b00cbc9046c5 -:10486c009946f0bd32783b01db1b9b00db191149eb -:10487c00cb181a76002a0cd0280018300123dab293 -:10488c00f15cc154002904d00132d2b201330f2b98 -:10489c00f5d13b01db1b9b00db190649cb189a18a1 -:1048ac00002313769ae70549054801f06bffd3e71f -:1048bc009c130020780e00203813002059020000b1 -:0448cc00507e00001a -:020000040000fa -:1048d000f8b5ce46474680b506000c009046002845 -:1048e00019d0002929d04346002b2bd0574b1988cb -:1048f000002900d1a3e0564b9e4200d17de0554aed -:10490000002301339bb2994221d010003d30b242c6 -:1049100020d00200f5e7504a0023136053609360f3 -:10492000d36013614d4a136053609360d360136189 -:104930004b4a1380012040425be04a494a4801f05b -:1049400027ffd0e74949484801f022ffcee7012080 -:1049500040424ee0464a934200d173e099469a00a5 -:104960003e495258002a06d19b006179a279120271 -:104970000a433a495a506279a3791b0213434a46c3 -:10498000920036495258934239d8354b1b88002b38 -:1049900006d0803b6179a27912020a43934233dc4c -:1049a0006279a3791b0213431f1c9bb2802b00d991 -:1049b0008027bfb2284e4b469d00ab594344180098 -:1049c000e11d3a0003f024feab599c466744af5109 -:1049d0006279a3791b021343214a13801f4beb58c2 -:1049e0009f421bd86279a3791b0213430020802bbe -:1049f0001ad90cbc90469946f8bd0023aee71d4974 -:104a0000194801f0c5fec0e74b469e000023124a3c -:104a1000b350134a138001204042eae7ce218900b7 -:104a2000114801f0b5fedde74b469e0000230a4a1f -:104a3000b3500b4a1380094ab058b350d9e701204c -:104a40004042d6e701204042d3e7c0469c130020f5 -:104a5000780e0020b50e0020e0120020f412002095 -:104a60009813002009030000507e00000a03000094 -:084a7000ffff00001903000024 -:020000040000fa -:104a7800f0b557464e464546de46e0b5040083b0dd -:104a88000d00924699468b4230d82dd04946504663 -:104a980003f058fd29000600200003f053fd331ae7 -:104aa8009846203b9b4633d45a4653469340424649 -:104ab8001f00534693401e00af423ad8af4200d180 -:104ac8007be05b46a41bbd41002b00da78e00022a6 -:104ad80000230092019301235a4693400193012336 -:104ae80042469340009328e08242cfd90022002317 -:104af800009201930c9b002b01d01c605d60009814 -:104b0800019903b03cbc90469946a246ab46f0bd1d -:104b1800424620239b1a5246da40414613004a4631 -:104b28008a40170042461f43534693401e00af4237 -:104b3800c4d900220023009201934346002bd9d008 -:104b4800fb079c46614672080a437b0846460ee00e -:104b5800ab4201d1a2420cd8a41a9d4101202419cc -:104b68006d410021013e24184d41002e06d0ab4274 -:104b7800eed9013e24196d41002ef8d10098019913 -:104b88005b4600196941002b25db2b005a46444639 -:104b9800d3402a00e2401c005b461500002b2bdbab -:104ba80026005f46be40330026004746be4032001e -:104bb800801a9941009001919ce7a342b9d880e7f7 -:104bc8004246202300219b1a0022009101920122d3 -:104bd800da40019283e7424620239b1a2a00464680 -:104be8009a402300f340444613432a00e2401c0045 -:104bf8005b461500002bd3da2023424626009b1a79 -:104c0800de402f00b4464646b74066463b00334375 -:044c1800cae7c046e1 -:020000040000fa -:104c1c0070b5010083781b071b0fdab2062a00d986 -:104c2c009de09b005f4ad3589f465f4a6423d35a4a -:104c3c009bb2002b55d003781b0940780001184318 -:104c4c00138c9bb2984200d18be00022564d642409 -:104c5c002e00013292b22b5b9bb2934241d9d3000e -:104c6c009b1a5b00f3181b8c9bb28342f1d1022080 -:104c7c0054e04d4a137b1020834313730a781209b6 -:104c8c004b781b01134348486822825ad200934246 -:104c9c0010dd02006820105ac000c0431b189bb2e4 -:104cac00d808121866321278d2b2072003401a4183 -:104cbc00d30711d43c4a7423d05cc0b2002852d123 -:104ccc000233d25a92b28c782409cb781b0123433d -:104cdc009a4223d0023021e0334a7823d05cc0b210 -:104cec001ce0314a7423d05cc0b200283dd10233a1 -:104cfc00d25a92b28c782409cb781b0123439a4266 -:104d0c000cd002300ae003781b09407800011843ec -:104d1c00264b9c46604443425841400070bd224a99 -:104d2c00137b1020834313730a7812094b781b01f1 -:104d3c0013431ed11c4b1b7f022b03d01a4b5b7fe2 -:104d4c00002b02d0184b1b8819e0174a7833d05c23 -:104d5c00c0b2e3e7144a7823d05cc0b2dee700208f -:104d6c00dce70220dae70020d8e70020d6e70020b5 -:104d7c00d4e70d4a12881205120d9342ead00a4a62 -:104d8c007423d05cc0b20028f1d10233d25a92b253 -:104d9c008c782409cb781b0123439a42bed0023075 -:104dac00bce7c046ac840000cc10002001f0ffff33 -:020000040000fa -:104dbc0070b584b00023039309336b440a226a4410 -:104dcc0003a901a801f03ef8002801d004b070bd81 -:104ddc0003f038fa0028f9d101998b7aca7a1202b9 -:104dec001a430b7b1b041a434b7b1b0613434a4a87 -:104dfc001278d2b21978914204d3474a1278d2b2bf -:104e0c00092a2bd9444a117819701378dbb2092b73 -:104e1c0024d9424b5b7e002b09d001990398027870 -:104e2c00120943781b0113430b721b0a4b720023ac -:104e3c00394a1370394a5376039a13781b09507800 -:104e4c0000011843fef7a2f909236b440a226a44b5 -:104e5c0003a901a800f0f6ffff28b7d0039a9178b8 -:104e6c000f230b40012b26d00124062b23d003f05b -:104e7c00e9f90028aad1294d2c7601232b7403f0d3 -:104e8c00cafb002003f022fc254bab60012003f091 -:104e9c001dfc039b6b61180003f030fc002803d051 -:104eac001d4b1b78002b15d00a236b4419880398d3 -:104ebc0001f03cf98ae709236b441b780224002b90 -:104ecc00d5d013781b09547824011c4363425c41f0 -:104edc000134cce7039802f011fa039e7379b4798c -:104eec0024021c4325000935adb2023d751902227e -:104efc002900684603f086fb6b461a88023ca0b278 -:104f0c003018092102f0aefe6b46991c0880022273 -:104f1c00280003f077fbc7e7b9130020cc10002062 -:044f2c00c15b000065 -:020000040000fa -:104f300070b505003f4b404a5a80404a136a04212d -:104f40000b4313623e4c23680226b3432360010bdc -:104f500000053c4a002302f059fd404280b2a08186 -:104f6000394b2360394b636023683343236022004d -:104f7000d369002bfcd1324b00249c7504229a7516 -:104f8000334bc22080001a5832491140c02212020d -:104f90000a431a50802292001a602900294800f022 -:104fa000a5f980b22c4b1880224b2c4a5a80234af8 -:104fb000116adb0c0b431362294b1c801a00d37b54 -:104fc0005bb2002bfbdb264a602313805c3b5371f2 -:104fd000214b198889b20b035b1a9b005b1a9b005b -:104fe000013b9bb213820020507301235373184b73 -:104ff000c424a4001a591b491140c02212040a43b8 -:105000001a518022d2021a600c4a536920210b43a4 -:105010005361154a154b5a631549996315495961ee -:105020003f2158541449596414491180144a1a8074 -:1050300070bdc046000c0040144000000004004059 -:1050400000080042006cdc02040112400002030070 -:1050500000e100e0ff00ffffa41300201b40000060 -:10506000002c0042ffff00ff081300200048004111 -:105070001813002081818181000280000904000052 -:04508000020f00001b -:020000040000fa -:1050840010b5424b1888642358430a2100f02cf9c8 -:10509400c0b23f4b1b681a78824200d218703d4b55 -:1050a4001888642358430a2100f01ef9c0b2384b13 -:1050b4001b689a78824200d29870002003f00afba1 -:1050c400354b1b685a1c46d0344a934202d3344aa7 -:1050d400934204d30821ff31324801f057fb2e4b91 -:1050e4001868314b1c68a0422ed9041b012003f020 -:1050f400f1fa6006001b80000019c000001b80004c -:105104002a4b9c4660449621ff3100f0edf8c0b272 -:105114001f4b1b68da78824200d2d870244b19687e -:10512400002906d007221d4803f070fa204b002204 -:105134001a60002003f0cefa1e4b1b78012b15d009 -:10514400012003f0c7fa10bd9630ff30041b012084 -:1051540003f0c0facde7184b18689630ff30124bb5 -:105164001c68041b012003f0b5fac2e7114b0022ae -:105174001a700d4b1968104b1868fbf7f1fa0028e8 -:10518400ded0f721074801f001fbd9e7a81300207e -:1051940070130020aa13002074130020740b002045 -:1051a400090d0020b07e000068130020349e00002a -:0c51b40060130020a90f002064130020ed -:020000040000fa -:1051c000f0b5de4657464e464546e0b5a3b006006c -:1051d000434a6c23d35cdbb20020012b78d8002536 -:1051e0006b465f1d0023984624e03d4c6d23012251 -:1051f000e25403f077fa20676c230222e254384a23 -:105200006c23d35c032b62d013881b0b1b0301217f -:105210000b4313800122334b1a8001233370002388 -:105220007370300000f0d8ffff2846d1042d48d815 -:105230000135edb26b461a8810235b4213436a4670 -:10524000138093780f229343032213436a4693708b -:105250000123137143463b707b700024204b9a4618 -:105260006c23994653464a469b5cdbb2012bc6d859 -:105270006946300000f0d0f903f0a2f90028fbd114 -:1052800000f0c8fa03f02efa834603f02bfa5b46cf -:10529000c01a0128f9d90134e4b203f0ebf8002870 -:1052a000e0d1052cded80e4a13881b0b1b0313809c -:1052b00003f090f9042ca2d897e70a4b188880b223 -:1052c00006e01c21ff31084801f062fab0e7002037 -:1052d00023b03cbc90469946a246ab46f0bdc046c2 -:0c52e000cc100020b61300205880000005 -:020000040000fa -:1052ec00002243088b4274d303098b425fd3030a19 -:1052fc008b4244d3030b8b4228d3030c8b420dd32c -:10530c00ff22090212ba030c8b4202d312120902b9 -:10531c0065d0030b8b4219d300e0090ac30b8b42f7 -:10532c0001d3cb03c01a5241830b8b4201d38b03a5 -:10533c00c01a5241430b8b4201d34b03c01a52414a -:10534c00030b8b4201d30b03c01a5241c30a8b428d -:10535c0001d3cb02c01a5241830a8b4201d38b0278 -:10536c00c01a5241430a8b4201d34b02c01a52411c -:10537c00030a8b4201d30b02c01a5241cdd2c3098e -:10538c008b4201d3cb01c01a524183098b4201d30a -:10539c008b01c01a524143098b4201d34b01c01af5 -:1053ac00524103098b4201d30b01c01a5241c3086d -:1053bc008b4201d3cb00c01a524183088b4201d3dc -:1053cc008b00c01a524143088b4201d34b00c01ac8 -:1053dc005241411a00d20146524110467047ffe734 -:1053ec0001b5002003f0d4f902bdc0460029f7d066 -:0453fc0076e7704799 -:020000040000fa -:10540000f7b58a8905000c0013075dd44b68002ba3 -:1054100004dc0b6c002b01dc0020febde76a002fd2 -:10542000fad000232e682b6080235b011a4034d011 -:10543000606da3895b0706d56368c01a636b002b98 -:1054400001d0236cc01a0200216a00232800e76af9 -:10545000b847a189431c06d12b681d2b31d82c4a93 -:10546000da40d3072dd50023636023692360cb0482 -:1054700005d5431c02d12b68002b00d16065616b00 -:105480002e600029c8d023004433994202d028005e -:1054900001f01cf800206063bfe70123216a2800a7 -:1054a000b847431cc5d12b68002bc2d01d2b01d09f -:1054b000162b01d12e60afe74023a2891343a381ad -:1054c000abe740230b43fae70f69002fa4d00b682a -:1054d0000f60db1b01930023920700d14b69a3608f -:1054e000019b002b00dc97e7019b3a00216a280012 -:1054f000a66ab047002806dc40230120a28940426a -:105500001343a38189e7019b3f181b1a0193e7e727 -:045510000100402036 -:020000040000fa -:10551400002020202020202020202828282828207f -:105524002020202020202020202020202020202077 -:1055340020881010101010101010101010101010df -:1055440010040404040404040404041010101010cf -:105554001010414141414141010101010101010199 -:1055640001010101010101010101010110101010eb -:10557400101042424242424202020202020202026b -:1055840002020202020202020202020210101010bf -:1055940020000000000000000000000000000000e7 -:1055a40000000000000000000000000000000000f7 -:1055b40000000000000000000000000000000000e7 -:1055c40000000000000000000000000000000000d7 -:1055d40000000000000000000000000000000000c7 -:1055e40000000000000000000000000000000000b7 -:1055f40000000000000000000000000000000000a7 -:105604000000000000000000000000000000000096 -:015614000095 -:020000040000fa -:025616007047db -:020000040000fa -:10561800f0b5c64600b584b005000c000b79292bff -:105628004dd823780f22934323702a786b781b0276 -:1056380013434bd01b051b0d0f221a401101a078f4 -:105648000f2202400a43a2701b09e3706379a27912 -:1056580012021a43161c92b2802a00d98026b6b2ca -:10566800330009339bb29846200003f049f8310013 -:10567800002800d14146023989b2234a200002f0ad -:10568800f3fa03902000fff7c5fa0700a2780f236a -:105698001340012b1fd00022062b1cd00192009032 -:1056a8004346039a21002800faf712fdff2802d08a -:1056b8000020012f24d104b004bc9046f0bd134a49 -:1056c8006c23d35c012bacd0ff20f4e70f4b1b8875 -:1056d8001b051b0db0e7002f05d02278120963784f -:1056e8001b01134305d1094a7823d35c0022022bfe -:1056f800d4d1064b1a7bd2b20a36b3b29846cde75c -:10570800fff758fb0020d6e7ffff0000cc10002071 -:020000040000fa -:1057180070b5354b354a5a8035498b694022134359 -:105728008b61344b4720002119541d5c40263543ba -:105738001d543930986058613a3819541c5c344308 -:105748001c549a605a6104329954985c042420438a -:10575800985410259d61123a985c0324204398546c -:1057680045201954195c0126012421431954995cd8 -:10577800302001439954204c082323706670a3708d -:105788000133e37026716371e279a3795b08d20172 -:105798009b181a4a944663441a78d2b21a700020a9 -:1057a80001f034f8e279a3795b08d2019b18134a17 -:1057b800944663441a78d2b21a70012001f026f890 -:1057c8000f4ac12189005358ff2083433f380343c0 -:1057d800535015600b4a137802210b4313700a4883 -:1057e800fff7a2fb70bdc046000c0040054000005a -:1057f80000040040004400414013002030440041b0 -:0c58080000e100e00018004040420f00ea -:020000040000fa -:1058140070b50400284a6423d35a9bb2002b0ed0df -:105824000022254900256420d3009b1a5b00cb1875 -:10583400dd830132d2b20b5a9bb29342f4d81f4b90 -:105844001f4a13601f4a136009331f4a136000255f -:105854001e4b1d80282200211d4802f009ff1d4b0c -:105864001d80502200211c4802f002ff1b4b1d80aa -:10587400a02200211a4802f0fbfe1a4b1d601a4bad -:105884001d601a4b012252421a600022184b1a70f2 -:10589400002c01d0174b1c6002f04afe064b762206 -:1058a40000219952753a74315a5404315a540022e1 -:1058b400114b1a7070bdc046cc100020740b002030 -:1058c400641300206c13002068130020a813002028 -:1058d40020120020a6130020a8110020aa130020e3 -:1058e400ac0f0020601300207813002074130020f4 -:0c58f400a90f0020701300209713002063 -:020000040000fa -:1059000010b504000078c0b202f050fe2f4a138890 -:1059100001339bb21380032b1bd0072b27d0012b05 -:1059200004d02b49200002f053fb10bd01f0def93a -:1059300008225242d31780185941264b18605960eb -:10594000254b09321a7400221a76214b013a1a802b -:10595000e7e7224b1868fff761f90028e1d1204bf7 -:10596000198800f0d1fe1c4b1e4a9a60dde7174be8 -:1059700000221a80184b1c4a9a60184b1b685a79ef -:10598000997909020a43802a11d85a799b791b0216 -:105990001343134a1380104b1b7b5b060dd4104b33 -:1059a00019880029bdd0012000f0aefeb9e70c4bec -:1059b00080221a8001f07cfcede7094b1988002059 -:1059c00000f0a2fe044b074a9a60aee7ae13002037 -:1059d000ac13002028130020cc10002064130020fa -:0c59e000b013002017560000c13e00006c -:020000040000fa -:1059ec00364b70b51d6806000c00002d05d0ab6958 -:1059fc00002b02d1280001f07ffa314b9c420fd1d1 -:105a0c006c680c23e25e93b219072dd4d90611d41d -:105a1c0009230120336037331343a381404270bd07 -:105a2c00284b9c4201d1ac68ebe7274b9c42e8d158 -:105a3c00ec68e6e75b0713d5616b002908d02300ff -:105a4c004433994202d0300000f03afd00236363e6 -:105a5c002422a3899343a3810023636023692360d9 -:105a6c000823a2891343a3812369002b0bd1a02106 -:105a7c008022a389890092000b40934203d021001d -:105a8c00300000f0d3fc0123a289134011d0002375 -:105a9c00a36063695b42a361002023698342bed18a -:105aac000c23e25e1306bad540231343a3810138bd -:105abc00b5e7920700d46369a360ede78413002077 -:0c5acc0068120020881200204812002000 -:020000040000fa -:105ad80070b583781b071b0fdab2062a03d89b0020 -:105ae800324ad3589f4600205ae0314a6423d35a99 -:105af8009bb2002b55d003781b0941780901194343 -:105b0800138c9bb2994246d00023150064241600da -:105b180001339bb22a5b92b29a423ed91800da004e -:105b2800d21a5200b218128c92b28a42f0d1c30033 -:105b3800181a40001e301e4bc01831e01c4a64235e -:105b4800d35a9bb2002b2ed003781b094178090148 -:105b58001943d38b9bb2994219d0002315006424b2 -:105b6800160001339bb22a5b92b29a4211d91800ef -:105b7800da00d21a5200b218d28b92b28a42f0d10d -:105b8800c300181a40001e30094bc01808e0002056 -:105b9800f6e7002004e00020c9e7002000e00548ff -:105ba80070bd0020fce70020fae7c04690840000a2 -:085bb800cc100020ea100020cf -:020000040000fa -:105bc000f8b50700304b5869304a11884b1c9bb21e -:105bd00013803a78d2b2415c914217d12a4a127ca2 -:105be000002a13d0284a127b52060fd4042b33d13b -:105bf000002002f005fa002001f062fe224b1b7e1d -:105c0000022b3cd0204b224a9a6029e01e4b0122f5 -:105c10005a76002001f04efc1c4b1b88012b0ed93c -:105c20000024194e194d736918782018c0b202f07b -:105c3000bdfc0134e4b22b88013b9c42f3db387895 -:105c4000c0b202f0b3fc104b114a9a6002221a76dd -:105c50000e4b1b88022b04d80e49380002f0b8f90d -:105c6000f8bd0d4b1868fef7d9ff0028f4d10b4b97 -:105c7000198800f049fd044b094a9a60f0e7024b8d -:105c8000084a9a60ece7c046cc100020ae13002012 -:105c900001590000ac13002064130020b013002051 -:085ca00017560000e17e000030 -:020000040000fa -:105ca800f7b5150001938a680b6900900c009342c0 -:105cb80000da130022002b6043321278002a01d048 -:105cc80001332b6023689b0602d52b6802332b60b7 -:105cd800062723681f4027d0230043331b785a1e0a -:105ce80093412268920630d42200019943320098e9 -:105cf800089eb047431c25d0062320682a68e1681f -:105d080003400025042b03d18d1aeb43db171d40fc -:105d1800a3682269934201dd9b1aed180027bd4252 -:105d280020d1002010e00137e3682a689b1abb42a3 -:105d3800d2dd22000123193201990098089eb0474c -:105d4800431cf0d101204042febd3020e118433110 -:105d5800087021005a1c45310978a21843320233d1 -:105d68001170c1e7220001231a3201990098089e98 -:0a5d7800b047431ce6d00137d1e725 -:020000040000fa -:025d8200704768 -:020000040000fa -:105d8400f8b505000e001400002804d08369002b28 -:105d940001d101f0b5f8294b9c4234d16c68a36958 -:105da400a360a3891b0738d52369002b35d00c23a6 -:105db400e25e80239b01f7b2f6b21a4236d0236822 -:105dc4002269981a6369834205dc2100280001f0e6 -:105dd400c5fa002827d1a3680130013ba3602368da -:105de4005a1c22601f706369834204d0a389db07b5 -:105df40007d50a2e05d12100280001f0affa0028aa -:105e040011d13000f8bd0e4b9c4201d1ac68c6e7fd -:105e14000c4b9c42c3d1ec68c1e721002800fff77a -:105e2400e3fd0028c3d001267642eae71343a381a9 -:105e3400226e054b13402366c1e7c046681200205a -:0c5e44008812002048120020ffdfffff42 -:020000040000fa -:105e5000f8b506000f0015001c00244b1b889bb2f0 -:105e6000092b1fd8224b1968002906d00722214888 -:105e700002f0cefb1e4b00221a60002002f02cfc28 -:105e80001d4b1b78012b12d0012002f025fc1b4b6f -:105e90001b78002b1bd1154b1b889bb2ff20002bbe -:105ea00018d1f8bd1649174800f072fcdae7124b1a -:105eb00000221a70144b1968144b1868faf752fc38 -:105ec0000028e1d0f7210f4800f062fcdce702f087 -:105ed00083f9e0e70e4b1a683a609a882a809a683c -:105ee00032601b7b23700020dbe7c046aa13002032 -:105ef00060130020740b0020a90f002097130020ce -:105f00000b070000b07e000068130020641300201f -:045f1000ac0f0020b2 -:020000040000fa -:105f1400f0b5de4657464e464546e0b583b00090a0 -:105f24000c0001929b46012399465b46802b08d9bd -:105f3400da09d1010123594500db00239bb29946bc -:105f4400914400239a460025f427ff3707e045448f -:105f5400adb2534601339bb29a4699452ad05b466b -:105f64005b1b80229046802b03dc5b465b1b9bb251 -:105f74009846e01d019b5919424602f047fb5b46d7 -:105f84005b1b9bb263711b0aa37102f0a9fb0600a1 -:105f94002100009801f0bcfbff28d8d1fcf78efa51 -:105fa40002f09efb801bb842f2d90649064800f075 -:105fb400edfbede703b03cbc90469946a246ab46e8 -:0c5fc400f0bdc046eb020000507e000063 -:020000040000fa -:105fd000f8b50323cd1c9d43083506000c2d1fd2b8 -:105fe0000c25a9421ed8300002f0e0fb25490a68c2 -:105ff0001400002c1ad1244f3b68002b04d121003f -:10600000300002f0d1f938602900300002f0ccf9fc -:10601000431c2ad10c233000336002f0c8fb03e09c -:10602000002ddeda0c2333600020f8bd23685b1bf3 -:1060300018d40b2b03d92360e418256003e06368b0 -:10604000a2420dd10b60300002f0b1fb200007220c -:106050000b30231d9043c21ae7d01b1aa350e4e76c -:106060005360f0e722006468c3e70323c41c9c4329 -:10607000a042e2d0211a300002f096f9431cdcd194 -:0c608000c8e7c046881300208c130020e5 -:020000040000fa -:10608c00f0b5c64600b582b0254b1b889bb2002be1 -:10609c0042d00024234f16263a0021490ce0db2184 -:1060ac0021484900103000f06dfb19e00134a4b216 -:1060bc000b889bb2a3422fd9019433006343db5d61 -:1060cc00012bf3d133006343d3185d789b781b020b -:1060dc002b438342ead1124b1b889bb2a342ded9dd -:1060ec0016277c430e4b98461a880e4ea019019d1c -:1060fc000135521b7a431634a11902f083fa434638 -:10610c001b88013b9bb24246138010887843801950 -:10611c001622002102f0a8fa02b004bc9046f0bd91 -:0c612c009e130020040800207c78000076 -:020000040000fa -:1061380070b504001d480122037e1342fcd04b1e9b -:106148009bb21b4a1380012917d81a4d1a482b886d -:10615800028a92b219015b1a18498c466344934229 -:10616800f5da012001f0a2f92278104b1a850222f3 -:106178009a75142001f0a0fb70bd114b1c600c4bec -:1061880000221a8064180f4b5c600f4a9a6059808d -:10619800012001f08bf90d4940228b5c022003435a -:1061a8008b543e3a014b9a75e3e7c046000800421b -:1061b800a2130020a4130020002c0042feff0000c0 -:1061c8005c13002008130020280800420048004102 -:020000040000fa -:1061d800f0b5a3b00400244d244e00f05bfe002867 -:1061e80040d10023237263726b469b780f2293433e -:1061f800062213436a46937012880f231340102215 -:1062080013436a461380002313716b4600225a71a8 -:106218009a7169462000fff7fbf902f0cdf9ff28d3 -:10622800fbd0227a637a1b0213430bd00e4a137fea -:106238005b00d318012149425980022313770023b8 -:106248005377cae702f04afa07006b7f002bc4d0e5 -:10625800fef77ef902f042fac01bb042f5d9ff20e2 -:1062680023b0f0bd0020fbe7cc100020b80b0000e5 -:020000040000fa -:10627800f0b5420046024d024c00c30f760a120eda -:106288006d0a240ec80fff2a1fd0ff2c10d0002a39 -:106298001fd171427141002c01d1002d1ed000295f -:1062a8000ed183421ed00221581e08400138f0bd8d -:1062b800002d26d1002af4d1714271410029f0d075 -:1062c8000028f4d101204042f1e7002e19d1ff2c1b -:1062d800eed0002ce5d1002de3d1e4e70020002e1c -:1062e800e5d0e0e7a24205dceadbae4202d8e7d31c -:1062f8000020dce741424141484202210840013880 -:08630800d5e702204042d2e774 -:020000040000fa -:1063100000b583b0142001f0d3fa1f4b1b7e5b073e -:1063200016d51d4b9b7d5b0712d51b4b1b8d6a46fb -:10633000d01d0370194b9b689847194b1b889bb263 -:10634000002b0ed1144b07225a8301321a7615e026 -:10635000114b5b8b9b0704d5104a137b40210b43e9 -:1063600013730d4b1b7e9b0703d50b4b9b7d9b072c -:1063700006d4094b07225a8301321a7603b000bdb6 -:10638000002001f097f8012001f03afe024b0222b2 -:106390001a761a75ede7c04600080042cc100020be -:0463a000a213002024 -:020000040000fa -:1063a400f0b5420046024d024c00c30f760a120ead -:1063b4006d0a240ec80fff2a0dd0ff2c0fd0002a1f -:1063c40023d171427141002c0fd1002d0dd1002039 -:1063d400002e14d00de0002e10d1ff2c15d1002d6d -:1063e4000cd1002a03d171427141002908d18342a2 -:1063f40010d00221581e0840013800e00220f0bdf0 -:106404000028fcd101204042f9e7002cefd1002df7 -:10641400edd1eee7a24205dcf2dbae4202d8efd3c7 -:106424000020ece741424141484202210840013842 -:04643400e5e7c04692 -:020000040000fa -:10643800f7b502268b8905000c00334206d00b0005 -:1064480047330b600b6101234b61f7bd01ab6a4613 -:1064580001f07cf8009907002800fff7b5fd002837 -:106468000ed10c22a35e9a05efd4032293431e4358 -:1064780023004733236023610123a6816361e4e796 -:106488000f4bab628023a28920601343a381009b3a -:1064980020616361019b002b0dd00e23e15e280073 -:1064a80001f0b4ff002806d00322a38993431a0001 -:1064b80001231343a381a0893843a081c5e7c046bf -:0464c80085860000c5 -:020000040000fa -:1064cc0070b50500002910d00c1f2368002b00dad2 -:1064dc00e418280002f064f91d4a1368002b05d15a -:1064ec0063601460280002f05cf970bda34209d906 -:1064fc00216860188342f3d118685b6841182160e9 -:10650c00eee713005a68002a01d0a242f9d91968a3 -:10651c005818a0420bd120680918581819608242eb -:10652c00e0d110685268411819605a60dae7a0424d -:10653c0002d90c232b60d5e721686018824203d165 -:10654c00106852684118216062605c60cae7c046fe -:04655c008813002080 -:020000040000fa -:10656000f0b5c6461f4a204b00b50021934203d226 -:10657000197001339342fbd10b231c4a9c46083b04 -:1065800098461368546819000026214311d017005b -:1065900091680c3700290fd11a19002c03d01e70f6 -:1065a00001339342fbd13a00136854681900214328 -:1065b000edd104bc9046f0bd6146c91a1d195118b1 -:1065c000002c05d05a1c505c187013009542f9d16c -:1065d000434623405a1e9341a4081c19a4003f19a6 -:1065e0003a00e1e704000020000000207c130000d6 -:020000040000fa -:1065f000f0b5194ca54405000f0016000400ff215a -:106600008022d2008902684602f002f8134bff2272 -:106610005202da61124a1a801249d9611a8012496b -:10662000d9611a801149d9611a80114be818684460 -:106630003a00310001f0ecff6a4628004030117842 -:1066400002c401328442fad16d08044bdd61094a6b -:106650001a80094b9d44f0bdfcfbffff0040004148 -:1066600002a5ffff80fe010000ff010080ff010086 -:0c66700000fcfbff04a5ffff0404000079 -:020000040000fa -:10667c0070b504000d00194b1968002906d00722cb -:10668c00174801f0bfff154b00221a60002002f0e2 -:10669c001df8144b1b78012b09d0012002f016f8c1 -:1066ac00114b1b889bb2ff20a34210d870bd0d4b21 -:1066bc0000221a700d4b19680d4b1868faf74cf83c -:1066cc000028ead0f7210b4800f05cf8e5e7e4007d -:1066dc00094b1c1963682b600020e7e7601300204e -:1066ec00740b0020a90f0020a613002068130020b3 -:0c66fc0064130020b07e0000a8110020f4 -:020000040000fa -:10670800012804d0174b1a68174b1a607047154bad -:106718001b6809315818154a90421ad8114b1b6842 -:106728005918134a1160134a126893420dd89142be -:106738000bd3104b00221a600f4b1a681379ff2bea -:1067480003d0013313716423d3700c4b01221a70e8 -:10675800dce70b4a13600b4b024a13600733024a0b -:106768001360dbe7641300206c130020080d002081 -:10677800681300207813002070130020a90f002050 -:0867880060130020740b0020d7 -:020000040000fa -:1067900010b5a4b00400019101f01cff0020fff728 -:1067a00039f802ab9a780f218a4303210a439a7081 -:1067b0001988102252420a431a8004221a712000ba -:1067c00001f077ff031d0d226a449bb213701b0a70 -:1067d0005370042201a90f20684401f019ff200022 -:1067e00001f067ff020021001320684401f010ff50 -:1067f00002a9002000f08eff0028f9d101992000a5 -:1068000001f08bfe01f0dcfeff28fbd0002001f040 -:0468100063fffee73d -:020000040000fa -:1068140030b51c49430018180c186278405cd2014a -:10682400194b9c466244131840330021197019789f -:106834000125294319701978042529431970012366 -:1068440083405361a478072c16d8a00000239b0032 -:106854000e4a944663449a69072181408a439a61a7 -:106864009d69012211008140294399611300a340cd -:1068740062461361d36030bd2000083880000123d4 -:10688400e5e7c046401300200044004100180040e2 -:020000040000fa -:1068940010b5174b1b78012b0fd0164b1b68164aeb -:1068a40013600933154a1360154a934216d2154be7 -:1068b400104a12689a4217d010bd0d4b00221a706c -:1068c4000d4b19680b4b1868f9f74aff0028e4d000 -:1068d400d02149000c48fff759ffdee7b821ff310a -:1068e4000948fff753ffe2e7084b00221a60e3e789 -:1068f400a90f0020641300206c13002068130020eb -:10690400090d0020740b0020b07e000060130020ed -:020000040000fa -:10691400194b00229a619a8c80218a439a841a0026 -:106924001023d1680b42fcd0144b1a68920e3f2af4 -:106934001fd0134b1b689b059b0d920213430e4af9 -:1069440093621023d1680b42fcd00b4b02229a8431 -:106954001a001023d1680b42fcd00a4b0a4a5a6031 -:106964001a0053785bb2002bfbdb034b00221a6244 -:106974007047203adde7c0460008004024608000ec -:0c69840028608000000c004000070100ab -:020000040000fa -:10699000f0b5d64600b584b0002302aad37102aa8e -:1069a00093710632184b1b68002b27d0a2252d02ad -:1069b0000027154e019215e0e3005246da4013001d -:1069c00002aa9371072202abd91d019801f00efab9 -:1069d0000137631cdbb2032b08d904350a4b1b6853 -:1069e000bb420bd92b689a46002400e0013433687f -:1069f000bb42e1d8631cdbb2032bf7d902abd879d9 -:0c6a000004b004bc9246f0bdc41200209b -:020000040000fa -:106a0c00f8b51c4b1b889bb2002b31d000231a4dc0 -:106a1c0016240f27174e05e001339bb2328892b231 -:106a2c009a4225d922005a43525d022af4d12200ff -:106a3c005a4311498c466244517892783a4012027a -:106a4c000a438242e8d101339bb216225a43614673 -:106a5c00525c012a0cd1654616265e438c1962786d -:106a6c00a07800021043fff70bfb725d012af6d0f1 -:0c6a7c00f8bdc0469e1300200408002056 -:020000040000fa -:106a880030b51b49430018180c186278405cd201d5 -:106a9800184b9c466244131840330021197019782a -:106aa80001252943197019780425294319700123f0 -:106ab80083405361a178072915d8880000239b00db -:106ac8000d4a944663449a6907248440a2439a6114 -:106ad8009c690222824022439a6101238b406246cc -:106ae8001361d36030bd0800083880000123e6e751 -:0c6af80040130020004400410018004042 -:020000040000fa -:106b0400f0b5c64600b51a4e430018183518ab78d0 -:106b1400012422009a40174b9a601a616a78875db3 -:106b2400d201154b9c4662449046d3194033002150 -:106b34001970197802229446624611431970197823 -:106b4400042294466246114319702300bb40424616 -:106b54005360815d6b788c40db01074a9446634443 -:106b64005c611b6acb400120184004bc9046f0bd18 -:0c6b7400401300200018004000440041c5 -:020000040000fa -:106b8000f8b51c4b07001e68b369002b02d130001a -:106b900000f0b8f94836b4687368013b04d533682f -:106ba000002b1cd03668f6e70c22a55e002d14d110 -:106bb0002000114b256625606560a560e3602561b6 -:106bc0006561a56108222900583001f053fd656315 -:106bd000a563a564e5642000f8bd6434dde7042105 -:106be000380001f04ffa041e3060dbd10c233b600b -:0c6bf000f1e7c046a08700000100ffff95 -:020000040000fa -:106bfc00f0b585b001900e00140001f045fd0128a0 -:106c0c000bd1731efe2b08d8050002ab1e7100279a -:106c1c00af4212d1300005b0f0bd23003200583322 -:106c2c0003a9019801f054fa0500431cefd140234d -:106c3c00a2891343a3810600ece703abd95da368db -:106c4c00013ba360002b04daa269934207db0a29fb -:106c5c0005d023685a1c226019700137d8e722002e -:0c6c6c000198fff789f8431cf7d1e4e71a -:020000040000fa -:106c78008446081c6146ffe71fb5fff78ffb002815 -:106c880001d40021c8421fbd10b500f037fc4042b6 -:106c9800013010bd10b5fff781fb002801db002093 -:106ca80010bd012010bdc04610b5fff777fb0028c6 -:106cb80001dd002010bd012010bdc04610b5fff752 -:106cc800d7fa002801dc002010bd012010bdc04605 -:106cd80010b5fff7cdfa002801da002010bd012019 -:046ce80010bdc046d5 -:020000040000fa -:106cec00f0b5184b5e689b68f61ab3009e19b60097 -:106cfc00154b1e60154a12680025140019695a6953 -:106d0c00641a95419c60dd60e30e690119436001d2 -:106d1c00001ba941c70d4b023b43420212196b41a8 -:106d2c0010001900970e8b013b438201121a8b4104 -:106d3c0010001900001969410023320080185941d4 -:106d4c00f0bdc04610e000e0c8120020581300202f -:020000040000fa -:106d5c00f0b5ce46474680b5421ed41707232340d4 -:106d6c009b18db109bb2154c6822a352002921d032 -:106d7c0000226827072399460125e35bdb00db43f0 -:106d8c00c318d3189bb2de08b446a4446626b0469a -:106d9c00c44466463678b0464e4633402e009e407c -:106dac00330046463343dbb266463370013292b24f -:106dbc009142e2d10cbc90469946f0bdcc1000201b -:020000040000fa -:106dcc0070b5154b1d88002d21d0144b98421cd04a -:106ddc00134c002301339bb29d4205d022003d325f -:106dec00844203d01400f5e7ff200de00d4a9342d6 -:106dfc000fd01801c018ff239b029c4660440a0068 -:106e0c001021fff7effb002070bd0023f1e7ff20fe -:106e1c00fae7ff20f8e7c0469c130020780e00200c -:086e2c00b50e0020ffff00007d -:020000040000fa -:106e340022250000222500004c2500002225000008 -:106e44002c2500004c2500004c2500004c2500009a -:106e54004c2500004c2500004c2500004c2500006a -:106e64004c25000048250000482500004825000066 -:106e7400482500008a250000482500008a250000d6 -:106e84008a2500008a250000482500004c250000c2 -:086e94004c25000094250000cc -:020000040000fa -:106e9c0010b5184b1b7f022b0dd0164b5b889bb289 -:106eac00002b0fd0134b9b889bb2002b14d001f0fe -:106ebc00b5f9ff2010bd0f4b1b881b051b0d012bbb -:106ecc00f5d1eae7002000f0adf800280ed1094b0f -:106edc00012252425a80e5e7012000f0a3f8002875 -:106eec0006d1044b012252429a80e0e70020e1e7f0 -:086efc000020dfe7cc100020ac -:020000040000fa -:106f0400836913b50400002b28d18364c36403652b -:106f1400134b144a1b6882620193984201d10123e6 -:106f240083612000fff72afe60602000fff726fe41 -:106f3400a0602000fff722fe0022e06004216068c8 -:106f440000f076fc01220921a06800f071fc022205 -:106f54001221e06800f06cfc0123a36113bdc0465c -:086f6400a087000085860000f3 -:020000040000fa -:106f6c00f8b50600144c002700256423e75223884b -:106f7c001b0b1b03238023881b051b0d23802574ef -:106f8c00657625760d4b0e4a1a6001f0cdfa01f0ac -:106f9c0025fb3000fef738fcfef7b8fb01f014fbc4 -:106fac002573237b0f22134323736d23e55427672b -:106fbc00013be554f8bdc046cc1000207c130020ea -:046fcc0040420f0030 -:020000040000fa -:106fd000f0b5ce46474680b58946134d01242b7d3a -:106fe0002342fcd000244f460f4d104b98460126fb -:106ff00005e01c0043462b802b7d3342fcd0a1458d -:107000000ed913195908e9611b6808c0231d4034c3 -:107010009f42eed9d15802c00433a342f8d1e9e728 -:107020000cbc90469946f0bd0040004104a5ffff0e -:020000040000fa -:1070300070b5040000f0cafc01f054fb050001f03b -:1070400051fb401b0128fad92000fff7e3fb01f0b8 -:1070500049fb401b0228fad962000b4b9b18012206 -:1070600052425a802000fff74dfd002800d170bd2c -:107070002000fff709fd0122044b1a70024b1c7718 -:107080005a770120f3e7c046cc100020b813002047 -:020000040000fa -:1070900010b5164b64215c5ae200121b52009a187c -:1070a0001084585ac200121a52009a180020d08335 -:1070b0005c5ae200121b52009a18d084585ac2003f -:1070c000121a52009a181000148d00241485528d43 -:1070d000002242855a5a92b2501c80b25852d000b7 -:1070e000801a40001e30181810bdc046cc10002079 -:020000040000fa -:1070f00070b5134b1b78002b14d0012b1ad0fbf763 -:10710000dff9104b1b88002b13d000240e4e0d4dc1 -:10711000e300f3185b6898470134a4b22b88a342bc -:10712000f6d806e000f0fafd00f030fc044b012236 -:107130001a7070bdfbf7c4f901f0e2f9f9e7c04637 -:0c714000090d00209a130020f811002017 -:020000040000fa -:10714c0010b5144b1b7e012b06d0124b1b7e022b51 -:10715c000ad0fdf72dfe10bd00230f4a13700d4a07 -:10716c005376fcf73bfcf4e70b4a13780133dbb2a4 -:10717c0013701078074c23881b051b0d01335843e3 -:10718c001423584380b200f095fb01232374002391 -:0c719c002376e0e7cc100020b91300209f -:020000040000fa -:1071a800480e00006a1300006a1300006a1300000a -:1071b8006a1300006a1300006a1300006a130000d3 -:1071c8006a1300005a0e0000301000005c12000024 -:1071d800dc12000028110000a81100007e10000039 -:1071e800d4100000f81100004e1300006a130000cc -:0871f8006a13000044130000bb -:020000040000fa -:10720000f0b5134b188880b200281fd0002300204f -:10721000104e16240f270e4d05e001339bb22a882d -:1072200092b29a4212d922005a43925d022af4d1b4 -:1072300022005a4307498c466244517892783a407a -:1072400012020a438242e8dd1000e6e7f0bdc046c4 -:087250009e1300200408002039 -:020000040000fa -:10725800f0b5134b188880b2002820d000230020f6 -:10726800104f16240e4d06e0b0b201339bb22a88a7 -:1072780092b29a4213d922005a43d25d012af4d11c -:1072880026005e43074a944666447178b278120233 -:107298000a43161c92b28242e6d2061ce4e7f0bd0d -:0872a8009e13002004080020e1 -:020000040000fa -:1072b00010b5114b1a685379927912021343802b3f -:1072c00014d90e4b1b88002b0fd10b4b1a68537926 -:1072d000917909020b43db0908490b8051799279b6 -:1072e0004a0602d00133054a138010bd04490548ff -:1072f000fff74efae5e7c04664130020b213002002 -:0873000082020000107f000072 -:020000040000fa -:10730800f0b585b0427983791b02134309339bb2e8 -:1073180000240025009401950a3bc4180822210086 -:1073280002a801f071f9fff7ddfc029e039fb94244 -:107338000dd80ad00020002100900191082269464a -:10734800200001f061f905b0f0bdb042f2d9fff7b5 -:08735800c9fc801bb941efe7fd -:020000040000fa -:107360000b6970b505000c00002b01d1002070bd29 -:10737000002804d08369002b01d1fff7c3fd0b4b1c -:107380009c4209d16c680c22a35e002beed0210038 -:107390002800fef735f8eae7054b9c4201d1ac68be -:1073a000f1e7044b9c42eed1ec68ece76812002058 -:0873b0008812002048120020a1 -:020000040000fa -:1073b80010b50a784b781b0213438a7812041343da -:1073c800ca7812061a439478d3781b022343c370f1 -:1073d8001b0a03710b784a7812021a438b781b0434 -:1073e8001a43cb781b0613431a785b784270837074 -:1073f80001230370002318310630ca5cc2540133dc -:06740800102bfad110bdab -:020000040000fa -:02740e007047c5 -:020000040000fa -:1074100070b504000d0009290dd9022663290bd986 -:1074200004300b22002101f025f905220c4920002f -:1074300001f0eef810e00126200001f03af90f23e8 -:107440009b1b984209d90022e25405492b002200d7 -:107450000831200000f0d0fb70bd00232354f4e776 -:047460007c78000034 -:020000040000fa -:10746400f0b5114b1b881149002216270e4e05e07a -:10747400013233889bb21631934213db0b78012b14 -:10748400f6d13d005543094b9c4665446c78ab7876 -:107494001b0223438342ebd116205043063062463d -:1074a400801800e00020f0bd9e1300200408002096 -:020000040000fa -:1074b400012815d00f4b442200219954995c0420d3 -:1074c40001439954343a9a6130325a610a48835cd0 -:1074d40002218b438354094b1975383a1a76704745 -:1074e400044b442200219954995c01439954043a71 -:1074f4009a61f4e70044004100480041000800425a -:020000040000fa -:1075040070b542004e024c0045026d0a120ec30fc4 -:10751400760a240ec90fff2a0fd0ff2c11d00120a8 -:10752400a24200d070bdb542fcd18b420dd0002ade -:10753400f8d12800451ea841f4e70120002df1d11f -:10754400ebe70120002eedd1e9e70020eae7c04691 -:020000040000fa -:1075540070b50e001d000e23c95e90b01400002902 -:1075640007da00232b60b3891b0611d48023db00c8 -:107574000fe001aa00f03aff0028f2dbf022029ba0 -:1075840012021340054a9b185a4253412b60ede7ff -:1075940040230020236010b070bdc04600e0ffff10 -:020000040000fa -:1075a400f8b505000f4b1b880f4c00260d4f05e066 -:1075b40001363b889bb21634b34211db2378012b8e -:1075c400f6d1a01d290001f017f80028f0d11623e8 -:1075d4007343054ef6187378b0780002184300e040 -:0c75e4000020f8bd9e13002004080020c9 -:020000040000fa -:1075f000f0b50f4a0023140016270e480be03d009b -:107600005d4365196e78a978090231430180013321 -:107610001632282b08d09db211780129efd000290d -:10762000f5d1054b1d80f0bd034b27221a80fae7e8 -:0c76300004080020a01300209e1300207e -:020000040000fa -:10763c0010b5064c2378002b07d1054b002b02d03c -:10764c00044800e000bf0123237010bda8120020e5 -:10765c000000000000000000044b10b5002b03d00c -:10766c000349044800e000bf10bdc0460000000004 -:08767c00ac1200200000000028 -:020000040000fa -:1076840010b50a4b98470a4b9847fef767ff094b1a -:10769400ff229343084a9360084b9847084b984746 -:1076a400084b984700f0fcfffee7c0465f810000ee -:1076b4005f8100000000000000ed00e0a5770000fd -:0876c4005f8100005f810000fe -:020000040000fa -:1076cc0010b5a2b017236a46137193780f22934317 -:1076dc0001210b436a4693700a4b1a8812016b46c0 -:1076ec001c880f23234013436a4613806b46517149 -:1076fc0000229a716b46d8716946002000f004f89c -:08770c0022b010bd0a0d00209f -:020000040000fa -:1077140010b5002819d0027843781b021a438378e5 -:107724001b041343c07800061843027843781b02f5 -:10773400134302d10b79292b09d8fdf76bffff38ce -:10774400434258414042c0b210bd0248e3e7012021 -:08775400fae7c046780e0020a0 -:020000040000fa -:10775c0010b504000e4b1b78012b02d0002b11d05e -:10776c0010bd00220a4b1a700a4b5a775b889bb2e9 -:10777c00002bf5d0074b9b889bb2002bf0d000f070 -:10778c004dfdede700f01cf9024b1c77e8e7c04615 -:08779c00b8130020cc100020fe -:020000040000fa -:1077a40070b500260c4d0d4c641ba410a64209d1e3 -:1077b4000026f8f77bfc0a4d0a4c641ba410a64271 -:1077c40005d170bdb300eb5898470136eee7b3001e -:1077d400eb5898470136f2e7bc000000bc000000fb -:0877e400bc000000c000000021 -:020000040000fa -:1077ec00f8b50d00096e06001400d718890418d5d9 -:1077fc009f08bf00d719bc4201d1002008e02a0025 -:10780c0002cc300000f021fe431cf4d10120404298 -:10781c00f8bd21782a00300000f086fc0134431cae -:08782c00f4d0bc42f5d1e8e7fd -:020000040000fa -:10783400002310b504000360436083608181036604 -:10784400c28103614361836119000822583000f04a -:107854000fff054b24626362044ba362044be36293 -:10786400044b236310bdc04679820000e57c000010 -:08787400b1800000158700003f -:020000040000fa -:10787c006572726f720000002573256400000000b1 -:10788c002e2e2f2e2e2f2e2e2f2e2e2f2e2e2f2e07 -:10789c002e2f456e67696e652f436f72652f73725d -:1078ac00632f726f7574696e675f7461626c652e9d -:0478bc006300c0465f -:020000040000fa -:1078c0000d4ac0235b008021c902d1500b4a803b86 -:1078d000ff3b93731188013399431180002809d02d -:1078e000074b1b884343db439bb21382138802215f -:1078f0000b4313807047c04600e100e0002c0042bb -:04790000a4130020ac -:020000040000fa -:1079040070b50400012814d0002809d003280cd82d -:107914000b4d6d230122ea5400f0e2fe286704e0d7 -:10792400074b00226d215a541a67054a6c23d4541c -:1079340070bd034b00226d215a541a67f5e7c04607 -:04794400cc10002043 -:020000040000fa -:10794800f7b504000700002601914834002c01d146 -:107958003000febd6368a5680093009b013b00935f -:1079680001d52468f2e7ab89012b08d90e22ab5e5a -:10797800013304d029003800019b98470643643539 -:02798800ebe72b -:020000040000fa -:02798a00704744 -:020000040000fa -:10798c0010b582b001ab02221a7000225a709a70a4 -:10799c00019b0a4a00210020fcf7bafe00f0a2fe6f -:1079ac00040000f0d3fe0470240a0f221440437824 -:1079bc0093431c43447002b010bdc04624860000a3 -:020000040000fa -:1079cc0030b50c49430018180b189c78012215008f -:1079dc00a540094ca56025615b78405cdb0107493b -:1079ec008c4663441918403100240c7082409a6014 -:1079fc009a6130bd40130020001800400044004143 -:020000040000fa -:107a0c00002b11d1002a0fd1002900d1002802d05f -:107a1c000021c943081c07b4024802a14018029077 -:107a2c0003bdc0466d0d000003b4684601b5029855 -:107a3c00fdf71cf8019b9e4602b00cbc7047c0467b -:020000040000fa -:107a4c005442000086410000864100008441000041 -:107a5c008a4100008a41000032420000844100004b -:107a6c008a410000324200008a410000844100003b -:107a7c002e4200002e4200002e4200003c4200002c -:020000040000fa -:107a8c0041024200c30f490a120e00207e2a03d97c -:107a9c009d2a02d9094a9818704780200004014396 -:107aac00952a07dc9620821ad1404842002bf3d14c -:107abc000800f1e7963a9140f7e7c046ffffff7fd9 -:020000040000fa -:107acc0010b50c4b9b7bdb0706d50a4b01229a7336 -:107adc00094b1b7c012b00d010bd00f03bfc002897 -:107aec00fad1fff7e1fc012000f084fa00f042f833 -:0c7afc00f2e7c046002c0042cc10002035 -:020000040000fa -:107b080010b50c4b1a691a690b4b997801238b40f5 -:107b1800134209d1074b1a69074b597901238b4046 -:107b28000120134201d110bd0020024a1361fff762 -:0c7b380011fef8e7001800404013002088 -:020000040000fa -:107b440010b50c4b1b78ff20002b00d110bd0a4b45 -:107b54001b881b0504d1074b00221a700020f5e78f -:107b6400054a13881b0b1b0313800020fdf750feee -:0c7b7400f1e7c04697130020cc10002061 -:020000040000fa -:107b800010b50b4b9a680b4b9a4209d0084b9a6878 -:107b9000094b9a4204d0064a137b20210b431373ee -:107ba000fef778fe00f082f8fff7d0fa10bdc0466d -:0c7bb000cc100020015900001756000006 -:020000040000fa -:107bbc001c2101231b04984201d3000c10391b0a11 -:107bcc00984201d3000a08391b09984201d30009d5 -:107bdc00043902a2105c40187047c046040302022c -:0c7bec0001010101000000000000000089 -:020000040000fa -:107bf8000eb410b500249bb00a4b1daa02ca069306 -:107c08000393094b0190059001a8049319940092dd -:107c180000f0a4fc019b1c701bb010bc08bc03b096 -:0c7c28001847c046ffffff7f0802ffff67 -:020000040000fa -:107c340070b50c1e0ed0002a0cd01500022801d9f4 -:107c4400280070bd084b002b06d01100200000e076 -:107c540000bff5e70025f3e78e1820780134fff71d -:0c7c640092feb442f9d1ebe700000000f2 -:020000040000fa -:107c7000f0b5002917d0002607270fe07a40013b16 -:107c8000dbb2002b06d05400a4b215b22200002da6 -:107c9000f5daf3e70136b3b2994204d9835d1b02ea -:0a7ca0005a400823efe71000f0bd82 -:020000040000fa -:027caa00fee7f3 -:020000040000fa -:107cac0010b5094b00221a80084b013a1a80084b78 -:107cbc0000221a741a7b40218a431a73054a9a606f -:107ccc00012000f0a8fc10bdae130020ac13002066 -:087cdc00cc100020015900004a -:020000040000fa -:107ce400f8b51f008b8905000c001600db0505d5cf -:107cf4000e23c95e0022022300f0e4faa389054a98 -:107d040028001340a38132000e23e15e3b0000f003 -:087d1400c5faf8bdffefffff07 -:020000040000fa -:107d1c0010b50023094a1380094c2360a38000f09e -:107d2c0011f82000fff71cf900f0d6fc040000f05d -:107d3c00d3fc001b0128fad910bdc0469c130020af -:047d4c0038130020c8 -:020000040000fa -:107d500010b5094b00221a609a60084a5a60062240 -:107d60001a601a6801210a431a60054b82225a6080 -:107d700000f0d4fb10bdc04610e000e07fbb000067 -:047d8000004000417e -:020000040000fa -:107d840030b5a2200002094b0122094dff24a402b0 -:107d9400197d1142fcd04108d9611d80197d114221 -:107da400fcd00130ff30a042f2d130bd0040004190 -:047db40002a5ffff26 -:020000040000fa -:107db8003031323334353637383941424344454619 -:107dc80000303132333435363738396162636465af -:107dd8006600232d302b2000686c4c0065666745d3 -:037de8004647000b -:020000040000fa -:107dec0030b50b78007858400002120295b2082387 -:107dfc0005e06a401000013bdbb2002b06d04200cc -:107e0c0092b204b21000002cf5daf2e7000a087006 -:027e1c0030bd77 -:020000040000fa -:027e1e00fee77d -:020000040000fa -:107e2000084b00221a609a80074b1988002908d055 -:107e3000064a00230020107001339bb23d328b4272 -:107e4000f9d17047381300209c130020af0e00209a -:020000040000fa -:107e50002e2e2f2e2e2f2e2e2f2e2e2f2e2e2f2e3d -:107e60002e2f456e67696e652f436f72652f737293 -:107e7000632f6c756f735f656e67696e652e630047 -:020000040000fa -:107e8000074bfc214902d961064a1a80064a02437f -:107e9000fc2080020260d961044a1a807047c04603 -:107ea0000040004102a5ffff00ffffff04a5ffff08 -:020000040000fa -:107eb0002e2e2f2e2e2f2e2e2f2e2e2f2e2e2f2edd -:107ec0002e2f4e6574776f726b2f526f6275732f02 -:107ed0007372632f6d73675f616c6c6f632e6300e9 -:020000040000fa -:107ee00082b00378dbb201aa13701378db0604d4e6 -:107ef00013781b071b0f0f2b04d0044b02221a769a -:107f000002b07047014b01221a76f9e7cc1000202d -:020000040000fa -:107f10002e2e2f2e2e2f2e2e2f2e2e2f2e2e2f2e7c -:107f20002e2f4e6574776f726b2f526f6275732fa1 -:107f30007372632f726563657074696f6e2e630070 -:020000040000fa -:107f400010b50379447924021c430dd08279c3799a -:107f50001b021343994209d000230133dbb29ab2ca -:107f6000a242fad3002010bd0020fce70120fae76e -:020000040000fa -:107f70009e2110b5c905041cfef7aefe002803d1f2 -:107f8000201cfff783fd10bd9e21201cc905faf7b8 -:107f900063fcfff77bfd80231b069c466044f2e7f1 -:020000040000fa -:107fa000084a1368002b09d007491818884202d8dc -:107fb00010601800704701235b42fae7034b13601f -:107fc000f2e7c04690130020c0150020c013002027 -:020000040000fa -:107fd00030b5007800020b8858400823072505e0db -:107fe0006a401000013bdbb2002b06d0420092b287 -:0e7ff00004b21000002cf5daf2e7088030bd74 -:020000040000fa -:027ffe00fee79c -:020000040000fa -:10800000012803d0084b04221a757047064b1b7ecb -:108010005b0705d5044b04211a8d1a7e0a42fbd159 -:0c802000014b04229a75f0e700080042b2 -:020000040000fa -:10802c00084b1b889bb2ff22834201d8100070477b -:10803c00c000054bc258507993791b0203430b8047 -:0c804c000022f3e7a6130020a81100207a -:020000040000fa -:108058002e2e2f2e2e2f2e2e2f2e2e2f2e2e2f2e33 -:108068002e2f4e6574776f726b2f526f6275732f58 -:0c8078007372632f726f6275732e6300c9 -:020000040000fa -:1080840070b564254a1e55430e0029007031fdf772 -:108094009dff041e08d000212a00016046600c30b8 -:0c80a400a060643200f0e4fa200070bd1f -:020000040000fa -:1080b00070b50c000e25495f00f006f9a389421c3b -:1080c00003d1054a1340a38170bd8022520113439e -:0c80d000a3816065f8e7c046ffefffffea -:020000040000fa -:1080dc007fb51d00084b0400e0331e682b000029ff -:1080ec0001d10a0001a9b047431c03d100232b6026 -:0c80fc008a33236004b070bd0c0d00201e -:020000040000fa -:1081080070b500290fd0002a0dd01500002808d11d -:108118000c008e18012000f03bfb20700134b442a3 -:0c812800f8d1280070bd0025fbe7c04620 -:020000040000fa -:10813400936810b5013b9360002b04da9469a34261 -:1081440007db0a2905d01368581c10601970080051 -:0a81540010bdfdf715fe0100f9e76c -:020000040000fa -:02815e00704768 -:020000040000fa -:1081600010b5dc2292000021044800f083fa0023bd -:10817000034a1380034a138010bdc0460408002040 -:08818000a01300209e13002053 -:020000040000fa -:10818800064b00221a605a609a60bff34f8f044b67 -:10819800044ada60bff34f8fc046fde710e000e005 -:0881a80000ed00e00400fa05ff -:020000040000fa -:1081b00010b5416872b6064b00221a605a609a6088 -:1081c000044b9860036883f3088862b6884710bd43 -:0881d00010e000e000ed00e00a -:020000040000fa -:1081d80010b5064b01221a70054b00221a80a032f6 -:1081e8000021044800f042fa10bdc0469713002051 -:0881f800aa130020ac0f0020c7 -:020000040000fa -:10820000074b1b889bb2ff22834201d810007047a6 -:10821000c000044bc3581b790b700022f6e7c04620 -:08822000a6130020a8110020a4 -:020000040000fa -:1082280010b5074a0023537702211177054a1370c6 -:108238000020fef7ebfa0120fef7e8fa10bdc04671 -:08824800cc100020b813002047 -:020000040000fa -:1082500010b5084b1b7c012b03d1064b187cc0b218 -:1082600010bd00f07df8034a137c0343dbb21374a6 -:08827000f3e7c046cc1000202a -:020000040000fa -:1082780070b50c000e25495f00f036f8002803dbc6 -:10828800636d1b18636570bda389024a1340a381ff -:08829800f9e7c046ffefffff0c -:020000040000fa -:1082a00070b50500080011000022064c22601a007b -:1082b00000f06afa431c03d12368002b00d02b6026 -:0882c00070bdc0460000002063 -:020000040000fa -:1082c80070b50500080011000022064c22601a0053 -:1082d80000f04efa431c03d12368002b00d02b601a -:0882e80070bdc046000000203b -:020000040000fa -:1082f00070b50500080011000022064c22601a002b -:1083000000f03efa431c03d12368002b00d02b6001 -:0883100070bdc0460000002012 -:020000040000fa -:1083180010b5074b06225a60fff775f8fef7f6fa14 -:1083280000f0caf9fdf729fd00f002fa10bdc046b9 -:0483380000400041c0 -:020000040000fa -:10833c00f03c0000f03c0000463e0000923c000087 -:10834c00d83c0000fc3c0000b43d0000f23d0000b5 -:04835c003e3e0000a1 -:020000040000fa -:1083600010b5074b187e0823184000d110bd044bf0 -:1083700008221a761420fff7a3fa0120f6e7c04678 -:0483800000080042af -:020000040000fa -:1083840082b0002900d101a9101e06d0002b06d00e -:1083940013780b601078431e984102b07047022096 -:0483a4004042fae772 -:020000040000fa -:1083a800002370b5064c050008002360fff7f4fdb4 -:1083b800431c03d12368002b00d02b6070bdc0463e -:0483c8000000002091 -:020000040000fa -:1083cc00002370b5064c05000800236000f0c2f9cc -:1083dc00431c03d12368002b00d02b6070bdc0461a -:0483ec00000000206d -:020000040000fa -:1083f000002370b5064c050008001100236000f052 -:10840000b3f9431c03d12368002b00d02b6070bd4f -:048410000000002048 -:020000040000fa -:10841400002370b5064c05000800236000f0a6f99f -:10842400431c03d12368002b00d02b6070bdc046d1 -:048434000000002024 -:020000040000fa -:1084380070b504000d001622002100f017f9022380 -:0e8448002370601c0622290000f0def870bdd3 -:020000040000fa -:1084560010b50c23d45e80239b011c4204d11c431f -:0e8466009481146e23431366fef7c5fb10bd10 -:020000040000fa -:10847400044b1868044bc01a431e98414042c0b2d2 -:0c8484007047c0466c130020740b0020f1 -:020000040000fa -:10849000445b0000445b0000f25a0000a65b000051 -:0c84a000ee5a0000a65b0000a65b000086 -:020000040000fa -:1084ac00884c00007e4c0000364c0000124d000041 -:0c84bc006a4d0000344d00002a4d000005 -:020000040000fa -:1084c800c0370000c0370000ac3700007637000026 -:0c84d8005e3700004a3900004a390000fd -:020000040000fa -:1084e40010b50020fff78afd034c01212000fdf7a1 -:0c84f40021fe0f23237010bdd8100020c3 -:020000040000fa -:1085000010b500f025f9012800d010bd00f04df89d -:0a851000a2200002fff74cfef7e77f -:020000040000fa -:02851a007047a8 -:020000040000fa -:10851c00034b1a68034b1a6100225a617047c0461c -:08852c0058130020c8120020c2 -:020000040000fa -:10853400044b002268210020585202395a54013158 -:088544005a547047cc100020ce -:020000040000fa -:10854c0010b5002903d1fff733fb203002e0081ce3 -:08855c00fff72efb10bdc04625 -:020000040000fa -:1085640010b513000a00010002480068f9f7b8fdcd -:0885740010bdc0468413002075 -:020000040000fa -:10857c000b1e04d0ff2a04d98a2303608b3b1800fe -:08858c0070470a700123fae7b1 -:020000040000fa -:10859400c9b28218904201d10020704703788b42ff -:0685a400fbd00130f6e7f8 -:020000040000fa -:0285aa00704718 -:020000040000fa -:1085ac00034b1a6810701a6801321a607047c04683 -:0485bc006c1300201c -:020000040000fa -:1085c000034b188880b2431e98414042c0b27047a6 -:0485d000aa130020ca -:020000040000fa -:1085d40010b5fff727fe024b00225a809a8010bd87 -:0485e400cc10002097 -:020000040000fa -:1085e800024b00221a73024a9a607047cc1000208e -:0485f8000159000025 -:020000040000fa -:1085fc0002780b78002a03d0013001319a42f7d06f -:04860c00d01a7047c9 -:020000040000fa -:10861000002310b59a4200d110bdcc5cc454013384 -:02862000f8e779 -:020000040000fa -:0286220070479f -:020000040000fa -:10862400626f6f745f736572766963650000c0463c -:020000040000fa -:10863400024a1368013313607047c0465813002080 -:020000040000fa -:1086440010b513000a0001001800fff7dfff10bd8a -:020000040000fa -:10865400024a6c23d05cc0b27047c046cc100020e4 -:020000040000fa -:108664000130c0b2014a7823d0547047cc100020a6 -:020000040000fa -:1086740003001218934200d1704719700133f9e7cf -:020000040000fa -:1086840010b50249fff75ef910bdc04661730000e2 -:020000040000fa -:108694009423024a5b00d05c7047c0460c0d002056 -:020000040000fa -:0e86a40010b50020fff736fefef720fdfce7c4 -:020000040000fa -:0e86b2000023c25c0133002afbd1581e704722 -:020000040000fa -:0c86c000014b82225a60704700400041cc -:020000040000fa -:0c86cc00014b188880b270479e130020fc -:020000040000fa -:0c86d800012801d072b6704762b6fce7c2 -:020000040000fa -:0c86e400014b18687047c0465813002076 -:020000040000fa -:0c86f000fc239b021868000a80b270474f -:020000040000fa -:0c86fc00014b00221a6070477813002028 -:020000040000fa -:0c8708000079183843425841c0b2704755 -:020000040000fa -:0c87140010b50e23c95efff757fe10bd24 -:020000040000fa -:0c87200080239b0100204b607047c04686 -:020000040000fa -:0b872c004300504f53495800002e003e -:020000040000fa -:08873800bff35f8f62b67047ca -:020000040000fa -:0887400010b5fff78fff10bd1b -:020000040000fa -:088748000048704704080020fe -:020000040000fa -:08875000fc239b02187870471e -:020000040000fa -:0887580000487047cc1000201e -:020000040000fa -:0887600010b500f015f810bd82 -:020000040000fa -:0887680010b5fff7d9ff10bda9 -:020000040000fa -:0887700010b500f017f810bd70 -:020000040000fa -:0887780010b500f015f810bd6a -:020000040000fa -:0887800010b5fff7c1fc10bdac -:020000040000fa -:0887880010b5fff753fa10bd14 -:020000040000fa -:08879000012040427047c04681 -:020000040000fa -:048798000020704706 -:020000040000fa -:04879c007047c0461c -:020000040000fa -:0487a000481100205c -:020000040000fa -:0487a40001207047f9 -:020000040000fa -:0487a80000207047f6 -:020000040000fa -:0287ac00704714 -:020000040000fa -:0287ae00704712 -:020000040000fa -:0200000400807a -:0440000077c700d8a6 -:020000040000fa -:0200000400807a -:044004005c00ffff5e -:00000001FF diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map deleted file mode 100644 index 204138e17..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.map +++ /dev/null @@ -1,3864 +0,0 @@ -Archive member included to satisfy reference by file (symbol) - -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - build/luos_bootloader/production/_ext/1137593668/startup_xc32.o (__pic32c_data_initialization) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - build/luos_bootloader/production/_ext/1857845632/robus_hal.o (__aeabi_uidiv) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - build/luos_bootloader/production/_ext/1555399743/luos_engine.o (__aeabi_idiv) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) (__aeabi_idiv0) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - build/luos_bootloader/production/_ext/1857845632/robus_hal.o (__aeabi_uldivmod) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - build/luos_bootloader/production/_ext/1555399743/luos_engine.o (__aeabi_f2uiz) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) (__udivmoddi4) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - build/luos_bootloader/production/_ext/1555399743/luos_engine.o (__aeabi_fmul) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) (__aeabi_fsub) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) (__aeabi_f2iz) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) (__aeabi_fcmpge) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) (__clzsi2) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) (__clzdi2) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) (__eqsf2) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) (__gesf2) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) (__lesf2) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - (_sprintf_cdnopsuxX) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - build/luos_bootloader/production/_ext/1137593668/startup_xc32.o (__libc_init_array) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o (memcpy) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - build/luos_bootloader/production/_ext/1342350994/bootloader_core.o (memset) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - build/luos_bootloader/production/_ext/1555399743/routing_table.o (strcmp) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - build/luos_bootloader/production/_ext/1555399743/luos_utils.o (strlen) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - build/luos_bootloader/production/_ext/1555399743/routing_table.o (strstr) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) (_vfprintf_cdnopsuxX) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) (__ssfputs_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) (__sinit) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) (_fputwc_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) (_fwalk_reent) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) (_global_impure_ptr) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) (__locale_mb_cur_max) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) (__ascii_mbtowc) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) (memchr) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) (_malloc_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) (_printf_common) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) (_sbrk_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) (__sread) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) (__swbuf_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) (_wcrtomb_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) (__ascii_wctomb) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) (_write_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) (__swsetup_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) (_close_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) (_ctype_) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) (_fflush_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) (_lseek_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) (__smakebuf_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) (__malloc_lock) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) (_free_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) (_read_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) (errno) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) (_fstat_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) (_isatty_r) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) (_close) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) (_fstat) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) (_isatty) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) (_lseek) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) (_read) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) (_sbrk) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) (_write) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) (close) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) (fstat) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) (isatty) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) (lseek) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) (read) -c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) (write) - -Allocating common symbols -Common symbol size file - -errno 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - -Microchip PIC32 Memory-Usage Report - -ROM Program-Memory Usage -section address length [bytes] (dec) Description -------- ---------- ------------------------- ----------- -.vectors 0 0xb0 176 -.text 0xb0 0x20 32 App's exec code -.ARM.exidx 0xd0 0x8 8 -.text.MsgAlloc_SetTxTas 0xd8 0x68c 1676 -.text.MsgAlloc_ClearMsg 0x764 0x670 1648 -.text.Luos_MsgHandler 0xdd4 0x5a8 1448 -.dinit 0x137c 0x560 1376 -.text.MsgAlloc_EndMsg 0x18dc 0x428 1064 -.text.MsgAlloc_LuosTask 0x1d04 0x3e0 992 -.text._vfprintf_r_cdnop 0x20e4 0x3dc 988 -.text.Luos_Loop 0x24c0 0x398 920 -.text 0x2858 0x348 840 App's exec code -.text.MsgAlloc_PullMsgF 0x2ba0 0x308 776 -.text.MsgAlloc_PullMsgT 0x2ea8 0x2f0 752 -.text.MsgAlloc_PullServ 0x3198 0x2dc 732 -.text.MsgAlloc_ClearMsg 0x3474 0x2cc 716 -.text.Recep_InterpretMs 0x3740 0x2a8 680 -.text.MsgAlloc_PullMsgF 0x39e8 0x290 656 -.text.LuosBootloader_Ms 0x3c78 0x248 584 -.text.Recep_GetData 0x3ec0 0x248 584 -.text 0x4108 0x22c 556 App's exec code -.text.RoutingTB_DetectS 0x4334 0x224 548 -.text.Robus_Loop 0x4558 0x1c4 452 -.text.Luos_CreateServic 0x471c 0x1b4 436 -.text.Luos_ReceiveData 0x48d0 0x1a8 424 -.text 0x4a78 0x1a4 420 App's exec code -.text.Recep_NodeConcern 0x4c1c 0x1a0 416 -.text.Transmit_Process 0x4dbc 0x174 372 -.text.RobusHAL_ComInit 0x4f30 0x154 340 -.text.MsgAlloc_loop 0x5084 0x13c 316 -.text.Robus_TopologyDet 0x51c0 0x12c 300 -.text 0x52ec 0x114 276 App's exec code -.text.__sflush_r 0x5400 0x114 276 -.rodata._ctype_ 0x5514 0x101 257 -.text.Recep_Drop 0x5616 0x2 2 -.text.Robus_SendMsg 0x5618 0x100 256 -.text.RobusHAL_Init 0x5718 0xfc 252 -.text.MsgAlloc_Init 0x5814 0xec 236 -.text.Recep_GetHeader 0x5900 0xec 236 -.text.__swsetup_r 0x59ec 0xec 236 -.text.Recep_GetConcerne 0x5ad8 0xe8 232 -.text.Recep_GetCollisio 0x5bc0 0xe8 232 -.text._printf_common 0x5ca8 0xda 218 -.text.EVSYS_Initialize 0x5d82 0x2 2 -.text.__swbuf_r 0x5d84 0xcc 204 -.text.MsgAlloc_GetTxTas 0x5e50 0xc4 196 -.text.Luos_SendData 0x5f14 0xbc 188 -.text._malloc_r 0x5fd0 0xbc 188 -.text.RoutingTB_RemoveO 0x608c 0xac 172 -.text.RobusHAL_ComTrans 0x6138 0xa0 160 -.text.Robus_DetectNextN 0x61d8 0xa0 160 -.text 0x6278 0x98 152 App's exec code -.text.SERCOM0_Handler 0x6310 0x94 148 -.text 0x63a4 0x94 148 App's exec code -.text.__smakebuf_r 0x6438 0x94 148 -.text._free_r 0x64cc 0x94 148 -.text.__pic32c_data_ini 0x6560 0x90 144 -.text.LuosHAL_FlashWrit 0x65f0 0x8c 140 -.text.MsgAlloc_LookAtLu 0x667c 0x8c 140 -.text.MsgAlloc_ValidHea 0x6708 0x88 136 -.text.Luos_assert 0x6790 0x84 132 -.text.RobusHAL_SetPTPDe 0x6814 0x80 128 -.text.MsgAlloc_InvalidM 0x6894 0x80 128 -.text.CLOCK_Initialize 0x6914 0x7c 124 -.text.compute_crc 0x6990 0x7c 124 -.text.RoutingTB_RemoveN 0x6a0c 0x7c 124 -.text.RobusHAL_SetPTPRe 0x6a88 0x7c 124 -.text.RobusHAL_GetPTPSt 0x6b04 0x7c 124 -.text.__sfp 0x6b80 0x7c 124 -.text.__fputwc 0x6bfc 0x7c 124 -.text 0x6c78 0x74 116 App's exec code -.text.LuosHAL_GetTimest 0x6cec 0x70 112 -.text.Robus_ShiftMaskCa 0x6d5c 0x70 112 -.text.Luos_SaveAlias 0x6dcc 0x68 104 -.rodata.Luos_Loop 0x6e34 0x68 104 -.text.PortMng_PokeNextP 0x6e9c 0x68 104 -.text.__sinit 0x6f04 0x68 104 -.text.Robus_Init 0x6f6c 0x64 100 -.text.LuosHAL_ProgramFl 0x6fd0 0x60 96 -.text.PortMng_PokePort 0x7030 0x60 96 -.text.Robus_ServiceCrea 0x7090 0x60 96 -.text.Luos_Run 0x70f0 0x5c 92 -.text.Transmit_End 0x714c 0x5c 92 -.rodata.Luos_MsgHandler 0x71a8 0x58 88 -.text.RoutingTB_BigestN 0x7200 0x58 88 -.text.RoutingTB_BigestI 0x7258 0x58 88 -.text.Recep_ComputeMsgN 0x72b0 0x58 88 -.text.Timestamp_TagMsg 0x7308 0x58 88 -.text._fflush_r 0x7360 0x58 88 -.text.RoutingTB_Convert 0x73b8 0x56 86 -.text.PORT_Initialize 0x740e 0x2 2 -.text.RoutingTB_AddNumT 0x7410 0x54 84 -.text.RoutingTB_AliasFr 0x7464 0x50 80 -.text.RobusHAL_SetTxSta 0x74b4 0x50 80 -.text 0x7504 0x50 80 App's exec code -.text.__swhatbuf_r 0x7554 0x50 80 -.text.RoutingTB_IDFromA 0x75a4 0x4c 76 -.text.RoutingTB_Compute 0x75f0 0x4c 76 -.text 0x763c 0x48 72 App's exec code -.text.Reset_Handler 0x7684 0x48 72 -.text.LuosBootloader_Se 0x76cc 0x48 72 -.text.Luos_SendMsg 0x7714 0x48 72 -.text.PortMng_PtpHandle 0x775c 0x48 72 -.text.__libc_init_array 0x77a4 0x48 72 -.text.__ssfputs_r 0x77ec 0x48 72 -.text.std 0x7834 0x48 72 -.rodata 0x787c 0x44 68 Read-only const -.text.RobusHAL_ResetTim 0x78c0 0x44 68 -.text.Robus_SetNodeDete 0x7904 0x44 68 -.text._fwalk_reent 0x7948 0x42 66 -.text._mon_putc 0x798a 0x2 2 -.text.LuosBootloader_In 0x798c 0x40 64 -.text.RobusHAL_PushPTP 0x79cc 0x40 64 -.text 0x7a0c 0x40 64 App's exec code -.rodata 0x7a4c 0x40 64 Read-only const -.text 0x7a8c 0x40 64 App's exec code -.text.TC3_Handler 0x7acc 0x3c 60 -.text.EIC_Handler 0x7b08 0x3c 60 -.text.MsgAlloc_IsResete 0x7b44 0x3c 60 -.text.Recep_Timeout 0x7b80 0x3c 60 -.text 0x7bbc 0x3c 60 App's exec code -.text._sprintf_cdnopsux 0x7bf8 0x3c 60 -.text.write 0x7c34 0x3c 60 -.text.ll_crc_compute 0x7c70 0x3a 58 -.text.Dummy_Handler 0x7caa 0x2 2 -.text.Recep_Reset 0x7cac 0x38 56 -.text.__swrite 0x7ce4 0x38 56 -.text.Luos_Init 0x7d1c 0x34 52 -.text.LuosHAL_Init 0x7d50 0x34 52 -.text.LuosHAL_EraseMemo 0x7d84 0x34 52 -.rodata 0x7db8 0x33 51 Read-only const -.text.crc8 0x7dec 0x32 50 -.text.NonMaskableInt_Ha 0x7e1e 0x2 2 -.text.Luos_ResetStatist 0x7e20 0x30 48 -.rodata 0x7e50 0x30 48 Read-only const -.text.LuosHAL_SetMode 0x7e80 0x30 48 -.rodata 0x7eb0 0x30 48 Read-only const -.text.Recep_CatchAck 0x7ee0 0x30 48 -.rodata 0x7f10 0x30 48 Read-only const -.text.Trgt_MulticastTar 0x7f40 0x30 48 -.text 0x7f70 0x30 48 App's exec code -.text._sbrk 0x7fa0 0x30 48 -.text.RobusHAL_ComputeC 0x7fd0 0x2e 46 -.text.HardFault_Handler 0x7ffe 0x2 2 -.text.RobusHAL_SetRxSta 0x8000 0x2c 44 -.text.MsgAlloc_GetLuosT 0x802c 0x2c 44 -.rodata 0x8058 0x2c 44 Read-only const -.text.__sfmoreglue 0x8084 0x2c 44 -.text.__sseek 0x80b0 0x2c 44 -.text._wcrtomb_r 0x80dc 0x2c 44 -.text.read 0x8108 0x2c 44 -.text.__sfputc_r 0x8134 0x2a 42 -.text.Dummy_App_Func 0x815e 0x2 2 -.text.RoutingTB_Erase 0x8160 0x28 40 -.text.LuosHAL_Reboot 0x8188 0x28 40 -.text.LuosHAL_JumpToApp 0x81b0 0x28 40 -.text.MsgAlloc_Reset 0x81d8 0x28 40 -.text.MsgAlloc_GetLuosT 0x8200 0x28 40 -.text.PortMng_Reset 0x8228 0x28 40 -.text.Transmit_GetLockS 0x8250 0x28 40 -.text.__sread 0x8278 0x28 40 -.text._write_r 0x82a0 0x28 40 -.text._lseek_r 0x82c8 0x28 40 -.text._read_r 0x82f0 0x28 40 -.text.SYS_Initialize 0x8318 0x24 36 -.rodata.LuosBootloader_ 0x833c 0x24 36 -.text.RobusHAL_GetTxLoc 0x8360 0x24 36 -.text.__ascii_mbtowc 0x8384 0x24 36 -.text._sbrk_r 0x83a8 0x24 36 -.text._close_r 0x83cc 0x24 36 -.text._fstat_r 0x83f0 0x24 36 -.text._isatty_r 0x8414 0x24 36 -.text.RoutingTB_Convert 0x8438 0x1e 30 -.text._fputwc_r 0x8456 0x1e 30 -.text.MsgAlloc_IsEmpty 0x8474 0x1c 28 -.rodata.Recep_GetConcer 0x8490 0x1c 28 -.rodata.Recep_NodeConce 0x84ac 0x1c 28 -.rodata.Recep_Interpret 0x84c8 0x1c 28 -.text.Transmit_SendAck 0x84e4 0x1c 28 -.text.LuosBootloader_Lo 0x8500 0x1a 26 -.text.node_assert 0x851a 0x2 2 -.text.LuosHAL_StartTime 0x851c 0x18 24 -.text.Robus_MaskInit 0x8534 0x18 24 -.text 0x854c 0x18 24 App's exec code -.text._vfprintf_cdnopsu 0x8564 0x18 24 -.text.__ascii_wctomb 0x857c 0x18 24 -.text.memchr 0x8594 0x16 22 -.text.LuosHAL_DeInit 0x85aa 0x2 2 -.text.MsgAlloc_SetData 0x85ac 0x14 20 -.text.MsgAlloc_TxAllCom 0x85c0 0x14 20 -.text.PortMng_Init 0x85d4 0x14 20 -.text.Recep_Init 0x85e8 0x14 20 -.text 0x85fc 0x14 20 App's exec code -.text.memcpy 0x8610 0x12 18 -.text.RobusHAL_SetRxDet 0x8622 0x2 2 -.rodata 0x8624 0x10 16 Read-only const -.text.SysTick_Handler 0x8634 0x10 16 -.text.LuosHAL_FlashRead 0x8644 0x10 16 -.text.Robus_IsNodeDetec 0x8654 0x10 16 -.text.Robus_SetVerboseM 0x8664 0x10 16 -.text.memset 0x8674 0x10 16 -.text._cleanup_r 0x8684 0x10 16 -.text.__locale_mb_cur_m 0x8694 0x10 16 -.text.main 0x86a4 0xe 14 -.text 0x86b2 0xe 14 App's exec code -.text.NVMCTRL_Initializ 0x86c0 0xc 12 -.text.RoutingTB_GetLast 0x86cc 0xc 12 -.text.LuosHAL_SetIrqSta 0x86d8 0xc 12 -.text.LuosHAL_GetSystic 0x86e4 0xc 12 -.text.LuosHAL_GetNodeID 0x86f0 0xc 12 -.text.MsgAlloc_UsedMsgE 0x86fc 0xc 12 -.text.Timestamp_IsTimes 0x8708 0xc 12 -.text.__sclose 0x8714 0xc 12 -.text.fstat 0x8720 0xc 12 -.rodata 0x872c 0xb 11 Read-only const -.text.NVIC_Initialize 0x8738 0x8 8 -.text.Luos_SetVerboseMo 0x8740 0x8 8 -.text.RoutingTB_Get 0x8748 0x8 8 -.text.LuosHAL_GetMode 0x8750 0x8 8 -.text.Node_Get 0x8758 0x8 8 -.text._close 0x8760 0x8 8 -.text._fstat 0x8768 0x8 8 -.text._isatty 0x8770 0x8 8 -.text._lseek 0x8778 0x8 8 -.text._read 0x8780 0x8 8 -.text._write 0x8788 0x8 8 -.text.close 0x8790 0x8 8 -.text._mon_getc 0x8798 0x4 4 -.text 0x879c 0x4 4 App's exec code -.rodata._global_impure_ 0x87a0 0x4 4 -.text.isatty 0x87a4 0x4 4 -.text.lseek 0x87a8 0x4 4 -.text.__malloc_lock 0x87ac 0x2 2 -.text.__malloc_unlock 0x87ae 0x2 2 - Total ROM used : 0x87ad 34733 84.8% of 0xa000 - -------------------------------------------------------------------------- - Total Program Memory used : 0x87ad 34733 84.8% of 0xa000 - -------------------------------------------------------------------------- - - -RAM Data-Memory Usage -section address length [bytes] (dec) Description -------- ---------- ------------------------- ----------- -.bss 0x20000000 0x4 4 Uninitialized data -.bss.data_buff 0x20000004 0x800 2048 -.bss.routing_table 0x20000804 0x370 880 -.bss.msg_buffer 0x20000b74 0x195 405 -.bss.node_state.8055 0x20000d09 0x1 1 -.bss.source_id 0x20000d0a 0x2 2 -.data.__global_locale 0x20000d0c 0x16c 364 -.bss.service_table 0x20000e78 0x131 305 -.bss.mem_clear_needed 0x20000fa9 0x1 1 -.data.residual_space 0x20000faa 0x2 2 -.bss.tx_tasks 0x20000fac 0xa0 160 -.bss.bootloader_data 0x2000104c 0x7f 127 -.bss.crc 0x200010cb 0x1 1 -.bss.ctx 0x200010cc 0x7c 124 -.data.impure_data 0x20001148 0x60 96 -.bss.luos_tasks 0x200011a8 0x50 80 -.bss.package_table 0x200011f8 0x28 40 -.bss.msg_tasks 0x20001220 0x28 40 -.bss.__sf_fake_stderr 0x20001248 0x20 32 -.bss.__sf_fake_stdin 0x20001268 0x20 32 -.bss.__sf_fake_stdout 0x20001288 0x20 32 -.bss 0x200012a8 0x1c 28 Uninitialized data -.bss.nb_bytes 0x200012c4 0x4 4 -.bss.ll_timestamp 0x200012c8 0x18 24 -.bss.data_size.7939 0x200012e0 0x14 20 -.bss.total_data_size.79 0x200012f4 0x14 20 -.bss.descriptor_section 0x20001308 0x10 16 -.bss.write_back_section 0x20001318 0x10 16 -.bss.ll_rx_timestamp 0x20001328 0x8 8 -.bss.general_stats 0x20001330 0x7 7 -.bss.load_flag 0x20001337 0x1 1 -.bss.luos_stats 0x20001338 0x6 6 -.bss.bootloader_data_si 0x2000133e 0x2 2 -.bss.PTP 0x20001340 0x6 6 -.bss.data_index 0x20001346 0x2 2 -.bss.tickstart 0x20001348 0x4 4 -.data.flash_addr 0x2000134c 0x4 4 -.bss.detection_service 0x20001350 0x4 4 -.bss.last_loop_date.776 0x20001354 0x4 4 -.bss.tick 0x20001358 0x4 4 -.bss.tx_data 0x2000135c 0x4 4 -.bss.copy_task_pointer 0x20001360 0x4 4 -.bss.current_msg 0x20001364 0x4 4 -.bss.data_end_estimatio 0x20001368 0x4 4 -.bss.data_ptr 0x2000136c 0x4 4 -.bss.mem_stat 0x20001370 0x4 4 -.bss.oldest_msg 0x20001374 0x4 4 -.bss.used_msg 0x20001378 0x4 4 -.bss.baudrate 0x2000137c 0x4 4 -.bss 0x20001380 0x4 4 Uninitialized data -.data._impure_ptr 0x20001384 0x4 4 -.bss.__malloc_free_list 0x20001388 0x4 4 -.bss.__malloc_sbrk_star 0x2000138c 0x4 4 -.bss 0x20001390 0x4 4 Uninitialized data -.data.luos_version 0x20001394 0x3 3 -.bss.reset_needed 0x20001397 0x1 1 -.bss.last_msg_size.7941 0x20001398 0x2 2 -.bss.package_number 0x2000139a 0x2 2 -.bss.service_number 0x2000139c 0x2 2 -.bss.last_routing_table 0x2000139e 0x2 2 -.bss.last_service 0x200013a0 0x2 2 -.bss.data_size_to_trans 0x200013a2 0x2 2 -.bss.timoutclockcnt 0x200013a4 0x2 2 -.bss.luos_tasks_stack_i 0x200013a6 0x2 2 -.bss.msg_tasks_stack_id 0x200013a8 0x2 2 -.bss.tx_tasks_stack_id 0x200013aa 0x2 2 -.bss.crc_val 0x200013ac 0x2 2 -.bss.data_count 0x200013ae 0x2 2 -.bss.data_size 0x200013b0 0x2 2 -.bss.large_data_num 0x200013b2 0x2 2 -.bss.last_crc.6331 0x200013b4 0x2 2 -.bss.last_node 0x200013b6 0x2 2 -.bss.Port_ExpectedState 0x200013b8 0x1 1 -.bss.nbrRetry 0x200013b9 0x1 1 - Total RAM used : 0x13ba 5050 15.4% of 0x8000 - -------------------------------------------------------------------------- - Total Data Memory used : 0x13ba 5050 15.4% of 0x8000 - -------------------------------------------------------------------------- - - -Dynamic Data-Memory Reservation -section address length [bytes] (dec) Description -------- ---------- ------------------------- ----------- -heap 0x200013c0 0x200 512 Reserved for heap -stack 0x200015d8 0x6a18 27160 Reserved for stack - - -------------------------------------------------------------------------- - -Discarded input sections - - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .xc_stack_usage - 0x00000000 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .data 0x00000000 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - .xc_stack_usage - 0x00000000 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .text.NVIC_INT_Enable - 0x00000000 0x8 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .text.NVIC_INT_Disable - 0x00000000 0x12 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .text.NVIC_INT_Restore - 0x00000000 0x14 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_CacheInvalidate - 0x00000000 0x10 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_Read - 0x00000000 0x10 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_PageWrite - 0x00000000 0x30 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_RowErase - 0x00000000 0x18 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_ErrorGet - 0x00000000 0x28 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_IsBusy - 0x00000000 0x14 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_RegionLock - 0x00000000 0x14 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text.NVMCTRL_RegionUnlock - 0x00000000 0x14 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupRead - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupWrite - 0x00000000 0xc build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupLatchRead - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupSet - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupClear - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupToggle - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupInputEnable - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_GroupOutputEnable - 0x00000000 0x4 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_PinPeripheralFunctionConfig - 0x00000000 0x48 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text.PORT_PinGPIOConfig - 0x00000000 0x20 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/initialization.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/initialization.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/initialization.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .text._exit 0x00000000 0x2 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_info 0x00000000 0xf60 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_abbrev 0x00000000 0x1cc build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_loc 0x00000000 0x15 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_aranges - 0x00000000 0x20 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_ranges 0x00000000 0x10 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_line 0x00000000 0x14b build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_str 0x00000000 0xe build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .comment 0x00000000 0x54 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .debug_frame 0x00000000 0x20 build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .ARM.attributes - 0x00000000 0x2c build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1360937237/main.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1360937237/main.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1360937237/main.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .text.LuosBootloader_SaveNodeID - 0x00000000 0x18 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_ServicesClear - 0x00000000 0x14 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Streaming_Receive - 0x00000000 0x3c build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SendBaudrate - 0x00000000 0x5a build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SetExternId - 0x00000000 0x54 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_NbrAvailableMsg - 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_GetSystick - 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_TxComplete - 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_Flush - 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Streaming_SendSize - 0x00000000 0xb8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Streaming_Send - 0x00000000 0x1c build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_ReadMsg - 0x00000000 0x44 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_ReadFromService - 0x00000000 0xa0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_IsDetected - 0x00000000 0x10 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SetFilterState - 0x00000000 0x1c build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_AddPackage - 0x00000000 0x20 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_SetID - 0x00000000 0x38 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text.Luos_Detect - 0x00000000 0x58 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .bss.boot_run 0x00000000 0x1 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .bss.boot_start_date - 0x00000000 0x4 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .bss.routing_table_pt - 0x00000000 0x4 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .data.launch_boot_flag - 0x00000000 0x1 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text.ProfileCore_Handler - 0x00000000 0x88 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text.ProfileCore_GetFromService - 0x00000000 0x1e build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text.ProfileCore_GetNew - 0x00000000 0xb0 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text.ProfileCore_OverrideConnectHandler - 0x00000000 0xc build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text.ProfileCore_StartService - 0x00000000 0x5c build/luos_bootloader/production/_ext/1555399743/profile_core.o - .rodata 0x00000000 0x34 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .bss.available_index - 0x00000000 0x2 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .bss.head_profile_index - 0x00000000 0x2 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .bss.override_connect_handler - 0x00000000 0x1 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .bss.profile_table - 0x00000000 0x78 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_info 0x00000000 0x1cf1 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_abbrev 0x00000000 0x382 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_loc 0x00000000 0x323 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_aranges - 0x00000000 0x40 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_ranges 0x00000000 0x48 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_line 0x00000000 0x3c7 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_str 0x00000000 0x90 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .comment 0x00000000 0x54 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .debug_frame 0x00000000 0x90 build/luos_bootloader/production/_ext/1555399743/profile_core.o - .ARM.attributes - 0x00000000 0x2c build/luos_bootloader/production/_ext/1555399743/profile_core.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RoutingTB_GetServiceIndex - 0x00000000 0x58 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RoutingTB_NodeIDFromID - 0x00000000 0x44 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RoutingTB_GetLastService - 0x00000000 0xc build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_InitCheck - 0x00000000 0x2c build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_Reset - 0x00000000 0x60 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_ID - 0x00000000 0x68 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_Type - 0x00000000 0x70 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_Node - 0x00000000 0x70 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_Alias - 0x00000000 0x6c build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text.RTFilter_Service - 0x00000000 0x9c build/luos_bootloader/production/_ext/1555399743/routing_table.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_CreateChannel - 0x00000000 0x38 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_ResetChannel - 0x00000000 0x8 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_GetAvailableSampleNB - 0x00000000 0x48 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_PutSample - 0x00000000 0x8c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_GetSample - 0x00000000 0x70 build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_GetAvailableSampleNBUntilEndBuffer - 0x00000000 0x3c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_AddAvailableSampleNB - 0x00000000 0x4c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text.Streaming_RmvAvailableSampleNB - 0x00000000 0x34 build/luos_bootloader/production/_ext/1555399743/streaming.o - .rodata 0x00000000 0x30 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_info 0x00000000 0x15eb build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_abbrev 0x00000000 0x2a6 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_loc 0x00000000 0x78c build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_aranges - 0x00000000 0x58 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_ranges 0x00000000 0x48 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_line 0x00000000 0x472 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_str 0x00000000 0x59 build/luos_bootloader/production/_ext/1555399743/streaming.o - .comment 0x00000000 0x54 build/luos_bootloader/production/_ext/1555399743/streaming.o - .debug_frame 0x00000000 0x108 build/luos_bootloader/production/_ext/1555399743/streaming.o - .ARM.attributes - 0x00000000 0x2c build/luos_bootloader/production/_ext/1555399743/streaming.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .text.LuosHAL_StopTimestamp - 0x00000000 0x18 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .text.LuosHAL_SaveNodeID - 0x00000000 0x38 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .text.MsgAlloc_GetLuosTaskSourceId - 0x00000000 0x30 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .text.MsgAlloc_LuosTasksNbr - 0x00000000 0xc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .text.MsgAlloc_PullMsg - 0x00000000 0x340 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/reception.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/reception.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/reception.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/robus.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/robus.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/robus.o - .text.Robus_ServicesClear - 0x00000000 0x1c build/luos_bootloader/production/_ext/1000620745/robus.o - .text.Robus_Flush - 0x00000000 0x24 build/luos_bootloader/production/_ext/1000620745/robus.o - .text.Robus_SetFilterState - 0x00000000 0x18 build/luos_bootloader/production/_ext/1000620745/robus.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/target.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/target.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/target.o - .text.Trgt_AddMulticastTarget - 0x00000000 0x1e build/luos_bootloader/production/_ext/1000620745/target.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .text.Timestamp_GetToken - 0x00000000 0x24 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .text.Timestamp_Tag - 0x00000000 0x38 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .text.Timestamp_EncodeMsg - 0x00000000 0x84 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .text.Timestamp_DecodeMsg - 0x00000000 0x2a build/luos_bootloader/production/_ext/1000620745/timestamp.o - .bss.token_list_head - 0x00000000 0x4 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .text 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/transmission.o - .data 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/transmission.o - .bss 0x00000000 0x0 build/luos_bootloader/production/_ext/1000620745/transmission.o - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .xc_stack_usage - 0x00000000 0x2a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .xc_stack_usage - 0x00000000 0x35 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .text 0x00000000 0x1d4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_frame 0x00000000 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .xc_stack_usage - 0x00000000 0x33 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_line 0x00000000 0xaf c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_info 0x00000000 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_abbrev 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_aranges - 0x00000000 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .debug_str 0x00000000 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .ARM.attributes - 0x00000000 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_divsi3.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .xc_stack_usage - 0x00000000 0x36 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .xc_stack_usage - 0x00000000 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .xc_stack_usage - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .xc_stack_usage - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .ARM.extab 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .xc_stack_usage - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .xc_stack_usage - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .xc_stack_usage - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .xc_stack_usage - 0x00000000 0xc7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .xc_stack_usage - 0x00000000 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .xc_stack_usage - 0x00000000 0x1f c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .text.strstr 0x00000000 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .comment 0x00000000 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .ARM.attributes - 0x00000000 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strstr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .xc_stack_usage - 0x00000000 0x60 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .text.__printf_float - 0x00000000 0x6 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .xc_stack_usage - 0x00000000 0x31 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .xc_stack_usage - 0x00000000 0x81 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .text._cleanup - 0x00000000 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .xc_stack_usage - 0x00000000 0x41 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .text.fputwc 0x00000000 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .xc_stack_usage - 0x00000000 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .text._fwalk 0x00000000 0x38 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .xc_stack_usage - 0x00000000 0x52 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .text._setlocale_r - 0x00000000 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .text.setlocale - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .bss._PathLocale - 0x00000000 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .xc_stack_usage - 0x00000000 0x33 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .text._mbtowc_r - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .xc_stack_usage - 0x00000000 0x17 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .xc_stack_usage - 0x00000000 0x33 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .text._printf_i - 0x00000000 0x210 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .rodata 0x00000000 0x22 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .xc_stack_usage - 0x00000000 0x6e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .text.__seofread - 0x00000000 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .xc_stack_usage - 0x00000000 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .text.__swbuf 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .xc_stack_usage - 0x00000000 0x2d c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .text.wcrtomb 0x00000000 0x18 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .xc_stack_usage - 0x00000000 0x33 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .text._wctomb_r - 0x00000000 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .xc_stack_usage - 0x00000000 0x19 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .xc_stack_usage - 0x00000000 0x43 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .text.fflush 0x00000000 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .xc_stack_usage - 0x00000000 0x34 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .xc_stack_usage - 0x00000000 0x38 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .xc_stack_usage - 0x00000000 0x36 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .text.cleanup_glue - 0x00000000 0x1a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .text._reclaim_reent - 0x00000000 0xcc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .xc_stack_usage - 0x00000000 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .xc_stack_usage - 0x00000000 0x17 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .xc_stack_usage - 0x00000000 0x15 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .gnu.warning.closestub - 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .xc_stack_usage - 0x00000000 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .xc_stack_usage - 0x00000000 0x12 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .xc_stack_usage - 0x00000000 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .eh_frame 0x00000000 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .comment 0x00000000 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .ARM.attributes - 0x00000000 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o - .text 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - .data 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - .bss 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - .xc_stack_usage.hdr - 0x00000000 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - -Memory Configuration - -Name Origin Length Attributes -rom 0x00000000 0x0000a000 xrl -ram 0x20000000 0x00008000 xw !r -config_00804000 0x00804000 0x00000004 -config_00804004 0x00804004 0x00000004 -*default* 0x00000000 0xffffffff - -Linker script and memory map - -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o -LOAD build/luos_bootloader/production/_ext/903266522/plib_clock.o -LOAD build/luos_bootloader/production/_ext/901117036/plib_evsys.o -LOAD build/luos_bootloader/production/_ext/1968463158/plib_nvic.o -LOAD build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o -LOAD build/luos_bootloader/production/_ext/1968410007/plib_port.o -LOAD build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o -LOAD build/luos_bootloader/production/_ext/1137593668/initialization.o -LOAD build/luos_bootloader/production/_ext/1137593668/interrupts.o -LOAD build/luos_bootloader/production/_ext/1137593668/exceptions.o -LOAD build/luos_bootloader/production/_ext/1137593668/startup_xc32.o -LOAD build/luos_bootloader/production/_ext/1137593668/libc_syscalls.o -LOAD build/luos_bootloader/production/_ext/1360937237/main.o -LOAD build/luos_bootloader/production/_ext/1342350994/bootloader_core.o -LOAD build/luos_bootloader/production/_ext/1555399743/luos_engine.o -LOAD build/luos_bootloader/production/_ext/1555399743/luos_utils.o -LOAD build/luos_bootloader/production/_ext/1555399743/profile_core.o -LOAD build/luos_bootloader/production/_ext/1555399743/routing_table.o -LOAD build/luos_bootloader/production/_ext/1555399743/streaming.o -LOAD build/luos_bootloader/production/_ext/1234256160/luos_hal.o -LOAD build/luos_bootloader/production/_ext/1857845632/robus_hal.o -LOAD build/luos_bootloader/production/_ext/1000620745/msg_alloc.o -LOAD build/luos_bootloader/production/_ext/1000620745/port_manager.o -LOAD build/luos_bootloader/production/_ext/1000620745/reception.o -LOAD build/luos_bootloader/production/_ext/1000620745/robus.o -LOAD build/luos_bootloader/production/_ext/1000620745/target.o -LOAD build/luos_bootloader/production/_ext/1000620745/timestamp.o -LOAD build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x00000001 __MPLAB_BUILD = 0x1 - 0x0000a000 __rom_end = (ORIGIN (rom) + LENGTH (rom)) - 0x20008000 __ram_end = (ORIGIN (ram) + LENGTH (ram)) - -.config_00804000 - 0x00804000 0x4 - *(.config_00804000) - .config_00804000 - 0x00804000 0x4 build/luos_bootloader/production/_ext/1137593668/initialization.o - 0x00804000 __config_00804000 - -.config_00804004 - 0x00804004 0x4 - *(.config_00804004) - .config_00804004 - 0x00804004 0x4 build/luos_bootloader/production/_ext/1137593668/initialization.o - 0x00804004 __config_00804004 - -.vectors 0x00000000 0xb0 - 0x00000000 . = ALIGN (0x4) - 0x00000000 _sfixed = . - *(.vectors .vectors.* .vectors_default .vectors_default.*) - .vectors 0x00000000 0xb0 build/luos_bootloader/production/_ext/1137593668/interrupts.o - 0x00000000 exception_table - *(.isr_vector) - *(.reset*) - *(.after_vectors) - -.text 0x000000b0 0x20 - 0x000000b0 . = ALIGN (0x4) - *(.glue_7t) - .glue_7t 0x000000b0 0x0 linker stubs - *(.glue_7) - .glue_7 0x000000b0 0x0 linker stubs - *(.gnu.linkonce.r.*) - *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x000000b0 . = ALIGN (0x4) - *(.init) - .init 0x000000b0 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - 0x000000b0 _init - .init 0x000000b4 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - 0x000000bc . = ALIGN (0x4) - 0x000000bc __preinit_array_start = . - *(.preinit_array) - 0x000000bc __preinit_array_end = . - 0x000000bc . = ALIGN (0x4) - 0x000000bc __init_array_start = . - *(SORT_BY_NAME(.init_array.*)) - *(.init_array) - .init_array 0x000000bc 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - 0x000000c0 __init_array_end = . - 0x000000c0 . = ALIGN (0x4) - *crtbegin.o(.ctors) - *(EXCLUDE_FILE(*crtend.o) .ctors) - *(SORT_BY_NAME(.ctors.*)) - *crtend.o(.ctors) - 0x000000c0 . = ALIGN (0x4) - *(.fini) - .fini 0x000000c0 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - 0x000000c0 _fini - .fini 0x000000c4 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - 0x000000cc . = ALIGN (0x4) - 0x000000cc __fini_array_start = . - *(.fini_array) - .fini_array 0x000000cc 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - *(SORT_BY_NAME(.fini_array.*)) - 0x000000d0 __fini_array_end = . - *crtbegin.o(.dtors) - *(EXCLUDE_FILE(*crtend.o) .dtors) - *(SORT_BY_NAME(.dtors.*)) - *crtend.o(.dtors) - 0x000000d0 . = ALIGN (0x4) - 0x000000d0 _efixed = . - [!provide] PROVIDE (__exidx_start = .) - -.ARM.exidx 0x000000d0 0x8 - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - .ARM.exidx 0x000000d0 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - [!provide] PROVIDE (__exidx_end = .) - 0x000000d8 . = ALIGN (0x4) - 0x000000d8 _etext = . - -.bss 0x20000000 0x4 - 0x20000000 . = ALIGN (0x4) - 0x20000000 __bss_start__ = . - 0x20000000 _sbss = . - 0x20000000 _szero = . - *(COMMON) - COMMON 0x20000000 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - 0x20000000 errno - 0x20000004 . = ALIGN (0x4) - 0x20000004 __bss_end__ = . - 0x20000004 _ebss = . - 0x20000004 _ezero = . - 0x20000004 . = ALIGN (0x4) - 0x20000004 _end = . - 0x20007fff _ram_end_ = ((ORIGIN (ram) + LENGTH (ram)) - 0x1) - 0x00000200 _min_heap_size = 0x200 -START GROUP -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libm_nano.a -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a -END GROUP -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtend.o -LOAD c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o -OUTPUT(dist/luos_bootloader/production/luos_bootloader_samd21j18a.X.production.elf elf32-littlearm) -LOAD stack -LOAD data_init - -.ARM.attributes - 0x00000000 0x28 - .ARM.attributes - 0x00000000 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crti.o - .ARM.attributes - 0x0000001e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - .ARM.attributes - 0x0000004a 0x2c build/luos_bootloader/production/_ext/903266522/plib_clock.o - .ARM.attributes - 0x00000076 0x2c build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .ARM.attributes - 0x000000a2 0x2c build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .ARM.attributes - 0x000000ce 0x2c build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .ARM.attributes - 0x000000fa 0x2c build/luos_bootloader/production/_ext/1968410007/plib_port.o - .ARM.attributes - 0x00000126 0x2c build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .ARM.attributes - 0x00000152 0x2c build/luos_bootloader/production/_ext/1137593668/initialization.o - .ARM.attributes - 0x0000017e 0x2c build/luos_bootloader/production/_ext/1137593668/interrupts.o - .ARM.attributes - 0x000001aa 0x2c build/luos_bootloader/production/_ext/1137593668/exceptions.o - .ARM.attributes - 0x000001d6 0x2c build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .ARM.attributes - 0x00000202 0x2c build/luos_bootloader/production/_ext/1360937237/main.o - .ARM.attributes - 0x0000022e 0x2c build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .ARM.attributes - 0x0000025a 0x2c build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .ARM.attributes - 0x00000286 0x2c build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .ARM.attributes - 0x000002b2 0x2c build/luos_bootloader/production/_ext/1555399743/routing_table.o - .ARM.attributes - 0x000002de 0x2c build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .ARM.attributes - 0x0000030a 0x2c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .ARM.attributes - 0x00000336 0x2c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .ARM.attributes - 0x00000362 0x2c build/luos_bootloader/production/_ext/1000620745/port_manager.o - .ARM.attributes - 0x0000038e 0x2c build/luos_bootloader/production/_ext/1000620745/reception.o - .ARM.attributes - 0x000003ba 0x2c build/luos_bootloader/production/_ext/1000620745/robus.o - .ARM.attributes - 0x000003e6 0x2c build/luos_bootloader/production/_ext/1000620745/target.o - .ARM.attributes - 0x00000412 0x2c build/luos_bootloader/production/_ext/1000620745/timestamp.o - .ARM.attributes - 0x0000043e 0x2c build/luos_bootloader/production/_ext/1000620745/transmission.o - .ARM.attributes - 0x0000046a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .ARM.attributes - 0x00000496 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .ARM.attributes - 0x000004b4 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .ARM.attributes - 0x000004d2 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .ARM.attributes - 0x000004f0 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .ARM.attributes - 0x0000051c 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .ARM.attributes - 0x00000548 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .ARM.attributes - 0x00000574 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .ARM.attributes - 0x000005a0 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .ARM.attributes - 0x000005cc 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .ARM.attributes - 0x000005ea 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .ARM.attributes - 0x00000608 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .ARM.attributes - 0x00000626 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .ARM.attributes - 0x00000652 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .ARM.attributes - 0x0000067e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .ARM.attributes - 0x000006aa 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .ARM.attributes - 0x000006d6 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .ARM.attributes - 0x00000702 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .ARM.attributes - 0x0000072e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .ARM.attributes - 0x0000075a 0x1c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .ARM.attributes - 0x00000776 0x1c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - .ARM.attributes - 0x00000792 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .ARM.attributes - 0x000007be 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .ARM.attributes - 0x000007ea 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .ARM.attributes - 0x00000816 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .ARM.attributes - 0x00000842 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .ARM.attributes - 0x0000086e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .ARM.attributes - 0x0000089a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .ARM.attributes - 0x000008c6 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .ARM.attributes - 0x000008f2 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .ARM.attributes - 0x0000091e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .ARM.attributes - 0x0000094a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .ARM.attributes - 0x00000976 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .ARM.attributes - 0x000009a2 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .ARM.attributes - 0x000009ce 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .ARM.attributes - 0x000009fa 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .ARM.attributes - 0x00000a26 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .ARM.attributes - 0x00000a52 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .ARM.attributes - 0x00000a7e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .ARM.attributes - 0x00000aaa 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .ARM.attributes - 0x00000ad6 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .ARM.attributes - 0x00000b02 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .ARM.attributes - 0x00000b2e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .ARM.attributes - 0x00000b5a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .ARM.attributes - 0x00000b86 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .ARM.attributes - 0x00000bb2 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .ARM.attributes - 0x00000bde 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .ARM.attributes - 0x00000c0a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .ARM.attributes - 0x00000c36 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .ARM.attributes - 0x00000c62 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .ARM.attributes - 0x00000c8e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .ARM.attributes - 0x00000cba 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .ARM.attributes - 0x00000ce6 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .ARM.attributes - 0x00000d12 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .ARM.attributes - 0x00000d3e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .ARM.attributes - 0x00000d6a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .ARM.attributes - 0x00000d96 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .ARM.attributes - 0x00000dc2 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .ARM.attributes - 0x00000dee 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .ARM.attributes - 0x00000e1a 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .ARM.attributes - 0x00000e46 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .ARM.attributes - 0x00000e72 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .ARM.attributes - 0x00000e9e 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - .ARM.attributes - 0x00000eca 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtn.o - -.comment 0x00000000 0x53 - .comment 0x00000000 0x53 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - 0x54 (size before relaxing) - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1137593668/initialization.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1360937237/main.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/reception.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/robus.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/target.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .comment 0x00000053 0x54 build/luos_bootloader/production/_ext/1000620745/transmission.o - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-reent.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .comment 0x00000053 0x54 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_info 0x00000000 0x2bf09 - .debug_info 0x00000000 0x8d9 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_info 0x000008d9 0x37b build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_info 0x00000c54 0x5ba build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_info 0x0000120e 0x1403 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_info 0x00002611 0xd99 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_info 0x000033aa 0x30c build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_info 0x000036b6 0x635 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_info 0x00003ceb 0x8d8 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_info 0x000045c3 0x396 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_info 0x00004959 0x521 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_info 0x00004e7a 0xf3b build/luos_bootloader/production/_ext/1360937237/main.o - .debug_info 0x00005db5 0x218d build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_info 0x00007f42 0x3eb1 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_info 0x0000bdf3 0x13a0 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_info 0x0000d193 0x3266 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_info 0x000103f9 0x1c61 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_info 0x0001205a 0x2e9e build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_info 0x00014ef8 0x5b58 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_info 0x0001aa50 0xcce build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_info 0x0001b71e 0x263c build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_info 0x0001dd5a 0x269d build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_info 0x000203f7 0xa3a build/luos_bootloader/production/_ext/1000620745/target.o - .debug_info 0x00020e31 0x1759 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_info 0x0002258a 0x1c62 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_info 0x000241ec 0x2c3 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_info 0x000244af 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_info 0x000244d5 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .debug_info 0x000244fb 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_info 0x00024521 0x1b5e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_info 0x0002607f 0x1c12 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_info 0x00027c91 0x6e2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_info 0x00028373 0x63e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_info 0x000289b1 0x441 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_info 0x00028df2 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .debug_info 0x00028e18 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .debug_info 0x00028e3e 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .debug_info 0x00028e64 0x491 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_info 0x000292f5 0x4c3 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_info 0x000297b8 0x4c3 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_info 0x00029c7b 0x2aa c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_info 0x00029f25 0x2aa c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_info 0x0002a1cf 0x2ac c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_info 0x0002a47b 0x2aa c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_info 0x0002a725 0x2a8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_info 0x0002a9cd 0x2a6 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_info 0x0002ac73 0x2aa c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_info 0x0002af1d 0x2a7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_info 0x0002b1c4 0x2a7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_info 0x0002b46b 0x2a9 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_info 0x0002b714 0x2a7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_info 0x0002b9bb 0x2a6 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_info 0x0002bc61 0x2a8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_abbrev 0x00000000 0x5084 - .debug_abbrev 0x00000000 0x12d build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_abbrev 0x0000012d 0x3b build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_abbrev 0x00000168 0x118 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_abbrev 0x00000280 0x2a7 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_abbrev 0x00000527 0x1c7 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_abbrev 0x000006ee 0x80 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_abbrev 0x0000076e 0xda build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_abbrev 0x00000848 0xa6 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_abbrev 0x000008ee 0x3e build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_abbrev 0x0000092c 0x11f build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_abbrev 0x00000a4b 0x1f1 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_abbrev 0x00000c3c 0x4d8 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_abbrev 0x00001114 0x673 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_abbrev 0x00001787 0x2bc build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_abbrev 0x00001a43 0x547 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_abbrev 0x00001f8a 0x52b build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_abbrev 0x000024b5 0x4a7 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_abbrev 0x0000295c 0x572 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_abbrev 0x00002ece 0x1e5 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_abbrev 0x000030b3 0x483 build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_abbrev 0x00003536 0x597 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_abbrev 0x00003acd 0x17b build/luos_bootloader/production/_ext/1000620745/target.o - .debug_abbrev 0x00003c48 0x384 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_abbrev 0x00003fcc 0x32d build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_abbrev 0x000042f9 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_abbrev 0x00004327 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_abbrev 0x0000433b 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .debug_abbrev 0x0000434f 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_abbrev 0x00004363 0x130 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_abbrev 0x00004493 0x157 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_abbrev 0x000045ea 0x161 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_abbrev 0x0000474b 0x172 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_abbrev 0x000048bd 0x153 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_abbrev 0x00004a10 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .debug_abbrev 0x00004a24 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .debug_abbrev 0x00004a38 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .debug_abbrev 0x00004a4c 0x14a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_abbrev 0x00004b96 0x14c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_abbrev 0x00004ce2 0x14c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_abbrev 0x00004e2e 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_abbrev 0x00004e5c 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_abbrev 0x00004e8a 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_abbrev 0x00004eb8 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_abbrev 0x00004ee6 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_abbrev 0x00004f14 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_abbrev 0x00004f42 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_abbrev 0x00004f70 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_abbrev 0x00004f9e 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_abbrev 0x00004fcc 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_abbrev 0x00004ffa 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_abbrev 0x00005028 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_abbrev 0x00005056 0x2e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_loc 0x00000000 0xa1c8 - .debug_loc 0x00000000 0x8e build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_loc 0x0000008e 0x2e build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_loc 0x000000bc 0x228 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_loc 0x000002e4 0x226 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_loc 0x0000050a 0x25 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_loc 0x0000052f 0x45 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_loc 0x00000574 0x20 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_loc 0x00000594 0x20 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_loc 0x000005b4 0x575 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_loc 0x00000b29 0x1b97 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_loc 0x000026c0 0x64 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_loc 0x00002724 0xebb build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_loc 0x000035df 0x631 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_loc 0x00003c10 0x792 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_loc 0x000043a2 0x256c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_loc 0x0000690e 0x253 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_loc 0x00006b61 0x87f build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_loc 0x000073e0 0x7f2 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_loc 0x00007bd2 0x107 build/luos_bootloader/production/_ext/1000620745/target.o - .debug_loc 0x00007cd9 0x3ad build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_loc 0x00008086 0x2f6 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_loc 0x0000837c 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_loc 0x00008390 0x62 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_loc 0x000083f2 0x41c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_loc 0x0000880e 0x8ef c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_loc 0x000090fd 0x8e2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_loc 0x000099df 0xf4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_loc 0x00009ad3 0x166 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_loc 0x00009c39 0x27d c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_loc 0x00009eb6 0x272 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_loc 0x0000a128 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_loc 0x0000a13c 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_loc 0x0000a150 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_loc 0x0000a164 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_loc 0x0000a178 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_loc 0x0000a18c 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_loc 0x0000a1a0 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_loc 0x0000a1b4 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_aranges 0x00000000 0xc08 - .debug_aranges - 0x00000000 0x20 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_aranges - 0x00000020 0x20 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_aranges - 0x00000040 0x38 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_aranges - 0x00000078 0x60 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_aranges - 0x000000d8 0x70 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_aranges - 0x00000148 0x28 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_aranges - 0x00000170 0x20 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_aranges - 0x00000190 0x20 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_aranges - 0x000001b0 0x28 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_aranges - 0x000001d8 0x28 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_aranges - 0x00000200 0x20 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_aranges - 0x00000220 0x50 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_aranges - 0x00000270 0xf8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_aranges - 0x00000368 0x28 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_aranges - 0x00000390 0xd8 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_aranges - 0x00000468 0xa8 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_aranges - 0x00000510 0x98 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_aranges - 0x000005a8 0xe8 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_aranges - 0x00000690 0x40 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_aranges - 0x000006d0 0x78 build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_aranges - 0x00000748 0x90 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_aranges - 0x000007d8 0x28 build/luos_bootloader/production/_ext/1000620745/target.o - .debug_aranges - 0x00000800 0x48 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_aranges - 0x00000848 0x40 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_aranges - 0x00000888 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_aranges - 0x000008a8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_aranges - 0x000008c8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .debug_aranges - 0x000008e8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_aranges - 0x00000908 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_aranges - 0x00000928 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_aranges - 0x00000948 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_aranges - 0x00000968 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_aranges - 0x00000988 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_aranges - 0x000009a8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .debug_aranges - 0x000009c8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .debug_aranges - 0x000009e8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .debug_aranges - 0x00000a08 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_aranges - 0x00000a28 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_aranges - 0x00000a48 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_aranges - 0x00000a68 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_aranges - 0x00000a88 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_aranges - 0x00000aa8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_aranges - 0x00000ac8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_aranges - 0x00000ae8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_aranges - 0x00000b08 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_aranges - 0x00000b28 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_aranges - 0x00000b48 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_aranges - 0x00000b68 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_aranges - 0x00000b88 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_aranges - 0x00000ba8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_aranges - 0x00000bc8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_aranges - 0x00000be8 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_ranges 0x00000000 0x19b0 - .debug_ranges 0x00000000 0x28 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_ranges 0x00000028 0x10 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_ranges 0x00000038 0x28 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_ranges 0x00000060 0x50 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_ranges 0x000000b0 0x60 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_ranges 0x00000110 0x18 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_ranges 0x00000128 0x10 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_ranges 0x00000138 0x10 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_ranges 0x00000148 0x18 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_ranges 0x00000160 0x18 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_ranges 0x00000178 0x10 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_ranges 0x00000188 0x88 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_ranges 0x00000210 0x2c0 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_ranges 0x000004d0 0x18 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_ranges 0x000004e8 0x158 build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_ranges 0x00000640 0x98 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_ranges 0x000006d8 0xd0 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_ranges 0x000007a8 0xb08 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_ranges 0x000012b0 0x48 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_ranges 0x000012f8 0x128 build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_ranges 0x00001420 0x118 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_ranges 0x00001538 0x18 build/luos_bootloader/production/_ext/1000620745/target.o - .debug_ranges 0x00001550 0x38 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_ranges 0x00001588 0x78 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_ranges 0x00001600 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_ranges 0x00001610 0x58 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_ranges 0x00001668 0x198 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_ranges 0x00001800 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_ranges 0x00001830 0x58 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_ranges 0x00001888 0x58 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_ranges 0x000018e0 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_ranges 0x000018f0 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_ranges 0x00001900 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_ranges 0x00001910 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_ranges 0x00001920 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_ranges 0x00001930 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_ranges 0x00001940 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_ranges 0x00001950 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_ranges 0x00001960 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_ranges 0x00001970 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_ranges 0x00001980 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_ranges 0x00001990 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_ranges 0x000019a0 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_line 0x00000000 0xbc3b - .debug_line 0x00000000 0x216 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_line 0x00000216 0x6e build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_line 0x00000284 0x26a build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_line 0x000004ee 0x343 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_line 0x00000831 0x2c3 build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_line 0x00000af4 0x85 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_line 0x00000b79 0x27e build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_line 0x00000df7 0x10c build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_line 0x00000f03 0x76 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_line 0x00000f79 0x1ab build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_line 0x00001124 0x192 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_line 0x000012b6 0x69d build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_line 0x00001953 0x127e build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_line 0x00002bd1 0x2dc build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_line 0x00002ead 0xc6f build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_line 0x00003b1c 0x714 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_line 0x00004230 0xaf1 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_line 0x00004d21 0x2955 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_line 0x00007676 0x398 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_line 0x00007a0e 0xcaa build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_line 0x000086b8 0xa35 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_line 0x000090ed 0x1c8 build/luos_bootloader/production/_ext/1000620745/target.o - .debug_line 0x000092b5 0x445 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_line 0x000096fa 0x4ef build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_line 0x00009be9 0x132 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_line 0x00009d1b 0xa8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_line 0x00009dc3 0x9c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .debug_line 0x00009e5f 0xa7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_line 0x00009f06 0x2cb c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_line 0x0000a1d1 0x3d7 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_line 0x0000a5a8 0x279 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_line 0x0000a821 0x314 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_line 0x0000ab35 0x154 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_line 0x0000ac89 0xb1 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .debug_line 0x0000ad3a 0xb0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .debug_line 0x0000adea 0xa6 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .debug_line 0x0000ae90 0x179 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_line 0x0000b009 0x1a8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_line 0x0000b1b1 0x1a4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_line 0x0000b355 0xa2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_line 0x0000b3f7 0xa2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_line 0x0000b499 0xa3 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_line 0x0000b53c 0xa2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_line 0x0000b5de 0xa1 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_line 0x0000b67f 0xb5 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_line 0x0000b734 0xa2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_line 0x0000b7d6 0xa1 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_line 0x0000b877 0x10c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_line 0x0000b983 0x9d c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_line 0x0000ba20 0x9e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_line 0x0000babe 0xb8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_line 0x0000bb76 0xc5 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_str 0x00000000 0x1636 - .debug_str 0x00000000 0x0 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_str 0x00000000 0x0 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_str 0x00000000 0x0 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_str 0x00000000 0x1f build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_str 0x0000001f 0xb build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_str 0x0000002a 0x0 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_str 0x0000002a 0x55 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_str 0x0000007f 0x0 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_str 0x0000007f 0x0 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_str 0x0000007f 0x2f build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_str 0x000000ae 0x26 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_str 0x000000d4 0x113 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_str 0x000001e7 0x491 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_str 0x00000678 0x61 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_str 0x000006d9 0x14d build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_str 0x00000826 0x3a build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_str 0x00000860 0x1b5 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_str 0x00000a15 0x7b build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_str 0x00000a90 0x71 build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_str 0x00000b01 0x1c2 build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_str 0x00000cc3 0x1a9 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_str 0x00000e6c 0xb build/luos_bootloader/production/_ext/1000620745/target.o - .debug_str 0x00000e77 0x3a build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_str 0x00000eb1 0x110 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_str 0x00000fc1 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_str 0x00000fc1 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_str 0x000010af 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - .debug_str 0x0000119d 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_str 0x0000128b 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_str 0x0000128b 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_str 0x0000128b 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_str 0x000012bb 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_str 0x000012e7 0x13 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_str 0x000012fa 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - .debug_str 0x000013e8 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - .debug_str 0x000014d6 0xee c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - .debug_str 0x000015c4 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_str 0x000015ea 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_str 0x00001610 0x26 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_str 0x00001636 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.debug_frame 0x00000000 0x1914 - .debug_frame 0x00000000 0x20 build/luos_bootloader/production/_ext/903266522/plib_clock.o - .debug_frame 0x00000020 0x20 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - .debug_frame 0x00000040 0x50 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - .debug_frame 0x00000090 0xb8 build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - .debug_frame 0x00000148 0xcc build/luos_bootloader/production/_ext/1968410007/plib_port.o - .debug_frame 0x00000214 0x30 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - .debug_frame 0x00000244 0x28 build/luos_bootloader/production/_ext/1137593668/initialization.o - .debug_frame 0x0000026c 0x20 build/luos_bootloader/production/_ext/1137593668/interrupts.o - .debug_frame 0x0000028c 0x30 build/luos_bootloader/production/_ext/1137593668/exceptions.o - .debug_frame 0x000002bc 0x38 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - .debug_frame 0x000002f4 0x28 build/luos_bootloader/production/_ext/1360937237/main.o - .debug_frame 0x0000031c 0xe8 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - .debug_frame 0x00000404 0x358 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - .debug_frame 0x0000075c 0x3c build/luos_bootloader/production/_ext/1555399743/luos_utils.o - .debug_frame 0x00000798 0x2bc build/luos_bootloader/production/_ext/1555399743/routing_table.o - .debug_frame 0x00000a54 0x194 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - .debug_frame 0x00000be8 0x198 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - .debug_frame 0x00000d80 0x2cc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - .debug_frame 0x0000104c 0x8c build/luos_bootloader/production/_ext/1000620745/port_manager.o - .debug_frame 0x000010d8 0x144 build/luos_bootloader/production/_ext/1000620745/reception.o - .debug_frame 0x0000121c 0x1a4 build/luos_bootloader/production/_ext/1000620745/robus.o - .debug_frame 0x000013c0 0x38 build/luos_bootloader/production/_ext/1000620745/target.o - .debug_frame 0x000013f8 0xa4 build/luos_bootloader/production/_ext/1000620745/timestamp.o - .debug_frame 0x0000149c 0x98 build/luos_bootloader/production/_ext/1000620745/transmission.o - .debug_frame 0x00001534 0x34 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - .debug_frame 0x00001568 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - .debug_frame 0x00001588 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - .debug_frame 0x000015b0 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - .debug_frame 0x000015ec 0x38 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - .debug_frame 0x00001624 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - .debug_frame 0x00001660 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - .debug_frame 0x00001680 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - .debug_frame 0x000016ac 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - .debug_frame 0x000016dc 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - .debug_frame 0x0000170c 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - .debug_frame 0x0000172c 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - .debug_frame 0x00001754 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - .debug_frame 0x0000177c 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - .debug_frame 0x000017a4 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - .debug_frame 0x000017cc 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - .debug_frame 0x000017f4 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - .debug_frame 0x00001814 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - .debug_frame 0x0000183c 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - .debug_frame 0x0000185c 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - .debug_frame 0x0000187c 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - .debug_frame 0x0000189c 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - .debug_frame 0x000018bc 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - .debug_frame 0x000018e8 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - -.stack 0x200015d8 0x100 - .stack 0x200015d8 0x100 stack - -.bss.data_buff%1 - 0x20000004 0x800 - .bss.data_buff - 0x20000004 0x800 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20000004 data_buff - -.bss.routing_table%2 - 0x20000804 0x370 - .bss.routing_table - 0x20000804 0x370 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x20000804 routing_table - -.bss.msg_buffer%3 - 0x20000b74 0x195 - .bss.msg_buffer - 0x20000b74 0x195 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20000b74 msg_buffer - -.data.__global_locale%4 - 0x20000d0c 0x16c - .data.__global_locale - 0x20000d0c 0x16c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - 0x20000d0c __global_locale - -.bss.service_table%5 - 0x20000e78 0x131 - .bss.service_table - 0x20000e78 0x131 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x20000e78 service_table - -.bss.tx_tasks%6 - 0x20000fac 0xa0 - .bss.tx_tasks 0x20000fac 0xa0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20000fac tx_tasks - -.bss.bootloader_data%7 - 0x2000104c 0x7f - .bss.bootloader_data - 0x2000104c 0x7f build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - -.bss.ctx%8 0x200010cc 0x7c - .bss.ctx 0x200010cc 0x7c build/luos_bootloader/production/_ext/1000620745/robus.o - 0x200010cc ctx - -.data.impure_data%9 - 0x20001148 0x60 - .data.impure_data - 0x20001148 0x60 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - -.bss.luos_tasks%10 - 0x200011a8 0x50 - .bss.luos_tasks - 0x200011a8 0x50 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x200011a8 luos_tasks - -.bss.package_table%11 - 0x200011f8 0x28 - .bss.package_table - 0x200011f8 0x28 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x200011f8 package_table - -.bss.msg_tasks%12 - 0x20001220 0x28 - .bss.msg_tasks - 0x20001220 0x28 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001220 msg_tasks - -.bss.__sf_fake_stderr%13 - 0x20001248 0x20 - .bss.__sf_fake_stderr - 0x20001248 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x20001248 __sf_fake_stderr - -.bss.__sf_fake_stdin%14 - 0x20001268 0x20 - .bss.__sf_fake_stdin - 0x20001268 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x20001268 __sf_fake_stdin - -.bss.__sf_fake_stdout%15 - 0x20001288 0x20 - .bss.__sf_fake_stdout - 0x20001288 0x20 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x20001288 __sf_fake_stdout - -.bss%16 0x200012a8 0x1c - .bss 0x200012a8 0x1c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - -.bss.ll_timestamp%17 - 0x200012c8 0x18 - .bss.ll_timestamp - 0x200012c8 0x18 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - -.bss.data_size.7939%18 - 0x200012e0 0x14 - .bss.data_size.7939 - 0x200012e0 0x14 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.bss.total_data_size.7940%19 - 0x200012f4 0x14 - .bss.total_data_size.7940 - 0x200012f4 0x14 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.bss.descriptor_section%20 - 0x20001308 0x10 - .bss.descriptor_section - 0x20001308 0x10 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - -.bss.write_back_section%21 - 0x20001318 0x10 - .bss.write_back_section - 0x20001318 0x10 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - -.bss.ll_rx_timestamp%22 - 0x20001328 0x8 - .bss.ll_rx_timestamp - 0x20001328 0x8 build/luos_bootloader/production/_ext/1000620745/reception.o - -.bss.general_stats%23 - 0x20001330 0x7 - .bss.general_stats - 0x20001330 0x7 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x20001330 general_stats - -.bss.luos_stats%24 - 0x20001338 0x6 - .bss.luos_stats - 0x20001338 0x6 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x20001338 luos_stats - -.bss.PTP%25 0x20001340 0x6 - .bss.PTP 0x20001340 0x6 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x20001340 PTP - -.bss.nb_bytes%26 - 0x200012c4 0x4 - .bss.nb_bytes 0x200012c4 0x4 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x200012c4 nb_bytes - -.bss.tickstart%27 - 0x20001348 0x4 - .bss.tickstart - 0x20001348 0x4 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20001348 tickstart - -.data.flash_addr%28 - 0x2000134c 0x4 - .data.flash_addr - 0x2000134c 0x4 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x2000134c flash_addr - -.bss.detection_service%29 - 0x20001350 0x4 - .bss.detection_service - 0x20001350 0x4 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x20001350 detection_service - -.bss.last_loop_date.7764%30 - 0x20001354 0x4 - .bss.last_loop_date.7764 - 0x20001354 0x4 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.bss.tick%31 0x20001358 0x4 - .bss.tick 0x20001358 0x4 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x20001358 tick - -.bss.tx_data%32 - 0x2000135c 0x4 - .bss.tx_data 0x2000135c 0x4 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x2000135c tx_data - -.bss.copy_task_pointer%33 - 0x20001360 0x4 - .bss.copy_task_pointer - 0x20001360 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001360 copy_task_pointer - -.bss.current_msg%34 - 0x20001364 0x4 - .bss.current_msg - 0x20001364 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001364 current_msg - -.bss.data_end_estimation%35 - 0x20001368 0x4 - .bss.data_end_estimation - 0x20001368 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001368 data_end_estimation - -.bss.data_ptr%36 - 0x2000136c 0x4 - .bss.data_ptr 0x2000136c 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x2000136c data_ptr - -.bss.mem_stat%37 - 0x20001370 0x4 - .bss.mem_stat 0x20001370 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001370 mem_stat - -.bss.oldest_msg%38 - 0x20001374 0x4 - .bss.oldest_msg - 0x20001374 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001374 oldest_msg - -.bss.used_msg%39 - 0x20001378 0x4 - .bss.used_msg 0x20001378 0x4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001378 used_msg - -.bss.baudrate%40 - 0x2000137c 0x4 - .bss.baudrate 0x2000137c 0x4 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x2000137c baudrate - -.bss%41 0x20001380 0x4 - .bss 0x20001380 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - -.data._impure_ptr%42 - 0x20001384 0x4 - .data._impure_ptr - 0x20001384 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - 0x20001384 _impure_ptr - -.bss.__malloc_free_list%43 - 0x20001388 0x4 - .bss.__malloc_free_list - 0x20001388 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - 0x20001388 __malloc_free_list - -.bss.__malloc_sbrk_start%44 - 0x2000138c 0x4 - .bss.__malloc_sbrk_start - 0x2000138c 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - 0x2000138c __malloc_sbrk_start - -.bss%45 0x20001390 0x4 - .bss 0x20001390 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - -.data.luos_version%46 - 0x20001394 0x3 - .data.luos_version - 0x20001394 0x3 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x20001394 luos_version - -.bss.bootloader_data_size%47 - 0x2000133e 0x2 - .bss.bootloader_data_size - 0x2000133e 0x2 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - -.bss.data_index%48 - 0x20001346 0x2 - .bss.data_index - 0x20001346 0x2 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20001346 data_index - -.bss.source_id%49 - 0x20000d0a 0x2 - .bss.source_id - 0x20000d0a 0x2 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20000d0a source_id - -.data.residual_space%50 - 0x20000faa 0x2 - .data.residual_space - 0x20000faa 0x2 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20000faa residual_space - -.bss.last_msg_size.7941%51 - 0x20001398 0x2 - .bss.last_msg_size.7941 - 0x20001398 0x2 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.bss.package_number%52 - 0x2000139a 0x2 - .bss.package_number - 0x2000139a 0x2 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x2000139a package_number - -.bss.service_number%53 - 0x2000139c 0x2 - .bss.service_number - 0x2000139c 0x2 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x2000139c service_number - -.bss.last_routing_table_entry%54 - 0x2000139e 0x2 - .bss.last_routing_table_entry - 0x2000139e 0x2 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x2000139e last_routing_table_entry - -.bss.last_service%55 - 0x200013a0 0x2 - .bss.last_service - 0x200013a0 0x2 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x200013a0 last_service - -.bss.data_size_to_transmit%56 - 0x200013a2 0x2 - .bss.data_size_to_transmit - 0x200013a2 0x2 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x200013a2 data_size_to_transmit - -.bss.timoutclockcnt%57 - 0x200013a4 0x2 - .bss.timoutclockcnt - 0x200013a4 0x2 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x200013a4 timoutclockcnt - -.bss.luos_tasks_stack_id%58 - 0x200013a6 0x2 - .bss.luos_tasks_stack_id - 0x200013a6 0x2 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x200013a6 luos_tasks_stack_id - -.bss.msg_tasks_stack_id%59 - 0x200013a8 0x2 - .bss.msg_tasks_stack_id - 0x200013a8 0x2 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x200013a8 msg_tasks_stack_id - -.bss.tx_tasks_stack_id%60 - 0x200013aa 0x2 - .bss.tx_tasks_stack_id - 0x200013aa 0x2 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x200013aa tx_tasks_stack_id - -.bss.crc_val%61 - 0x200013ac 0x2 - .bss.crc_val 0x200013ac 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x200013ac crc_val - -.bss.data_count%62 - 0x200013ae 0x2 - .bss.data_count - 0x200013ae 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x200013ae data_count - -.bss.data_size%63 - 0x200013b0 0x2 - .bss.data_size - 0x200013b0 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x200013b0 data_size - -.bss.large_data_num%64 - 0x200013b2 0x2 - .bss.large_data_num - 0x200013b2 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x200013b2 large_data_num - -.bss.last_crc.6331%65 - 0x200013b4 0x2 - .bss.last_crc.6331 - 0x200013b4 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - -.bss.last_node%66 - 0x200013b6 0x2 - .bss.last_node - 0x200013b6 0x2 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x200013b6 last_node - -.bss.crc%67 0x200010cb 0x1 - .bss.crc 0x200010cb 0x1 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x200010cb crc - -.bss.load_flag%68 - 0x20001337 0x1 - .bss.load_flag - 0x20001337 0x1 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x20001337 load_flag - -.bss.node_state.8055%69 - 0x20000d09 0x1 - .bss.node_state.8055 - 0x20000d09 0x1 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.bss.mem_clear_needed%70 - 0x20000fa9 0x1 - .bss.mem_clear_needed - 0x20000fa9 0x1 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20000fa9 mem_clear_needed - -.bss.reset_needed%71 - 0x20001397 0x1 - .bss.reset_needed - 0x20001397 0x1 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x20001397 reset_needed - -.bss.Port_ExpectedState%72 - 0x200013b8 0x1 - .bss.Port_ExpectedState - 0x200013b8 0x1 build/luos_bootloader/production/_ext/1000620745/port_manager.o - 0x200013b8 Port_ExpectedState - -.bss.nbrRetry%73 - 0x200013b9 0x1 - .bss.nbrRetry 0x200013b9 0x1 build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x200013b9 nbrRetry - -.eh_frame%z1 0x00000000 0x0 - .eh_frame 0x00000000 0x0 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - -.text.MsgAlloc_SetTxTask%74 - 0x000000d8 0x68c - .text.MsgAlloc_SetTxTask - 0x000000d8 0x68c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000000d8 MsgAlloc_SetTxTask - -.text.MsgAlloc_ClearMsgSpace%75 - 0x00000764 0x670 - .text.MsgAlloc_ClearMsgSpace - 0x00000764 0x670 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - -.text.Luos_MsgHandler%76 - 0x00000dd4 0x5a8 - .text.Luos_MsgHandler - 0x00000dd4 0x5a8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.dinit%77 0x0000137c 0x560 - .dinit 0x0000137c 0x560 data_init - -.text.MsgAlloc_EndMsg%78 - 0x000018dc 0x428 - .text.MsgAlloc_EndMsg - 0x000018dc 0x428 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000018dc MsgAlloc_EndMsg - -.text.MsgAlloc_LuosTaskAlloc%79 - 0x00001d04 0x3e0 - .text.MsgAlloc_LuosTaskAlloc - 0x00001d04 0x3e0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00001d04 MsgAlloc_LuosTaskAlloc - -.text._vfprintf_r_cdnopsuxX%80 - 0x000020e4 0x3dc - .text._vfprintf_r_cdnopsuxX - 0x000020e4 0x3dc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - 0x000020e4 _vfprintf_r_cdnopsuxX - -.text.Luos_Loop%81 - 0x000024c0 0x398 - .text.Luos_Loop - 0x000024c0 0x398 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x000024c0 Luos_Loop - -.text%82 0x00002858 0x348 - .text 0x00002858 0x348 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(subsf3.o) - 0x00002858 __aeabi_fsub - -.text.MsgAlloc_PullMsgFromLuosTask%83 - 0x00002ba0 0x308 - .text.MsgAlloc_PullMsgFromLuosTask - 0x00002ba0 0x308 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00002ba0 MsgAlloc_PullMsgFromLuosTask - -.text.MsgAlloc_PullMsgToInterpret%84 - 0x00002ea8 0x2f0 - .text.MsgAlloc_PullMsgToInterpret - 0x00002ea8 0x2f0 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00002ea8 MsgAlloc_PullMsgToInterpret - -.text.MsgAlloc_PullServiceFromTxTask%85 - 0x00003198 0x2dc - .text.MsgAlloc_PullServiceFromTxTask - 0x00003198 0x2dc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00003198 MsgAlloc_PullServiceFromTxTask - -.text.MsgAlloc_ClearMsgFromLuosTasks%86 - 0x00003474 0x2cc - .text.MsgAlloc_ClearMsgFromLuosTasks - 0x00003474 0x2cc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00003474 MsgAlloc_ClearMsgFromLuosTasks - -.text.Recep_InterpretMsgProtocol%87 - 0x00003740 0x2a8 - .text.Recep_InterpretMsgProtocol - 0x00003740 0x2a8 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00003740 Recep_InterpretMsgProtocol - -.text.MsgAlloc_PullMsgFromTxTask%88 - 0x000039e8 0x290 - .text.MsgAlloc_PullMsgFromTxTask - 0x000039e8 0x290 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000039e8 MsgAlloc_PullMsgFromTxTask - -.text.LuosBootloader_MsgHandler%89 - 0x00003c78 0x248 - .text.LuosBootloader_MsgHandler - 0x00003c78 0x248 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x00003c78 LuosBootloader_MsgHandler - -.text.Recep_GetData%90 - 0x00003ec0 0x248 - .text.Recep_GetData - 0x00003ec0 0x248 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00003ec0 Recep_GetData - -.text%91 0x00004108 0x22c - .text 0x00004108 0x22c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - 0x00004108 __aeabi_fmul - -.text.RoutingTB_DetectServices%92 - 0x00004334 0x224 - .text.RoutingTB_DetectServices - 0x00004334 0x224 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00004334 RoutingTB_DetectServices - -.text.Robus_Loop%93 - 0x00004558 0x1c4 - .text.Robus_Loop - 0x00004558 0x1c4 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00004558 Robus_Loop - -.text.Luos_CreateService%94 - 0x0000471c 0x1b4 - .text.Luos_CreateService - 0x0000471c 0x1b4 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x0000471c Luos_CreateService - -.text.Luos_ReceiveData%95 - 0x000048d0 0x1a8 - .text.Luos_ReceiveData - 0x000048d0 0x1a8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x000048d0 Luos_ReceiveData - -.text%96 0x00004a78 0x1a4 - .text 0x00004a78 0x1a4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivmoddi4.o) - 0x00004a78 __udivmoddi4 - -.text.Recep_NodeConcerned%97 - 0x00004c1c 0x1a0 - .text.Recep_NodeConcerned - 0x00004c1c 0x1a0 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00004c1c Recep_NodeConcerned - -.text.Transmit_Process%98 - 0x00004dbc 0x174 - .text.Transmit_Process - 0x00004dbc 0x174 build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x00004dbc Transmit_Process - -.text.RobusHAL_ComInit%99 - 0x00004f30 0x154 - .text.RobusHAL_ComInit - 0x00004f30 0x154 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00004f30 RobusHAL_ComInit - -.text.MsgAlloc_loop%100 - 0x00005084 0x13c - .text.MsgAlloc_loop - 0x00005084 0x13c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00005084 MsgAlloc_loop - -.text.Robus_TopologyDetection%101 - 0x000051c0 0x12c - .text.Robus_TopologyDetection - 0x000051c0 0x12c build/luos_bootloader/production/_ext/1000620745/robus.o - 0x000051c0 Robus_TopologyDetection - -.text%102 0x000052ec 0x114 - .text 0x000052ec 0x114 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_udivsi3.o) - 0x000052ec __aeabi_uidiv - 0x000052ec __udivsi3 - 0x000053f8 __aeabi_uidivmod - -.text.__sflush_r%103 - 0x00005400 0x114 - .text.__sflush_r - 0x00005400 0x114 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - 0x00005400 __sflush_r - -.rodata._ctype_%104 - 0x00005514 0x101 - .rodata._ctype_ - 0x00005514 0x101 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o) - 0x00005514 _ctype_ - -.text.Robus_SendMsg%105 - 0x00005618 0x100 - .text.Robus_SendMsg - 0x00005618 0x100 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00005618 Robus_SendMsg - -.text.RobusHAL_Init%106 - 0x00005718 0xfc - .text.RobusHAL_Init - 0x00005718 0xfc build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00005718 RobusHAL_Init - -.text.MsgAlloc_Init%107 - 0x00005814 0xec - .text.MsgAlloc_Init - 0x00005814 0xec build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00005814 MsgAlloc_Init - -.text.Recep_GetHeader%108 - 0x00005900 0xec - .text.Recep_GetHeader - 0x00005900 0xec build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00005900 Recep_GetHeader - -.text.__swsetup_r%109 - 0x000059ec 0xec - .text.__swsetup_r - 0x000059ec 0xec c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wsetup.o) - 0x000059ec __swsetup_r - -.text.Recep_GetConcernedLLService%110 - 0x00005ad8 0xe8 - .text.Recep_GetConcernedLLService - 0x00005ad8 0xe8 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00005ad8 Recep_GetConcernedLLService - -.text.Recep_GetCollision%111 - 0x00005bc0 0xe8 - .text.Recep_GetCollision - 0x00005bc0 0xe8 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00005bc0 Recep_GetCollision - -.text._printf_common%112 - 0x00005ca8 0xda - .text._printf_common - 0x00005ca8 0xda c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-vfprintf_i.o) - 0x00005ca8 _printf_common - -.text.__swbuf_r%113 - 0x00005d84 0xcc - .text.__swbuf_r - 0x00005d84 0xcc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wbuf.o) - 0x00005d84 __swbuf_r - -.text.MsgAlloc_GetTxTask%114 - 0x00005e50 0xc4 - .text.MsgAlloc_GetTxTask - 0x00005e50 0xc4 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00005e50 MsgAlloc_GetTxTask - -.text.Luos_SendData%115 - 0x00005f14 0xbc - .text.Luos_SendData - 0x00005f14 0xbc build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x00005f14 Luos_SendData - -.text._malloc_r%116 - 0x00005fd0 0xbc - .text._malloc_r - 0x00005fd0 0xbc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-mallocr.o) - 0x00005fd0 _malloc_r - -.text.RoutingTB_RemoveOnRoutingTable%117 - 0x0000608c 0xac - .text.RoutingTB_RemoveOnRoutingTable - 0x0000608c 0xac build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x0000608c RoutingTB_RemoveOnRoutingTable - -.text.RobusHAL_ComTransmit%118 - 0x00006138 0xa0 - .text.RobusHAL_ComTransmit - 0x00006138 0xa0 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00006138 RobusHAL_ComTransmit - -.text.Robus_DetectNextNodes%119 - 0x000061d8 0xa0 - .text.Robus_DetectNextNodes - 0x000061d8 0xa0 build/luos_bootloader/production/_ext/1000620745/robus.o - -.text%120 0x00006278 0x98 - .text 0x00006278 0x98 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(gesf2.o) - 0x00006278 __gesf2 - 0x00006278 __gtsf2 - -.text.SERCOM0_Handler%121 - 0x00006310 0x94 - .text.SERCOM0_Handler - 0x00006310 0x94 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00006310 SERCOM0_Handler - -.text%122 0x000063a4 0x94 - .text 0x000063a4 0x94 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(lesf2.o) - 0x000063a4 __ltsf2 - 0x000063a4 __lesf2 - -.text.__smakebuf_r%123 - 0x00006438 0x94 - .text.__smakebuf_r - 0x00006438 0x94 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - 0x00006438 __smakebuf_r - -.text._free_r%124 - 0x000064cc 0x94 - .text._free_r 0x000064cc 0x94 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-nano-freer.o) - 0x000064cc _free_r - -.text.__pic32c_data_initialization%125 - 0x00006560 0x90 - .text.__pic32c_data_initialization - 0x00006560 0x90 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(data_init.o) - 0x00006560 __pic32c_data_initialization - -.text.LuosHAL_FlashWriteLuosMemoryInfo%126 - 0x000065f0 0x8c - .text.LuosHAL_FlashWriteLuosMemoryInfo - 0x000065f0 0x8c build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000065f0 LuosHAL_FlashWriteLuosMemoryInfo - -.text.MsgAlloc_LookAtLuosTask%127 - 0x0000667c 0x8c - .text.MsgAlloc_LookAtLuosTask - 0x0000667c 0x8c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x0000667c MsgAlloc_LookAtLuosTask - -.text.MsgAlloc_ValidHeader%128 - 0x00006708 0x88 - .text.MsgAlloc_ValidHeader - 0x00006708 0x88 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00006708 MsgAlloc_ValidHeader - -.text.Luos_assert%129 - 0x00006790 0x84 - .text.Luos_assert - 0x00006790 0x84 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - 0x00006790 Luos_assert - -.text.RobusHAL_SetPTPDefaultState%130 - 0x00006814 0x80 - .text.RobusHAL_SetPTPDefaultState - 0x00006814 0x80 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00006814 RobusHAL_SetPTPDefaultState - -.text.MsgAlloc_InvalidMsg%131 - 0x00006894 0x80 - .text.MsgAlloc_InvalidMsg - 0x00006894 0x80 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00006894 MsgAlloc_InvalidMsg - -.text.CLOCK_Initialize%132 - 0x00006914 0x7c - .text.CLOCK_Initialize - 0x00006914 0x7c build/luos_bootloader/production/_ext/903266522/plib_clock.o - 0x00006914 CLOCK_Initialize - -.text.compute_crc%133 - 0x00006990 0x7c - .text.compute_crc - 0x00006990 0x7c build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x00006990 compute_crc - -.text.RoutingTB_RemoveNode%134 - 0x00006a0c 0x7c - .text.RoutingTB_RemoveNode - 0x00006a0c 0x7c build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00006a0c RoutingTB_RemoveNode - -.text.RobusHAL_SetPTPReverseState%135 - 0x00006a88 0x7c - .text.RobusHAL_SetPTPReverseState - 0x00006a88 0x7c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00006a88 RobusHAL_SetPTPReverseState - -.text.RobusHAL_GetPTPState%136 - 0x00006b04 0x7c - .text.RobusHAL_GetPTPState - 0x00006b04 0x7c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00006b04 RobusHAL_GetPTPState - -.text.__sfp%137 - 0x00006b80 0x7c - .text.__sfp 0x00006b80 0x7c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x00006b80 __sfp - -.text.__fputwc%138 - 0x00006bfc 0x7c - .text.__fputwc - 0x00006bfc 0x7c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - 0x00006bfc __fputwc - -.text%139 0x00006c78 0x74 - .text 0x00006c78 0x74 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_arm_cmpsf2.o) - 0x00006c78 __aeabi_cfrcmple - 0x00006c80 __aeabi_cfcmpeq - 0x00006c80 __aeabi_cfcmple - 0x00006c90 __aeabi_fcmpeq - 0x00006c9c __aeabi_fcmplt - 0x00006cb0 __aeabi_fcmple - 0x00006cc4 __aeabi_fcmpgt - 0x00006cd8 __aeabi_fcmpge - -.text.LuosHAL_GetTimestamp%140 - 0x00006cec 0x70 - .text.LuosHAL_GetTimestamp - 0x00006cec 0x70 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00006cec LuosHAL_GetTimestamp - -.text.Robus_ShiftMaskCalculation%141 - 0x00006d5c 0x70 - .text.Robus_ShiftMaskCalculation - 0x00006d5c 0x70 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00006d5c Robus_ShiftMaskCalculation - -.text.Luos_SaveAlias%142 - 0x00006dcc 0x68 - .text.Luos_SaveAlias - 0x00006dcc 0x68 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.rodata.Luos_Loop%143 - 0x00006e34 0x68 - .rodata.Luos_Loop - 0x00006e34 0x68 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.text.PortMng_PokeNextPort%144 - 0x00006e9c 0x68 - .text.PortMng_PokeNextPort - 0x00006e9c 0x68 build/luos_bootloader/production/_ext/1000620745/port_manager.o - 0x00006e9c PortMng_PokeNextPort - -.text.__sinit%145 - 0x00006f04 0x68 - .text.__sinit 0x00006f04 0x68 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x00006f04 __sinit - -.text.Robus_Init%146 - 0x00006f6c 0x64 - .text.Robus_Init - 0x00006f6c 0x64 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00006f6c Robus_Init - -.text.LuosHAL_ProgramFlash%147 - 0x00006fd0 0x60 - .text.LuosHAL_ProgramFlash - 0x00006fd0 0x60 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00006fd0 LuosHAL_ProgramFlash - -.text.PortMng_PokePort%148 - 0x00007030 0x60 - .text.PortMng_PokePort - 0x00007030 0x60 build/luos_bootloader/production/_ext/1000620745/port_manager.o - 0x00007030 PortMng_PokePort - -.text.Robus_ServiceCreate%149 - 0x00007090 0x60 - .text.Robus_ServiceCreate - 0x00007090 0x60 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00007090 Robus_ServiceCreate - -.text.Luos_Run%150 - 0x000070f0 0x5c - .text.Luos_Run - 0x000070f0 0x5c build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x000070f0 Luos_Run - -.text.Transmit_End%151 - 0x0000714c 0x5c - .text.Transmit_End - 0x0000714c 0x5c build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x0000714c Transmit_End - -.rodata.Luos_MsgHandler%152 - 0x000071a8 0x58 - .rodata.Luos_MsgHandler - 0x000071a8 0x58 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.text.RoutingTB_BigestNodeID%153 - 0x00007200 0x58 - .text.RoutingTB_BigestNodeID - 0x00007200 0x58 build/luos_bootloader/production/_ext/1555399743/routing_table.o - -.text.RoutingTB_BigestID%154 - 0x00007258 0x58 - .text.RoutingTB_BigestID - 0x00007258 0x58 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00007258 RoutingTB_BigestID - -.text.Recep_ComputeMsgNumber%155 - 0x000072b0 0x58 - .text.Recep_ComputeMsgNumber - 0x000072b0 0x58 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x000072b0 Recep_ComputeMsgNumber - -.text.Timestamp_TagMsg%156 - 0x00007308 0x58 - .text.Timestamp_TagMsg - 0x00007308 0x58 build/luos_bootloader/production/_ext/1000620745/timestamp.o - 0x00007308 Timestamp_TagMsg - -.text._fflush_r%157 - 0x00007360 0x58 - .text._fflush_r - 0x00007360 0x58 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fflush.o) - 0x00007360 _fflush_r - -.text.RoutingTB_ConvertServiceToRoutingTable%158 - 0x000073b8 0x56 - .text.RoutingTB_ConvertServiceToRoutingTable - 0x000073b8 0x56 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x000073b8 RoutingTB_ConvertServiceToRoutingTable - -.text.RoutingTB_AddNumToAlias%159 - 0x00007410 0x54 - .text.RoutingTB_AddNumToAlias - 0x00007410 0x54 build/luos_bootloader/production/_ext/1555399743/routing_table.o - -.text.RoutingTB_AliasFromId%160 - 0x00007464 0x50 - .text.RoutingTB_AliasFromId - 0x00007464 0x50 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00007464 RoutingTB_AliasFromId - -.text.RobusHAL_SetTxState%161 - 0x000074b4 0x50 - .text.RobusHAL_SetTxState - 0x000074b4 0x50 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x000074b4 RobusHAL_SetTxState - -.text%162 0x00007504 0x50 - .text 0x00007504 0x50 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(eqsf2.o) - 0x00007504 __eqsf2 - 0x00007504 __nesf2 - -.text.__swhatbuf_r%163 - 0x00007554 0x50 - .text.__swhatbuf_r - 0x00007554 0x50 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-makebuf.o) - 0x00007554 __swhatbuf_r - -.text.RoutingTB_IDFromAlias%164 - 0x000075a4 0x4c - .text.RoutingTB_IDFromAlias - 0x000075a4 0x4c build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x000075a4 RoutingTB_IDFromAlias - -.text.RoutingTB_ComputeRoutingTableEntryNB%165 - 0x000075f0 0x4c - .text.RoutingTB_ComputeRoutingTableEntryNB - 0x000075f0 0x4c build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x000075f0 RoutingTB_ComputeRoutingTableEntryNB - -.text%166 0x0000763c 0x48 - .text 0x0000763c 0x48 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp/crtbegin.o - -.text.Reset_Handler%167 - 0x00007684 0x48 - .text.Reset_Handler - 0x00007684 0x48 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - 0x00007684 Reset_Handler - -.text.LuosBootloader_SendResponse%168 - 0x000076cc 0x48 - .text.LuosBootloader_SendResponse - 0x000076cc 0x48 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - -.text.Luos_SendMsg%169 - 0x00007714 0x48 - .text.Luos_SendMsg - 0x00007714 0x48 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x00007714 Luos_SendMsg - -.text.PortMng_PtpHandler%170 - 0x0000775c 0x48 - .text.PortMng_PtpHandler - 0x0000775c 0x48 build/luos_bootloader/production/_ext/1000620745/port_manager.o - 0x0000775c PortMng_PtpHandler - -.text.__libc_init_array%171 - 0x000077a4 0x48 - .text.__libc_init_array - 0x000077a4 0x48 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o) - 0x000077a4 __libc_init_array - -.text.__ssfputs_r%172 - 0x000077ec 0x48 - .text.__ssfputs_r - 0x000077ec 0x48 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - 0x000077ec __ssfputs_r - -.text.std%173 0x00007834 0x48 - .text.std 0x00007834 0x48 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - -.rodata%174 0x0000787c 0x44 - .rodata 0x0000787c 0x44 build/luos_bootloader/production/_ext/1555399743/routing_table.o - -.text.RobusHAL_ResetTimeout%175 - 0x000078c0 0x44 - .text.RobusHAL_ResetTimeout - 0x000078c0 0x44 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x000078c0 RobusHAL_ResetTimeout - -.text.Node_SetState%176 - 0x00007904 0x44 - .text.Node_SetState - 0x00007904 0x44 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00007904 Node_SetState - -.text._fwalk_reent%177 - 0x00007948 0x42 - .text._fwalk_reent - 0x00007948 0x42 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fwalk.o) - 0x00007948 _fwalk_reent - -.text.LuosBootloader_Init%178 - 0x0000798c 0x40 - .text.LuosBootloader_Init - 0x0000798c 0x40 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x0000798c LuosBootloader_Init - -.text.RobusHAL_PushPTP%179 - 0x000079cc 0x40 - .text.RobusHAL_PushPTP - 0x000079cc 0x40 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x000079cc RobusHAL_PushPTP - -.text%180 0x00007a0c 0x40 - .text 0x00007a0c 0x40 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_aeabi_uldivmod.o) - 0x00007a0c __aeabi_uldivmod - -.rodata%181 0x00007a4c 0x40 - .rodata 0x00007a4c 0x40 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(mulsf3.o) - -.text%182 0x00007a8c 0x40 - .text 0x00007a8c 0x40 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(fixsfsi.o) - 0x00007a8c __aeabi_f2iz - -.text.TC3_Handler%183 - 0x00007acc 0x3c - .text.TC3_Handler - 0x00007acc 0x3c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00007acc TC3_Handler - -.text.EIC_Handler%184 - 0x00007b08 0x3c - .text.EIC_Handler - 0x00007b08 0x3c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00007b08 EIC_Handler - -.text.MsgAlloc_IsReseted%185 - 0x00007b44 0x3c - .text.MsgAlloc_IsReseted - 0x00007b44 0x3c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00007b44 MsgAlloc_IsReseted - -.text.Recep_Timeout%186 - 0x00007b80 0x3c - .text.Recep_Timeout - 0x00007b80 0x3c build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00007b80 Recep_Timeout - -.text%187 0x00007bbc 0x3c - .text 0x00007bbc 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzsi2.o) - 0x00007bbc __clzsi2 - -.text._sprintf_cdnopsuxX%188 - 0x00007bf8 0x3c - .text._sprintf_cdnopsuxX - 0x00007bf8 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-sprintf.cdnopsuxX.o) - 0x00007bf8 _sprintf_cdnopsuxX - 0x00007bf8 __sprintf_dis - -.text.write%189 - 0x00007c34 0x3c - .text.write 0x00007c34 0x3c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(write.o) - 0x00007c34 write - -.text.ll_crc_compute%190 - 0x00007c70 0x3a - .text.ll_crc_compute - 0x00007c70 0x3a build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x00007c70 ll_crc_compute - -.text.Recep_Reset%191 - 0x00007cac 0x38 - .text.Recep_Reset - 0x00007cac 0x38 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00007cac Recep_Reset - -.text.__swrite%192 - 0x00007ce4 0x38 - .text.__swrite - 0x00007ce4 0x38 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - 0x00007ce4 __swrite - -.text.Luos_Init%193 - 0x00007d1c 0x34 - .text.Luos_Init - 0x00007d1c 0x34 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x00007d1c Luos_Init - -.text.LuosHAL_Init%194 - 0x00007d50 0x34 - .text.LuosHAL_Init - 0x00007d50 0x34 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00007d50 LuosHAL_Init - -.text.LuosHAL_EraseMemory%195 - 0x00007d84 0x34 - .text.LuosHAL_EraseMemory - 0x00007d84 0x34 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00007d84 LuosHAL_EraseMemory - -.rodata%196 0x00007db8 0x33 - .rodata 0x00007db8 0x33 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - -.text.crc8%197 0x00007dec 0x32 - .text.crc8 0x00007dec 0x32 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x00007dec crc8 - -.text.Luos_ResetStatistic%198 - 0x00007e20 0x30 - .text.Luos_ResetStatistic - 0x00007e20 0x30 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x00007e20 Luos_ResetStatistic - -.rodata%199 0x00007e50 0x30 - .rodata 0x00007e50 0x30 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - -.text.LuosHAL_SetMode%200 - 0x00007e80 0x30 - .text.LuosHAL_SetMode - 0x00007e80 0x30 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00007e80 LuosHAL_SetMode - -.rodata%201 0x00007eb0 0x30 - .rodata 0x00007eb0 0x30 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - -.text.Recep_CatchAck%202 - 0x00007ee0 0x30 - .text.Recep_CatchAck - 0x00007ee0 0x30 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00007ee0 Recep_CatchAck - -.rodata%203 0x00007f10 0x30 - .rodata 0x00007f10 0x30 build/luos_bootloader/production/_ext/1000620745/reception.o - -.text.Trgt_MulticastTargetBank%204 - 0x00007f40 0x30 - .text.Trgt_MulticastTargetBank - 0x00007f40 0x30 build/luos_bootloader/production/_ext/1000620745/target.o - 0x00007f40 Trgt_MulticastTargetBank - -.text%205 0x00007f70 0x30 - .text 0x00007f70 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_fixunssfsi.o) - 0x00007f70 __fixunssfsi - 0x00007f70 __aeabi_f2uiz - -.text._sbrk%206 - 0x00007fa0 0x30 - .text._sbrk 0x00007fa0 0x30 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(sbrk.o) - 0x00007fa0 _sbrk - -.text.RobusHAL_ComputeCRC%207 - 0x00007fd0 0x2e - .text.RobusHAL_ComputeCRC - 0x00007fd0 0x2e build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00007fd0 RobusHAL_ComputeCRC - -.text.RobusHAL_SetRxState%208 - 0x00008000 0x2c - .text.RobusHAL_SetRxState - 0x00008000 0x2c build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00008000 RobusHAL_SetRxState - -.text.MsgAlloc_GetLuosTaskSize%209 - 0x0000802c 0x2c - .text.MsgAlloc_GetLuosTaskSize - 0x0000802c 0x2c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x0000802c MsgAlloc_GetLuosTaskSize - -.rodata%210 0x00008058 0x2c - .rodata 0x00008058 0x2c build/luos_bootloader/production/_ext/1000620745/robus.o - -.text.__sfmoreglue%211 - 0x00008084 0x2c - .text.__sfmoreglue - 0x00008084 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x00008084 __sfmoreglue - -.text.__sseek%212 - 0x000080b0 0x2c - .text.__sseek 0x000080b0 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - 0x000080b0 __sseek - -.text._wcrtomb_r%213 - 0x000080dc 0x2c - .text._wcrtomb_r - 0x000080dc 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wcrtomb.o) - 0x000080dc _wcrtomb_r - -.text.read%214 0x00008108 0x2c - .text.read 0x00008108 0x2c c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(read.o) - 0x00008108 read - -.text.__sfputc_r%215 - 0x00008134 0x2a - .text.__sfputc_r - 0x00008134 0x2a c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-__ssfputs.o) - -.text.RoutingTB_Erase%216 - 0x00008160 0x28 - .text.RoutingTB_Erase - 0x00008160 0x28 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00008160 RoutingTB_Erase - -.text.LuosHAL_Reboot%217 - 0x00008188 0x28 - .text.LuosHAL_Reboot - 0x00008188 0x28 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00008188 LuosHAL_Reboot - -.text.LuosHAL_JumpToApp%218 - 0x000081b0 0x28 - .text.LuosHAL_JumpToApp - 0x000081b0 0x28 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000081b0 LuosHAL_JumpToApp - -.text.MsgAlloc_Reset%219 - 0x000081d8 0x28 - .text.MsgAlloc_Reset - 0x000081d8 0x28 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000081d8 MsgAlloc_Reset - -.text.MsgAlloc_GetLuosTaskCmd%220 - 0x00008200 0x28 - .text.MsgAlloc_GetLuosTaskCmd - 0x00008200 0x28 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00008200 MsgAlloc_GetLuosTaskCmd - -.text.PortMng_Reset%221 - 0x00008228 0x28 - .text.PortMng_Reset - 0x00008228 0x28 build/luos_bootloader/production/_ext/1000620745/port_manager.o - -.text.Transmit_GetLockStatus%222 - 0x00008250 0x28 - .text.Transmit_GetLockStatus - 0x00008250 0x28 build/luos_bootloader/production/_ext/1000620745/transmission.o - -.text.__sread%223 - 0x00008278 0x28 - .text.__sread 0x00008278 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - 0x00008278 __sread - -.text._write_r%224 - 0x000082a0 0x28 - .text._write_r - 0x000082a0 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-writer.o) - 0x000082a0 _write_r - -.text._lseek_r%225 - 0x000082c8 0x28 - .text._lseek_r - 0x000082c8 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-lseekr.o) - 0x000082c8 _lseek_r - -.text._read_r%226 - 0x000082f0 0x28 - .text._read_r 0x000082f0 0x28 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-readr.o) - 0x000082f0 _read_r - -.text.SYS_Initialize%227 - 0x00008318 0x24 - .text.SYS_Initialize - 0x00008318 0x24 build/luos_bootloader/production/_ext/1137593668/initialization.o - 0x00008318 SYS_Initialize - -.rodata.LuosBootloader_MsgHandler%228 - 0x0000833c 0x24 - .rodata.LuosBootloader_MsgHandler - 0x0000833c 0x24 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - -.text.RobusHAL_GetTxLockState%229 - 0x00008360 0x24 - .text.RobusHAL_GetTxLockState - 0x00008360 0x24 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00008360 RobusHAL_GetTxLockState - -.text.__ascii_mbtowc%230 - 0x00008384 0x24 - .text.__ascii_mbtowc - 0x00008384 0x24 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mbtowc_r.o) - 0x00008384 __ascii_mbtowc - -.text._sbrk_r%231 - 0x000083a8 0x24 - .text._sbrk_r 0x000083a8 0x24 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-sbrkr.o) - 0x000083a8 _sbrk_r - -.text._close_r%232 - 0x000083cc 0x24 - .text._close_r - 0x000083cc 0x24 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-closer.o) - 0x000083cc _close_r - -.text._fstat_r%233 - 0x000083f0 0x24 - .text._fstat_r - 0x000083f0 0x24 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fstatr.o) - 0x000083f0 _fstat_r - -.text._isatty_r%234 - 0x00008414 0x24 - .text._isatty_r - 0x00008414 0x24 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-isattyr.o) - 0x00008414 _isatty_r - -.text.RoutingTB_ConvertNodeToRoutingTable%235 - 0x00008438 0x1e - .text.RoutingTB_ConvertNodeToRoutingTable - 0x00008438 0x1e build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00008438 RoutingTB_ConvertNodeToRoutingTable - -.text._fputwc_r%236 - 0x00008456 0x1e - .text._fputwc_r - 0x00008456 0x1e c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-fputwc.o) - 0x00008456 _fputwc_r - -.text.MsgAlloc_IsEmpty%237 - 0x00008474 0x1c - .text.MsgAlloc_IsEmpty - 0x00008474 0x1c build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x00008474 MsgAlloc_IsEmpty - -.rodata.Recep_GetConcernedLLService%238 - 0x00008490 0x1c - .rodata.Recep_GetConcernedLLService - 0x00008490 0x1c build/luos_bootloader/production/_ext/1000620745/reception.o - -.rodata.Recep_NodeConcerned%239 - 0x000084ac 0x1c - .rodata.Recep_NodeConcerned - 0x000084ac 0x1c build/luos_bootloader/production/_ext/1000620745/reception.o - -.rodata.Recep_InterpretMsgProtocol%240 - 0x000084c8 0x1c - .rodata.Recep_InterpretMsgProtocol - 0x000084c8 0x1c build/luos_bootloader/production/_ext/1000620745/reception.o - -.text.Transmit_SendAck%241 - 0x000084e4 0x1c - .text.Transmit_SendAck - 0x000084e4 0x1c build/luos_bootloader/production/_ext/1000620745/transmission.o - 0x000084e4 Transmit_SendAck - -.text.LuosBootloader_Loop%242 - 0x00008500 0x1a - .text.LuosBootloader_Loop - 0x00008500 0x1a build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - 0x00008500 LuosBootloader_Loop - -.text.LuosHAL_StartTimestamp%243 - 0x0000851c 0x18 - .text.LuosHAL_StartTimestamp - 0x0000851c 0x18 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x0000851c LuosHAL_StartTimestamp - -.text.Robus_MaskInit%244 - 0x00008534 0x18 - .text.Robus_MaskInit - 0x00008534 0x18 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008534 Robus_MaskInit - -.text%245 0x0000854c 0x18 - .text 0x0000854c 0x18 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_clzdi2.o) - 0x0000854c __clzdi2 - -.text._vfprintf_cdnopsuxX%246 - 0x00008564 0x18 - .text._vfprintf_cdnopsuxX - 0x00008564 0x18 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(_lib_a-nano-vfprintf.cdnopsuxX.o) - 0x00008564 _vfprintf_cdnopsuxX - -.text.__ascii_wctomb%247 - 0x0000857c 0x18 - .text.__ascii_wctomb - 0x0000857c 0x18 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-wctomb_r.o) - 0x0000857c __ascii_wctomb - -.text.memchr%248 - 0x00008594 0x16 - .text.memchr 0x00008594 0x16 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memchr-stub.o) - 0x00008594 memchr - -.text.MsgAlloc_SetData%249 - 0x000085ac 0x14 - .text.MsgAlloc_SetData - 0x000085ac 0x14 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000085ac MsgAlloc_SetData - -.text.MsgAlloc_TxAllComplete%250 - 0x000085c0 0x14 - .text.MsgAlloc_TxAllComplete - 0x000085c0 0x14 build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000085c0 MsgAlloc_TxAllComplete - -.text.PortMng_Init%251 - 0x000085d4 0x14 - .text.PortMng_Init - 0x000085d4 0x14 build/luos_bootloader/production/_ext/1000620745/port_manager.o - 0x000085d4 PortMng_Init - -.text.Recep_Init%252 - 0x000085e8 0x14 - .text.Recep_Init - 0x000085e8 0x14 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x000085e8 Recep_Init - -.text%253 0x000085fc 0x14 - .text 0x000085fc 0x14 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strcmp.o) - 0x000085fc strcmp - -.text.memcpy%254 - 0x00008610 0x12 - .text.memcpy 0x00008610 0x12 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memcpy-stub.o) - 0x00008610 memcpy - -.rodata%255 0x00008624 0x10 - .rodata 0x00008624 0x10 build/luos_bootloader/production/_ext/1342350994/bootloader_core.o - -.text.SysTick_Handler%256 - 0x00008634 0x10 - .text.SysTick_Handler - 0x00008634 0x10 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00008634 SysTick_Handler - -.text.LuosHAL_FlashReadLuosMemoryInfo%257 - 0x00008644 0x10 - .text.LuosHAL_FlashReadLuosMemoryInfo - 0x00008644 0x10 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00008644 LuosHAL_FlashReadLuosMemoryInfo - -.text.Node_GetState%258 - 0x00008654 0x10 - .text.Node_GetState - 0x00008654 0x10 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008654 Node_GetState - -.text.Robus_SetVerboseMode%259 - 0x00008664 0x10 - .text.Robus_SetVerboseMode - 0x00008664 0x10 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008664 Robus_SetVerboseMode - -.text.memset%260 - 0x00008674 0x10 - .text.memset 0x00008674 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o) - 0x00008674 memset - -.text._cleanup_r%261 - 0x00008684 0x10 - .text._cleanup_r - 0x00008684 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o) - 0x00008684 _cleanup_r - -.text.__locale_mb_cur_max%262 - 0x00008694 0x10 - .text.__locale_mb_cur_max - 0x00008694 0x10 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - 0x00008694 __locale_mb_cur_max - -.text.main%263 0x000086a4 0xe - .text.main 0x000086a4 0xe build/luos_bootloader/production/_ext/1360937237/main.o - 0x000086a4 main - -.text%264 0x000086b2 0xe - .text 0x000086b2 0xe c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strlen.o) - 0x000086b2 strlen - -.text.NVMCTRL_Initialize%265 - 0x000086c0 0xc - .text.NVMCTRL_Initialize - 0x000086c0 0xc build/luos_bootloader/production/_ext/1001328808/plib_nvmctrl.o - 0x000086c0 NVMCTRL_Initialize - -.text.RoutingTB_GetLastEntry%266 - 0x000086cc 0xc - .text.RoutingTB_GetLastEntry - 0x000086cc 0xc build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x000086cc RoutingTB_GetLastEntry - -.text.LuosHAL_SetIrqState%267 - 0x000086d8 0xc - .text.LuosHAL_SetIrqState - 0x000086d8 0xc build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000086d8 LuosHAL_SetIrqState - -.text.LuosHAL_GetSystick%268 - 0x000086e4 0xc - .text.LuosHAL_GetSystick - 0x000086e4 0xc build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000086e4 LuosHAL_GetSystick - -.text.LuosHAL_GetNodeID%269 - 0x000086f0 0xc - .text.LuosHAL_GetNodeID - 0x000086f0 0xc build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000086f0 LuosHAL_GetNodeID - -.text.MsgAlloc_UsedMsgEnd%270 - 0x000086fc 0xc - .text.MsgAlloc_UsedMsgEnd - 0x000086fc 0xc build/luos_bootloader/production/_ext/1000620745/msg_alloc.o - 0x000086fc MsgAlloc_UsedMsgEnd - -.text.Luos_IsMsgTimstamped%271 - 0x00008708 0xc - .text.Luos_IsMsgTimstamped - 0x00008708 0xc build/luos_bootloader/production/_ext/1000620745/timestamp.o - 0x00008708 Luos_IsMsgTimstamped - -.text.__sclose%272 - 0x00008714 0xc - .text.__sclose - 0x00008714 0xc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-stdio.o) - 0x00008714 __sclose - -.text.fstat%273 - 0x00008720 0xc - .text.fstat 0x00008720 0xc c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(fstat.o) - 0x00008720 fstat - -.rodata%274 0x0000872c 0xb - .rodata 0x0000872c 0xb c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-locale.o) - -.text.NVIC_Initialize%275 - 0x00008738 0x8 - .text.NVIC_Initialize - 0x00008738 0x8 build/luos_bootloader/production/_ext/1968463158/plib_nvic.o - 0x00008738 NVIC_Initialize - -.text.Luos_SetVerboseMode%276 - 0x00008740 0x8 - .text.Luos_SetVerboseMode - 0x00008740 0x8 build/luos_bootloader/production/_ext/1555399743/luos_engine.o - 0x00008740 Luos_SetVerboseMode - -.text.RoutingTB_Get%277 - 0x00008748 0x8 - .text.RoutingTB_Get - 0x00008748 0x8 build/luos_bootloader/production/_ext/1555399743/routing_table.o - 0x00008748 RoutingTB_Get - -.text.LuosHAL_GetMode%278 - 0x00008750 0x8 - .text.LuosHAL_GetMode - 0x00008750 0x8 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x00008750 LuosHAL_GetMode - -.text.Node_Get%279 - 0x00008758 0x8 - .text.Node_Get - 0x00008758 0x8 build/luos_bootloader/production/_ext/1000620745/robus.o - 0x00008758 Node_Get - -.text._close%280 - 0x00008760 0x8 - .text._close 0x00008760 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_close.o) - 0x00008760 _close - -.text._fstat%281 - 0x00008768 0x8 - .text._fstat 0x00008768 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_fstat.o) - 0x00008768 _fstat - -.text._isatty%282 - 0x00008770 0x8 - .text._isatty 0x00008770 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_isatty.o) - 0x00008770 _isatty - -.text._lseek%283 - 0x00008778 0x8 - .text._lseek 0x00008778 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_lseek.o) - 0x00008778 _lseek - -.text._read%284 - 0x00008780 0x8 - .text._read 0x00008780 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_read.o) - 0x00008780 _read - -.text._write%285 - 0x00008788 0x8 - .text._write 0x00008788 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(_write.o) - 0x00008788 _write - -.text.close%286 - 0x00008790 0x8 - .text.close 0x00008790 0x8 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(close.o) - 0x00008790 close - -.text._mon_getc%287 - 0x00008798 0x4 - .text._mon_getc - 0x00008798 0x4 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - 0x00008798 _mon_getc - -.text%288 0x0000879c 0x4 - .text 0x0000879c 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/thumb/v6-m/nofp\libgcc.a(_dvmd_tls.o) - 0x0000879c __aeabi_idiv0 - 0x0000879c __aeabi_ldiv0 - -.rodata._global_impure_ptr%289 - 0x000087a0 0x4 - .rodata._global_impure_ptr - 0x000087a0 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-impure.o) - 0x000087a0 _global_impure_ptr - -.text.isatty%290 - 0x000087a4 0x4 - .text.isatty 0x000087a4 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(isatty.o) - 0x000087a4 isatty - -.text.lseek%291 - 0x000087a8 0x4 - .text.lseek 0x000087a8 0x4 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libpic32c.a(lseek.o) - 0x000087a8 lseek - -.text.EVSYS_Initialize%292 - 0x00005d82 0x2 - .text.EVSYS_Initialize - 0x00005d82 0x2 build/luos_bootloader/production/_ext/901117036/plib_evsys.o - 0x00005d82 EVSYS_Initialize - -.text.PORT_Initialize%293 - 0x0000740e 0x2 - .text.PORT_Initialize - 0x0000740e 0x2 build/luos_bootloader/production/_ext/1968410007/plib_port.o - 0x0000740e PORT_Initialize - -.text._mon_putc%294 - 0x0000798a 0x2 - .text._mon_putc - 0x0000798a 0x2 build/luos_bootloader/production/_ext/1426513406/xc32_monitor.o - 0x0000798a _mon_putc - -.text.Dummy_Handler%295 - 0x00007caa 0x2 - .text.Dummy_Handler - 0x00007caa 0x2 build/luos_bootloader/production/_ext/1137593668/interrupts.o - 0x00007caa SVCall_Handler - 0x00007caa DMAC_Handler - 0x00007caa AC_Handler - 0x00007caa PendSV_Handler - 0x00007caa TC7_Handler - 0x00007caa SERCOM1_Handler - 0x00007caa ADC_Handler - 0x00007caa TCC1_Handler - 0x00007caa SERCOM2_Handler - 0x00007caa TCC0_Handler - 0x00007caa RTC_Handler - 0x00007caa TC6_Handler - 0x00007caa WDT_Handler - 0x00007caa TC4_Handler - 0x00007caa USB_Handler - 0x00007caa Dummy_Handler - 0x00007caa PM_Handler - 0x00007caa SERCOM5_Handler - 0x00007caa TCC2_Handler - 0x00007caa EVSYS_Handler - 0x00007caa SERCOM3_Handler - 0x00007caa SERCOM4_Handler - 0x00007caa I2S_Handler - 0x00007caa NVMCTRL_Handler - 0x00007caa DAC_Handler - 0x00007caa PTC_Handler - 0x00007caa TC5_Handler - 0x00007caa SYSCTRL_Handler - -.text.NonMaskableInt_Handler%296 - 0x00007e1e 0x2 - .text.NonMaskableInt_Handler - 0x00007e1e 0x2 build/luos_bootloader/production/_ext/1137593668/exceptions.o - 0x00007e1e NonMaskableInt_Handler - -.text.HardFault_Handler%297 - 0x00007ffe 0x2 - .text.HardFault_Handler - 0x00007ffe 0x2 build/luos_bootloader/production/_ext/1137593668/exceptions.o - 0x00007ffe HardFault_Handler - -.text.Dummy_App_Func%298 - 0x0000815e 0x2 - .text.Dummy_App_Func - 0x0000815e 0x2 build/luos_bootloader/production/_ext/1137593668/startup_xc32.o - 0x0000815e _on_reset - 0x0000815e _on_bootstrap - 0x0000815e __xc32_on_reset - 0x0000815e Dummy_App_Func - 0x0000815e __xc32_on_bootstrap - -.text.node_assert%299 - 0x0000851a 0x2 - .text.node_assert - 0x0000851a 0x2 build/luos_bootloader/production/_ext/1555399743/luos_utils.o - 0x0000851a node_assert - -.text.LuosHAL_DeInit%300 - 0x000085aa 0x2 - .text.LuosHAL_DeInit - 0x000085aa 0x2 build/luos_bootloader/production/_ext/1234256160/luos_hal.o - 0x000085aa LuosHAL_DeInit - -.text.RobusHAL_SetRxDetecPin%301 - 0x00008622 0x2 - .text.RobusHAL_SetRxDetecPin - 0x00008622 0x2 build/luos_bootloader/production/_ext/1857845632/robus_hal.o - 0x00008622 RobusHAL_SetRxDetecPin - -.text.Recep_Drop%302 - 0x00005616 0x2 - .text.Recep_Drop - 0x00005616 0x2 build/luos_bootloader/production/_ext/1000620745/reception.o - 0x00005616 Recep_Drop - -.text.__malloc_lock%303 - 0x000087ac 0x2 - .text.__malloc_lock - 0x000087ac 0x2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - 0x000087ac __malloc_lock - -.text.__malloc_unlock%304 - 0x000087ae 0x2 - .text.__malloc_unlock - 0x000087ae 0x2 c:/program files/microchip/xc32/v3.00/bin/bin/../../lib/gcc/pic32c/8.3.1/../../../../pic32c/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-mlock.o) - 0x000087ae __malloc_unlock diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/memoryfile.xml b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/memoryfile.xml deleted file mode 100644 index b9a2446b3..000000000 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/luos_bootloader_samd21j18a.X/dist/luos_bootloader/production/memoryfile.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - bytes - 40960 - 34733 - 6227 - - - bytes - 32768 - 5050 - 27718 - - - From 1e817d2343d9149f0fe642c852a9b3045f3c300a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Apr 2023 17:03:37 +0200 Subject: [PATCH 053/198] Move CRC_SIZE definition from Alloc to robus config --- engine/IO/inc/msg_alloc.h | 1 - network/robus/robus_config.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index 8e86aef14..f29e3b5e5 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -13,7 +13,6 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define CRC_SIZE 2 /******************************************************************************* * Variables diff --git a/network/robus/robus_config.h b/network/robus/robus_config.h index f3b57aa85..b0a81f9be 100644 --- a/network/robus/robus_config.h +++ b/network/robus/robus_config.h @@ -21,4 +21,6 @@ #define NBR_RETRY 10 #endif +#define CRC_SIZE 2 + #endif /* _ROBUS_CONFIG_H_ */ From b9144c2cca60ab44f27ce7c2df4b4e58fef14a4f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Apr 2023 11:39:52 +0200 Subject: [PATCH 054/198] Engine TX is passed to LuosIO RX normal process --- engine/IO/inc/_luos_phy.h | 21 + engine/IO/inc/filter.h | 3 +- engine/IO/inc/luos_io.h | 13 +- engine/IO/inc/luos_phy.h | 65 +- engine/IO/inc/msg_alloc.h | 45 +- engine/IO/inc/struct_io.h | 47 - engine/IO/inc/struct_phy.h | 36 + engine/IO/src/filter.c | 28 +- engine/IO/src/luos_io.c | 373 ++++- engine/IO/src/luos_phy.c | 471 +++++- engine/IO/src/msg_alloc.c | 1229 ++------------- engine/OD/od_linear.h | 1 - engine/OD/od_time.h | 106 +- engine/bootloader/bootloader_core.c | 8 +- engine/bootloader/bootloader_core.h | 4 +- engine/core/inc/_timestamp.h | 2 +- engine/core/inc/luos_engine.h | 11 +- engine/core/inc/luos_list.h | 8 +- engine/core/inc/profile_core.h | 4 +- engine/core/inc/routing_table.h | 2 +- engine/core/inc/service.h | 22 +- engine/core/inc/stats.h | 21 + engine/core/inc/struct_engine.h | 1 - engine/core/inc/struct_luos.h | 50 +- engine/core/inc/time_luos.h | 120 ++ engine/core/src/luos_engine.c | 432 +---- engine/core/src/luos_utils.c | 6 +- engine/core/src/profile_core.c | 2 +- engine/core/src/pub_sub.c | 6 +- engine/core/src/routing_table.c | 13 +- engine/core/src/service.c | 110 +- .../{IO/inc/_luos_io.h => core/src/stats.c} | 34 +- engine/core/src/streaming.c | 6 +- engine/core/src/timestamp.c | 20 +- engine/profiles/motor/profile_motor.c | 4 +- .../servo_motor/profile_servo_motor.c | 4 +- engine/profiles/state/profile_state.c | 4 +- engine/profiles/voltage/profile_voltage.c | 4 +- .../apps/alarm_controller/alarm_controller.c | 4 +- .../biometric-security/biometric_security.c | 6 +- .../apps/start_controller/start_controller.c | 4 +- .../bldc_simple_foc/lib/motor/motor.cpp | 6 +- .../Arduino/button/lib/button/button.c | 4 +- .../fingerprint/lib/Fingerprint/fingerprint.c | 4 +- examples/projects/Arduino/lcd/lib/Lcd/lcd.c | 6 +- examples/projects/Arduino/led/lib/led/led.c | 4 +- .../servo_motor/lib/Servo_motor/servo_motor.c | 6 +- .../stepper_simple_foc/lib/motor/motor.cpp | 6 +- .../projects/ESP32/button/lib/button/button.c | 4 +- .../ESP32/button_arduino/lib/button/button.c | 4 +- examples/projects/ESP32/led/lib/led/led.c | 4 +- .../barometer/lib/barometer/BMP280.c | 6 +- .../dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- .../NUCLEO-F401RE/button/lib/Button/button.c | 4 +- .../dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../projects/NUCLEO-F401RE/led/lib/Led/led.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- .../NUCLEO-F410RB/button/lib/Button/button.c | 4 +- .../dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../projects/NUCLEO-F410RB/led/lib/Led/led.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- .../NUCLEO-G431KB/button/lib/Button/button.c | 4 +- .../dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- .../NUCLEO-G474RE/button/lib/Button/button.c | 4 +- .../NUCLEO-L432KC/button/lib/Button/button.c | 4 +- .../dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../fingerprint/lib/Fingerprint/fingerprint.c | 4 +- .../projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.c | 6 +- .../projects/NUCLEO-L432KC/led/lib/Led/led.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- .../NUCLEO-L432KC/servo/lib/Servo/servo.c | 6 +- .../SAMD21XPLAINED/button/lib/button/button.c | 4 +- .../button/lib/Button/button.c | 4 +- .../button/lib/Button/button.c | 4 +- .../lib/Led_Fader/led_fader.c | 4 +- .../projects/l0/button_freertos/lib/Led/led.c | 4 +- .../lib/Controller_motor/controller_motor.c | 6 +- .../l0/dc_motor/lib/DC_motor/dc_motor.c | 4 +- .../lib/Detection_Button/detection_button.c | 6 +- .../ledstrip_position/lib/Distance/distance.c | 4 +- .../lib/LedStrip_Position/ledstrip_position.c | 6 +- .../lib/motor_copy/motor_copy.c | 6 +- .../motor_demo_app/lib/run_motor/run_motor.c | 6 +- .../l0/distance/lib/Distance/distance.c | 4 +- examples/projects/l0/dxl/lib/Dxl/dxl.c | 4 +- .../fingerprint/lib/Fingerprint/fingerprint.c | 4 +- .../projects/l0/gpio/lib/Gpio_dev/gpio_dev.c | 4 +- examples/projects/l0/imu/lib/Imu/imu.c | 4 +- examples/projects/l0/lcd/lib/Lcd/lcd.c | 6 +- examples/projects/l0/led/lib/Led/led.c | 4 +- .../l0/led_fader/lib/Led_Fader/led_fader.c | 4 +- .../l0/led_strip/lib/Led_strip/led_strip.c | 4 +- .../lib/Light_sensor/light_sensor.c | 4 +- examples/projects/l0/load/lib/Load/load.c | 4 +- .../lib/Potentiometer/potentiometer.c | 4 +- examples/projects/l0/servo/lib/Servo/servo.c | 4 +- .../projects/l0/stepper/lib/Stepper/stepper.c | 4 +- examples/projects/native/led/lib/Led/led.c | 6 +- .../native/ping_pong/lib/PingPong/ping_pong.c | 4 +- .../native/ping_pong/lib/PingPong/scoring.c | 6 +- .../native/ping_pong/lib/PingPong/scoring.h | 4 +- network/robus/HAL/ATSAMD21/robus_hal_config.h | 5 + .../HAL/ATSAMD21_ARDUINO/robus_hal_config.h | 1 + .../HAL/ATSAMD21_MBED/robus_hal_config.h | 1 + network/robus/HAL/ESP32/robus_hal_config.h | 3 +- network/robus/HAL/NATIVE/robus_hal_config.h | 1 + network/robus/HAL/STM32F0/robus_hal_config.h | 3 +- network/robus/HAL/STM32F4/robus_hal_config.h | 3 +- network/robus/HAL/STM32G4/robus_hal_config.h | 1 + network/robus/HAL/STM32L0/robus_hal_config.h | 3 +- network/robus/HAL/STM32L4/robus_hal_config.h | 1 + network/robus/HAL/STUB/robus_hal_config.h | 1 + network/robus/HAL/template/robus_hal_config.h | 1 + network/robus/inc/reception.h | 2 - network/robus/inc/robus.h | 2 - network/robus/inc/transmission.h | 25 +- network/robus/src/reception.c | 29 +- network/robus/src/robus.c | 90 +- network/robus/src/transmission.c | 103 +- test/_resources/Scenarios/default_scenario.c | 12 +- test/_resources/Unity/unit_test.h | 3 +- test/example_build.py | 1 - test/test_luos/main.c | 8 +- test/test_msg_alloc/main.c | 38 +- test/test_msg_alloc/main.h | 42 +- test/test_msg_alloc/unit_test_mem_alloc.c | 770 +++++++++ .../unit_test_mem_alloc_generic.c | 1395 ----------------- .../unit_test_mem_alloc_static.c | 1018 ------------ test/test_msg_alloc/unit_test_mem_alloc_tx.c | 601 ------- test/test_timestamp/main.c | 2 +- tool_services/gate/TinyJSON/bootloader_ex.h | 3 +- tool_services/gate/TinyJSON/convert.c | 17 +- tool_services/gate/convert.h | 1 - tool_services/gate/data_manager.c | 58 +- tool_services/inspector/data_manager.c | 20 +- tool_services/pipe/pipe.c | 4 +- 138 files changed, 2541 insertions(+), 5355 deletions(-) create mode 100644 engine/IO/inc/_luos_phy.h delete mode 100644 engine/IO/inc/struct_io.h create mode 100644 engine/IO/inc/struct_phy.h create mode 100644 engine/core/inc/stats.h create mode 100644 engine/core/inc/time_luos.h rename engine/{IO/inc/_luos_io.h => core/src/stats.c} (61%) create mode 100644 test/test_msg_alloc/unit_test_mem_alloc.c delete mode 100644 test/test_msg_alloc/unit_test_mem_alloc_generic.c delete mode 100644 test/test_msg_alloc/unit_test_mem_alloc_static.c delete mode 100644 test/test_msg_alloc/unit_test_mem_alloc_tx.c diff --git a/engine/IO/inc/_luos_phy.h b/engine/IO/inc/_luos_phy.h new file mode 100644 index 000000000..ec83bbb14 --- /dev/null +++ b/engine/IO/inc/_luos_phy.h @@ -0,0 +1,21 @@ +/****************************************************************************** + * @file phy.h + * @brief This file have to be imported by phy layers to interract with Luos + * @author Nicolas Rabault + * @version 0.0.0 + ******************************************************************************/ +#ifndef _PRIVATE_LUOS_PHY_H_ +#define _PRIVATE_LUOS_PHY_H_ + +#include "luos_phy.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +void Phy_Init(void); +void Phy_Reset(void); +void Phy_Loop(void); +luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb); + +#endif /* _PRIVATE_LUOS_PHY_H_ */ diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index 26aae2651..016faa4e4 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -9,7 +9,6 @@ #include #include -#include "struct_io.h" #include "struct_luos.h" /******************************************************************************* @@ -33,6 +32,6 @@ void Filter_RmTopic(uint16_t topic_id); bool Filter_ServiceID(uint16_t service_id); bool Filter_Topic(uint16_t topic_id); bool Filter_Type(uint16_t type_id); -luos_localhost_t Filter_GetLocalhost(header_t *header); +uint8_t Filter_GetPhyTarget(header_t *header); #endif /* _FILTER_H_ */ diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index 6d5d38af3..2c8bfb91a 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -8,6 +8,7 @@ #define _LUOSIO_H_ #include "struct_luos.h" +#include "struct_phy.h" /******************************************************************************* * Definitions @@ -22,8 +23,18 @@ ******************************************************************************/ // generic functions -void LuosIO_Init(memory_stats_t *memory_stats); +void LuosIO_Init(void); void LuosIO_Loop(void); uint16_t LuosIO_TopologyDetection(service_t *service); +error_return_t LuosIO_Send(service_t *service, msg_t *msg); + +// Job management +error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job); +void LuosIO_RmJob(phy_job_t *job); +uint16_t LuosIO_GetJobNb(void); +error_return_t LuosIO_TxAllComplete(void); + +// Specific phy treatment +error_return_t Phy_TxAllComplete(void); #endif /* _LUOSIO_H_ */ diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 3a26e1723..d18987a1f 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -8,30 +8,27 @@ #define _LUOS_PHY_H_ #include -#include "struct_luos.h" -#include "struct_io.h" +#include +#include "struct_phy.h" +#include "time_luos.h" +#include "luos_utils.h" +#include "luos_hal.h" /******************************************************************************* * Definitions ******************************************************************************/ /****************************************************************************** - * @struct luos_luos_phy_t - * @brief the data structure allowing the phy to interract with LuosIO + * @struct phy_target_t + * @brief Transmit message direction ******************************************************************************/ -typedef struct -{ - // This is allowing to access the data as data or message - union - { - uint8_t *data_pt; // Start pointer of the data on msg_buffer. - msg_t *msg_pt; // Pointer to the message. - }; - uint16_t size; // size of the data. - void *phy_data; // Phy developpers can use this pointer to store any data they need. -} phy_tx_job_t; +typedef uint8_t phy_target_t; -typedef struct luos_luos_phy_t +/****************************************************************************** + * @struct luos_phy_t + * @brief the data structure allowing the phy to interract with LuosIO + ******************************************************************************/ +typedef struct luos_phy_t { // *************** RX information *************** volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. @@ -43,26 +40,42 @@ typedef struct luos_luos_phy_t }; volatile uint16_t received_data; // Number of bytes already received. volatile uint16_t rx_size; // Size of data to receive. - struct __attribute__((__packed__)) + struct { volatile uint8_t rx_alloc_job : 1; // If true, Luosio_Loop funciton will need to filter already received data, if filter is ok, set rx_keep, alloc needed space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. volatile uint8_t rx_keep : 1; // True if we want to keep the received data. + volatile uint8_t rx_ack : 1; // True if we need to generate an acknoledgement for this message. }; // RX Private data - luos_localhost_t rx_phy_filter; // The phy concerned by this message. + phy_target_t rx_phy_filter; // The phy concerned by this message. // *************** TX informations *************** - phy_tx_job_t tx_job[MAX_MSG_NB]; // List of phy tx jobs to send. - uint8_t tx_job_nb; // Number of tx jobs to send. + // Jobs are stores from the newest to the oldest to optimize pulling time allowing to do it in IRQ. + // So adding a job is done by moving all job up and adding the new one at 0, then add 1 to job_nb. + phy_job_t job[MAX_MSG_NB]; // List of phy jobs to send. + uint8_t job_nb; // Number of jobs to send. + + void (*phy_cb)(struct luos_phy_t *phy_ptr, phy_job_t *job); // Callback } luos_phy_t; -void Phy_Init(void); -void Phy_Loop(void); -luos_phy_t *Phy_Create(void); +typedef void (*PHY_CB)(luos_phy_t *phy_ptr, phy_job_t *job); + +// Phy creation +luos_phy_t *Phy_Create(PHY_CB phy_cb); // Use it to reference your phy to Luos. + +// Rx management +void Phy_ComputeHeader(luos_phy_t *phy_ptr); // After receiving the first 7 bytes (the header) call this function to compute how you should manage the incoming message. +void Phy_ValidMsg(luos_phy_t *phy_ptr); // After receiving as much valid bytes as phy_ptr.rx_size, call this function to validate the message. + +// Tx management +time_luos_t Phy_ComputeTimestamp(phy_job_t *job); +uint16_t Phy_GetNodeId(void); -void Phy_Send(luos_phy_t *phy_ptr, uint8_t *data, uint16_t size); -void Phy_Computeheader(luos_phy_t *phy_ptr); -void Phy_ValidMsg(luos_phy_t *phy_ptr); +// Job management +void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead +phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the next job to send. +void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. +uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr); // Use it to get the number of job you currently have to send on your phy_ptr.job list. #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index f29e3b5e5..8a99a115b 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -8,53 +8,18 @@ #define _MSGALLOC_H_ #include "struct_luos.h" -#include "struct_io.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ /******************************************************************************* * Functions ******************************************************************************/ -// generic functions +// Generic functions void MsgAlloc_Init(memory_stats_t *memory_stats); -void MsgAlloc_loop(void); - -// msg buffering functions -uint8_t *MsgAlloc_Alloc(uint16_t data_size); +void MsgAlloc_Loop(void); +// Msg buffering functions +uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter); +void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data); error_return_t MsgAlloc_IsEmpty(void); -void MsgAlloc_UsedMsgEnd(void); -void MsgAlloc_Reset(void); -error_return_t MsgAlloc_IsReseted(void); - -// msg interpretation task stack -error_return_t MsgAlloc_PullMsgToInterpret(msg_t **returned_msg); - -// Luos task stack -void MsgAlloc_LuosTaskAlloc(service_t *service_concerned_by_current_msg, msg_t *concerned_msg); - -// Luos task research and pull -error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg); -error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **returned_msg); -error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, service_t **allocated_service); -error_return_t MsgAlloc_GetLuosTaskSourceId(uint16_t luos_task_id, uint16_t *source_id); -error_return_t MsgAlloc_GetLuosTaskCmd(uint16_t luos_task_id, uint8_t *cmd); -error_return_t MsgAlloc_GetLuosTaskSize(uint16_t luos_task_id, uint16_t *size); -uint16_t MsgAlloc_LuosTasksNbr(void); -void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg); - -// Tx tasks create, get and consume -error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack); -void MsgAlloc_PullMsgFromTxTask(void); -void MsgAlloc_PullServiceFromTxTask(uint16_t service_id); -error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size); -error_return_t MsgAlloc_TxAllComplete(void); #endif /* _MSGALLOC_H_ */ diff --git a/engine/IO/inc/struct_io.h b/engine/IO/inc/struct_io.h deleted file mode 100644 index 37751a41f..000000000 --- a/engine/IO/inc/struct_io.h +++ /dev/null @@ -1,47 +0,0 @@ -/****************************************************************************** - * @file struct_io - * @brief io level structures - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _STRUCT_IO_H_ -#define _STRUCT_IO_H_ - -#include -#include "engine_config.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/****************************************************************************** - * @struct luos_localhost_t - * @brief Transmit message direction - ******************************************************************************/ -typedef enum -{ - EXTERNALHOST, // This message is for an external service - LOCALHOST, // This message is for an internal service only - MULTIHOST // This message is for an internal and an external service -} luos_localhost_t; - -typedef enum -{ - // protocol level command - WRITE_NODE_ID, /*!< Get and save a new given node ID. */ - START_DETECTION, /*!< Start a detection*/ - END_DETECTION, /*!< Detect the end of a detection*/ - ASSERT, /*!< Node Assert message (only broadcast with a source as a node */ - - /*!< Compatibility area*/ - // ROBUS_PROTOCOL_NB = 13, -} robus_cmd_t; - -typedef enum -{ - // Protocol version - BASE_PROTOCOL = PROTOCOL_REVISION, - TIMESTAMP_PROTOCOL, -} robus_protocol_t; - -#endif /* _STRUCT_IO_H_ */ diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h new file mode 100644 index 000000000..e14b7753c --- /dev/null +++ b/engine/IO/inc/struct_phy.h @@ -0,0 +1,36 @@ +/****************************************************************************** + * @file phy.h + * @brief This file have to be imported by phy layers to interract with Luos + * @author Nicolas Rabault + * @version 0.0.0 + ******************************************************************************/ +#ifndef _STRUCT_PHY_H_ +#define _STRUCT_PHY_H_ + +#include +#include +#include "struct_luos.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/****************************************************************************** + * @struct phy_job_t + * @brief Definition of a phy job (task to do by the phy) + ******************************************************************************/ +typedef struct +{ + // This is allowing to access the data as data pointer or message + union + { + const uint8_t *data_pt; // Start pointer of the data on msg_buffer. + const msg_t *msg_pt; // Pointer to the message. + }; + uint16_t size; // size of the data. + bool ack; // True if we want to receive a message acknoledgement. + bool timestamp; // True if this job is timestamped. + void *phy_data; // Phy developpers can use this pointer to store any data they need. +} phy_job_t; + +#endif /* _STRUCT_PHY_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 7082a1825..d531e218e 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -4,7 +4,6 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ - #include "filter.h" #include "luos_utils.h" #include "luos_hal.h" @@ -121,7 +120,7 @@ _CRITICAL bool Filter_ServiceID(uint16_t service_id) if ((service_id > (8 * filter_ctx.IDShiftMask))) // IDMask aligned byte { - // Calcul ID mask for ID receive + // Calcul ID mask for ID received compare = ((service_id - 1) - ((8 * filter_ctx.IDShiftMask))); // Check if compare and internal mask match if ((filter_ctx.IDMask[compare / 8] & (1 << (compare % 8))) != 0) @@ -179,7 +178,7 @@ _CRITICAL bool Filter_Type(uint16_t type_id) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL luos_localhost_t Filter_GetLocalhost(header_t *header) +_CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) { // Find if we are concerned by this message. // check if we need to filter all the messages @@ -191,38 +190,45 @@ _CRITICAL luos_localhost_t Filter_GetLocalhost(header_t *header) // Check all service id if (Filter_ServiceID(header->target)) { - return LOCALHOST; + // This concerns Luos phy only + return 0x01; } break; case TYPE: if (Filter_Type(header->target)) { - return MULTIHOST; + // This concerns Luos phy and Robus + return 0x01 | (0x01 << 1); } break; case BROADCAST: if (header->target == BROADCAST_VAL) { - return MULTIHOST; + // This concerns Luos phy and Robus + return 0x01 | (0x01 << 1); } break; case NODEIDACK: case NODEID: - if ((header->target == Node_Get()->node_id)) + if (header->target == Node_Get()->node_id) { - return LOCALHOST; + // This concerns Luos phy only + return 0x01; } break; case TOPIC: if (Filter_Topic(header->target)) { - return MULTIHOST; + // This concerns Luos phy and Robus + return 0x01 | (0x01 << 1); } break; default: - return EXTERNALHOST; + // This concerns Robus only + return 0x01 << 1; break; } - return EXTERNALHOST; + // This concerns Robus only + return 0x01 << 1; } diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 1390d7ae8..9497d5d5a 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -1,23 +1,23 @@ /****************************************************************************** * @file luos_io.c - * @brief Interface file between Luos and a physical layer + * @brief Interface file between Luos and phy. This is also managing all protocol messages. * @author Luos * @version 0.0.0 ******************************************************************************/ #include #include "luos_io.h" -#include "transmission.h" -#include "reception.h" #include "msg_alloc.h" -#include "robus.h" #include "service.h" #include "filter.h" -#include "node.h" #include "luos_utils.h" #include "luos_hal.h" #include "luos_engine.h" #include "bootloader_core.h" +#include "_luos_phy.h" +#include "stats.h" + +#include "robus.h" /******************************************************************************* * Definitions @@ -38,11 +38,19 @@ typedef struct __attribute__((__packed__)) static error_return_t LuosIO_StartTopologyDetection(service_t *service); static error_return_t LuosIO_DetectNextNodes(service_t *service); +static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); +static error_return_t LuosIO_ConsumeMsg(const msg_t *input); +static void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); /******************************************************************************* * Variables ******************************************************************************/ volatile uint16_t last_node = 0; +luos_phy_t *luos_phy; +service_filter_t service_filter[MAX_MSG_NB]; // Service filter table. Each of these filter will be linked with jobs. +uint8_t service_filter_index = 0; // Index of the next service filter to use. +service_t *detection_service = NULL; +bool Flag_DetectServices = false; /******************************************************************************* * Functions @@ -53,15 +61,22 @@ volatile uint16_t last_node = 0; * @param None * @return None ******************************************************************************/ -void LuosIO_Init(memory_stats_t *memory_stats) +void LuosIO_Init(void) { // Init filter Filter_IdInit(); Filter_TopicInit(); - + Stats_Init(); + memory_stats_t *memory_stats = Stats_GetMemory(); // Clear message allocation buffer table MsgAlloc_Init(memory_stats); + // Init Phy + Phy_Init(); + + // Get the Luos phy struct, Luos always use the first phy + luos_phy = Phy_Get(0, LuosIO_MsgHandler); + // Init Robus Robus_Init(); } @@ -74,8 +89,85 @@ void LuosIO_Init(memory_stats_t *memory_stats) void LuosIO_Loop(void) { // Execute message allocation tasks - MsgAlloc_loop(); + MsgAlloc_Loop(); + Phy_Loop(); + Robus_Loop(); + if (Flag_DetectServices == true) + { + Flag_DetectServices = false; + // Set the detection launcher id to 1 + detection_service->id = 1; + // Generate the filters + Service_GenerateId(1); + RoutingTB_DetectServices(detection_service); + } +} + +/****************************************************************************** + * @brief manage a message reception + * @param None + * @return None + ******************************************************************************/ +static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + // Check if this message is a protocol one + if (LuosIO_ConsumeMsg(job->msg_pt) == FAILED) + { + // If not create a service filter for this job. + service_filter[service_filter_index] = Service_GetFilter(job->msg_pt); + job->phy_data = &service_filter[service_filter_index]; + service_filter_index++; + if (service_filter_index >= MAX_MSG_NB) + { + service_filter_index = 0; + } + } + else + { + // This message was a protocol one, we can remove it. + Phy_RmJob(luos_phy, job); + } +} + +/****************************************************************************** + * @brief Send a message to the network + * @param service pointer to the service + * @param msg pointer to the message + * @return error return + ******************************************************************************/ +error_return_t LuosIO_Send(service_t *service, msg_t *msg) +{ + error_return_t error = SUCCEED; + + // *************************************************** + // Don't send luos messages if the network is down + // *************************************************** + if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Node_GetState() != DETECTION_OK)) + { + return PROHIBITED; + } + + // Save message information in the Luosphy struct + luos_phy->rx_buffer_base = (uint8_t *)msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + Phy_ComputeHeader(luos_phy); + // The header computation give us how many byte we need to have. + // Just update the received data to the full message size. + luos_phy->received_data = luos_phy->rx_size; + // Validate the message to allocate it and generate tasks. + Phy_ValidMsg(luos_phy); + if (luos_phy->rx_data == NULL) + { + // The message wasn't kept, there is no more space on the buffer, or the message is corrupted. + // Return a failure to notify user. + return FAILED; + } + // Execute phy loop to dispatch the allocated message. Phy_Loop(); + return error; } /****************************************************************************** @@ -132,7 +224,6 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) msg_t msg; uint8_t try_nbr = 0; - msg.header.config = BASE_PROTOCOL; msg.header.target = BROADCAST_VAL; msg.header.target_mode = BROADCAST; msg.header.cmd = START_DETECTION; @@ -147,14 +238,16 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) // Load the message to send Luos_SendMsg(service, &msg); // Wait until message is actually transmitted - while (MsgAlloc_TxAllComplete() != SUCCEED) + while (Phy_TxAllComplete() != SUCCEED) ; // Reinit services id Service_ClearId(); // Reinit msg alloc MsgAlloc_Init(NULL); + // Reinit service filter + Filter_IdInit(); // Reinit Phy - Phy_Init(); + Phy_Reset(); // Wait 2ms to be sure all previous messages are received and treated by other nodes uint32_t start_tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - start_tick < 2) @@ -178,13 +271,19 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) * @param msg pointer to the reeived message * @return error_return_t SUCCEED if the message have been consumed. ******************************************************************************/ -error_return_t LuosIO_MsgHandler(msg_t *input) +error_return_t LuosIO_ConsumeMsg(const msg_t *input) { msg_t output_msg; node_bootstrap_t node_bootstrap; - service_t *service = Service_GetConcerned(&input->header); + time_luos_t time; + service_t *service = Service_GetConcerned(&input->header); + dead_target_t *dead_target = (dead_target_t *)input->data; + uint16_t base_id = 0; + routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()]; + switch (input->header.cmd) { + //**************************************** detection section **************************************** case WRITE_NODE_ID: // Depending on the size of the received data we have to do different things switch (input->header.size) @@ -227,8 +326,10 @@ error_return_t LuosIO_MsgHandler(msg_t *input) Service_ClearId(); // Reinit msg alloc MsgAlloc_Init(NULL); + // Reinit service filter + Filter_IdInit(); // Reinit Phy - Phy_Init(); + Phy_Reset(); } // This is a node bootstrap information. memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); @@ -236,33 +337,171 @@ error_return_t LuosIO_MsgHandler(msg_t *input) Robus_SaveNodeID(node_bootstrap.prev_nodeid); // Continue the topology detection on our other ports. LuosIO_DetectNextNodes(service); + break; default: + LUOS_ASSERT(0); break; } + // This message have been consumed return SUCCEED; break; - case BOOTLOADER_CMD: - if (input->data[0] == BOOTLOADER_RESET) + + case LOCAL_RTB: + // Depending on the size of this message we have to make different operations + // If size is 0 someone ask to get local_route table back + // If size is 2 someone ask us to generate a local route table based on the given service ID then send local route table back. + switch (input->header.size) { - LuosHAL_SetMode((uint8_t)BOOT_MODE); - LuosHAL_Reboot(); - // This message have been consumed - return SUCCEED; + case 2: + // generate local ID + RoutingTB_Erase(); + memcpy(&base_id, &input->data[0], sizeof(uint16_t)); + Service_GenerateId(base_id); + case 0: + // send back a local routing table + output_msg.header.cmd = RTB; + output_msg.header.target_mode = SERVICEIDACK; + output_msg.header.target = input->header.source; + LuosIO_TransmitLocalRoutingTable(0, &output_msg); + break; + default: + LUOS_ASSERT(0); + break; } - return FAILED; + return SUCCEED; break; + + case RTB: + // We are receiving a rouiting table + // Check routing table overflow + LUOS_ASSERT(((uintptr_t)route_tab + input->header.size) <= ((uintptr_t)RoutingTB_Get() + (sizeof(routing_table_t) * MAX_RTB_ENTRY))); + if (Luos_ReceiveData(service, input, (void *)route_tab) > 0) + { + // route table section reception complete + RoutingTB_ComputeRoutingTableEntryNB(); + Luos_ResetStatistic(); + } + return SUCCEED; + break; + case START_DETECTION: - MsgAlloc_Reset(); + Phy_Reset(); + MsgAlloc_Init(NULL); Node_SetState(EXTERNAL_DETECTION); + Service_ClearId(); + // Reset the data reception context + Luos_ReceiveData(NULL, NULL, NULL); Robus_ResetNodeID(); // This message have been consumed return SUCCEED; break; + case END_DETECTION: // Detect end of detection Node_SetState(DETECTION_OK); return FAILED; break; + + case ASK_DETECTION: + if (input->header.size == 0) + { + if (Node_GetState() < LOCAL_DETECTION) + { + detection_service = service; + Flag_DetectServices = true; + } + } + return SUCCEED; + break; + + //**************************************** failure section **************************************** + case ASSERT: + // A service assert remove all services of the asserted node in routing table + RoutingTB_RemoveNode(input->header.source); + // This assert information could be usefull for services, do not remove it. + return FAILED; + break; + + case DEADTARGET: + if (dead_target->node_id != 0) + { + RoutingTB_RemoveNode(dead_target->node_id); + } + if (dead_target->service_id != 0) + { + RoutingTB_RemoveService(dead_target->service_id); + } + // This assert information could be usefull for services, do not remove it. + return FAILED; + break; + + //**************************************** info section ********************************************** + + case REVISION: + if (input->header.size == 0) + { + output_msg.header.cmd = REVISION; + output_msg.header.target_mode = SERVICEID; + memcpy(output_msg.data, service->revision.unmap, sizeof(revision_t)); + output_msg.header.size = sizeof(revision_t); + output_msg.header.target = input->header.source; + Luos_SendMsg(service, &output_msg); + return SUCCEED; + } + break; + + case LUOS_REVISION: + if (input->header.size == 0) + { + const revision_t *luos_version = Luos_GetVersion(); + output_msg.header.cmd = LUOS_REVISION; + output_msg.header.target_mode = SERVICEID; + output_msg.header.size = sizeof(revision_t); + output_msg.header.target = input->header.source; + memcpy(output_msg.data, &luos_version->unmap, sizeof(revision_t)); + Luos_SendMsg(service, &output_msg); + return SUCCEED; + } + break; + + case LUOS_STATISTICS: + if (input->header.size == 0) + { + output_msg.header.cmd = LUOS_STATISTICS; + output_msg.header.target_mode = SERVICEID; + output_msg.header.size = sizeof(general_stats_t); + output_msg.header.target = input->header.source; + general_stats_t *general_stats = Stats_Get(); + memcpy(&general_stats->service_stat, service->statistics.unmap, sizeof(service_stats_t)); + memcpy(output_msg.data, &general_stats->unmap, sizeof(general_stats_t)); + Luos_SendMsg(service, &output_msg); + return SUCCEED; + } + break; + //**************************************** service section **************************************** + + case WRITE_ALIAS: + // Save this alias into the service + Luos_UpdateAlias(service, (const char *)input->data, input->header.size); + // Send this message to user + return FAILED; + break; + + case UPDATE_PUB: + // this service need to be auto updated + TimeOD_TimeFromMsg(&time, input); + service->auto_refresh.target = input->header.source; + service->auto_refresh.time_ms = (uint16_t)TimeOD_TimeTo_ms(time); + service->auto_refresh.last_update = LuosHAL_GetSystick(); + return SUCCEED; + break; + //**************************************** bootloader section **************************************** + case BOOTLOADER_CMD: + // send data to the bootloader + LuosBootloader_MsgHandler(input); + return SUCCEED; + break; + default: return FAILED; break; @@ -270,6 +509,28 @@ error_return_t LuosIO_MsgHandler(msg_t *input) return FAILED; } +/****************************************************************************** + * @brief Transmit local RTB to network + * @param service + * @param routeTB_msg : Loca RTB message to transmit + * @return none + ******************************************************************************/ +static inline void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg) +{ + uint16_t entry_nb = 0; + routing_table_t local_routing_table[Service_GetNumber() + 1]; + + // start by saving node entry + RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Node_Get()); + entry_nb++; + // save services entry + for (uint16_t i = 0; i < Service_GetNumber(); i++) + { + RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &Service_GetTable()[i]); + } + Luos_SendData(service, routeTB_msg, (void *)local_routing_table, (entry_nb * sizeof(routing_table_t))); +} + /****************************************************************************** * @brief run the procedure allowing to detect the next nodes on the next physical layer port. * @param service pointer to the detecting service @@ -281,8 +542,6 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) while (Robus_FindNeighbour() == SUCCEED) { // There is someone here - // Clear spotted dead service detection - service->dead_service_spotted = 0; // Ask an ID to the detector service. msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -292,17 +551,8 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) msg.header.size = 0; Luos_SendMsg(service, &msg); // Wait the end of transmission - while (MsgAlloc_TxAllComplete() == FAILED) + while (Phy_TxAllComplete() == FAILED) ; - // Check if there is a failure on transmission - if (service->dead_service_spotted != 0) - { - // Message transmission failure - // Consider this port unconnected by sending a 0xFFFF node id meaning that this port is not connected - Robus_SaveNodeID(0xFFFF); - continue; - } - // When Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. // We just have to wait the end of the treatment of the entire branch uint32_t start_tick = LuosHAL_GetSystick(); @@ -318,3 +568,58 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) } return SUCCEED; } + +/****************************************************************************** + * @brief try to get a job from the job list. + * @param job_id the id of the job to get + * @param job pointer to the job pointer + * @return SUCEED if the job is available, FAILED if not. + ******************************************************************************/ +error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job) +{ + LUOS_ASSERT(job != NULL); + MSGALLOC_MUTEX_LOCK + if (job_id < luos_phy->job_nb) + { + *job = &luos_phy->job[job_id]; + MSGALLOC_MUTEX_UNLOCK + return SUCCEED; + } + MSGALLOC_MUTEX_UNLOCK + return FAILED; +} + +/****************************************************************************** + * @brief remove a job from the job list. + * @param job pointer to the job to remove + * @return None. + ******************************************************************************/ +void LuosIO_RmJob(phy_job_t *job) +{ + // Be sure every service has finished to use this job + if (*(service_filter_t *)job->phy_data != 0) + { + // This job is still used by a service, we can't remove it now + return; + } + Phy_RmJob(luos_phy, job); +} + +/****************************************************************************** + * @brief get the number of job in the job list. + * @param None. + * @return the number of job in the job list. + ******************************************************************************/ +uint16_t LuosIO_GetJobNb(void) +{ + return luos_phy->job_nb; +} + +/****************************************************************************** + * @brief define is theire is something waiting to be sent or not + * @return Succeed if nothing is waiting to be sent + ******************************************************************************/ +error_return_t LuosIO_TxAllComplete(void) +{ + return Phy_TxAllComplete(); +} diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 475adf518..67cd09567 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -5,38 +5,89 @@ * @version 0.0.0 ******************************************************************************/ +/****************************************************************************** + * + * Phy receive messages from Luos and any other phy and dispatch all received messages to all phys + * + ************************************************* RX timeline representation ************************************************* + * ------------------+------------------------------------------------------------------------------------------------------------------+ + * | +---+-----------------+-----------------------+------------+---+ | + * Phy RX bus | | ? | Header | data | Timestamp | ? | | + * | +---+-----------------+-----------------------+------------+---+ | + * ------------------+-----------------------|----------------------------------------|-------------------------------------------------+ + * | V V | + * | +-------------------+ +--------------+ | + * IRQ | | Phy_ComputeHeader | | Phy_ValidMsg | | + * | +-------------------+ +--------------+ | + * | [Phy status updated]--+ | | + * ------------------+----------------------------------------------|-----------------------------|-------------------------------------+ + * | V | | + * | +-----------+ | +--------------+ | + * Loop |.......................| |..| Phy_alloc |.....| | |.....| Phy_Dispatch |.............| + * | +-----------+ | +--------------+ | + * | | ^ | | + * ------------------+----------------------------------------------------------------------------|--------|---------|------------------+ + * | V | | | + * | +--------+ | +------------+ | + * Generated | | io_job | +->| Phy[0].Job | | + * tasks | +--------+ | +------------+ | + * | | +------------+ | + * (Each generated | +->| Phy[1].Job | | + * job is inserted | | +------------+ | + * in a job table) | | +------------+ | + * | +->| Phy[3].Job | | + * | | +------------+ | + * | | +------------+ | + * | +->| Phy[x].Job | | + * | +------------+ | + * ------------------+------------------------------------------------------------------------------------------------------------------+ + * + ******************************************************************************/ + #include #include "luos_phy.h" +#include "_luos_phy.h" #include "filter.h" #include "msg_alloc.h" -#include "engine_config.h" #include "luos_hal.h" -#include "node.h" #include "_timestamp.h" -#include "robus.h" #include "luos_io.h" -#include "_luos_io.h" -#include "service.h" +// #include "service.h" /******************************************************************************* * Definitions ******************************************************************************/ +#define PHY_NB 2 + typedef struct __attribute__((__packed__)) { uint64_t timestamp; msg_t *alloc_msg; - luos_localhost_t phy_filter; -} luos_phy_job_t; + phy_target_t phy_filter; + uint16_t size; +} IO_job_t; typedef struct { - luos_phy_t phy; - luos_phy_job_t phy_job[MAX_MSG_NB]; - volatile uint16_t phy_job_nb; + // ******************** Phy management ******************** + luos_phy_t phy[PHY_NB]; // phy[0] is the local phy, phy[1] is the remote phy. + uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. + + // ******************** job management ******************** + // io_jobs are stores from the newest to the oldest. + // This will add time in IRQ when we will pull a job but allow to keep pointers constant. + IO_job_t io_job[MAX_MSG_NB]; // Table of all the io_jobs to dispatch. + volatile uint16_t io_job_nb; // Number of io_jobs in the io_job table. + phy_job_t failed_job[4]; // Table of all the failed jobs we have to deal with. + uint8_t failed_job_nb; // Number of failed jobs in the failed_job table. } luos_phy_ctx_t; static void Phy_alloc(luos_phy_t *phy); static void Phy_Dispatch(void); +static void Phy_ManageFailedJob(void); +static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job); +static int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job); +static int Phy_GetPhyId(luos_phy_t *phy_ptr); /******************************************************************************* * Variables @@ -48,83 +99,83 @@ luos_phy_ctx_t phy_ctx; ******************************************************************************/ /****************************************************************************** - * @brief POhy initialization + * @brief Phy initialization * @param None * @return None ******************************************************************************/ void Phy_Init(void) { - // Put everything to 0 - memset((void *)phy_ctx.phy_job, 0, sizeof(phy_ctx.phy_job)); - phy_ctx.phy_job_nb = 0; + Phy_Reset(); + phy_ctx.phy_nb = 1; } /****************************************************************************** - * @brief Phy loop + * @brief Reset the phy * @param None * @return None ******************************************************************************/ -void Phy_Loop(void) +void Phy_Reset(void) { - // Manage received data allocation - if (phy_ctx.phy.rx_alloc_job) + // Put everything to 0 + memset((void *)phy_ctx.io_job, 0, sizeof(phy_ctx.io_job)); + phy_ctx.io_job_nb = 0; + memset((void *)phy_ctx.failed_job, 0, sizeof(phy_ctx.failed_job)); + phy_ctx.failed_job_nb = 0; + for (uint8_t i = 0; i < phy_ctx.phy_nb; i++) { - Phy_alloc(&phy_ctx.phy); + memset((void *)&phy_ctx.phy[i].job, 0, sizeof(phy_ctx.phy[0].job)); + phy_ctx.phy[i].job_nb = 0; } - // Manage complete message received dispatching - Phy_Dispatch(); - Robus_Loop(); } /****************************************************************************** - * @brief Instanciate a physical layer + * @brief Phy loop * @param None * @return None ******************************************************************************/ -luos_phy_t *Phy_Create(void) +void Phy_Loop(void) { - return &phy_ctx.phy; + // Manage received data allocation + // This is only needed for Robus for now. + if (phy_ctx.phy[1].rx_alloc_job) + { + Phy_alloc(phy_ctx.phy); + } + // Manage complete message received dispatching + Phy_Dispatch(); + Phy_ManageFailedJob(); + // Compute phy job statistics + /* + uint8_t stat = (uint8_t)((job nbr * 100) / (MAX_MSG_NB)); + if (stat > mem_stat->rx_msg_stack_ratio) + { + memory_stats_t mem_stat->rx_msg_stack_ratio = stat; + }*/ } /****************************************************************************** - * @brief Send data on the physical layer - * @param data Data to send - * @param size Size of the data to send + * @brief Instanciate a physical layer + * @param phy_cb callback to call when we want to transmit a message * @return None ******************************************************************************/ -void Phy_Send(luos_phy_t *phy_ptr, uint8_t *data, uint16_t size) +luos_phy_t *Phy_Create(PHY_CB phy_cb) { + LUOS_ASSERT((phy_ctx.phy_nb < PHY_NB) && (phy_ctx.phy_nb > 0)); + return Phy_Get(phy_ctx.phy_nb++, phy_cb); } /****************************************************************************** - * @brief Consider the message as valid - * @param phy_ptr Pointer to the phy concerned by the allocation + * @brief return the local physical layer + * @param id of the phy we want + * @param phy_cb callback to call when we want to transmit a message * @return None ******************************************************************************/ -_CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) +luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb) { - LUOS_ASSERT(phy_ptr != NULL); - // Check if the allocation of the received message have been done - if (phy_ptr->rx_alloc_job) - { - // We did not allocate the received data yet - // This can happen if we did not had the time to execute Phy_Loop function before the end of the message reception or if this phy get the complete mgs in one time. - Phy_alloc(phy_ptr); - } - if (phy_ptr->rx_keep == true) - { - // Now we can create a phy_job to dispatch the tx_job later - LUOS_ASSERT(phy_ctx.phy_job_nb < MAX_MSG_NB); - LuosHAL_SetIrqState(false); - phy_ctx.phy_job[phy_ctx.phy_job_nb].timestamp = phy_ptr->rx_timestamp; - phy_ctx.phy_job[phy_ctx.phy_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; - phy_ctx.phy_job[phy_ctx.phy_job_nb].phy_filter = phy_ptr->rx_phy_filter; - phy_ctx.phy_job_nb++; - // Then reset the phy to receive the next message - phy_ptr->rx_data = phy_ptr->rx_buffer_base; - phy_ptr->received_data = 0; - LuosHAL_SetIrqState(true); - } + // Set the callback + phy_ctx.phy[id].phy_cb = phy_cb; + // Return the phy pointer + return &phy_ctx.phy[id]; } /****************************************************************************** @@ -132,7 +183,7 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) * @param phy_ptr Pointer to the phy concerned by this message * @return None ******************************************************************************/ -inline void Phy_Computeheader(luos_phy_t *phy_ptr) +inline void Phy_ComputeHeader(luos_phy_t *phy_ptr) { // Compute the size of the data to allocate @@ -145,24 +196,88 @@ inline void Phy_Computeheader(luos_phy_t *phy_ptr) { phy_ptr->rx_size = ((header_t *)phy_ptr->rx_buffer_base)->size + sizeof(header_t); // We need to check if we have a timestamped message and increase the data size if yes - if (Luos_IsMsgTimstamped((msg_t *)(phy_ptr->rx_data)) == true) // TODO move it to TX + if (Luos_IsMsgTimstamped((msg_t *)(phy_ptr->rx_data)) == true) { phy_ptr->rx_size += sizeof(time_luos_t); } } // Compute the phy concerned by this message - phy_ptr->rx_phy_filter = Filter_GetLocalhost((header_t *)phy_ptr->rx_buffer_base); - if (phy_ptr->rx_phy_filter != EXTERNALHOST) + phy_ptr->rx_phy_filter = Filter_GetPhyTarget((header_t *)phy_ptr->rx_buffer_base); + // Remove the phy asking to compute the header to avoid to retransmit it, except for Luos because Luos can do localhost. + uint32_t index = Phy_GetPhyId(phy_ptr); + if (index != 0) + { + // remove the phy asking to compute the header, except if it is Luos because Luos can do localhost. + phy_ptr->rx_phy_filter &= ~(0x01 << index); + } + if (phy_ptr->rx_phy_filter != 0) { + // Someone need to receive this message phy_ptr->rx_keep = true; phy_ptr->rx_alloc_job = true; + phy_ptr->rx_ack = ((((header_t *)phy_ptr->rx_buffer_base)->target_mode == SERVICEIDACK) || (((header_t *)phy_ptr->rx_buffer_base)->target_mode == NODEIDACK)); } else { + // No one need to receive this message phy_ptr->rx_keep = false; phy_ptr->rx_alloc_job = false; + phy_ptr->rx_ack = false; + return; + } +} + +/****************************************************************************** + * @brief Consider the message as valid + * @param phy_ptr Pointer to the phy concerned by the allocation + * @return None + ******************************************************************************/ +_CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) +{ + LUOS_ASSERT(phy_ptr != NULL); + // Check if the allocation of the received message have been done + if (phy_ptr->rx_alloc_job) + { + // We did not allocate the received data yet + // This can happen if we did not had the time to execute Phy_Loop function before the end of the message reception or if this phy get the complete mgs in one time. + Phy_alloc(phy_ptr); } + if (phy_ptr->rx_keep == true) + { + // Now we can create a phy_job to dispatch the tx_job later + LUOS_ASSERT(phy_ctx.io_job_nb < MAX_MSG_NB); + LuosHAL_SetIrqState(false); + phy_ctx.io_job[phy_ctx.io_job_nb].timestamp = phy_ptr->rx_timestamp; + phy_ctx.io_job[phy_ctx.io_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; + phy_ctx.io_job[phy_ctx.io_job_nb].phy_filter = phy_ptr->rx_phy_filter; + phy_ctx.io_job[phy_ctx.io_job_nb].size = phy_ptr->rx_size; + phy_ctx.io_job_nb++; + // Then reset the phy to receive the next message + phy_ptr->rx_data = phy_ptr->rx_buffer_base; + phy_ptr->received_data = 0; + LuosHAL_SetIrqState(true); + } +} + +/****************************************************************************** + * @brief Compute the timestamp to send with the message + * @param job Pointer to the job concerned by this message + * @return None + ******************************************************************************/ +time_luos_t Phy_ComputeTimestamp(phy_job_t *job) +{ + LUOS_ASSERT((job != NULL) && (job->msg_pt != NULL) && (job->timestamp == true)); + return Timestamp_ConvertToLatency(job->msg_pt); +} + +/****************************************************************************** + * @brief return the node id + * @return Node ID value + ******************************************************************************/ +uint16_t Phy_GetNodeId(void) +{ + return Node_Get()->node_id; } /****************************************************************************** @@ -188,7 +303,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) LUOS_ASSERT(phy_ptr->rx_data == phy_ptr->rx_buffer_base); LuosHAL_SetIrqState(true); - // Now we can check if we need to store the received data if (phy_ptr->rx_keep) { @@ -200,10 +314,18 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) uint16_t phy_stored_data_size = phy_ptr->received_data; phy_ptr->rx_alloc_job = false; // Now allocate it - rx_data = MsgAlloc_Alloc(phy_ptr->rx_size); - // Assert if the allocation failed. We don't allow to loose a RX message. - LUOS_ASSERT(rx_data != NULL); + rx_data = MsgAlloc_Alloc(phy_ptr->rx_size, (uint8_t)phy_ptr->rx_phy_filter); phy_ptr->rx_data = rx_data; + // Assert if the allocation failed. We don't allow to loose a message comming from outside. + if ((phy_ptr == &phy_ctx.phy[0]) && (rx_data == NULL)) + { + // We don't successfully allocated the message. + // This is luos trying to send something, return and Luos will wait... + LuosHAL_SetIrqState(true); + phy_ptr->rx_keep = false; + return; + } + LUOS_ASSERT(rx_data != NULL); // Job is done LuosHAL_SetIrqState(true); copy_from = (void *)phy_ptr->rx_buffer_base; @@ -235,37 +357,220 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) ******************************************************************************/ static void Phy_Dispatch(void) { - // Interpreat received messages and create luos task for it. - while (phy_ctx.phy_job_nb) + static bool running = false; + int i = 0; + if (running) + { + return; + } + running = true; + // Interpreat received messages and create tasks for it. + LuosHAL_SetIrqState(false); + while (i < phy_ctx.io_job_nb) { - // Get the oldest job - LuosHAL_SetIrqState(false); - luos_phy_job_t job = phy_ctx.phy_job[--phy_ctx.phy_job_nb]; LuosHAL_SetIrqState(true); + // Get the oldest job + IO_job_t *job = &phy_ctx.io_job[i]; + i++; // If message is timestamped, convert the latency to date - if (Luos_IsMsgTimstamped(job.alloc_msg)) + if (Luos_IsMsgTimstamped(job->alloc_msg)) { - // This conversion also remove the timestamp from the message size. - Timestamp_ConvertToDate(job.alloc_msg, job.timestamp); + Timestamp_ConvertToDate(job->alloc_msg, job->timestamp); } - // Check if this message is a protocol one - if (LuosIO_MsgHandler(job.alloc_msg) == FAILED) + // Network phy first then Luos in the end + for (int y = phy_ctx.phy_nb - 1; y >= 0; y--) { - // If not create luos tasks for all services. - Service_AllocMsg(job.alloc_msg); - // Later this service level dispatch will need to be done in core. - // LuosIO shoudn't care about service level, and should just list the message as a task to do on the Luos side. + // Loop in all phys + if ((job->phy_filter >> y) & 0x01) + { + // Phy[y] is concerned by this message. + // Generate the job and put it in the phy queue + phy_job_t phy_job; + phy_job.msg_pt = job->alloc_msg; + phy_job.size = job->size; + phy_job.ack = ((job->alloc_msg->header.target_mode == NODEIDACK) || (job->alloc_msg->header.target_mode == SERVICEIDACK)); + phy_job.timestamp = Luos_IsMsgTimstamped(job->alloc_msg); + + // Write the job in the phy queue and get back the pointer to it + phy_job_t *job_ptr = Phy_AddJob(&phy_ctx.phy[y], &phy_job); + // Notify this phy that a job is available and give it the concerned job on his queue + phy_ctx.phy[y].phy_cb(&phy_ctx.phy[y], job_ptr); + } } + LuosHAL_SetIrqState(false); + } + phy_ctx.io_job_nb = 0; + LuosHAL_SetIrqState(true); + running = false; +} + +/****************************************************************************** + * @brief Manage a failed trasmit job. + * @param phy_ptr pointer to the phy that failed to send a message. + * @param job pointer to the job that failed. + * @return None + ******************************************************************************/ +_CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) +{ + // A phy failed to send a message, we need to be sure that our node don't try to contact this target again. + LUOS_ASSERT(job->msg_pt->header.target_mode == NODEIDACK || job->msg_pt->header.target_mode == SERVICEIDACK || job->msg_pt->header.target_mode == NODEID || job->msg_pt->header.target_mode == SERVICEID); + // Store the job in the dead service spotted list + phy_ctx.failed_job[phy_ctx.failed_job_nb++] = *job; + + // Remove all job targeting this target on this phy job queue; + for (int i = 0; i < phy_ptr->job_nb; i++) + { + if ((phy_ptr->job[i].msg_pt->header.target == job->msg_pt->header.target) && (phy_ptr->job[i].msg_pt->header.target_mode == job->msg_pt->header.target_mode)) + { + // This job is targeting the dead target, remove it from the queue + phy_ptr->job_nb--; + for (int j = i; j < phy_ptr->job_nb; j++) + { + phy_ptr->job[j] = phy_ptr->job[j + 1]; + } + } + } +} + +/****************************************************************************** + * @brief Manage a failed trasmit job. + * @param None + * @return None + ******************************************************************************/ +static void Phy_ManageFailedJob(void) +{ + // This is allowing to avoid recursive call to this function + static bool managing_failed_job = false; + // Check if we have failed job to manage + if ((phy_ctx.failed_job_nb != 0) && (managing_failed_job == false)) + { + managing_failed_job = true; + // We have failed jobs to manage + for (int i = 0; i < phy_ctx.failed_job_nb; i++) + { + // Create a broadcast message to inform everyone that this target is dead + msg_t dead_msg; + dead_msg.header.cmd = DEADTARGET; + dead_msg.header.target_mode = BROADCAST; + dead_msg.header.target = BROADCAST_VAL; + dead_msg.header.size = sizeof(dead_target_t); + + dead_target_t *dead_target = (dead_target_t *)dead_msg.data; + if (phy_ctx.failed_job[i].msg_pt->header.target_mode == NODEIDACK || phy_ctx.failed_job[i].msg_pt->header.target_mode == NODEID) + { + dead_target->node_id = phy_ctx.failed_job[i].msg_pt->header.target; + dead_target->service_id = 0; + } + else + { + dead_target->node_id = 0; + dead_target->service_id = phy_ctx.failed_job[i].msg_pt->header.target; + } + Luos_SendMsg(0, &dead_msg); + } + phy_ctx.failed_job_nb = 0; + managing_failed_job = false; + } +} + +/****************************************************************************** + * @brief Add a job to the phy queue + * @param phy_ptr Phy to add the job to + * @param phy_job Job to add + * @return None + ******************************************************************************/ +static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) +{ + // Check if the phy queue is full + LUOS_ASSERT((phy_job != NULL) && (phy_ptr != NULL)); + LUOS_ASSERT(phy_ptr->job_nb < MAX_MSG_NB); + // Add the job to the queue + LuosHAL_SetIrqState(false); + phy_ptr->job[phy_ptr->job_nb++] = *phy_job; + LuosHAL_SetIrqState(true); + return &phy_ptr->job[phy_ptr->job_nb - 1]; +} + +/****************************************************************************** + * @brief Get the oldest job from the phy queue + * @param phy_ptr Phy to get the job from + * @return Job pointer + ******************************************************************************/ +_CRITICAL inline phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr) +{ + LUOS_ASSERT(phy_ptr != NULL); + if (phy_ptr->job_nb == 0) + { + return NULL; } - // Localhost message are still stored on the MsgAlloc msg_task buffer, we have to deal with it too. - msg_t *msg; - while (MsgAlloc_PullMsgToInterpret(&msg) == SUCCEED) + return &phy_ptr->job[0]; +} + +/****************************************************************************** + * @brief Get the job id from the job pointer + * @param phy_ptr Phy to get the job id from + * @param job Job pointer + * @return Job id + ******************************************************************************/ +inline int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job) +{ + return (((uintptr_t)job - (uintptr_t)phy_ptr->job) / sizeof(phy_job_t)); +} + +inline int Phy_GetPhyId(luos_phy_t *phy_ptr) +{ + return ((uintptr_t)phy_ptr - (uintptr_t)phy_ctx.phy) / sizeof(luos_phy_t); +} + +/****************************************************************************** + * @brief Remove the oldest job from the phy queue + * @param phy_ptr Phy to remove the job from + * @return None + ******************************************************************************/ +_CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) +{ + LUOS_ASSERT((phy_ptr != NULL) && (job != NULL)); + if (phy_ptr->job_nb == 0) + { + return; + } + // We potentially need to free this message from msg allocator + // Get the Phy index + int phy_index = Phy_GetPhyId(phy_ptr); + MsgAlloc_Free(phy_index, job->data_pt); + + // Remove the job from the queue + uint8_t id = Phy_GetJobId(phy_ptr, job); + for (int i = id; i < phy_ptr->job_nb; i++) + { + phy_ptr->job[i] = phy_ptr->job[i + 1]; + } + phy_ptr->job_nb--; +} + +/****************************************************************************** + * @brief Get the number of job in the phy queue + * @param phy_ptr Phy to get the number of job from + * @return Number of job + ******************************************************************************/ +_CRITICAL inline uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr) +{ + return phy_ptr->job_nb; +} + +/****************************************************************************** + * @brief define is there is something waiting to be sent or not + * @return Succeed if nothing is waiting to be sent + ******************************************************************************/ +error_return_t Phy_TxAllComplete(void) +{ + // We don't check the first phy because it is Luos + for (int i = 1; i < phy_ctx.phy_nb; i++) { - // Check if this message is a protocol one - if (LuosIO_MsgHandler(msg) == FAILED) + if (Phy_GetJobNbr(&phy_ctx.phy[i]) != 0) { - // If not create luos tasks for all services. - Service_AllocMsg(msg); + return FAILED; } } + return SUCCEED; } diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index be2b20449..937bf9496 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -44,89 +44,49 @@ #include #include -#include #include "msg_alloc.h" #include "luos_hal.h" #include "luos_utils.h" -#include "node.h" -#include "filter.h" -#include "struct_luos.h" /******************************************************************************* * Definitions ******************************************************************************/ - -/****************************************************************************** - * @struct luos_task_t - * @brief Message allocator loger structure. - * - * This structure is used to link services and messages into the allocator. - * - ******************************************************************************/ typedef struct { - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - service_t *service_pt; /*!< Pointer to the concerned service. */ -} luos_task_t; + uint8_t *data; // Pointer to the first byte of the message. + uint8_t phy_filter; // Physical filter of the message. +} alloc_slot_t; -typedef struct -{ - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - service_t *service_pt; /*!< Pointer to the transmitting service. */ -} tx_task_t; /******************************************************************************* * Variables ******************************************************************************/ -memory_stats_t *mem_stat = NULL; -volatile bool reset_needed = false; +memory_stats_t *mem_stat = NULL; // msg buffering volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; /*!< Memory space used to save and alloc messages. */ volatile uint8_t *data_ptr; /*!< Pointer to the next data able to be written into msgbuffer. */ -volatile msg_t *oldest_msg = NULL; /*!< The oldest message among all the stacks. */ -volatile msg_t *used_msg = NULL; /*!< Message curently used by luos loop. */ - -// msg interpretation task stack -volatile msg_t *msg_tasks[MAX_MSG_NB]; /*!< ready message table. */ -volatile uint16_t msg_tasks_stack_id; /*!< Next writen msg_tasks id. */ - -// Luos task stack -volatile luos_task_t luos_tasks[MAX_MSG_NB]; /*!< Message allocation table. */ -volatile uint16_t luos_tasks_stack_id; /*!< Next writen luos_tasks id. */ - -// Tx task stack -volatile tx_task_t tx_tasks[MAX_MSG_NB]; /*!< Message to transmit allocation table. */ -volatile uint16_t tx_tasks_stack_id; /*!< Next writen tx_tasks id. */ +alloc_slot_t alloc_slots[MAX_MSG_NB]; /*!< Slots used to save the index of the first byte of a message. */ +volatile uint16_t alloc_slot_index; /*!< Index of the next slot able to be written. */ /******************************************************************************* * Functions ******************************************************************************/ -// msg buffering -_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpace(void *to); +// Pack allocated messages +static inline void MsgAlloc_SlotPack(void); -// Allocator task stack -_CRITICAL static inline error_return_t MsgAlloc_ClearMsgSpace(void *from, void *to); +// msg buffering +_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(void *to); // Allocator task stack TX check space static inline error_return_t MsgAlloc_CheckMsgSpace(void *from, void *to); -// msg interpretation task stack -_CRITICAL static inline void MsgAlloc_ClearMsgTask(void); - -// Luos task stack -_CRITICAL static inline void MsgAlloc_ClearLuosTask(uint16_t luos_task_id); - // Available buffer space evaluation static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void); -// Check if this message is the oldest -_CRITICAL static inline void MsgAlloc_OldestMsgCandidate(msg_t *oldest_stack_msg_pt); - -// Find the oldest message curretly stored -_CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void); +// Find get the oldest message +_CRITICAL static inline uint8_t *MsgAlloc_GetOldestMsg(void); /******************************************************************************* * Functions --> generic @@ -140,53 +100,75 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void); void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** - msg_tasks_stack_id = 0; - memset((void *)msg_tasks, 0, sizeof(msg_tasks)); - luos_tasks_stack_id = 0; - memset((void *)luos_tasks, 0, sizeof(luos_tasks)); - tx_tasks_stack_id = 0; - memset((void *)tx_tasks, 0, sizeof(tx_tasks)); LuosHAL_SetIrqState(false); - data_ptr = (uint8_t *)&msg_buffer[0]; - used_msg = NULL; - oldest_msg = (msg_t *)INT_MAX; + data_ptr = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 0; + memset((void *)alloc_slots, 0, sizeof(alloc_slots)); LuosHAL_SetIrqState(true); if (memory_stats != NULL) { mem_stat = memory_stats; } - Filter_IdInit(); // Mask filter for service ID - // Reset have been made - reset_needed = false; } + /****************************************************************************** * @brief execute some things out of IRQ * @param None * @return None ******************************************************************************/ -void MsgAlloc_loop(void) +void MsgAlloc_Loop(void) { - // Compute memory stats for msg task memory usage - uint8_t stat = 0; - // Compute memory stats for rx msg task memory usage - stat = (uint8_t)(((uintptr_t)msg_tasks_stack_id * 100) / (MAX_MSG_NB)); - if (stat > mem_stat->rx_msg_stack_ratio) - { - mem_stat->rx_msg_stack_ratio = stat; - } - // Compute memory stats for tx msg task memory usage - stat = (uint8_t)(((uintptr_t)tx_tasks_stack_id * 100) / (MAX_MSG_NB)); - if (stat > mem_stat->tx_msg_stack_ratio) - { - mem_stat->tx_msg_stack_ratio = stat; - } + // Pack the list of allocated messages + MsgAlloc_SlotPack(); // Compute buffer occupation rate - stat = (uint8_t)(((MSG_BUFFER_SIZE - MsgAlloc_BufferAvailableSpaceComputation()) * 100) / (MSG_BUFFER_SIZE)); + uint8_t stat = 0; + stat = (uint8_t)(((MSG_BUFFER_SIZE - MsgAlloc_BufferAvailableSpaceComputation()) * 100) / (MSG_BUFFER_SIZE)); if (stat > mem_stat->buffer_occupation_ratio) { mem_stat->buffer_occupation_ratio = stat; } } + +/****************************************************************************** + * @brief re-organize the list of allocated messages + * @param None + * @return None + ******************************************************************************/ +static inline void MsgAlloc_SlotPack(void) +{ + LUOS_ASSERT(alloc_slot_index <= MAX_MSG_NB); + // Pack the list of allocated messages + uint16_t i = 0; + uint16_t decay = 0; + LuosHAL_SetIrqState(false); + for (i = 0; i < alloc_slot_index; i++) + { + if (alloc_slots[i].data == 0) + { + decay++; + } + else + { + if (decay == 0) + { + continue; + } + if (i < MAX_MSG_NB) + { + alloc_slots[i - decay] = alloc_slots[i]; + alloc_slots[i].data = 0; + } + else + { + + alloc_slots[i - decay].data = 0; + } + } + } + alloc_slot_index -= decay; + LuosHAL_SetIrqState(true); +} + /****************************************************************************** * @brief compute remaing space on msg_buffer. * @param None @@ -195,9 +177,11 @@ void MsgAlloc_loop(void) static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) { uint32_t stack_free_space = 0; + LUOS_ASSERT(((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)data_ptr < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); LuosHAL_SetIrqState(false); - if ((uintptr_t)oldest_msg != INT_MAX) + uint8_t *oldest_msg = MsgAlloc_GetOldestMsg(); + if (oldest_msg != NULL) { LUOS_ASSERT(((uintptr_t)oldest_msg >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); // There is some tasks @@ -211,7 +195,7 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // | | // |<-----Free space---->| // | | - // data_ptr oldest_task + // data_ptr oldest_msg // stack_free_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; LuosHAL_SetIrqState(true); @@ -228,7 +212,7 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // <-Free space->| |<-Free space-> // | | // | | - // oldest_task data_ptr + // oldest_msg data_ptr // stack_free_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); LuosHAL_SetIrqState(true); @@ -236,84 +220,37 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) } else { - // There is no task yet just compute the actual reception + // There is nothing allocated stack_free_space = MSG_BUFFER_SIZE; LuosHAL_SetIrqState(true); } return stack_free_space; } + /****************************************************************************** - * @brief save the given msg as oldest if it is - * @param oldest_stack_msg_pt : the oldest message of a stack + * @brief update the new oldest message if we need to + * @param removed_msg : the freshly oldest removed message of the stack * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline void MsgAlloc_OldestMsgCandidate(msg_t *oldest_stack_msg_pt) +_CRITICAL static inline uint8_t *MsgAlloc_GetOldestMsg(void) { - if ((uintptr_t)oldest_stack_msg_pt > 0) + LUOS_ASSERT(alloc_slot_index <= MAX_MSG_NB); + // Get the oldest message + if (alloc_slot_index == 0) { - LUOS_ASSERT(((uintptr_t)oldest_stack_msg_pt >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_stack_msg_pt < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); - // recompute oldest_stack_msg_pt into delta byte from current message - uint32_t stack_delta_space; - if ((uintptr_t)oldest_stack_msg_pt > (uintptr_t)data_ptr) - { - // The oldest task is between `data_ptr` and the end of the buffer - LuosHAL_SetIrqState(false); - stack_delta_space = (uintptr_t)oldest_stack_msg_pt - (uintptr_t)data_ptr; - LuosHAL_SetIrqState(true); - } - else - { - // The oldest task is between the begin of the buffer and `data_ptr` - // we have to decay it to be able to define delta - LuosHAL_SetIrqState(false); - stack_delta_space = ((uintptr_t)oldest_stack_msg_pt - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); - LuosHAL_SetIrqState(true); - } - // recompute oldest_msg into delta byte from current message - uintptr_t oldest_msg_delta_space; - if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) - { - // The oldest msg is between `data_ptr` and the end of the buffer - LuosHAL_SetIrqState(false); - oldest_msg_delta_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; - LuosHAL_SetIrqState(true); - } - else - { - // The oldest msg is between the begin of the buffer and `data_ptr` - // we have to decay it to be able to define delta - LuosHAL_SetIrqState(false); - oldest_msg_delta_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); - LuosHAL_SetIrqState(true); - } - // Compare deltas - if (stack_delta_space < oldest_msg_delta_space) + // There is no message allocated + return NULL; + } + for (int i = 0; i < alloc_slot_index; i++) + { + if (alloc_slots[i].data != NULL) { - // This one is the new oldest message - oldest_msg = oldest_stack_msg_pt; + return alloc_slots[i].data; } } -} -/****************************************************************************** - * @brief update the new oldest message if we need to - * @param removed_msg : the freshly oldest removed message of the stack - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void) -{ - // Reinit the value - oldest_msg = (msg_t *)INT_MAX; - MSGALLOC_MUTEX_LOCK - // start parsing tasks to find the oldest message - // check it on msg_tasks - MsgAlloc_OldestMsgCandidate((msg_t *)msg_tasks[0]); - // check it on luos_tasks - MsgAlloc_OldestMsgCandidate(luos_tasks[0].msg_pt); - // check it on tx_tasks - MsgAlloc_OldestMsgCandidate((msg_t *)tx_tasks[0].data_pt); - MSGALLOC_MUTEX_UNLOCK + // There is no message allocated + return NULL; } /******************************************************************************* @@ -327,8 +264,9 @@ _CRITICAL static inline void MsgAlloc_FindNewOldestMsg(void) * @return error_return_t * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpace(void *to) +_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(void *to) { + LUOS_ASSERT((uintptr_t)to >= (uintptr_t)&msg_buffer[0]); if ((uintptr_t)to > ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - 1])) { // We reach msg_buffer end. @@ -348,19 +286,27 @@ _CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpace(void *to) /****************************************************************************** * @brief Allocate a new message * @param uint16_t data_size - * @return None + * @param phy_target_t phy_filter + * @return uint8_t * : pointer to the allocated message * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size) +_CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) { + LUOS_ASSERT((data_size > 0) + && (phy_filter != 0) + && (data_size <= MSG_BUFFER_SIZE)); uint8_t *returned_ptr; // Check data ptr alignement if ((uintptr_t)data_ptr % 2 == 1) { data_ptr++; + if (data_ptr == &msg_buffer[MSG_BUFFER_SIZE]) + { + data_ptr = &msg_buffer[0]; + } } // Check if we have space for the message - if (MsgAlloc_DoWeHaveSpace((void *)(data_ptr + data_size)) == FAILED) + if (MsgAlloc_DoWeHaveSpaceUntilBufferEnd((void *)(data_ptr + data_size)) == FAILED) { // // We don't have the space to store the message : @@ -378,6 +324,13 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size) // data_ptr data_end // + // Check if we dont jump any messages + if (MsgAlloc_CheckMsgSpace((void *)data_ptr, (void *)&msg_buffer[MSG_BUFFER_SIZE - 1]) != SUCCEED) + { + // We don't have the space to store the message, return NULL to indicate that there is no more space + return NULL; + } + // We don't have the space to store the message, move data_ptr to the beginning of the buffer returned_ptr = (uint8_t *)&msg_buffer[0]; } @@ -385,145 +338,73 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size) { returned_ptr = (uint8_t *)data_ptr; } - // Check if we have space for the message, assert if we don't + // Check if we have space for the message if (MsgAlloc_CheckMsgSpace((void *)returned_ptr, (void *)((uintptr_t)returned_ptr + data_size)) != SUCCEED) { // We don't have the space to store the message, return NULL to indicate that there is no more space return NULL; } - // We consider this space as occupied, move data to the next available space + // We consider this space as occupied, save its reference into the alloc_slots + alloc_slots[alloc_slot_index].data = returned_ptr; + alloc_slots[alloc_slot_index].phy_filter = phy_filter; + alloc_slot_index++; + // Move data to the next available space data_ptr = (uint8_t *)((uintptr_t)returned_ptr + data_size); return returned_ptr; } + /****************************************************************************** - * @brief No message in buffer receive since initialization - * @param None - * @return msg_t* sucess or fail if good init - ******************************************************************************/ -error_return_t MsgAlloc_IsEmpty(void) -{ - if (data_ptr == &msg_buffer[0]) - { - return SUCCEED; - } - else - { - return FAILED; - } -} -/****************************************************************************** - * @brief Reset msg_alloc tx_tasks to avoid sending messages - * @param None + * @brief Free a message + * @param uint8_t phy_id : id of the phy that free the message + * @param uint8_t *data : pointer to the message to free * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL void MsgAlloc_Reset(void) +_CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) { - // We will need to reset - - MSGALLOC_MUTEX_LOCK - reset_needed = true; - tx_tasks_stack_id = 0; - memset((void *)tx_tasks, 0, sizeof(tx_tasks)); - MSGALLOC_MUTEX_UNLOCK -} -/****************************************************************************** - * @brief Check if we need to reset Msg alloc - * @param None - * @return SUCCEED or FAILED if msg alloc is reset or not - ******************************************************************************/ -error_return_t MsgAlloc_IsReseted(void) -{ - // Check if we need to reset everything due to detection reset - if (reset_needed) + LUOS_ASSERT(data != NULL); + // Find the slot where the data is stored + for (int i = 0; i < alloc_slot_index; i++) { - if (Node_Get()->node_id != 0) + if (alloc_slots[i].data == data) { - Node_Get()->node_id = 0; - // We need to reset MsgAlloc - MsgAlloc_Init(NULL); + // This is the one we are looking for + // Remove the phy_id from the phy_filter + // Assert if this phy have already been freed + LUOS_ASSERT(alloc_slots[i].phy_filter & (0x01 << phy_id)); + alloc_slots[i].phy_filter &= ~(0x01 << phy_id); + // Check if the phy_filter is empty + if (alloc_slots[i].phy_filter == 0) + { + // This message is not used anymore, free it + alloc_slots[i].data = NULL; + } + return; } - reset_needed = false; - return SUCCEED; } - return FAILED; + // If you pass here, the message have been freed already. + // You probably are in detection and the reset detection reseted the allocator before this free. } -/******************************************************************************* - * Functions --> Allocator task stack - ******************************************************************************/ - /****************************************************************************** - * @brief prepare a buffer space to be usable by cleaning remaining messages and prepare pointers - * @param from : start of the memory space to clean - * @param to : start of the memory space to clean - * @return error_return_t - * _CRITICAL function call in IRQ + * @brief No message in buffer receive since initialization + * @param None + * @return msg_t* sucess or fail if good init ******************************************************************************/ -_CRITICAL static inline error_return_t MsgAlloc_ClearMsgSpace(void *from, void *to) +error_return_t MsgAlloc_IsEmpty(void) { - //******** Check if there is sufficient space on the buffer ********** - if (MsgAlloc_DoWeHaveSpace(to) == FAILED) - { - // We reach msg_buffer end return an error - return FAILED; - } - //******** Prepare a memory space to be writable ********** - - // check if there is a msg traitement pending - if (((uintptr_t)used_msg >= (uintptr_t)from) && ((uintptr_t)used_msg <= (uintptr_t)to)) + LUOS_ASSERT(alloc_slot_index <= MSG_BUFFER_SIZE); + if (alloc_slot_index == 0) { - used_msg = NULL; - // This message is in the space we want to use, clear the task - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->buffer_occupation_ratio = 100; - } + return SUCCEED; } - // check if there is a msg in the space we need - // Start by checking if the oldest message is out of scope - if (((uintptr_t)oldest_msg >= (uintptr_t)from) && ((uintptr_t)oldest_msg <= (uintptr_t)to)) + else { - // We have to drop some messages for sure - mem_stat->buffer_occupation_ratio = 100; - while (((uintptr_t)luos_tasks[0].msg_pt >= (uintptr_t)from) && ((uintptr_t)luos_tasks[0].msg_pt <= (uintptr_t)to) && (luos_tasks_stack_id > 0)) - { - // This message is in the space we want to use, clear all the Luos task - MsgAlloc_ClearLuosTask(0); - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->buffer_occupation_ratio = 100; - } - } - // check if there is no msg between from and to on msg_tasks - while (((uintptr_t)msg_tasks[0] >= (uintptr_t)from) && ((uintptr_t)msg_tasks[0] <= (uintptr_t)to) && (msg_tasks_stack_id > 0)) - { - // This message is in the space we want to use, clear all the message task - MsgAlloc_ClearMsgTask(); - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->buffer_occupation_ratio = 100; - } - } - // check if there is no msg between from and to on tx_tasks - while (((uintptr_t)tx_tasks[0].data_pt >= (uintptr_t)from) && ((uintptr_t)tx_tasks[0].data_pt <= (uintptr_t)to) && (tx_tasks_stack_id > 0)) - { - // This message is in the space we want to use, clear all the Tx task - MsgAlloc_PullMsgFromTxTask(); - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->buffer_occupation_ratio = 100; - } - } + return FAILED; } - // if we go here there is no reason to continue because newest messages can't overlap the memory zone. - return SUCCEED; } + /****************************************************************************** * @brief Check if there is space in buffer * @param from : start of the memory space to check @@ -532,8 +413,13 @@ _CRITICAL static inline error_return_t MsgAlloc_ClearMsgSpace(void *from, void * ******************************************************************************/ static inline error_return_t MsgAlloc_CheckMsgSpace(void *from, void *to) { - if ((((uintptr_t)used_msg >= (uintptr_t)from) && ((uintptr_t)used_msg <= (uintptr_t)to)) - || (((uintptr_t)oldest_msg >= (uintptr_t)from) && ((uintptr_t)oldest_msg <= (uintptr_t)to))) + LUOS_ASSERT(((uintptr_t)from < (uintptr_t)to) + && ((uintptr_t)from >= (uintptr_t)&msg_buffer[0]) + && ((uintptr_t)from < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]) + && ((uintptr_t)to >= (uintptr_t)&msg_buffer[0]) + && ((uintptr_t)to < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); + uint8_t *oldest_msg = MsgAlloc_GetOldestMsg(); + if ((((uintptr_t)oldest_msg >= (uintptr_t)from) && ((uintptr_t)oldest_msg <= (uintptr_t)to))) { // FAILED CASES : // @@ -544,821 +430,8 @@ static inline error_return_t MsgAlloc_CheckMsgSpace(void *from, void *to) // | | | // from | to // | - // "used_msg" - // or "oldest_msg" - // - return FAILED; - } - return SUCCEED; -} -/******************************************************************************* - * Functions --> msg interpretation task stack - ******************************************************************************/ - -/****************************************************************************** - * @brief Clear a slot. This action is due to an error - * @param None - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline void MsgAlloc_ClearMsgTask(void) -{ - LUOS_ASSERT((msg_tasks_stack_id <= MAX_MSG_NB) && (msg_tasks_stack_id > 0)); - - // - // msg_tasks init state msg_tasks ending state - // +---------+ +---------+ - // | MSG_1 | | MSG_2 | - // +---------+ +---------+ - // | MSG_2 | | MSG_3 | - // +---------+ +---------+ - // | etc... | | etc... |<--msg_tasks_stack_id - // +---------+ +---------+ - // | Last |<--msg_tasks_stack_id | 0 | <--- Last message is cleared - // +---------+ +---------+ - // | etc... | | etc... | - // +---------+ +---------+ - // - MSGALLOC_MUTEX_LOCK - for (uint16_t rm = 0; rm < msg_tasks_stack_id; rm++) - { - LuosHAL_SetIrqState(true); - LuosHAL_SetIrqState(false); - LUOS_ASSERT((msg_tasks[rm] != 0)); - msg_tasks[rm] = msg_tasks[rm + 1]; - } - - msg_tasks_stack_id--; - msg_tasks[msg_tasks_stack_id] = 0; - - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - MsgAlloc_FindNewOldestMsg(); -} -/****************************************************************************** - * @brief Pull a message that is not interpreted by the phy yet - * @param returned_msg : The message pointer. - * @return error_return_t - ******************************************************************************/ -error_return_t MsgAlloc_PullMsgToInterpret(msg_t **returned_msg) -{ - if (msg_tasks_stack_id > 0) - { - // Case SUCCEED + // "oldest_msg" // - // msg_tasks init state msg_tasks ending state - // +---------+ +---------+ - // | MSG_1 | | MSG_2 |<--"returned_msg" points to 1st message of msg_tasks - // |---------| |---------| - // | MSG_2 | | MSG_3 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------|<--msg_tasks_stack_id - // | LAST | | 0 | - // +---------+<--msg_tasks_stack_id +---------+ - // - *returned_msg = (msg_t *)msg_tasks[0]; - LUOS_ASSERT(((uintptr_t)*returned_msg >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)*returned_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); - MsgAlloc_ClearMsgTask(); - return SUCCEED; - } - // At this point we don't find any message for this service - return FAILED; -} - -/******************************************************************************* - * Functions --> Luos task stack - ******************************************************************************/ - -/****************************************************************************** - * @brief Notify the end of the usage of the message. - * @param returned_msg : The message pointer. - * @return None - ******************************************************************************/ -void MsgAlloc_UsedMsgEnd(void) -{ - used_msg = NULL; -} -/****************************************************************************** - * @brief Clear a slot. This action is due to an error - * @param None - * @return None - ******************************************************************************/ -_CRITICAL static inline void MsgAlloc_ClearLuosTask(uint16_t luos_task_id) -{ - LUOS_ASSERT((luos_task_id < luos_tasks_stack_id) && (luos_tasks_stack_id <= MAX_MSG_NB)); - // - // Start to clear from "luos_task_id" - // - // Luos_tasks init state Luos_tasks ending state - // +---------+ +---------+ - // | MSG_1 | | MSG_1 | - // +---------+ +---------+ - // | MSG_2 | | MSG_2 | - // +---------+ +---------+ - // | etc... | | etc... | - // +---------+ +---------+ - // | Msg X |<--luos_task_id | 0 |<--luos_tasks_stack_id - // +---------+ +---------+ - // | etc... | | 0 | - // |---------| |---------| - // | LAST | | 0 | - // +---------+ +---------+ - // | 0 |<--luos_tasks_stack_id | 0 | - // +---------+ |---------| - // - MSGALLOC_MUTEX_LOCK - for (uint16_t rm = luos_task_id; rm < luos_tasks_stack_id; rm++) - { - LuosHAL_SetIrqState(false); - luos_tasks[rm] = luos_tasks[rm + 1]; - LuosHAL_SetIrqState(true); - } - LuosHAL_SetIrqState(false); - if (luos_tasks_stack_id != 0) - { - luos_tasks_stack_id--; - luos_tasks[luos_tasks_stack_id].msg_pt = 0; - luos_tasks[luos_tasks_stack_id].service_pt = 0; - } - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - MsgAlloc_FindNewOldestMsg(); -} -/****************************************************************************** - * @brief Alloc luos task - * @param service_concerned_by_current_msg concerned services - * @param service_concerned_by_current_msg concerned msg - * @return None - ******************************************************************************/ -void MsgAlloc_LuosTaskAlloc(service_t *service_concerned_by_current_msg, msg_t *concerned_msg) -{ - // Find a free slot - if (luos_tasks_stack_id == MAX_MSG_NB) - { - // There is no more space on the luos_tasks, remove the oldest msg. - MsgAlloc_ClearLuosTask(0); - if (mem_stat->msg_drop_number < 0xFF) - { - mem_stat->msg_drop_number++; - mem_stat->engine_msg_stack_ratio = 100; - } - } - // Fill the informations of the message in this slot - MSGALLOC_MUTEX_LOCK - LuosHAL_SetIrqState(false); - LUOS_ASSERT(luos_tasks_stack_id < MAX_MSG_NB); - luos_tasks[luos_tasks_stack_id].msg_pt = concerned_msg; - luos_tasks[luos_tasks_stack_id].service_pt = service_concerned_by_current_msg; - if (luos_tasks_stack_id == 0) - { - // This is the first message in the stack, so it could be the oldest one. - MsgAlloc_OldestMsgCandidate(luos_tasks[0].msg_pt); - } - luos_tasks_stack_id++; - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - // Luos task memory usage - uint8_t stat = (uint8_t)(((uintptr_t)luos_tasks_stack_id * 100) / (MAX_MSG_NB)); - if (stat > mem_stat->engine_msg_stack_ratio) - { - mem_stat->engine_msg_stack_ratio = stat; - } -} - -/******************************************************************************* - * Functions --> Luos tasks find and consume - ******************************************************************************/ - -/****************************************************************************** - * @brief Pull a message allocated to a specific service - * @param target_service : The service concerned by this message - * @param returned_msg : The message pointer. - * @return error_return_t - ******************************************************************************/ -error_return_t MsgAlloc_PullMsg(service_t *target_service, msg_t **returned_msg) -{ - // - // Pull a message from a specific service - // - // For example, there are 4 messages in buffer and required service is in task 3 : - // luos_tasks_stack_id = 3 : function will search in messages 1, 2 & 3 - // - // - // msg_buffer msg_buffer after pull - // +------------------------+ +------------------------+ - // |------------------------| |------------------------| - // +--^---^---^---^---------+ +--^---^---^---^---------+ - // | | | | | | | | - // Msg: 1 2 3 4 1 2 | 4 - // used_msg - // returned_msg - // - // - // luos_tasks luos_tasks - // +---------+ +---------+ - // | MSG_1 |\ | MSG_1 | - // |---------| | |---------| - // | MSG_2 | | | MSG_2 | - // |---------| | |---------| - // | MSG_3 | | | MSG_4 |<-- third message pulled is cleared - // |---------| | |---------| - // | MSG_4 | |<--luos_tasks_stack_id | 0 | - // |---------| / |---------| - // | 0 | | 0 | - // |---------| |---------| - // | etc... | | etc... | - // +---------+ +---------+ - // - // find the oldest message allocated to this service - for (uint16_t i = 0; i < luos_tasks_stack_id; i++) - { - if (luos_tasks[i].service_pt == target_service) - { - *returned_msg = luos_tasks[i].msg_pt; - // Clear the slot by sliding others to the left on it - used_msg = *returned_msg; - MsgAlloc_ClearLuosTask(i); - return SUCCEED; - } - } - // At this point we don't find any message for this service - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - return FAILED; -} -/****************************************************************************** - * @brief Pull a message allocated to a specific luos task - * @param luos_task_id : Id of the allocator luos task - * @param returned_msg : The message pointer. - * @return error_return_t - ******************************************************************************/ -error_return_t MsgAlloc_PullMsgFromLuosTask(uint16_t luos_task_id, msg_t **returned_msg) -{ - // - // msg_buffer example : msg_buffer after pulling message D2 - // +------------------------+ +------------------------+ - // |------------------------| |------------------------| - // +--^-------^-------^-----+ +--^-------^-------^-----+ - // | | | | | | - // Msg: 1 2 ... LAST 1 2 ... LAST - // used_msg - // returned_msg - // - // luos_tasks luos_tasks - // +---------+ +---------+ - // | MSG_1 | | MSG_1 | - // |---------| |---------| - // | MSG_2 | | MSG_3 | - // |---------| |---------| - // | MSG_3 | | MSG_4 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------| - // | LAST | | 0 | - // +---------+ +---------+ - // - // find the oldest message allocated to this service - if (luos_task_id < luos_tasks_stack_id) - { - used_msg = luos_tasks[luos_task_id].msg_pt; - *returned_msg = (msg_t *)used_msg; - // Clear the slot by sliding others to the left on it - MsgAlloc_ClearLuosTask(luos_task_id); - return SUCCEED; - } - // At this point we don't find any message for this service - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - return FAILED; -} -/****************************************************************************** - * @brief get back the service who received the oldest message - * @param allocated_service : Return the service concerned by the oldest message - * @param luos_task_id : Id of the allocator slot - * @return error_return_t : Fail is there is no more message available. - ******************************************************************************/ -error_return_t MsgAlloc_LookAtLuosTask(uint16_t luos_task_id, service_t **allocated_service) -{ - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<-- if searching this ID : fills service pointer associated to D 2 Luos Task - // |---------| - // | MSG_3 |<--luos_tasks_stack_id - // |---------| - // | 0 | - // |---------| - // | etc... | - // |---------| - // | 0 | - // +---------+ - // - MSGALLOC_MUTEX_LOCK - if (luos_task_id < luos_tasks_stack_id) - { - *allocated_service = luos_tasks[luos_task_id].service_pt; - MSGALLOC_MUTEX_UNLOCK - return SUCCEED; - } - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - MSGALLOC_MUTEX_UNLOCK - return FAILED; -} -/****************************************************************************** - * @brief get back a specific slot message command - * @param luos_task_id : Id of the allocator slot - * @param cmd : The pointer filled with the cmd value. - * @return error_return_t : Fail is there is no more message available. - ******************************************************************************/ -error_return_t MsgAlloc_GetLuosTaskCmd(uint16_t luos_task_id, uint8_t *cmd) -{ - // - // luos_tasks - // +---------+ - // | MSG_1 || - // |---------|<--luos_tasks_stack_id : fills CMD header pointer - // | MSG_2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - MSGALLOC_MUTEX_LOCK - if (luos_task_id < luos_tasks_stack_id) - { - *cmd = luos_tasks[luos_task_id].msg_pt->header.cmd; - MSGALLOC_MUTEX_UNLOCK - return SUCCEED; - } - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - MSGALLOC_MUTEX_UNLOCK - return FAILED; -} -/****************************************************************************** - * @brief get back a specific slot message command - * @param luos_task_id : Id of the allocator slot - * @param cmd : The pointer filled with the cmd value. - * @return error_return_t : Fail is there is no more message available. - ******************************************************************************/ -error_return_t MsgAlloc_GetLuosTaskSourceId(uint16_t luos_task_id, uint16_t *source_id) -{ - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------|<--luos_tasks_stack_id : fills SOURCE header pointer - // | MSG_2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - MSGALLOC_MUTEX_LOCK - if (luos_task_id < luos_tasks_stack_id) - { - *source_id = luos_tasks[luos_task_id].msg_pt->header.source; - MSGALLOC_MUTEX_UNLOCK - return SUCCEED; - } - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - MSGALLOC_MUTEX_UNLOCK - return FAILED; -} -/****************************************************************************** - * @brief get back a specific slot message command - * @param luos_task_id : Id of the allocator slot - * @param size : The pointer filled with the size value. - * @return error_return_t : Fail is there is no more message available. - ******************************************************************************/ -error_return_t MsgAlloc_GetLuosTaskSize(uint16_t luos_task_id, uint16_t *size) -{ - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------|<--luos_tasks_stack_id : fills SIZE header pointer - // | MSG_2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - MSGALLOC_MUTEX_LOCK - if (luos_task_id < luos_tasks_stack_id) - { - *size = luos_tasks[luos_task_id].msg_pt->header.size; - MSGALLOC_MUTEX_UNLOCK - return SUCCEED; - } - // - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------| - // | MSG_2 |<--luos_tasks_stack_id - // |---------| - // | MSG_3 |\_ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | _| - // +---------+/ - // - MSGALLOC_MUTEX_UNLOCK - return FAILED; -} -/****************************************************************************** - * @brief return the number of allocated messages - * @param None - * @return the number of messages - ******************************************************************************/ -uint16_t MsgAlloc_LuosTasksNbr(void) -{ - return (uint16_t)luos_tasks_stack_id; -} -/****************************************************************************** - * @brief Clear a specific message in Luos Tasks - * @param None - * @return the number of messages - ******************************************************************************/ -void MsgAlloc_ClearMsgFromLuosTasks(msg_t *msg) -{ - // - // Example with message to clean = MSG_2 - // - // msg_buffer - // +-------------------------------------------------------------+ - // |--| 1 | 2 |----| 3 |------------ | X |--------| - // +--^-----^--------^------------------------^------------------+ - // | | | | - // | | | | - // | | | | - // | | | Luos_tasks init state | Luos_tasks ending state - // | | | +---------+ | +---------+ - // +-----|--------|-->| MSG_1 | | | MSG_1 | - // | | |---------| | |---------| - // +--------|-->| MSG_2 | | | MSG_3 | - // | |---------| | |---------| - // +-->| MSG_3 | | | etc... | - // |---------| | |---------| - // | etc... | | | Last | - // |---------| | |---------| - // | Last |<---------+ | 0 | - // +---------+ +---------+ - // - uint16_t id = 0; - while (id < luos_tasks_stack_id) - { - if (luos_tasks[id].msg_pt == msg) - { - MsgAlloc_ClearLuosTask(id); - } - else - { - id++; - } - } - // If message to clean is not in Luos_tasks : nothing is done - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +----------^^................^---------------^----------------+ - // || | | - // || Luos_tasks | msg to clean - // || +---------+ | - // +|->| MSG_1 | | - // | |---------| | - // +->| MSG_2 | | - // |---------| | - // | etc... | | - // |---------| | - // | Last |<--+ - // +---------+ - // -} -/******************************************************************************* - * Functions --> Tx tasks create, get and consume - ******************************************************************************/ - -/****************************************************************************** - * @brief copy a message to transmit into msg_buffer and create a Tx task - * @param data to transmit - * @param size of the data to transmit - * @return None - ******************************************************************************/ -error_return_t MsgAlloc_SetTxTask(service_t *service_pt, uint8_t *data, uint16_t crc, uint16_t size, luos_localhost_t localhost, uint8_t ack) -{ - LUOS_ASSERT((tx_tasks_stack_id >= 0) && (tx_tasks_stack_id < MAX_MSG_NB) && ((uintptr_t)data > 0)); - void *tx_msg = 0; - - // Then compute if we have space into the TX_message buffer stack - if (tx_tasks_stack_id >= MAX_MSG_NB - 1) - { - return FAILED; - } - MSGALLOC_MUTEX_LOCK - - LuosHAL_SetIrqState(false); - // Alloc the space for the message - tx_msg = (void *)MsgAlloc_Alloc(size); - if (tx_msg == NULL) - { - MSGALLOC_MUTEX_UNLOCK - return FAILED; - } - LuosHAL_SetIrqState(true); - - // Copy the tx msg into the buffer - memcpy((void *)tx_msg, (void *)data, size); - -#ifndef VERBOSE_LOCALHOST - if (localhost != LOCALHOST) - { -#endif - // if VERBOSE_LOCALHOST is defined : Create a tx task to transmit on network for all localhost mode (including LOCALHOST) - // if VERBOSE_LOCALHOST is NOT defined : create a tx task to transmit on network, except for LOCALHOST - // - // Now we are ready to transmit, we can create the tx task - LuosHAL_SetIrqState(false); - tx_tasks[tx_tasks_stack_id].size = size; - tx_tasks[tx_tasks_stack_id].data_pt = (uint8_t *)tx_msg; - tx_tasks[tx_tasks_stack_id].service_pt = service_pt; - tx_tasks_stack_id++; - LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); - LuosHAL_SetIrqState(true); - // Check if last tx task is the oldest msg of the buffer - if (tx_tasks_stack_id == 0) - { - MsgAlloc_OldestMsgCandidate((msg_t *)tx_tasks[0].data_pt); - } -#ifndef VERBOSE_LOCALHOST - } -#endif - - // Write the CRC and the ACK if needed - if (ack != 0) - { - // Write the CRC and Ack - ((char *)tx_msg)[size - 3] = (uint8_t)(crc); - ((char *)tx_msg)[size - 2] = (uint8_t)(crc >> 8); - ((char *)tx_msg)[size - 1] = ack; - } - else - { - // Write the CRC only - ((char *)tx_msg)[size - 2] = (uint8_t)(crc); - ((char *)tx_msg)[size - 1] = (uint8_t)(crc >> 8); - } - MSGALLOC_MUTEX_UNLOCK - - // manage localhost (exclude EXTERNALHOST) - if (localhost != EXTERNALHOST) - { - // This is a localhost (LOCALHOST or MULTIHOST) message copy it as a message task - LUOS_ASSERT(!(msg_tasks_stack_id > 0) || (((uintptr_t)msg_tasks[0] >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)msg_tasks[0] < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]))); - MSGALLOC_MUTEX_LOCK - LuosHAL_SetIrqState(false); - LUOS_ASSERT(msg_tasks[msg_tasks_stack_id] == 0); - msg_tasks[msg_tasks_stack_id] = tx_msg; - LUOS_ASSERT((msg_tasks[msg_tasks_stack_id] != 0)); - msg_tasks_stack_id++; - LuosHAL_SetIrqState(true); - MSGALLOC_MUTEX_UNLOCK - } - MsgAlloc_FindNewOldestMsg(); - return SUCCEED; -} -/****************************************************************************** - * @brief remove a transmit message task - * @param None - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL void MsgAlloc_PullMsgFromTxTask(void) -{ - if (tx_tasks_stack_id != 0) - { - LUOS_ASSERT((tx_tasks_stack_id > 0) && (tx_tasks_stack_id <= MAX_MSG_NB)); - // - // - // tx_tasks tx_tasks tx_tasks - // +---------+ +---------+ +---------+<--tx_tasks_stack_id = 0 - // | Tx1 | | Tx2 | | 0 | - // |---------| |---------| |---------| - // | Tx2 | | Tx3 | | 0 | - // |---------| |---------| |---------| - // | Tx3 | | Tx4 | | 0 | - // |---------| |---------| |---------| - // | etc... | | etc... | etc... | etc... | - // |---------| |---------| |---------| - // | etc... | tx_tasks_stack_id-->| etc... | | 0 | - // |---------| |---------| |---------| - // tx_tasks_stack_id-->| LAST | | 0 | | 0 | - // +---------+ +---------+ +---------+ - // - // Decay tasks - for (int i = 0; i < tx_tasks_stack_id; i++) - { - LuosHAL_SetIrqState(false); - tx_tasks[i].data_pt = tx_tasks[i + 1].data_pt; - tx_tasks[i].size = tx_tasks[i + 1].size; - LuosHAL_SetIrqState(true); - } - LuosHAL_SetIrqState(false); - if (tx_tasks_stack_id != 0) - { - tx_tasks_stack_id--; - tx_tasks[tx_tasks_stack_id].data_pt = 0; - tx_tasks[tx_tasks_stack_id].size = 0; - } - LuosHAL_SetIrqState(true); - MsgAlloc_FindNewOldestMsg(); - } -} -/****************************************************************************** - * @brief remove all transmit task of a specific service - * @param None - * @return None - ******************************************************************************/ -void MsgAlloc_PullServiceFromTxTask(uint16_t service_id) -{ - // - // Remove a Tx message from a specific service by analyzing "target" in header (for example service is in tx task Tx2) - // tx_tasks_stack_id = 3 : function will search in messages Tx1, Tx2 & Tx3 - // - // tx_tasks tx_tasks - // +---------+ +---------+ - // | Tx1 |\ | Tx1 | - // |---------| | |---------| - // | Tx2 | | | Tx3 |<-- messaged Tx2 has been is cleared - // |---------| | |---------| - // | Tx3 |/ | Tx4 | - // |---------|<--tx_tasks_stack_id |---------| - // | etc... | | etc... | - // |---------| |---------| - // | LAST | | 0 | - // +---------+ +---------+ - // - LUOS_ASSERT((tx_tasks_stack_id > 0) && (tx_tasks_stack_id <= MAX_MSG_NB)); - uint8_t task_id = 0; - // check all task - while (task_id < tx_tasks_stack_id) - { - if (((msg_t *)tx_tasks[task_id].data_pt)->header.target == service_id) - { - // Decay tasks - for (uint8_t i = task_id; i < tx_tasks_stack_id; i++) - { - LuosHAL_SetIrqState(false); - tx_tasks[i].data_pt = tx_tasks[i + 1].data_pt; - tx_tasks[i].size = tx_tasks[i + 1].size; - LuosHAL_SetIrqState(true); - } - LuosHAL_SetIrqState(false); - if (tx_tasks_stack_id != 0) - { - tx_tasks_stack_id--; - tx_tasks[tx_tasks_stack_id].data_pt = 0; - tx_tasks[tx_tasks_stack_id].size = 0; - } - LuosHAL_SetIrqState(true); - } - else - { - task_id++; - } - } - MsgAlloc_FindNewOldestMsg(); -} -/****************************************************************************** - * @brief return a message to transmit - * @param service_pt service sending this data - * @param data to send - * @param size of the data to send - * @param localhost is this message a localhost one - * @return error_return_t : Fail is there is no more message available. - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL error_return_t MsgAlloc_GetTxTask(service_t **service_pt, uint8_t **data, uint16_t *size) -{ - LUOS_ASSERT(tx_tasks_stack_id < MAX_MSG_NB); - - // - // example if luos_tasks_stack_id = 0 - // luos_tasks - // +---------+ - // | MSG_1 | - // |---------|<--luos_tasks_stack_id : tx_tasks[0] is filled with pointers (service, data, size & localhost) - // | MSG_2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - LuosHAL_SetIrqState(false); - if (tx_tasks_stack_id > 0) - { - *data = tx_tasks[0].data_pt; - *size = tx_tasks[0].size; - *service_pt = tx_tasks[0].service_pt; - LuosHAL_SetIrqState(true); - return SUCCEED; - } - LuosHAL_SetIrqState(true); - // - // luos_tasks - // +---------+<--luos_tasks_stack_id (no message, function return FAILED) - // | MSG_1 | - // |---------| - // | MSG_2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - return FAILED; -} -/****************************************************************************** - * @brief check if there is uncomplete tx_tasks - * @param None - * @return error_return_t : Fail is there is untransmitted message. - ******************************************************************************/ -_CRITICAL error_return_t MsgAlloc_TxAllComplete(void) -{ - if (tx_tasks_stack_id > 0) - { return FAILED; } return SUCCEED; diff --git a/engine/OD/od_linear.h b/engine/OD/od_linear.h index aac85d89a..b25e9f517 100644 --- a/engine/OD/od_linear.h +++ b/engine/OD/od_linear.h @@ -7,7 +7,6 @@ #ifndef OD_OD_LINEAR_H_ #define OD_OD_LINEAR_H_ -#include "struct_io.h" #include "string.h" /******************************************************************************* diff --git a/engine/OD/od_time.h b/engine/OD/od_time.h index 480f0a425..c95779f17 100644 --- a/engine/OD/od_time.h +++ b/engine/OD/od_time.h @@ -8,114 +8,10 @@ #define OD_OD_TIME_H_ #include +#include "time_luos.h" /******************************************************************************* * Definitions ******************************************************************************/ -typedef struct -{ - double _private; -} time_luos_t; - -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ -// time values are stored in seconds (s) -//******** Conversions *********** - -// sec -static inline double TimeOD_TimeTo_s(time_luos_t self) -{ - return self._private; -} - -static inline time_luos_t TimeOD_TimeFrom_s(double sec) -{ - time_luos_t self; - self._private = sec; - return self; -} - -// ms -static inline double TimeOD_TimeTo_ms(time_luos_t self) -{ - return self._private * 1000.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_ms(double ms) -{ - time_luos_t self; - self._private = ms / 1000.0f; - return self; -} - -// µs -static inline double TimeOD_TimeTo_us(time_luos_t self) -{ - return self._private * 1000000.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_us(double us) -{ - time_luos_t self; - self._private = us / 1000000.0f; - return self; -} - -// ns -static inline double TimeOD_TimeTo_ns(time_luos_t self) -{ - return self._private * 1000000000.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_ns(double ns) -{ - time_luos_t self; - self._private = ns / 1000000000.0f; - return self; -} - -// min -static inline double TimeOD_TimeTo_min(time_luos_t self) -{ - return self._private / 60.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_min(double min) -{ - time_luos_t self; - self._private = min * 60.0f; - return self; -} - -// hour -static inline double TimeOD_TimeTo_h(time_luos_t self) -{ - return self._private / 3600.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_h(double hour) -{ - time_luos_t self; - self._private = hour * 3600.0f; - return self; -} - -// day -static inline double TimeOD_TimeTo_day(time_luos_t self) -{ - return self._private / 86400.0f; -} - -static inline time_luos_t TimeOD_TimeFrom_day(double day) -{ - time_luos_t self; - self._private = day * 86400.0f; - return self; -} //******** Messages management *********** static inline void TimeOD_TimeToMsg(const time_luos_t *const self, msg_t *const msg) diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/bootloader_core.c index 609e3c95c..0a90dc5a7 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/bootloader_core.c @@ -366,7 +366,7 @@ void LuosBootloader_Loop(void) * @param input : Pointer to message received from luos network * @return None ******************************************************************************/ -void LuosBootloader_MsgHandler(msg_t *input) +void LuosBootloader_MsgHandler(const msg_t *input) { bootloader_cmd = input->data[0]; @@ -467,7 +467,11 @@ void LuosBootloader_MsgHandler(msg_t *input) } break; #endif + case BOOTLOADER_RESET: + LuosHAL_SetMode((uint8_t)BOOT_MODE); + LuosHAL_Reboot(); + break; default: break; } -} \ No newline at end of file +} diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/bootloader_core.h index 2ee7bab12..2f2d7f949 100644 --- a/engine/bootloader/bootloader_core.h +++ b/engine/bootloader/bootloader_core.h @@ -64,9 +64,9 @@ void LuosBootloader_Loop(void); /****************************************************************************** * @brief function used by Luos to send message to the bootloader ******************************************************************************/ -void LuosBootloader_MsgHandler(msg_t *); +void LuosBootloader_MsgHandler(const msg_t *input); #ifndef BOOTLOADER void LuosBootloader_JumpToBootloader(void); #endif -#endif /* BOOTLOADER_H */ \ No newline at end of file +#endif /* BOOTLOADER_H */ diff --git a/engine/core/inc/_timestamp.h b/engine/core/inc/_timestamp.h index d07d87211..d87685fe3 100644 --- a/engine/core/inc/_timestamp.h +++ b/engine/core/inc/_timestamp.h @@ -14,7 +14,7 @@ ******************************************************************************/ void Timestamp_EncodeMsg(msg_t *msg, time_luos_t timestamp); -void Timestamp_ConvertToLatency(msg_t *msg); +time_luos_t Timestamp_ConvertToLatency(const msg_t *msg); void Timestamp_ConvertToDate(msg_t *msg, uint64_t reception_date); #endif /* __TIMESTAMP_H_ */ diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 86246ebdf..0f3474d57 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -29,6 +29,7 @@ void Luos_Init(void); void Luos_Loop(void); void Luos_ResetStatistic(void); +const revision_t *Luos_GetVersion(void); // ***************** Node management ***************** uint32_t Luos_GetSystick(void); @@ -53,11 +54,11 @@ void Luos_Flush(void); #include "streaming.h" void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); -error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); +error_return_t Luos_ReceiveStreaming(service_t *service, const msg_t *msg, streaming_channel_t *stream); // *** Timestamping management (in file `timestamp.c`)*** time_luos_t Luos_Timestamp(void); -bool Luos_IsMsgTimstamped(msg_t *msg); +bool Luos_IsMsgTimstamped(const msg_t *msg); time_luos_t Luos_GetMsgTimestamp(msg_t *msg); error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); @@ -67,15 +68,15 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); // *** Big data management *** void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); -int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data); +int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data); // *** Basic transmission management *** error_return_t Luos_SendMsg(service_t *service, msg_t *msg); error_return_t Luos_TxComplete(void); // *** Polling reception management *** -error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg); -error_return_t Luos_ReadFromService(service_t *service, int16_t id, msg_t **returned_msg); +error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write); +error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write); uint16_t Luos_NbrAvailableMsg(void); #endif /* LUOS_ENGINE_H */ diff --git a/engine/core/inc/luos_list.h b/engine/core/inc/luos_list.h index c2f8e20c7..70ecdfd89 100644 --- a/engine/core/inc/luos_list.h +++ b/engine/core/inc/luos_list.h @@ -34,7 +34,7 @@ typedef enum typedef enum { - // Common register for all services + // Generic cmd UNKNOWN_CMD = LUOS_LAST_RESERVED_CMD, // set or get some undefined data (change size of msg to set or get) GET_CMD = UNKNOWN_CMD, // retrocompatibility SET_CMD, // retrocompatibility @@ -53,6 +53,8 @@ typedef enum FORCE, // force_t (Newton N) MOMENT, // moment_t (Newton meter N.m) CONTROL, // control_mode (control_mode_t) + TEXT, // ASCII string + PRESSURE, // pressure_t (Pa) // Configuration commands REGISTER, // a register data [reg_add, data[]] @@ -93,10 +95,6 @@ typedef enum PARAMETERS, // depend on the service, can be : servo_parameters_t, imu_report_t, motor_mode_t ERROR_CMD, - // Retrocompatibility zone - TEXT, // ASCII string - PRESSURE, // pressure_t (Pa) - // compatibility area LUOS_LAST_STD_CMD = 128 } luos_cmd_t; diff --git a/engine/core/inc/profile_core.h b/engine/core/inc/profile_core.h index 03c5378b1..ad5d8d26c 100644 --- a/engine/core/inc/profile_core.h +++ b/engine/core/inc/profile_core.h @@ -17,7 +17,7 @@ typedef struct profile_ops { void (*Init)(void *); - void (*Handler)(service_t *, msg_t *); + void (*Handler)(service_t *, const msg_t *); SERVICE_CB Callback; } profile_ops_t; @@ -47,4 +47,4 @@ profile_core_t *ProfileCore_GetNew(bool); void ProfileCore_OverrideConnectHandler(void); service_t *ProfileCore_StartService(SERVICE_CB, const char *, revision_t); -#endif /* PROFILE_CORE_H_ */ \ No newline at end of file +#endif /* PROFILE_CORE_H_ */ diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index 055feeeb9..1b228b142 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -77,7 +77,7 @@ void RoutingTB_DetectServices(service_t *service); void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node); void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service); void RoutingTB_RemoveNode(uint16_t nodeid); -void RoutingTB_RemoveOnRoutingTable(uint16_t id); +void RoutingTB_RemoveService(uint16_t id); void RoutingTB_Erase(void); routing_table_t *RoutingTB_Get(void); uint16_t RoutingTB_GetLastService(void); diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h index db19c5198..423a9aa1a 100644 --- a/engine/core/inc/service.h +++ b/engine/core/inc/service.h @@ -8,6 +8,22 @@ #define _SERVICE_H_ #include "struct_luos.h" +#include "luos_io.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#if (MAX_SERVICE_NUMBER <= 8) +typedef uint8_t service_filter_t; +#elif (MAX_SERVICE_NUMBER <= 16) +typedef uint16_t service_filter_t; +#elif (MAX_SERVICE_NUMBER <= 32) +typedef uint32_t service_filter_t; +#elif (MAX_SERVICE_NUMBER <= 64) +typedef uint64_t service_filter_t; +#else + #error "MAX_SERVICE_NUMBER is too high" +#endif /******************************************************************************* * Function @@ -19,10 +35,12 @@ void Service_ResetStatistics(void); void Service_GenerateId(uint16_t base_id); void Service_ClearId(void); uint16_t Service_GetIndex(service_t *service); +void Service_RmAutoUpdateTarget(uint16_t service_id); void Service_AutoUpdateManager(void); +error_return_t Service_Deliver(phy_job_t *job); // IO related functions -service_t *Service_GetConcerned(header_t *header); -void Service_AllocMsg(msg_t *msg); +service_t *Service_GetConcerned(const header_t *header); +service_filter_t Service_GetFilter(const msg_t *msg); #endif /* _SERVICE_H_ */ diff --git a/engine/core/inc/stats.h b/engine/core/inc/stats.h new file mode 100644 index 000000000..5017d2d39 --- /dev/null +++ b/engine/core/inc/stats.h @@ -0,0 +1,21 @@ +/****************************************************************************** + * @file pub_sub.h + * @brief multicast referencing description + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _STATS_H_ +#define _STATS_H_ + +#include "struct_stat.h" + +/******************************************************************************* + * Function + ******************************************************************************/ +void Stats_Init(void); + +general_stats_t *Stats_Get(void); +memory_stats_t *Stats_GetMemory(void); +luos_stats_t *Stats_GetLuos(void); + +#endif /* _PUB_SUB_H_ */ diff --git a/engine/core/inc/struct_engine.h b/engine/core/inc/struct_engine.h index 982239f0b..1982ec8b5 100644 --- a/engine/core/inc/struct_engine.h +++ b/engine/core/inc/struct_engine.h @@ -8,7 +8,6 @@ #define __ENGINE_STRUCT_H #include -#include "struct_io.h" /******************************************************************************* * Definitions diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 2e5c315f5..696ac92ec 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -15,6 +15,13 @@ * Definitions ******************************************************************************/ +typedef enum +{ + // Protocol version + BASE_PROTOCOL = PROTOCOL_REVISION, + TIMESTAMP_PROTOCOL, +} protocol_t; + /****************************************************************************** * This enum list all CMD reserved to Luos * please refer to the documentation @@ -22,11 +29,16 @@ typedef enum { // Luos specific registers - LOCAL_RTB = ROBUS_PROTOCOL_NB, // Ask(size == 0), generate(size == 2) a local routing_table. - RTB, // Receive a routing_table. - WRITE_ALIAS, // Get and save a new given alias. - UPDATE_PUB, // Ask to update a sensor value each time duration to the sender - ASK_DETECTION, // Ask Luos to launch a detection + WRITE_NODE_ID, // Get and save a new given node ID. + START_DETECTION, // Start a detection + END_DETECTION, // Detect the end of a detection + LOCAL_RTB, // Ask(size == 0), generate(size == 2) a local routing_table. + RTB, // Receive a routing_table. + WRITE_ALIAS, // Get and save a new given alias. + UPDATE_PUB, // Ask to update a sensor value each time duration to the sender + ASK_DETECTION, // Ask Luos to launch a detection + DEADTARGET, // Send a dead target message + ASSERT, // Node Assert message (only broadcast with a source as a node) // Revision management REVISION, // service sends its firmware revision @@ -101,13 +113,32 @@ typedef struct __attribute__((__packed__)) * This structure is used to manage services timed auto update * please refer to the documentation ******************************************************************************/ -typedef struct __attribute__((__packed__)) timed_update_t +typedef struct timed_update_t { uint32_t last_update; uint16_t time_ms; uint16_t target; } timed_update_t; +/****************************************************************************** + * This structure is used to manage dead target message + * Service_id or node_id can be set to 0 to ignore it. + * Only 1 of those 2 can have a value indicating if the dead target is a service or a node. + * please refer to the documentation + ******************************************************************************/ +typedef struct __attribute__((__packed__)) dead_target_t +{ + union + { + struct __attribute__((__packed__)) + { + uint16_t service_id; + uint16_t node_id; + }; + uint8_t unmap[4]; + }; +} dead_target_t; + /****************************************************************************** * This structure is used to manage read or write access * please refer to the documentation @@ -151,10 +182,9 @@ typedef struct service_t uint8_t alias[MAX_ALIAS_SIZE]; /*!< service alias. */ revision_t revision; /*!< service firmware version. */ access_t access; /*!< service read write access. */ - uint16_t dead_service_spotted; /*!< The ID of a service that don't reply to a lot of ACK msg */ // Callback - void (*service_cb)(struct service_t *service, msg_t *msg); + void (*service_cb)(struct service_t *service, const msg_t *msg); // Statistics service_stats_t statistics; /*!< service level statistics. */ @@ -167,6 +197,6 @@ typedef struct service_t } service_t; -typedef void (*SERVICE_CB)(service_t *service, msg_t *msg); +typedef void (*SERVICE_CB)(service_t *service, const msg_t *msg); -#endif /*__LUOS_STRUCT_H */ \ No newline at end of file +#endif /*__LUOS_STRUCT_H */ diff --git a/engine/core/inc/time_luos.h b/engine/core/inc/time_luos.h new file mode 100644 index 000000000..6ff874915 --- /dev/null +++ b/engine/core/inc/time_luos.h @@ -0,0 +1,120 @@ +/****************************************************************************** + * @file OD_time + * @brief object dictionnary time + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef TIME_LUOS_H_ +#define TIME_LUOS_H_ + +#include +/******************************************************************************* + * Definitions + ******************************************************************************/ +typedef struct +{ + double _private; +} time_luos_t; + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Function + ******************************************************************************/ +// time values are stored in seconds (s) +//******** Conversions *********** + +// sec +static inline double TimeOD_TimeTo_s(time_luos_t self) +{ + return self._private; +} + +static inline time_luos_t TimeOD_TimeFrom_s(double sec) +{ + time_luos_t self; + self._private = sec; + return self; +} + +// ms +static inline double TimeOD_TimeTo_ms(time_luos_t self) +{ + return self._private * 1000.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_ms(double ms) +{ + time_luos_t self; + self._private = ms / 1000.0f; + return self; +} + +// µs +static inline double TimeOD_TimeTo_us(time_luos_t self) +{ + return self._private * 1000000.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_us(double us) +{ + time_luos_t self; + self._private = us / 1000000.0f; + return self; +} + +// ns +static inline double TimeOD_TimeTo_ns(time_luos_t self) +{ + return self._private * 1000000000.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_ns(double ns) +{ + time_luos_t self; + self._private = ns / 1000000000.0f; + return self; +} + +// min +static inline double TimeOD_TimeTo_min(time_luos_t self) +{ + return self._private / 60.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_min(double min) +{ + time_luos_t self; + self._private = min * 60.0f; + return self; +} + +// hour +static inline double TimeOD_TimeTo_h(time_luos_t self) +{ + return self._private / 3600.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_h(double hour) +{ + time_luos_t self; + self._private = hour * 3600.0f; + return self; +} + +// day +static inline double TimeOD_TimeTo_day(time_luos_t self) +{ + return self._private / 86400.0f; +} + +static inline time_luos_t TimeOD_TimeFrom_day(double day) +{ + time_luos_t self; + self._private = day * 86400.0f; + return self; +} + +#endif /* TIME_LUOS_H_ */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index b88bd5690..4bc35f325 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -4,11 +4,8 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include "luos_engine.h" #include -#include -#include "msg_alloc.h" -#include "robus.h" +#include "luos_engine.h" #include "luos_hal.h" #include "bootloader_core.h" #include "_timestamp.h" @@ -16,25 +13,18 @@ #include "service.h" #include "struct_engine.h" #include "luos_io.h" +#include "stats.h" /******************************************************************************* * Variables ******************************************************************************/ -revision_t luos_version = {.major = 3, .minor = 0, .build = 0}; +const revision_t luos_version = {.major = 3, .minor = 0, .build = 0}; package_t package_table[MAX_SERVICE_NUMBER]; uint16_t package_number = 0; -service_t *detection_service; -uint8_t Flag_DetectServices = 0; - -luos_stats_t luos_stats; -general_stats_t general_stats; /******************************************************************************* * Function ******************************************************************************/ -static error_return_t Luos_MsgHandler(service_t *service, msg_t *input); -static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); -static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t size); static error_return_t Luos_Send(service_t *service, msg_t *msg); static inline void Luos_PackageInit(void); static inline void Luos_PackageLoop(void); @@ -48,9 +38,8 @@ void Luos_Init(void) { Service_Init(); Node_Init(); - memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); LuosHAL_Init(); - LuosIO_Init(&luos_stats.memory); + LuosIO_Init(); #ifdef WITH_BOOTLOADER if (APP_START_ADDRESS == (uint32_t)FLASH_BASE) @@ -70,9 +59,8 @@ void Luos_Init(void) void Luos_Loop(void) { static uint32_t last_loop_date; - uint16_t remaining_msg_number = 0; - service_t *oldest_service = NULL; - msg_t *returned_msg = NULL; + uint16_t remaining_job_number = 0; + phy_job_t *job; #ifdef WITH_BOOTLOADER // After 3 Luos_Loop, consider this application as safe and write a flag to let the booloader know it can jump to the application safely. @@ -87,99 +75,41 @@ void Luos_Loop(void) } #endif - // check loop call time stat - if ((LuosHAL_GetSystick() - last_loop_date) > luos_stats.max_loop_time_ms) - { - luos_stats.max_loop_time_ms = LuosHAL_GetSystick() - last_loop_date; - } - if (MsgAlloc_IsReseted() == SUCCEED) + // Check loop call time stat + // Get node stats + luos_stats_t *luos_stats = Stats_GetLuos(); + if ((LuosHAL_GetSystick() - last_loop_date) > luos_stats->max_loop_time_ms) { - // We receive a reset detection - // Reset services ID - Service_ClearId(); - // Reset the data reception context - Luos_ReceiveData(NULL, NULL, NULL); + luos_stats->max_loop_time_ms = LuosHAL_GetSystick() - last_loop_date; } Node_Loop(); LuosIO_Loop(); - // look at all received messages + // Look at all received jobs LUOS_MUTEX_LOCK - while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_service) != FAILED) + while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) { - // There is a message available, check if this is a Luos Command - uint8_t cmd = 0; - uint16_t size = 0; - // There is a possibility to receive in IT a START_DETECTION so check task before doing any treatement - if ((MsgAlloc_GetLuosTaskCmd(remaining_msg_number, &cmd) != SUCCEED) || (MsgAlloc_GetLuosTaskSize(remaining_msg_number, &size) != SUCCEED)) + // We got a job + // Try to deliver it to the services + if (Service_Deliver(job) == FAILED) { - break; - } - // check if this msg cmd should be consumed by Luos_MsgHandler - if (Luos_IsALuosCmd(oldest_service, cmd, size) == SUCCEED) - { - if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) - { - // Be sure the content of this message need to be managed by Luos and do it if it is. - if (Luos_MsgHandler((service_t *)oldest_service, returned_msg) == SUCCEED) - { - // Luos CMD are generic for all services and have to be executed only once - // Clear all luos tasks related to this message (in case of multicast message) - MsgAlloc_ClearMsgFromLuosTasks(returned_msg); - } - else - { - // Here we should not have polling services. - LUOS_ASSERT(oldest_service->service_cb != 0); - // This message is for the user, pass it to the user. - oldest_service->service_cb(oldest_service, returned_msg); - } - } + // Some services wasn't able to get this job, they are in polling mode keep it for later. +#ifndef BOOTLOADER + remaining_job_number++; +#endif } else { - // This message is for a service - // check if this service have a callback? - if (oldest_service->service_cb != 0) - { - // This service have a callback pull the message - if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) - { - // This message is for the user, pass it to the user. - oldest_service->service_cb(oldest_service, returned_msg); - } - } - else - { -#ifdef BOOTLOADER - if (MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, &returned_msg) == SUCCEED) - { - LuosBootloader_MsgHandler(returned_msg); - } -#else - remaining_msg_number++; -#endif - } + // Services consume this job. remove it + LuosIO_RmJob(job); } } LUOS_MUTEX_UNLOCK - // finish msg used - MsgAlloc_UsedMsgEnd(); // manage timed auto update Service_AutoUpdateManager(); // save loop date last_loop_date = LuosHAL_GetSystick(); - - if (Flag_DetectServices == 1) - { - - Flag_DetectServices = 0; - // Set the detection launcher id to 1 - detection_service->id = 1; - // Generate the filters - Service_GenerateId(1); - RoutingTB_DetectServices(detection_service); - } } + /****************************************************************************** * @brief Luos clear statistic * @param None @@ -187,215 +117,19 @@ void Luos_Loop(void) ******************************************************************************/ void Luos_ResetStatistic(void) { - memset(&luos_stats.unmap[0], 0, sizeof(luos_stats_t)); + luos_stats_t *luos_stats = Stats_GetLuos(); + memset(&luos_stats->unmap[0], 0, sizeof(luos_stats_t)); void Service_ResetStatistics(void); } -/****************************************************************************** - * @brief Check if this command concern luos - * @param service : Pointer to the service - * @param cmd : The command value - * @param size : The size of the received message - * @return SUCCEED : If the command if for Luos, else FAILED - ******************************************************************************/ -static error_return_t Luos_IsALuosCmd(service_t *service, uint8_t cmd, uint16_t size) -{ - switch (cmd) - { - case WRITE_NODE_ID: - case START_DETECTION: - // ERROR - LUOS_ASSERT(0); - break; - case ASSERT: - if (service->service_cb != 0) - { - return SUCCEED; - } - else - { - return FAILED; - } - break; - case LOCAL_RTB: - case RTB: - case WRITE_ALIAS: - case UPDATE_PUB: - case ASK_DETECTION: - return SUCCEED; - break; - - case REVISION: - case LUOS_REVISION: - case LUOS_STATISTICS: - if (size == 0) - { - return SUCCEED; - } - break; - case BOOTLOADER_CMD: - return SUCCEED; - break; - default: - return FAILED; - break; - } - return FAILED; -} -/****************************************************************************** - * @brief Handling message for Luos library - * @param service - * @param input : Message received - * @return SUCCEED : If the messaged is consumed, else FAILED - ******************************************************************************/ -static error_return_t Luos_MsgHandler(service_t *service, msg_t *input) -{ - error_return_t consume = FAILED; - msg_t output_msg; - routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()]; - time_luos_t time; - uint16_t base_id = 0; - - if (((input->header.target_mode == SERVICEIDACK) || (input->header.target_mode == SERVICEID)) && (input->header.target != service->id)) - { - return FAILED; - } - - switch (input->header.cmd) - { - case ASSERT: - // a service assert remove all services of the asserted node in routing table - RoutingTB_RemoveNode(input->header.source); - // This assert information could be usefull for services, do not remove it. - consume = FAILED; - break; - case LOCAL_RTB: - // Depending on the size of this message we have to make different operations - // If size is 0 someone ask to get local_route table back - // If size is 2 someone ask us to generate a local route table based on the given service ID then send local route table back. - switch (input->header.size) - { - case 2: - // generate local ID - RoutingTB_Erase(); - memcpy(&base_id, &input->data[0], sizeof(uint16_t)); - Service_GenerateId(base_id); - case 0: - // send back a local routing table - output_msg.header.cmd = RTB; - output_msg.header.target_mode = SERVICEIDACK; - output_msg.header.target = input->header.source; - Luos_TransmitLocalRoutingTable(service, &output_msg); - break; - } - consume = SUCCEED; - break; - case RTB: - // Check routing table overflow - LUOS_ASSERT(((uintptr_t)route_tab + input->header.size) <= ((uintptr_t)RoutingTB_Get() + (sizeof(routing_table_t) * MAX_RTB_ENTRY))); - if (Luos_ReceiveData(service, input, (void *)route_tab) > 0) - { - // route table section reception complete - RoutingTB_ComputeRoutingTableEntryNB(); - Luos_ResetStatistic(); - } - consume = SUCCEED; - break; - case REVISION: - if (input->header.size == 0) - { - msg_t output; - output.header.cmd = REVISION; - output.header.target_mode = SERVICEID; - memcpy(output.data, service->revision.unmap, sizeof(revision_t)); - output.header.size = sizeof(revision_t); - output.header.target = input->header.source; - Luos_SendMsg(service, &output); - consume = SUCCEED; - } - break; - case LUOS_REVISION: - if (input->header.size == 0) - { - msg_t output; - output.header.cmd = LUOS_REVISION; - output.header.target_mode = SERVICEID; - memcpy(output.data, &luos_version.unmap, sizeof(revision_t)); - output.header.size = sizeof(revision_t); - output.header.target = input->header.source; - Luos_SendMsg(service, &output); - consume = SUCCEED; - } - break; - case ASK_DETECTION: - if (input->header.size == 0) - { - if (Node_GetState() < LOCAL_DETECTION) - { - Flag_DetectServices = 1; - } - } - consume = SUCCEED; - break; - case LUOS_STATISTICS: - if (input->header.size == 0) - { - msg_t output; - output.header.cmd = LUOS_STATISTICS; - output.header.target_mode = SERVICEID; - output.header.size = sizeof(general_stats_t); - output.header.target = input->header.source; - memcpy(&general_stats.node_stat, &luos_stats.unmap, sizeof(luos_stats_t)); - memcpy(&general_stats.service_stat, service->statistics.unmap, sizeof(service_stats_t)); - memcpy(output.data, &general_stats.unmap, sizeof(general_stats_t)); - Luos_SendMsg(service, &output); - consume = SUCCEED; - } - break; - case WRITE_ALIAS: - // Save this alias into the service - Luos_UpdateAlias(service, (const char *)input->data, input->header.size); - // Send this message to user - consume = FAILED; - break; - case UPDATE_PUB: - // this service need to be auto updated - TimeOD_TimeFromMsg(&time, input); - service->auto_refresh.target = input->header.source; - service->auto_refresh.time_ms = (uint16_t)TimeOD_TimeTo_ms(time); - service->auto_refresh.last_update = LuosHAL_GetSystick(); - consume = SUCCEED; - break; - case BOOTLOADER_CMD: - // send data to the bootloader - LuosBootloader_MsgHandler(input); - consume = SUCCEED; - break; - default: - break; - } - return consume; -} /****************************************************************************** - * @brief Transmit local RTB to network - * @param service - * @param routeTB_msg : Loca RTB message to transmit - * @return none + * @brief return the Luos version + * @param None + * @return Luos version ******************************************************************************/ -static void Luos_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg) +const revision_t *Luos_GetVersion(void) { - uint16_t entry_nb = 0; - routing_table_t local_routing_table[Service_GetNumber() + 1]; - - // start by saving node entry - RoutingTB_ConvertNodeToRoutingTable(&local_routing_table[entry_nb], Node_Get()); - entry_nb++; - // save services entry - for (uint16_t i = 0; i < Service_GetNumber(); i++) - { - RoutingTB_ConvertServiceToRoutingTable((routing_table_t *)&local_routing_table[entry_nb++], &Service_GetTable()[i]); - } - Luos_SendData(service, routeTB_msg, (void *)local_routing_table, (entry_nb * sizeof(routing_table_t))); + return &luos_version; } /****************************************************************************** @@ -455,7 +189,7 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) { msg->header.source = Node_Get()->node_id; } - if (Robus_SetTxTask(service, msg) == FAILED) + if (LuosIO_Send(service, msg) == FAILED) { return FAILED; } @@ -465,27 +199,38 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) /****************************************************************************** * @brief Read last message from buffer for a specifig service * @param service : Who receives the message we are looking for - * @param returned_msg : Oldest message of the service + * @param msg_to_write : Message to write * @return SUCCEED : If the message is passed to the user, else FAILED ******************************************************************************/ -error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg) +error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) { - error_return_t error = SUCCEED; + uint8_t service_index = Service_GetIndex(service); + int remaining_job_number = 0; + phy_job_t *job; LUOS_MUTEX_LOCK - while (error == SUCCEED) + while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) { - error = MsgAlloc_PullMsg(service, returned_msg); - // check if the content of this message need to be managed by Luos and do it if it is. - if (error == SUCCEED) + // We got a job + // Check if our service is concerned by this job + if (((*(uint8_t *)job->phy_data) >> service_index) & 0x01) { - if (Luos_MsgHandler(service, *returned_msg) == FAILED) + // This job is for our service, copy the job message to the user message + if (Luos_IsMsgTimstamped(job->msg_pt) == true) { - LUOS_MUTEX_UNLOCK - // This message is for the user, pass it to the user. - return SUCCEED; + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size + sizeof(time_luos_t)); } + else + { + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size); + } + // Remove this service from the job filter + *(uint8_t *)job->phy_data &= ~(1 << service_index); + // Services consume this job. try to remove it + LuosIO_RmJob(job); + LUOS_MUTEX_UNLOCK + return SUCCEED; } - MsgAlloc_ClearMsgFromLuosTasks(*returned_msg); + remaining_job_number++; } LUOS_MUTEX_UNLOCK return FAILED; @@ -494,49 +239,38 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t **returned_msg) * @brief Read last msg from buffer from a specific id service * @param service : Who receive the message we are looking for * @param id : Who sent the message we are looking for - * @param returned_msg : Oldest message of the service + * @param msg_to_write : Message to write * @return FAILED if no message available ******************************************************************************/ -error_return_t Luos_ReadFromService(service_t *service, short id, msg_t **returned_msg) +error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write) { - uint16_t remaining_msg_number = 0; - service_t *oldest_service = NULL; - error_return_t error = SUCCEED; + uint16_t remaining_job_number = 0; + phy_job_t *job; + uint8_t service_index = Service_GetIndex(service); LUOS_MUTEX_LOCK - while (MsgAlloc_LookAtLuosTask(remaining_msg_number, &oldest_service) != FAILED) + while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) { - // Check if this message is for us - if (oldest_service == service) + // We got a job + // Check if our service is concerned by this job + if ((*(service_filter_t *)job->phy_data >> service_index & 0x01) && (job->msg_pt->header.source == id)) { - // Check the source id - uint16_t source = 0; -#ifdef LUOS_ASSERTION - LUOS_ASSERT(MsgAlloc_GetLuosTaskSourceId(remaining_msg_number, &source) == SUCCEED); -#else - MsgAlloc_GetLuosTaskSourceId(remaining_msg_number, &source); -#endif - if (source == id) + // This job is for our service, copy the job message to the user message + if (Luos_IsMsgTimstamped(job->msg_pt) == true) { - // Source id of this message match, get it and treat it. - error = MsgAlloc_PullMsgFromLuosTask(remaining_msg_number, returned_msg); - // check if the content of this message need to be managed by Luos and do it if it is. - if ((Luos_MsgHandler(service, *returned_msg) == FAILED) & (error == SUCCEED)) - { - // This message is for the user, pass it to the user. - LUOS_MUTEX_UNLOCK - return SUCCEED; - } - MsgAlloc_ClearMsgFromLuosTasks(*returned_msg); + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size + sizeof(time_luos_t)); } else { - remaining_msg_number++; + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size); } + // Remove this service from the job filter + *(service_filter_t *)job->phy_data &= ~(1 << service_index); + // Services consume this job. try to remove it + LuosIO_RmJob(job); + LUOS_MUTEX_UNLOCK + return SUCCEED; } - else - { - remaining_msg_number++; - } + remaining_job_number++; } LUOS_MUTEX_UNLOCK return FAILED; @@ -598,7 +332,7 @@ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size * @param bin_data : Pointer to data * @return Valid data received (negative values are errors) ******************************************************************************/ -int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) +int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data) { // Manage buffer session (one per service) static uint32_t data_size[MAX_SERVICE_NUMBER] = {0}; @@ -613,16 +347,9 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) last_msg_size = 0; return -1; } - - LUOS_ASSERT(msg != 0); - LUOS_ASSERT(bin_data != 0); + LUOS_ASSERT((msg != 0) && (bin_data != 0)); uint16_t id = Service_GetIndex(service); - // check good service index - if (id == 0xFFFF) - { - return -1; - } // store total size of a msg if (total_data_size[id] == 0) @@ -682,7 +409,7 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data) ******************************************************************************/ uint16_t Luos_NbrAvailableMsg(void) { - return MsgAlloc_LuosTasksNbr(); + return LuosIO_GetJobNb(); } /****************************************************************************** * @brief Check if all Tx message are complete @@ -691,7 +418,7 @@ uint16_t Luos_NbrAvailableMsg(void) ******************************************************************************/ error_return_t Luos_TxComplete(void) { - return MsgAlloc_TxAllComplete(); + return LuosIO_TxAllComplete(); } /****************************************************************************** * @brief Register a new package @@ -787,7 +514,7 @@ void Luos_Detect(service_t *service) if (Node_GetState() < LOCAL_DETECTION) { - if (Node_GetState() == NO_DETECTION) + if (service->id == 0) { // We don't have any ID yet, let's create one at least for the detector // Reset filters @@ -799,7 +526,6 @@ void Luos_Detect(service_t *service) } // Send ask detection message - detection_service = service; detect_msg.header.target_mode = SERVICEIDACK; detect_msg.header.cmd = ASK_DETECTION; detect_msg.header.size = 0; diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 74191c68b..5496fdcb2 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -4,13 +4,14 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ +#include #include "luos_utils.h" #include "luos_engine.h" #include "port_manager.h" #include "string.h" #include "luos_hal.h" #include "msg_alloc.h" -#include +#include "filter.h" #ifdef WITH_BOOTLOADER #include "bootloader_core.h" #endif @@ -45,6 +46,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) PortMng_Init(); // completely reinit the allocator MsgAlloc_Init(NULL); + Filter_IdInit(); // Mask filter for service ID msg_t msg; msg.header.target_mode = BROADCAST; msg.header.target = BROADCAST_VAL; @@ -56,7 +58,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) ; node_assert(file, line); // wait for the transmission to finish before killing IRQ - while (MsgAlloc_TxAllComplete() == FAILED) + while (Luos_TxComplete() == FAILED) ; #ifdef WITH_BOOTLOADER // We're in a failed app, diff --git a/engine/core/src/profile_core.c b/engine/core/src/profile_core.c index 9e6a21ea5..4adbd4d51 100644 --- a/engine/core/src/profile_core.c +++ b/engine/core/src/profile_core.c @@ -76,7 +76,7 @@ void ProfileCore_OverrideConnectHandler(void) * @param msg : Messaged received * @return None ******************************************************************************/ -static void ProfileCore_Handler(service_t *service, msg_t *msg) +static void ProfileCore_Handler(service_t *service, const msg_t *msg) { profile_core_t *head_profile = ProfileCore_GetFromService(service); diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index 60d134df4..92aab9eb1 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -4,10 +4,10 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include "pub_sub.h" -#include "luos_engine.h" #include #include +#include "pub_sub.h" +#include "luos_utils.h" #include "filter.h" #include "service.h" /******************************************************************************* @@ -106,4 +106,4 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) Filter_RmTopic(topic); } return err; -} \ No newline at end of file +} diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 228f9c1c8..d500f4f72 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -4,16 +4,16 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include - #include #include #include #include +#include "routing_table.h" #include "luos_hal.h" #include "luos_engine.h" #include "struct_engine.h" #include "luos_io.h" +#include "service.h" /******************************************************************************* * Definitions @@ -428,7 +428,7 @@ void RoutingTB_RemoveNode(uint16_t nodeid) // We find our node remove all services while (routing_table[i].mode == SERVICE) { - RoutingTB_RemoveOnRoutingTable(routing_table[i].id); + RoutingTB_RemoveService(routing_table[i].id); } return; } @@ -440,12 +440,13 @@ void RoutingTB_RemoveNode(uint16_t nodeid) * @param id : Id of service * @return None ******************************************************************************/ -void RoutingTB_RemoveOnRoutingTable(uint16_t id) +void RoutingTB_RemoveService(uint16_t serviceid) { - // find the service + Service_RmAutoUpdateTarget(serviceid); + // Find the service for (uint16_t i = 0; i < last_routing_table_entry; i++) { - if ((routing_table[i].mode == SERVICE) && (routing_table[i].id == id)) + if ((routing_table[i].mode == SERVICE) && (routing_table[i].id == serviceid)) { LUOS_ASSERT(i < last_routing_table_entry); memcpy(&routing_table[i], &routing_table[i + 1], sizeof(routing_table_t) * (last_routing_table_entry - (i + 1))); diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 4ca6a4084..04e5c695e 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -7,13 +7,11 @@ #include #include "service.h" #include "filter.h" -#include "luos_list.h" #include "node.h" #include "luos_utils.h" #include "luos_hal.h" -#include "msg_alloc.h" #include "pub_sub.h" -#include "robus.h" +#include "luos_engine.h" /******************************************************************************* * Definitions @@ -119,17 +117,28 @@ void Service_ClearId(void) * @return Service id the service list ******************************************************************************/ uint16_t Service_GetIndex(service_t *service) +{ + LUOS_ASSERT((service >= service_ctx.list) && (service < &service_ctx.list[service_ctx.number])); + return (service - service_ctx.list) / sizeof(service_t); +} + +/****************************************************************************** + * @brief Remove all services auto update targetting this service_id + * @param service_id + * @return None + ******************************************************************************/ +void Service_RmAutoUpdateTarget(uint16_t service_id) { for (uint16_t i = 0; i < service_ctx.number; i++) { - if (service == &service_ctx.list[i]) + if (service_ctx.list[i].auto_refresh.target == service_id) { - return i; + service_ctx.list[i].auto_refresh.target = 0; + service_ctx.list[i].auto_refresh.time_ms = 0; + service_ctx.list[i].auto_refresh.last_update = 0; } } - return 0xFFFF; } - /****************************************************************************** * @brief Auto update call for services * @param none @@ -153,13 +162,6 @@ void Service_AutoUpdateManager(void) // check if there is a timed update setted and if it's time to update it. if (service_ctx.list[i].auto_refresh.time_ms) { - if (service_ctx.list[i].dead_service_spotted == service_ctx.list[i].auto_refresh.target) - { - service_ctx.list[i].auto_refresh.target = 0; - service_ctx.list[i].auto_refresh.time_ms = 0; - service_ctx.list[i].auto_refresh.last_update = 0; - continue; - } if ((LuosHAL_GetSystick() - service_ctx.list[i].auto_refresh.last_update) >= service_ctx.list[i].auto_refresh.time_ms) { // This service need to send an update @@ -179,8 +181,7 @@ void Service_AutoUpdateManager(void) { if (Node_GetState() == DETECTION_OK) { - // Directly transmit the message in Localhost - Robus_SetTxTask(&service_ctx.list[i], &updt_msg); + Luos_SendMsg(&service_ctx.list[i], &updt_msg); } } service_ctx.list[i].auto_refresh.last_update = LuosHAL_GetSystick(); @@ -195,7 +196,7 @@ void Service_AutoUpdateManager(void) * @param header of message * @return service pointer ******************************************************************************/ -service_t *Service_GetConcerned(header_t *header) +service_t *Service_GetConcerned(const header_t *header) { uint16_t i = 0; LUOS_ASSERT(header); @@ -237,13 +238,51 @@ service_t *Service_GetConcerned(header_t *header) } /****************************************************************************** - * @brief Parse msg to find all services concerned and allocate them + * @brief Parse all services targeted by this job and call their callback + * @param job pointer + * @return FAILED if some services are not reachable + ******************************************************************************/ +error_return_t Service_Deliver(phy_job_t *job) +{ + // The job we are receiving is comming from Luos. + // This means that this job already contain a service filter. + // We just have to loop in the service list, filter it, call the callback and remove it from the service filter. + error_return_t error = SUCCEED; + LUOS_ASSERT(job); + service_filter_t *service_filter = (service_filter_t *)job->phy_data; + for (int i = 0; i < service_ctx.number; i++) + { + if (((*service_filter) >> i) & 0x01) + { + // This service is concerned by this job. + // Check if he have a callback. + if (service_ctx.list[i].service_cb != 0) + { + // Call the callback. + service_ctx.list[i].service_cb(&service_ctx.list[i], job->msg_pt); + // Remove this service from the filter. + *service_filter &= ~(0x01 << i); + } + else + { + // This service have no callback. Send the message to the service. + // We will have to keep this job for later, we will have to return failed in the end. + error = FAILED; + } + } + } + return error; +} + +/****************************************************************************** + * @brief Parse msg to find all services concerned and generate a filter of concerned services * @param msg pointer * @return None ******************************************************************************/ -void Service_AllocMsg(msg_t *msg) +service_filter_t Service_GetFilter(const msg_t *msg) { - uint16_t i = 0; + uint16_t i = 0; + service_filter_t filter = 0; // Find if we are concerned by this message. switch (msg->header.target_mode) @@ -255,11 +294,10 @@ void Service_AllocMsg(msg_t *msg) { if (msg->header.target == service_ctx.list[i].id) { - MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); + filter |= (1 << i); break; } } - return; break; case TYPE: // Check all service type @@ -267,49 +305,42 @@ void Service_AllocMsg(msg_t *msg) { if (msg->header.target == service_ctx.list[i].type) { - MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); + filter |= (1 << i); } } - return; break; case BROADCAST: for (i = 0; i < service_ctx.number; i++) { - MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); + filter |= (1 << i); } - return; break; case TOPIC: for (i = 0; i < service_ctx.number; i++) { if (PubSub_IsTopicSubscribed(&service_ctx.list[i], msg->header.target)) { - // TODO manage multiple slave concerned - MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); + filter |= (1 << i); } } - return; break; case NODEIDACK: case NODEID: - if (msg->header.target == DEFAULTID) // on default ID it's always a luos command create only one task - { - MsgAlloc_LuosTaskAlloc(&service_ctx.list[0], msg); - return; - } - // check if the message is really for the node or it is a service that has no filter + LUOS_ASSERT(msg->header.target != DEFAULTID); + // check if the message is for the node if (msg->header.target == Node_Get()->node_id) { + // Give it to all services for (i = 0; i < service_ctx.number; i++) { - MsgAlloc_LuosTaskAlloc(&service_ctx.list[i], msg); + filter |= (1 << i); } } - return; break; default: break; } + return filter; } /****************************************************************************** @@ -329,8 +360,6 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a service->type = type; // Initialise the service id, TODO the ID could be stored in EEprom, the default ID could be set in factory... service->id = DEFAULTID; - // Initialize dead service detection - service->dead_service_spotted = 0; // Clear stats service->statistics.max_retry = 0; // Clear topic number @@ -421,6 +450,7 @@ error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t memcpy(service->alias, clean_alias, MAX_ALIAS_SIZE); return SUCCEED; } + /****************************************************************************** * @brief Clear list of service * @param none @@ -432,4 +462,4 @@ void Luos_ServicesClear(void) // Clear service table memset((void *)service_ctx.list, 0, sizeof(service_t) * MAX_SERVICE_NUMBER); -} \ No newline at end of file +} diff --git a/engine/IO/inc/_luos_io.h b/engine/core/src/stats.c similarity index 61% rename from engine/IO/inc/_luos_io.h rename to engine/core/src/stats.c index b8ff046bb..bbf5545dd 100644 --- a/engine/IO/inc/_luos_io.h +++ b/engine/core/src/stats.c @@ -1,14 +1,11 @@ /****************************************************************************** - * @file luos_io.c - * @brief Interface file between Luos and a physical layer + * @file stats + * @brief manage statistics of Luos * @author Luos * @version 0.0.0 ******************************************************************************/ -#ifndef _PRIVATE_LUOSIO_H_ -#define _PRIVATE_LUOSIO_H_ - -#include "struct_luos.h" - +#include +#include "stats.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -16,11 +13,28 @@ /******************************************************************************* * Variables ******************************************************************************/ +general_stats_t general_stats; /******************************************************************************* - * Functions + * Function ******************************************************************************/ -error_return_t LuosIO_MsgHandler(msg_t *input); +void Stats_Init(void) +{ + memset(&general_stats, 0, sizeof(general_stats_t)); +} + +general_stats_t *Stats_Get(void) +{ + return &general_stats; +} + +memory_stats_t *Stats_GetMemory(void) +{ + return &general_stats.node_stat.memory; +} -#endif /* _PRIVATE_LUOSIO_H_ */ \ No newline at end of file +luos_stats_t *Stats_GetLuos(void) +{ + return &general_stats.node_stat; +} diff --git a/engine/core/src/streaming.c b/engine/core/src/streaming.c index ef7eeaa9d..36db3eaa6 100644 --- a/engine/core/src/streaming.c +++ b/engine/core/src/streaming.c @@ -87,7 +87,7 @@ uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint * @param stream : Streaming channel pointer * @param data : A pointer of data * @param size : data size - * @return None + * @return Number of dample available in buffer ******************************************************************************/ uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size) { @@ -284,7 +284,7 @@ void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t * @param stream : Streaming channel pointer * @return error ******************************************************************************/ -error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream) +error_return_t Luos_ReceiveStreaming(service_t *service, const msg_t *msg, streaming_channel_t *stream) { // Get chunk size unsigned short chunk_size = 0; @@ -303,4 +303,4 @@ error_return_t Luos_ReceiveStreaming(service_t *service, msg_t *msg, streaming_c return SUCCEED; } return FAILED; -} \ No newline at end of file +} diff --git a/engine/core/src/timestamp.c b/engine/core/src/timestamp.c index ee1f5d6be..c1fd55e71 100644 --- a/engine/core/src/timestamp.c +++ b/engine/core/src/timestamp.c @@ -4,9 +4,9 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ +#include #include "_timestamp.h" #include "luos_hal.h" -#include "string.h" #include "struct_luos.h" /******************************* Description of Timestamp process ************************************ * @@ -67,7 +67,7 @@ time_luos_t Luos_Timestamp(void) * @param msg : Message to check * @return boolean it "True" if message is timestamped ******************************************************************************/ -_CRITICAL inline bool Luos_IsMsgTimstamped(msg_t *msg) +_CRITICAL inline bool Luos_IsMsgTimstamped(const msg_t *msg) { return (msg->header.config == TIMESTAMP_PROTOCOL); } @@ -107,22 +107,14 @@ void Timestamp_EncodeMsg(msg_t *msg, time_luos_t timestamp) * @param msg : Message that will be sent * @return None ******************************************************************************/ -_CRITICAL void Timestamp_ConvertToLatency(msg_t *msg) +_CRITICAL time_luos_t Timestamp_ConvertToLatency(const msg_t *msg) { - static time_luos_t timestamp_date = {0.0f}; - static msg_t *last_msg = NULL; - if (last_msg != msg) - { - // This is a new message, backup the timestamp date - memcpy(×tamp_date, &msg->data[msg->header.size], sizeof(time_luos_t)); - // Keep the message pointer to know if we already manage this one or not. - last_msg = msg; - } + time_luos_t timestamp_date; + memcpy(×tamp_date, &msg->data[msg->header.size], sizeof(time_luos_t)); // Compute the latency from date time_luos_t latency = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(timestamp_date) - TimeOD_TimeTo_s(Luos_Timestamp())); - // Write latency on the message - memcpy(&msg->data[msg->header.size], &latency, sizeof(time_luos_t)); + return latency; } /****************************************************************************** diff --git a/engine/profiles/motor/profile_motor.c b/engine/profiles/motor/profile_motor.c index cbf08e4df..554336cb8 100644 --- a/engine/profiles/motor/profile_motor.c +++ b/engine/profiles/motor/profile_motor.c @@ -13,7 +13,7 @@ * @param msg : The received message * @return None ******************************************************************************/ -void ProfileMotor_Handler(service_t *service, msg_t *msg) +void ProfileMotor_Handler(service_t *service, const msg_t *msg) { profile_core_t *profile = ProfileCore_GetFromService(service); profile_motor_t *profile_motor = (profile_motor_t *)profile->profile_data; @@ -119,4 +119,4 @@ service_t *ProfileMotor_CreateService(profile_motor_t *profile_motor, SERVICE_CB // Start service with the linked profile return ProfileCore_StartService(callback, alias, revision); -} \ No newline at end of file +} diff --git a/engine/profiles/servo_motor/profile_servo_motor.c b/engine/profiles/servo_motor/profile_servo_motor.c index b2e800bf0..efa2bab5e 100644 --- a/engine/profiles/servo_motor/profile_servo_motor.c +++ b/engine/profiles/servo_motor/profile_servo_motor.c @@ -28,7 +28,7 @@ void ProfileServo_Init(void *handler) * @param msg : The received message * @return None ******************************************************************************/ -void ProfileServo_Handler(service_t *service, msg_t *msg) +void ProfileServo_Handler(service_t *service, const msg_t *msg) { // get profile informations from service profile_core_t *profile = ProfileCore_GetFromService(service); @@ -301,4 +301,4 @@ service_t *ProfileServo_CreateService(profile_servo_motor_t *profile_servo_motor // Start service with the linked profile return ProfileCore_StartService(callback, alias, revision); -} \ No newline at end of file +} diff --git a/engine/profiles/state/profile_state.c b/engine/profiles/state/profile_state.c index 70d963250..aa6f1e927 100644 --- a/engine/profiles/state/profile_state.c +++ b/engine/profiles/state/profile_state.c @@ -12,7 +12,7 @@ * @param msg : The received message * @return None ******************************************************************************/ -void ProfileState_Handler(service_t *service, msg_t *msg) +void ProfileState_Handler(service_t *service, const msg_t *msg) { profile_core_t *profile = ProfileCore_GetFromService(service); profile_state_t *profile_state = (profile_state_t *)profile->profile_data; @@ -82,4 +82,4 @@ service_t *ProfileState_CreateService(profile_state_t *profile_state, SERVICE_CB // Start profile return ProfileCore_StartService(callback, alias, revision); -} \ No newline at end of file +} diff --git a/engine/profiles/voltage/profile_voltage.c b/engine/profiles/voltage/profile_voltage.c index 2aef8aaf7..e78177693 100644 --- a/engine/profiles/voltage/profile_voltage.c +++ b/engine/profiles/voltage/profile_voltage.c @@ -12,7 +12,7 @@ * @param msg : The received message * @return None ******************************************************************************/ -void ProfileVoltage_Handler(service_t *service, msg_t *msg) +void ProfileVoltage_Handler(service_t *service, const msg_t *msg) { profile_core_t *profile = ProfileCore_GetFromService(service); profile_voltage_t *voltage_profile = (profile_voltage_t *)profile->profile_data; @@ -105,4 +105,4 @@ service_t *ProfileVoltage_CreateService(profile_voltage_t *profile_voltage, SERV // Start profile return ProfileCore_StartService(callback, alias, revision); -} \ No newline at end of file +} diff --git a/examples/apps/alarm_controller/alarm_controller.c b/examples/apps/alarm_controller/alarm_controller.c index 66a3ee03b..13ab83c9b 100644 --- a/examples/apps/alarm_controller/alarm_controller.c +++ b/examples/apps/alarm_controller/alarm_controller.c @@ -20,7 +20,7 @@ uint8_t end_detection = 0; /******************************************************************************* * Function ******************************************************************************/ -static void AlarmController_MsgHandler(service_t *service, msg_t *msg); +static void AlarmController_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -206,7 +206,7 @@ void AlarmController_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void AlarmController_MsgHandler(service_t *service, msg_t *msg) +static void AlarmController_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GYRO_3D) { diff --git a/examples/apps/biometric-security/biometric_security.c b/examples/apps/biometric-security/biometric_security.c index d14830467..63c762753 100644 --- a/examples/apps/biometric-security/biometric_security.c +++ b/examples/apps/biometric-security/biometric_security.c @@ -8,7 +8,7 @@ * @version 0.0.0 ******************************************************************************/ -//#include "product_config.h" //if your are using it into a project you need to uncomment this line +// #include "product_config.h" //if your are using it into a project you need to uncomment this line #include "biometric_security.h" /******************************************************************************* @@ -38,7 +38,7 @@ uint8_t fingerprint_busy = 0; /******************************************************************************* * Functions ******************************************************************************/ -void BiometricSecurity_MsgHandler(service_t *service, msg_t *msg); +void BiometricSecurity_MsgHandler(service_t *service, const msg_t *msg); uint8_t BiometricSecurity_SetServoPosition(void); uint8_t BiometricSecurity_CheckFingerprint(void); @@ -114,7 +114,7 @@ void BiometricSecurity_Loop(void) * @param msg * @return None ******************************************************************************/ -void BiometricSecurity_MsgHandler(service_t *service, msg_t *msg) +void BiometricSecurity_MsgHandler(service_t *service, const msg_t *msg) { search_result_t result; RTFilter_Type(RTFilter_Reset(&result), STATE_TYPE); diff --git a/examples/apps/start_controller/start_controller.c b/examples/apps/start_controller/start_controller.c index 0ff313568..f849233f5 100644 --- a/examples/apps/start_controller/start_controller.c +++ b/examples/apps/start_controller/start_controller.c @@ -32,7 +32,7 @@ uint8_t end_detection = 0; /******************************************************************************* * Function ******************************************************************************/ -static void StartController_MsgHandler(service_t *service, msg_t *msg); +static void StartController_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -242,7 +242,7 @@ void StartController_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void StartController_MsgHandler(service_t *service, msg_t *msg) +static void StartController_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp b/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp index 6591e809e..565b75bea 100644 --- a/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp +++ b/examples/projects/Arduino/bldc_simple_foc/lib/motor/motor.cpp @@ -56,7 +56,7 @@ float velocity_tickstart = 0.0; /******************************************************************************* * Function ******************************************************************************/ -static void Motor_MsgHandler(service_t *service, msg_t *msg); +static void Motor_MsgHandler(service_t *service, const msg_t *msg); void Motor_TrajectoryCallback(void); float Motor_getVelocity(void); /****************************************************************************** @@ -228,7 +228,7 @@ void Motor_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Motor_MsgHandler(service_t *service, msg_t *msg) +static void Motor_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == PARAMETERS) { @@ -341,4 +341,4 @@ float Motor_getVelocity(void) } return vel; -} \ No newline at end of file +} diff --git a/examples/projects/Arduino/button/lib/button/button.c b/examples/projects/Arduino/button/lib/button/button.c index c465b37a8..942701102 100644 --- a/examples/projects/Arduino/button/lib/button/button.c +++ b/examples/projects/Arduino/button/lib/button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.c b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.c index c44298497..727eafc1b 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.c +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.c @@ -33,7 +33,7 @@ static service_t *service_fingerprint; /******************************************************************************* * Functions ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg); +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -64,7 +64,7 @@ void Fingerprint_Loop(void) * @param msg * @return None ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg) +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg) { msg_t pub_msg; pub_msg.header.target = msg->header.source; diff --git a/examples/projects/Arduino/lcd/lib/Lcd/lcd.c b/examples/projects/Arduino/lcd/lib/Lcd/lcd.c index 2d5330e47..2e58d9653 100644 --- a/examples/projects/Arduino/lcd/lib/Lcd/lcd.c +++ b/examples/projects/Arduino/lcd/lib/Lcd/lcd.c @@ -27,7 +27,7 @@ uint8_t i = 0; /******************************************************************************* * Functions ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg); +void Lcd_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief Service init must be call in project init @@ -75,7 +75,7 @@ void Lcd_Loop(void) * @param msg * @return None ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg) +void Lcd_MsgHandler(service_t *service, const msg_t *msg) { switch (msg->header.cmd) { @@ -114,4 +114,4 @@ void Lcd_MsgHandler(service_t *service, msg_t *msg) } break; } -} \ No newline at end of file +} diff --git a/examples/projects/Arduino/led/lib/led/led.c b/examples/projects/Arduino/led/lib/led/led.c index 400dbd283..4c067da66 100644 --- a/examples/projects/Arduino/led/lib/led/led.c +++ b/examples/projects/Arduino/led/lib/led/led.c @@ -17,7 +17,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -45,7 +45,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_motor.c b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_motor.c index 4f72e9c66..44c54af19 100644 --- a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_motor.c +++ b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_motor.c @@ -21,7 +21,7 @@ static service_t *service_servo; /******************************************************************************* * Functions ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg); +static void Servo_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -52,7 +52,7 @@ void Servo_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg) +static void Servo_MsgHandler(service_t *service, const msg_t *msg) { servo_motor_t servo; if (msg->header.cmd == ANGULAR_POSITION) @@ -67,4 +67,4 @@ static void Servo_MsgHandler(service_t *service, msg_t *msg) memcpy((void *)servo.param.unmap, msg->data, sizeof(servo_parameters_t)); ServoDrv_Parameter(servo.param); } -} \ No newline at end of file +} diff --git a/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp b/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp index a809743a5..762d0c89f 100644 --- a/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp +++ b/examples/projects/Arduino/stepper_simple_foc/lib/motor/motor.cpp @@ -47,7 +47,7 @@ float tickstart = 0.0; /******************************************************************************* * Function ******************************************************************************/ -static void Motor_MsgHandler(service_t *service, msg_t *msg); +static void Motor_MsgHandler(service_t *service, const msg_t *msg); void Motor_TrajectoryCallback(void); /****************************************************************************** * @brief init must be call in project init @@ -192,7 +192,7 @@ void Motor_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Motor_MsgHandler(service_t *service, msg_t *msg) +static void Motor_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == PARAMETERS) { @@ -283,4 +283,4 @@ void Motor_TrajectoryCallback(void) motion_target_position = AngularOD_PositionTo_deg(servo_motor.target_angular_position); } last_position = AngularOD_PositionFrom_deg(motion_target_position); -} \ No newline at end of file +} diff --git a/examples/projects/ESP32/button/lib/button/button.c b/examples/projects/ESP32/button/lib/button/button.c index 94753304c..d9962f4a6 100644 --- a/examples/projects/ESP32/button/lib/button/button.c +++ b/examples/projects/ESP32/button/lib/button/button.c @@ -22,7 +22,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -57,7 +57,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/ESP32/button_arduino/lib/button/button.c b/examples/projects/ESP32/button_arduino/lib/button/button.c index 6ceab3928..8a6826edb 100644 --- a/examples/projects/ESP32/button_arduino/lib/button/button.c +++ b/examples/projects/ESP32/button_arduino/lib/button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/ESP32/led/lib/led/led.c b/examples/projects/ESP32/led/lib/led/led.c index 3da53a1a4..41f776e58 100644 --- a/examples/projects/ESP32/led/lib/led/led.c +++ b/examples/projects/ESP32/led/lib/led/led.c @@ -28,7 +28,7 @@ uint8_t Led_last_state = 0; /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -69,7 +69,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { #ifdef CONFIG_IDF_TARGET_ESP32 if (msg->header.cmd == IO_STATE) diff --git a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.c b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.c index 7f3ec5a38..b6268550b 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.c +++ b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.c @@ -86,10 +86,10 @@ float Pressure_temp2 = 0; float Temperature = 0; pressure_t Pressure = {0.0}; -static void BMP280_MsgHandler(service_t *service, msg_t *msg); +static void BMP280_MsgHandler(service_t *service, const msg_t *msg); /* Receive and reply to an external Message */ -static void BMP280_MsgHandler(service_t *service, msg_t *msg) +static void BMP280_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { @@ -286,4 +286,4 @@ void BMP280_Loop() Var14_P = ((float)Pressure9) * Pressure_temp2 * Pressure_temp2 / 2147483648; Var24_P = Pressure_temp2 * ((float)Pressure8) / 32768; Pressure = PressureOD_PressureFrom_Pa(Pressure_temp2 + (Var14_P + Var24_P + ((float)Pressure7)) / 16); -} \ No newline at end of file +} diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c index bb4784c93..dad36ccd2 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.c b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.c +++ b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.c b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.c index cc8365a55..3dd99095a 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.c +++ b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.c @@ -19,7 +19,7 @@ uint8_t Led_last_state = 0; /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c index d14040dce..4889042e2 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.c b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.c +++ b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.c b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.c index b94b83038..50ac3232c 100644 --- a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.c +++ b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.c @@ -18,7 +18,7 @@ uint8_t Led_last_state = 0; /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -44,7 +44,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c index bb4784c93..dad36ccd2 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.c b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.c +++ b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c index bb4784c93..dad36ccd2 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.c b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.c index 0d2016a2f..39e1a943f 100644 --- a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.c +++ b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -43,7 +43,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.c b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.c +++ b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.c b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.c index 312df824a..b9484b750 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.c +++ b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.c @@ -32,7 +32,7 @@ static service_t *service_fingerprint; /******************************************************************************* * Functions ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg); +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -63,7 +63,7 @@ void Fingerprint_Loop(void) * @param msg * @return None ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg) +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg) { msg_t pub_msg; pub_msg.header.target = msg->header.source; diff --git a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.c b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.c index 12af3b433..acde8e422 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.c +++ b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.c @@ -27,7 +27,7 @@ uint8_t i = 0; /******************************************************************************* * Functions ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg); +void Lcd_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief Service init must be call in project init @@ -75,7 +75,7 @@ void Lcd_Loop(void) * @param msg * @return None ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg) +void Lcd_MsgHandler(service_t *service, const msg_t *msg) { switch (msg->header.cmd) { @@ -114,4 +114,4 @@ void Lcd_MsgHandler(service_t *service, msg_t *msg) } break; } -} \ No newline at end of file +} diff --git a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.c b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.c index 4683c1e77..bcb1cdf06 100644 --- a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.c +++ b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.c @@ -18,7 +18,7 @@ uint8_t Led_last_state = 0; /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -45,7 +45,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c index bb4784c93..dad36ccd2 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo.c b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo.c index 5a8bcd527..101565866 100644 --- a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo.c +++ b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo.c @@ -22,7 +22,7 @@ static service_t *service_servo; /******************************************************************************* * Functions ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg); +static void Servo_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -53,7 +53,7 @@ void Servo_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg) +static void Servo_MsgHandler(service_t *service, const msg_t *msg) { servo_t servo; if (msg->header.cmd == ANGULAR_POSITION) @@ -68,4 +68,4 @@ static void Servo_MsgHandler(service_t *service, msg_t *msg) memcpy((void *)servo.param.unmap, msg->data, sizeof(servo_parameters_t)); ServoDrv_Parameter(servo.param); } -} \ No newline at end of file +} diff --git a/examples/projects/SAMD21XPLAINED/button/lib/button/button.c b/examples/projects/SAMD21XPLAINED/button/lib/button/button.c index af99840e4..953f5cd3f 100644 --- a/examples/projects/SAMD21XPLAINED/button/lib/button/button.c +++ b/examples/projects/SAMD21XPLAINED/button/lib/button/button.c @@ -19,7 +19,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/STM32F4-discovery/button/lib/Button/button.c b/examples/projects/STM32F4-discovery/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/STM32F4-discovery/button/lib/Button/button.c +++ b/examples/projects/STM32F4-discovery/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.c b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.c index f9d3d893b..6a14d2cbf 100644 --- a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.c +++ b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.c @@ -18,7 +18,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg); +static void Button_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -44,7 +44,7 @@ void Button_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Button_MsgHandler(service_t *service, msg_t *msg) +static void Button_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.c b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.c index e4b35878d..009f14a13 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.c +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.c @@ -32,7 +32,7 @@ volatile float coef[3] = {0.0}; /******************************************************************************* * Function ******************************************************************************/ -static void LedFader_MsgHandler(service_t *service, msg_t *msg); +static void LedFader_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief package init must be call in project init * @param None @@ -89,7 +89,7 @@ void LedFader_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -void LedFader_MsgHandler(service_t *service, msg_t *msg) +void LedFader_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == COLOR) { diff --git a/examples/projects/l0/button_freertos/lib/Led/led.c b/examples/projects/l0/button_freertos/lib/Led/led.c index 7134c50cc..4958d2372 100644 --- a/examples/projects/l0/button_freertos/lib/Led/led.c +++ b/examples/projects/l0/button_freertos/lib/Led/led.c @@ -20,7 +20,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief package init must be call in project init @@ -50,7 +50,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c index 30667ecba..c5238bf54 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c @@ -50,7 +50,7 @@ char speed_bootstrap = 0; /******************************************************************************* * Function ******************************************************************************/ -static void ControllerMotor_MsgHandler(service_t *service, msg_t *msg); +static void ControllerMotor_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -248,7 +248,7 @@ void ControllerMotor_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void ControllerMotor_MsgHandler(service_t *service, msg_t *msg) +static void ControllerMotor_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { @@ -363,4 +363,4 @@ void HAL_SYSTICK_Motor_Callback(void) motion_target_position = AngularOD_PositionTo_deg(servo_motor.target_angular_position); } last_position = AngularOD_PositionFrom_deg(motion_target_position); -} \ No newline at end of file +} diff --git a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor.c b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor.c index ed1e4c111..037034b57 100644 --- a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor.c +++ b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor.c @@ -19,7 +19,7 @@ service_t *MotorDCservice2; /******************************************************************************* * Function ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg); +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -48,7 +48,7 @@ void MotorDC_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void MotorDC_MsgHandler(service_t *service, msg_t *msg) +static void MotorDC_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == RATIO) { diff --git a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c index 32810d513..34301a656 100644 --- a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c +++ b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.c @@ -23,7 +23,7 @@ uint32_t last_detection_date_ms = 0; /******************************************************************************* * Function ******************************************************************************/ -static void DetectionButton_MsgHandler(service_t *service, msg_t *msg); +static void DetectionButton_MsgHandler(service_t *service, const msg_t *msg); static void Setup_button(void); /****************************************************************************** @@ -72,7 +72,7 @@ void DetectionButton_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void DetectionButton_MsgHandler(service_t *service, msg_t *msg) +static void DetectionButton_MsgHandler(service_t *service, const msg_t *msg) { static uint8_t last_btn_state = 0; if (msg->header.cmd == IO_STATE) @@ -111,4 +111,4 @@ void Setup_button(void) Luos_Loop(); } } -} \ No newline at end of file +} diff --git a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.c b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.c index 449df3433..e2f5c06bc 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.c +++ b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.c @@ -21,7 +21,7 @@ bool new_data_ready = false; /******************************************************************************* * Function ******************************************************************************/ -static void Distance_MsgHandler(service_t *service, msg_t *msg); +static void Distance_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Distance_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Distance_MsgHandler(service_t *service, msg_t *msg) +static void Distance_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c index 51a05a83c..5270721bf 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c +++ b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.c @@ -44,7 +44,7 @@ bool end_detection = false; /******************************************************************************* * Function ******************************************************************************/ -static void LedStripPosition_MsgHandler(service_t *service, msg_t *msg); +static void LedStripPosition_MsgHandler(service_t *service, const msg_t *msg); static void distance_filtering(void); static void distance_frame_compute(void); static void glowing_fade(float target); @@ -150,7 +150,7 @@ void LedStripPosition_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void LedStripPosition_MsgHandler(service_t *service, msg_t *msg) +static void LedStripPosition_MsgHandler(service_t *service, const msg_t *msg) { search_result_t services_list; RTFilter_Reset(&services_list); @@ -523,4 +523,4 @@ void sort_motors(void) // Parse routing table to find motors RTFilter_Type(RTFilter_Reset(&result), SERVO_MOTOR_TYPE); motor_found = result.result_nbr; -} \ No newline at end of file +} diff --git a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c index 06b68e633..abf95af80 100644 --- a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c +++ b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.c @@ -28,7 +28,7 @@ bool end_detection = false; /******************************************************************************* * Function ******************************************************************************/ -static void MotorCopy_EventHandler(service_t *service, msg_t *msg); +static void MotorCopy_EventHandler(service_t *service, const msg_t *msg); static void Motor_init(uint16_t id); static void motor_set(uint8_t motor_target, angular_position_t position); static void sort_motors(void); @@ -129,7 +129,7 @@ void MotorCopy_Loop(void) } } -void MotorCopy_EventHandler(service_t *service, msg_t *msg) +void MotorCopy_EventHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == ANGULAR_POSITION) { @@ -238,4 +238,4 @@ static void sort_motors(void) break; } } -} \ No newline at end of file +} diff --git a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c index 9ffa9013f..7e1b7eec3 100644 --- a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c +++ b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.c @@ -41,7 +41,7 @@ float trajectory[NB_POINT_IN_TRAJECTORY]; /******************************************************************************* * Function ******************************************************************************/ -static void RunMotor_EventHandler(service_t *service, msg_t *msg); +static void RunMotor_EventHandler(service_t *service, const msg_t *msg); static void motor_init(uint8_t motor_target); static void motor_SendTrajectory(uint8_t motor_target); static void motor_stream(uint8_t motor_target, control_type_t control); @@ -106,7 +106,7 @@ void RunMotor_Loop(void) } } -void RunMotor_EventHandler(service_t *service, msg_t *msg) +void RunMotor_EventHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == SET_CMD) { @@ -277,4 +277,4 @@ void compute_trajectory(void) // compute sinus trajectory trajectory[index] = sin(M_PI / 180 * angle_deg) * MAX_ANGLE; } -} \ No newline at end of file +} diff --git a/examples/projects/l0/distance/lib/Distance/distance.c b/examples/projects/l0/distance/lib/Distance/distance.c index b408d013c..57dc0d8ad 100644 --- a/examples/projects/l0/distance/lib/Distance/distance.c +++ b/examples/projects/l0/distance/lib/Distance/distance.c @@ -22,7 +22,7 @@ time_luos_t distance_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Distance_MsgHandler(service_t *service, msg_t *msg); +static void Distance_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -56,7 +56,7 @@ void Distance_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Distance_MsgHandler(service_t *service, msg_t *msg) +static void Distance_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 99a7e79d0..3c4741a70 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -37,7 +37,7 @@ volatile float measurement_buf[BUFFER_SIZE]; /******************************************************************************* * Function ******************************************************************************/ -static void Dxl_MsgHandler(service_t *service, msg_t *msg); +static void Dxl_MsgHandler(service_t *service, const msg_t *msg); static void discover_dxl(void); static int find_id(service_t *service); @@ -137,7 +137,7 @@ void Dxl_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Dxl_MsgHandler(service_t *service, msg_t *msg) +static void Dxl_MsgHandler(service_t *service, const msg_t *msg) { int index = find_id(service); diff --git a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.c b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.c index 655f0a124..fdf15a57e 100644 --- a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.c +++ b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.c @@ -33,7 +33,7 @@ static service_t *service_fingerprint; /******************************************************************************* * Functions ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg); +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -64,7 +64,7 @@ void Fingerprint_Loop(void) * @param msg * @return None ******************************************************************************/ -void Fingerprint_MsgHandler(service_t *service, msg_t *msg) +void Fingerprint_MsgHandler(service_t *service, const msg_t *msg) { msg_t pub_msg; pub_msg.header.target = msg->header.source; diff --git a/examples/projects/l0/gpio/lib/Gpio_dev/gpio_dev.c b/examples/projects/l0/gpio/lib/Gpio_dev/gpio_dev.c index 10421ad1f..734b3904d 100644 --- a/examples/projects/l0/gpio/lib/Gpio_dev/gpio_dev.c +++ b/examples/projects/l0/gpio/lib/Gpio_dev/gpio_dev.c @@ -23,7 +23,7 @@ profile_voltage_t analog[ANALOG_NB]; /******************************************************************************* * Function ******************************************************************************/ -static void GpioDev_callback(service_t *service, msg_t *msg); +static void GpioDev_callback(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -85,7 +85,7 @@ void GpioDev_Loop(void) * @param None * @return None ******************************************************************************/ -static void GpioDev_callback(service_t *service, msg_t *msg) +static void GpioDev_callback(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/l0/imu/lib/Imu/imu.c b/examples/projects/l0/imu/lib/Imu/imu.c index 4ada77d05..597ecd08a 100644 --- a/examples/projects/l0/imu/lib/Imu/imu.c +++ b/examples/projects/l0/imu/lib/Imu/imu.c @@ -25,7 +25,7 @@ volatile int pub = LUOS_LAST_STD_CMD; /******************************************************************************* * Function ******************************************************************************/ -static void Imu_MsgHandler(service_t *service, msg_t *msg); +static void Imu_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -238,7 +238,7 @@ void Imu_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Imu_MsgHandler(service_t *service, msg_t *msg) +static void Imu_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/lcd/lib/Lcd/lcd.c b/examples/projects/l0/lcd/lib/Lcd/lcd.c index 9a2e9113d..913b63500 100644 --- a/examples/projects/l0/lcd/lib/Lcd/lcd.c +++ b/examples/projects/l0/lcd/lib/Lcd/lcd.c @@ -27,7 +27,7 @@ uint8_t i = 0; /******************************************************************************* * Functions ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg); +void Lcd_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief Service init must be call in project init @@ -75,7 +75,7 @@ void Lcd_Loop(void) * @param msg * @return None ******************************************************************************/ -void Lcd_MsgHandler(service_t *service, msg_t *msg) +void Lcd_MsgHandler(service_t *service, const msg_t *msg) { switch (msg->header.cmd) { @@ -114,4 +114,4 @@ void Lcd_MsgHandler(service_t *service, msg_t *msg) } break; } -} \ No newline at end of file +} diff --git a/examples/projects/l0/led/lib/Led/led.c b/examples/projects/l0/led/lib/Led/led.c index aa9fa027c..47c4eb873 100644 --- a/examples/projects/l0/led/lib/Led/led.c +++ b/examples/projects/l0/led/lib/Led/led.c @@ -20,7 +20,7 @@ /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief package init must be call in project init @@ -50,7 +50,7 @@ void Led_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { color_t rgb; if (msg->header.cmd == COLOR) diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.c b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.c index 227a7ae00..283533ce4 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.c +++ b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.c @@ -32,7 +32,7 @@ volatile float coef[3] = {0.0}; /******************************************************************************* * Function ******************************************************************************/ -static void LedFader_MsgHandler(service_t *service, msg_t *msg); +static void LedFader_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief package init must be call in project init * @param None @@ -89,7 +89,7 @@ void LedFader_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -void LedFader_MsgHandler(service_t *service, msg_t *msg) +void LedFader_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == COLOR) { diff --git a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.c b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.c index 7c55dd5a0..f0e0b0c20 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.c +++ b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.c @@ -20,7 +20,7 @@ int imgsize = MAX_LED_NUMBER; /******************************************************************************* * Function ******************************************************************************/ -static void LedStrip_MsgHandler(service_t *service, msg_t *msg); +static void LedStrip_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -53,7 +53,7 @@ void LedStrip_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void LedStrip_MsgHandler(service_t *service, msg_t *msg) +static void LedStrip_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == COLOR) { diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c index 56fd8a18a..e2f95a08a 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.c @@ -20,7 +20,7 @@ time_luos_t lux_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void LightSensor_MsgHandler(service_t *service, msg_t *msg); +static void LightSensor_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void LightSensor_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void LightSensor_MsgHandler(service_t *service, msg_t *msg) +static void LightSensor_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/load/lib/Load/load.c b/examples/projects/l0/load/lib/Load/load.c index 6734b9cd2..5a42549f5 100644 --- a/examples/projects/l0/load/lib/Load/load.c +++ b/examples/projects/l0/load/lib/Load/load.c @@ -22,7 +22,7 @@ bool new_data_ready = false; /******************************************************************************* * Function ******************************************************************************/ -static void Load_MsgHandler(service_t *service, msg_t *msg); +static void Load_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -55,7 +55,7 @@ void Load_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Load_MsgHandler(service_t *service, msg_t *msg) +static void Load_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c index bb4784c93..dad36ccd2 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.c @@ -20,7 +20,7 @@ time_luos_t angle_timestamp; /******************************************************************************* * Function ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg); +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -54,7 +54,7 @@ void Potentiometer_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Potentiometer_MsgHandler(service_t *service, msg_t *msg) +static void Potentiometer_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { diff --git a/examples/projects/l0/servo/lib/Servo/servo.c b/examples/projects/l0/servo/lib/Servo/servo.c index c7bed4ee8..52851cee8 100644 --- a/examples/projects/l0/servo/lib/Servo/servo.c +++ b/examples/projects/l0/servo/lib/Servo/servo.c @@ -18,7 +18,7 @@ static service_t *service_servo[SERVONUMBER]; /******************************************************************************* * Function ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg); +static void Servo_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -50,7 +50,7 @@ void Servo_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Servo_MsgHandler(service_t *service, msg_t *msg) +static void Servo_MsgHandler(service_t *service, const msg_t *msg) { uint8_t i = 0; servo_t servo; diff --git a/examples/projects/l0/stepper/lib/Stepper/stepper.c b/examples/projects/l0/stepper/lib/Stepper/stepper.c index a2b841efa..cc55dd9d6 100644 --- a/examples/projects/l0/stepper/lib/Stepper/stepper.c +++ b/examples/projects/l0/stepper/lib/Stepper/stepper.c @@ -27,7 +27,7 @@ volatile int current_step_nb = 0; /******************************************************************************* * Function ******************************************************************************/ -static void Stepper_MsgHandler(service_t *service, msg_t *msg); +static void Stepper_MsgHandler(service_t *service, const msg_t *msg); static void compute_speed(void); /****************************************************************************** @@ -95,7 +95,7 @@ void Stepper_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Stepper_MsgHandler(service_t *service, msg_t *msg) +static void Stepper_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == PARAMETERS) { diff --git a/examples/projects/native/led/lib/Led/led.c b/examples/projects/native/led/lib/Led/led.c index e317382e1..5b7fa2ff6 100644 --- a/examples/projects/native/led/lib/Led/led.c +++ b/examples/projects/native/led/lib/Led/led.c @@ -51,7 +51,7 @@ const char led_OFF[768] = "\n" /******************************************************************************* * Function ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg); +static void Led_MsgHandler(service_t *service, const msg_t *msg); void clear_screen(void) { @@ -90,7 +90,7 @@ void Led_Loop(void) {} * @param Msg receive * @return None ******************************************************************************/ -static void Led_MsgHandler(service_t *service, msg_t *msg) +static void Led_MsgHandler(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { @@ -126,4 +126,4 @@ static void Led_MsgHandler(service_t *service, msg_t *msg) printf(led_OFF); } } -} \ No newline at end of file +} diff --git a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c index 6dfc5022e..e5b95149d 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c +++ b/examples/projects/native/ping_pong/lib/PingPong/ping_pong.c @@ -62,9 +62,9 @@ uint16_t last_id = 0; * Function ******************************************************************************/ -void Player_MsgHandler(service_t *service, msg_t *msg) +void Player_MsgHandler(service_t *service, const msg_t *msg) { - if ((msg->header.target_mode == TOPIC) & (msg->header.target = SCORE_TOPIC) & (msg->header.source != service->id)) + if ((msg->header.target_mode == TOPIC) & (msg->header.target == SCORE_TOPIC) & (msg->header.source != service->id)) { score_update(msg); set_screen_to(score_view); diff --git a/examples/projects/native/ping_pong/lib/PingPong/scoring.c b/examples/projects/native/ping_pong/lib/PingPong/scoring.c index 1412e402b..d3587c037 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/scoring.c +++ b/examples/projects/native/ping_pong/lib/PingPong/scoring.c @@ -66,10 +66,10 @@ void score_increase(service_t *player, uint16_t winning_player_id) Luos_SendMsg(player, &msg); } -void score_update(msg_t *msg) +void score_update(const msg_t *msg) { score_t tmp_score[SCORE_TABLE_SIZE]; - msg_score_t *msg_score = (msg_score_t *)msg->data; + const msg_score_t *msg_score = (const msg_score_t *)msg->data; // Transform the message value into a score table for (int i = 0; i < score_table.player_nb; i++) { @@ -96,4 +96,4 @@ void score_update(msg_t *msg) score_table_t *get_score(void) { return &score_table; -} \ No newline at end of file +} diff --git a/examples/projects/native/ping_pong/lib/PingPong/scoring.h b/examples/projects/native/ping_pong/lib/PingPong/scoring.h index 9011e28aa..4470feca0 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/scoring.h +++ b/examples/projects/native/ping_pong/lib/PingPong/scoring.h @@ -27,7 +27,7 @@ typedef struct void score_init(service_t *player, search_result_t *player_list); void score_increase(service_t *player, uint16_t winning_player_id); -void score_update(msg_t *msg); +void score_update(const msg_t *msg); score_table_t *get_score(void); -#endif /* SCORING_H */ \ No newline at end of file +#endif /* SCORING_H */ diff --git a/network/robus/HAL/ATSAMD21/robus_hal_config.h b/network/robus/HAL/ATSAMD21/robus_hal_config.h index 531b61896..7fe568a60 100644 --- a/network/robus/HAL/ATSAMD21/robus_hal_config.h +++ b/network/robus/HAL/ATSAMD21/robus_hal_config.h @@ -12,6 +12,11 @@ #include "samd21.h" +#define _CRITICAL +#define _CRITICAL +#define _CRITICAL +#define _CRITICAL +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit #define USE_TX_IT diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h b/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h index 9ea7fc8fc..43b0db4d4 100644 --- a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h +++ b/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h @@ -26,6 +26,7 @@ DEFAULT RobusHAL ARDUINO PIN CONFIGURATION | 7 | D7 | PTPB | +------------+------------------+---------------+ */ +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit #define USE_TX_IT diff --git a/network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h b/network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h index 47b534b81..6cc956272 100644 --- a/network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h +++ b/network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h @@ -12,6 +12,7 @@ #include "samd21.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit #define USE_TX_IT diff --git a/network/robus/HAL/ESP32/robus_hal_config.h b/network/robus/HAL/ESP32/robus_hal_config.h index 5bac7059d..d4db4a835 100644 --- a/network/robus/HAL/ESP32/robus_hal_config.h +++ b/network/robus/HAL/ESP32/robus_hal_config.h @@ -14,7 +14,8 @@ #include "esp_attr.h" #include -#define DISABLE 0x00 +#define _CRITICAL IRAM_ATTR +#define DISABLE 0x00 #ifndef MCUFREQ #define MCUFREQ 80000000 // MCU frequence diff --git a/network/robus/HAL/NATIVE/robus_hal_config.h b/network/robus/HAL/NATIVE/robus_hal_config.h index 0a5ebc2db..9e5394e34 100644 --- a/network/robus/HAL/NATIVE/robus_hal_config.h +++ b/network/robus/HAL/NATIVE/robus_hal_config.h @@ -13,6 +13,7 @@ // STUB Value for x86 stub only #define X86_STUB 0x00 +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT diff --git a/network/robus/HAL/STM32F0/robus_hal_config.h b/network/robus/HAL/STM32F0/robus_hal_config.h index 8b3566dbe..b922a0e12 100644 --- a/network/robus/HAL/STM32F0/robus_hal_config.h +++ b/network/robus/HAL/STM32F0/robus_hal_config.h @@ -12,6 +12,7 @@ #include "stm32f0xx_hal.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT @@ -152,4 +153,4 @@ #define LUOS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() #endif -#endif /* _RobusHAL_CONFIG_H_ */ \ No newline at end of file +#endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus/HAL/STM32F4/robus_hal_config.h b/network/robus/HAL/STM32F4/robus_hal_config.h index e11fc9917..86e44f46e 100644 --- a/network/robus/HAL/STM32F4/robus_hal_config.h +++ b/network/robus/HAL/STM32F4/robus_hal_config.h @@ -12,6 +12,7 @@ #include "stm32f4xx_hal.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT @@ -154,4 +155,4 @@ #ifndef LUOS_TIMER_IRQHANDLER #define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() #endif -#endif /* _RobusHAL_CONFIG_H_ */ \ No newline at end of file +#endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus/HAL/STM32G4/robus_hal_config.h b/network/robus/HAL/STM32G4/robus_hal_config.h index 4b2e84a4a..74277b865 100644 --- a/network/robus/HAL/STM32G4/robus_hal_config.h +++ b/network/robus/HAL/STM32G4/robus_hal_config.h @@ -12,6 +12,7 @@ #include "stm32g4xx_hal.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT diff --git a/network/robus/HAL/STM32L0/robus_hal_config.h b/network/robus/HAL/STM32L0/robus_hal_config.h index fe1c3cb5e..193d90d52 100644 --- a/network/robus/HAL/STM32L0/robus_hal_config.h +++ b/network/robus/HAL/STM32L0/robus_hal_config.h @@ -12,6 +12,7 @@ #include "stm32l0xx_hal.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT @@ -152,4 +153,4 @@ #define LUOS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() #endif -#endif /* _RobusHAL_CONFIG_H_ */ \ No newline at end of file +#endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus/HAL/STM32L4/robus_hal_config.h b/network/robus/HAL/STM32L4/robus_hal_config.h index e26ca9c86..f9d0f992b 100644 --- a/network/robus/HAL/STM32L4/robus_hal_config.h +++ b/network/robus/HAL/STM32L4/robus_hal_config.h @@ -12,6 +12,7 @@ #include "stm32l4xx_hal.h" +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT diff --git a/network/robus/HAL/STUB/robus_hal_config.h b/network/robus/HAL/STUB/robus_hal_config.h index 0a5ebc2db..9e5394e34 100644 --- a/network/robus/HAL/STUB/robus_hal_config.h +++ b/network/robus/HAL/STUB/robus_hal_config.h @@ -13,6 +13,7 @@ // STUB Value for x86 stub only #define X86_STUB 0x00 +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT diff --git a/network/robus/HAL/template/robus_hal_config.h b/network/robus/HAL/template/robus_hal_config.h index a3964f136..76046d924 100644 --- a/network/robus/HAL/template/robus_hal_config.h +++ b/network/robus/HAL/template/robus_hal_config.h @@ -12,6 +12,7 @@ // include main sdk files relative to your MCU family +#define _CRITICAL #define DISABLE 0x00 // If your MCU do not Have DMA for tx transmit define USE_TX_IT diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index bfe7bb32c..5cc499685 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -9,8 +9,6 @@ #include #include "luos_phy.h" -#include "struct_io.h" -#include "luos_io.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 2db25fb2e..2b4e2850e 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -16,8 +16,6 @@ void Robus_Init(void); void Robus_Loop(void); -error_return_t Robus_SetTxTask(service_t *service, msg_t *msg); - void Robus_SaveNodeID(uint16_t nodeid); void Robus_ResetNodeID(void); bool Robus_Busy(void); diff --git a/network/robus/inc/transmission.h b/network/robus/inc/transmission.h index 82c44bf70..df1cd3f3b 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus/inc/transmission.h @@ -7,8 +7,9 @@ #ifndef _TRANSMISSION_H_ #define _TRANSMISSION_H_ -#include "struct_io.h" #include +#include "luos_phy.h" +#include "robus_config.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -23,10 +24,26 @@ typedef enum typedef struct { volatile uint8_t lock; // Transmit lock state - uint8_t *data; // data to compare for collision detection - volatile transmitStatus_t status; // data to compare for collision detection + const uint8_t *data; // data to compare for collision detection + volatile transmitStatus_t status; // status of the transmission volatile uint8_t collision; // true is a collision occure during this transmission. } TxCom_t; + +typedef struct __attribute__((__packed__)) +{ + union + { + struct __attribute__((__packed__)) + { + time_luos_t timestamp; + uint16_t timestamped_crc; + }; // This form is used if there is a timestamp in the message. + uint16_t crc; // This form is used if there is no timestamp in the message. + uint8_t unmaped[sizeof(time_luos_t) + CRC_SIZE]; // This form is used to access the last part to transmit as an array of bytes. + }; + uint16_t size; +} robus_encaps_t; + /******************************************************************************* * Variables ******************************************************************************/ @@ -35,7 +52,7 @@ typedef struct * Function ******************************************************************************/ void Transmit_Init(void); -uint16_t ll_crc_compute(uint8_t *, uint16_t, uint16_t); +uint16_t ll_crc_compute(const uint8_t *data, uint16_t size, uint16_t crc_seed); void Transmit_SendAck(void); void Transmit_Process(void); void Transmit_End(void); diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index 8298ba687..d5b24e27a 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -44,8 +44,6 @@ #include #include "reception.h" #include "robus_hal.h" -#include "luos_hal.h" -#include "luos_utils.h" #include "robus.h" #include "context.h" /******************************************************************************* @@ -70,7 +68,6 @@ uint16_t crc_val = 0; // CRC value /******************************************************************************* * Function ******************************************************************************/ -static inline bool Recep_IsAckNeeded(luos_phy_t *phy_robus); static inline bool Recep_RobusShouldDrop(header_t *header); /****************************************************************************** * @brief Reception init. @@ -142,7 +139,7 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) // We complete the header reception, we need to compute all the needed values. // Compute message header size, keep, ... the result will be available in phy_robus->rx_size, ... - Phy_Computeheader(phy_robus); + Phy_ComputeHeader(phy_robus); } break; @@ -179,7 +176,7 @@ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) { // Message is OK // Check if we need to send an ack - if (Recep_IsAckNeeded(phy_robus)) + if ((phy_robus->rx_ack == true) && (phy_robus->rx_keep == true)) { // Send an Ack Transmit_SendAck(); @@ -190,7 +187,7 @@ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) else { ctx.rx.status.rx_error = true; - if (Recep_IsAckNeeded(phy_robus)) + if ((phy_robus->rx_ack == true) && (phy_robus->rx_keep == true)) { Transmit_SendAck(); } @@ -226,7 +223,7 @@ _CRITICAL void Recep_GetCollision(luos_phy_t *phy_robus, volatile uint8_t *data) // Save the received data into the allocator to be able to continue the reception for (uint8_t i = 0; i < data_count - 1; i++) { - Recep_GetHeader(phy_robus, &ctx.tx.data[i]); + Recep_GetHeader(phy_robus, (volatile uint8_t *)&ctx.tx.data[i]); } Recep_GetHeader(phy_robus, data); // Switch to get header. @@ -344,21 +341,3 @@ _CRITICAL static inline bool Recep_RobusShouldDrop(header_t *header) } return false; } - -/****************************************************************************** - * @brief Check if we need to send an ack - * @param None - * @return true or false - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline bool Recep_IsAckNeeded(luos_phy_t *phy_robus) -{ - header_t *header = (header_t *)(phy_robus->rx_buffer_base); - // Check the mode of the message received - if (((header->target_mode == SERVICEIDACK) || (header->target_mode == NODEIDACK)) && (phy_robus->rx_keep == true)) - { - // If the message is a serviceidack or nodeidack and we keep it we need to send an ack - return true; - } - return false; -} diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 6a313d442..44ff4edc7 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -4,24 +4,19 @@ * @author Luos * @version 0.0.0 ******************************************************************************/ -#include - #include #include +#include "robus.h" #include "transmission.h" #include "reception.h" #include "port_manager.h" #include "context.h" #include "robus_hal.h" -#include "luos_hal.h" -#include "luos_utils.h" - -#include "msg_alloc.h" -#include "luos_engine.h" -#include "filter.h" +#include "robus_config.h" /******************************************************************************* * Definitions ******************************************************************************/ +static void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); /******************************************************************************* * Variables @@ -29,6 +24,7 @@ // Creation of the robus context. This variable is used in all files of this lib. volatile context_t ctx; luos_phy_t *phy_robus; +robus_encaps_t encaps[MAX_MSG_NB]; // Store all the CRC for each msg to transmit. /******************************************************************************* * Function @@ -51,7 +47,7 @@ void Robus_Init(void) Transmit_Init(); // Instantiate the phy struct - phy_robus = Phy_Create(); + phy_robus = Phy_Create(Robus_MsgHandler); LUOS_ASSERT(phy_robus); // Init reception @@ -69,72 +65,32 @@ void Robus_Loop(void) } /****************************************************************************** - * @brief Formalize message Set tx task and send - * @param service to send - * @param msg to send - * @return error_return_t + * @brief Robus message handler + * @param phy_ptr + * @param job + * @return None ******************************************************************************/ -error_return_t Robus_SetTxTask(service_t *service, msg_t *msg) +void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) { - error_return_t error = SUCCEED; - uint8_t ack = 0; - uint16_t data_size = 0; - uint16_t crc_val = 0xFFFF; - // *************************************************** - // Don't send luos messages if network is down - // *************************************************** - if ((msg->header.cmd >= LUOS_LAST_RESERVED_CMD) && (Node_GetState() != DETECTION_OK)) - { - return PROHIBITED; - } - - // Compute the full message size based on the header size info. - if (msg->header.size > MAX_DATA_MSG_SIZE) - { - data_size = MAX_DATA_MSG_SIZE; - } - else - { - data_size = msg->header.size; - } - - // Check the localhost situation - luos_localhost_t localhost = Filter_GetLocalhost(&msg->header); - // Add the CRC to the total size of the message - uint16_t full_size = sizeof(header_t) + data_size + CRC_SIZE; + static uint8_t encaps_index = 0; + // Luos ask Robus to send a message - uint16_t crc_max_index = full_size; + // Compute the CRC and create the encapsulation context + encaps[encaps_index].crc = ll_crc_compute(job->data_pt, job->size, 0xFFFF); + encaps[encaps_index].size = CRC_SIZE; - if (Luos_IsMsgTimstamped(msg) == true) - { - full_size += sizeof(time_luos_t); - } - // Compute the CRC - crc_val = ll_crc_compute(&msg->stream[0], crc_max_index - CRC_SIZE, 0xFFFF); + // Save the precomputed encapsulation in the job + job->phy_data = (void *)&encaps[encaps_index]; - // Check if ACK needed - if (((msg->header.target_mode == SERVICEIDACK) || (msg->header.target_mode == NODEIDACK)) && (localhost != EXTERNALHOST)) + // Get the next encapsulation index for the next job + encaps_index++; + if (encaps_index >= MAX_MSG_NB) { - // This is a localhost message and we need to transmit a ack. Add it at the end of the data to transmit - ack = ctx.rx.status.unmap; - full_size++; + encaps_index = 0; } - // ********** Allocate the message ******************** - if (MsgAlloc_SetTxTask(service, (uint8_t *)msg->stream, crc_val, full_size, localhost, ack) == FAILED) - { - error = FAILED; - } -// **********Try to send the message******************** -#ifndef VERBOSE_LOCALHOST - if (localhost != LOCALHOST) - { -#endif - Transmit_Process(); -#ifndef VERBOSE_LOCALHOST - } -#endif - return error; + // Then, try to directly transmit... Who knows perhaps the line is free + Transmit_Process(); } /****************************************************************************** diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index fb326df39..45fefe952 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -41,17 +41,12 @@ * ************************************************************************************************************************************/ -#include - -#include "robus_hal.h" -#include "luos_hal.h" #include #include +#include "transmission.h" +#include "robus_hal.h" #include "context.h" #include "reception.h" -#include "msg_alloc.h" -#include "_timestamp.h" -#include "luos_engine.h" /******************************************************************************* * Definitions @@ -61,12 +56,12 @@ * Variables ******************************************************************************/ volatile uint8_t nbrRetry = 0; +robus_encaps_t *end = NULL; /******************************************************************************* * Function ******************************************************************************/ _CRITICAL static uint8_t Transmit_GetLockStatus(void); - /****************************************************************************** * @brief Transmit_Init * @param None @@ -104,7 +99,7 @@ _CRITICAL void Transmit_SendAck(void) * @param crc initialization value * @return crc ******************************************************************************/ -uint16_t ll_crc_compute(uint8_t *data, uint16_t size, uint16_t crc_seed) +uint16_t ll_crc_compute(const uint8_t *data, uint16_t size, uint16_t crc_seed) { uint16_t crc_val = crc_seed; for (uint16_t i = 0; i < size; i++) @@ -129,35 +124,33 @@ uint16_t ll_crc_compute(uint8_t *data, uint16_t size, uint16_t crc_seed) ******************************************************************************/ _CRITICAL void Transmit_Process() { - uint8_t *data = 0; - uint16_t size; - service_t *service_pt; - if ((MsgAlloc_GetTxTask(&service_pt, &data, &size) == SUCCEED) && (Transmit_GetLockStatus() == false)) + static uint16_t crc_val = 0; + luos_phy_t *robus_phy = Robus_GetPhy(); + phy_job_t *job = Phy_GetJob(robus_phy); + static uint8_t tx_data[sizeof(msg_t) + sizeof(robus_encaps_t)]; + // Get the message encapsulation + if ((job != NULL) && (Transmit_GetLockStatus() == false)) { + robus_encaps_t *encaps = (robus_encaps_t *)job->phy_data; // We have something to send // Check if we already try to send it multiple times and save it on stats if it is - if ((service_pt->statistics.max_retry < nbrRetry) || (nbrRetry >= NBR_RETRY)) + if (nbrRetry >= NBR_RETRY) { - service_pt->statistics.max_retry = nbrRetry; - if (nbrRetry >= NBR_RETRY) + // We failed to transmit this message. We can't allow it, there is an issue on this target. + Phy_DeadTargetSpotted(robus_phy, job); + nbrRetry = 0; + ctx.tx.collision = false; + // Try to get a new job + job = Phy_GetJob(robus_phy); + if (job == NULL) { - // We failed to transmit this message. We can't allow it, there is a issue on this target. - service_pt->dead_service_spotted = (uint16_t)(((msg_t *)data)->header.target); - nbrRetry = 0; - ctx.tx.collision = false; - // Remove all transmist messages of this specific target - MsgAlloc_PullServiceFromTxTask((uint16_t)(((msg_t *)data)->header.target)); - // Try to get a tx_task for another service - if (MsgAlloc_GetTxTask(&service_pt, &data, &size) == FAILED) - { - // Nothing to transmit anymore, just exit. - return; - } + // Nothing to transmit anymore, just exit. + return; } } - // Check if we will need an ACK for this message and compute the transmit status we will need to manage it + // Check if we will need an ACK for this message and compute the transmit status we will need to manage transmitStatus_t initial_transmit_status = TX_OK; - if (((((msg_t *)data)->header.target_mode == SERVICEIDACK) || (((msg_t *)data)->header.target_mode == NODEIDACK))) + if (job->ack == true) { // We will need to validate the good reception with a ack. // Switch the tx status as TX_NOK allowing to detect a default at the next Timeout if no ACK have been received. @@ -167,7 +160,7 @@ _CRITICAL void Transmit_Process() if (Transmit_GetLockStatus() == false) { // We are free to transmit - // We will prepare to transmit something enable tx status with precomputed value if we need ACK + // We will prepare to transmit something enable tx status with precomputed value of the initial_transmit_status ctx.tx.status = initial_transmit_status; // Lock the bus ctx.tx.lock = true; @@ -176,35 +169,38 @@ _CRITICAL void Transmit_Process() LuosHAL_SetIrqState(false); ctx.rx.callback = Recep_GetCollision; LuosHAL_SetIrqState(true); - ctx.tx.data = data; + ctx.tx.data = tx_data; + + if (!nbrRetry) + { + // This is the first time we try to send this message, we need to backup the original crc value and the job data to the TX_data buffer + crc_val = encaps->crc; + memcpy(tx_data, job->data_pt, job->size); + } // Put timestamping on data here - if (Luos_IsMsgTimstamped((msg_t *)data) && (!nbrRetry)) + if (job->timestamp) { - // Convert date to latency - Timestamp_ConvertToLatency((msg_t *)data); - // Complete the CRC computation with the latency - msg_t *msg = (msg_t *)data; - uint16_t full_size = sizeof(header_t) + msg->header.size + sizeof(time_luos_t) + CRC_SIZE; - uint16_t index_without_timestamp = sizeof(header_t) + msg->header.size; - uint16_t crc_seed = 0; - memcpy(&crc_seed, &msg->stream[full_size - CRC_SIZE], CRC_SIZE); - uint16_t crc_val = ll_crc_compute(&msg->stream[index_without_timestamp], full_size - CRC_SIZE - index_without_timestamp, crc_seed); + // Convert date to a sendable timestamp and put it on the encapsulation + encaps->timestamp = Phy_ComputeTimestamp(job); - // copy crc in message - memcpy(&msg->stream[full_size - CRC_SIZE], &crc_val, CRC_SIZE); + encaps->timestamped_crc = ll_crc_compute(encaps->unmaped, sizeof(time_luos_t), crc_val); + encaps->size = sizeof(time_luos_t) + CRC_SIZE; } // Transmit data - if (MsgAlloc_TxAllComplete() == FAILED) + if (Phy_GetJobNbr(robus_phy) != 0) { - // There is no more task to send. the network have been reseted - RobusHAL_ComTransmit(data, size); + // Add the end of the message in the end of the buffer + memcpy(&tx_data[job->size], encaps->unmaped, encaps->size); + // We still have something to send, no reset occured + RobusHAL_ComTransmit(tx_data, (job->size + encaps->size)); } } } } + /****************************************************************************** * @brief Send ID to others service on network * @param None @@ -219,6 +215,7 @@ _CRITICAL static uint8_t Transmit_GetLockStatus(void) } return ctx.tx.lock; } + /****************************************************************************** * @brief finish transmit and try to launch a new one * @param None @@ -229,19 +226,21 @@ _CRITICAL void Transmit_End(void) { if (ctx.tx.status == TX_OK) { - // A tx_task have been sucessfully transmitted + // A job have been sucessfully transmitted nbrRetry = 0; ctx.tx.collision = false; ctx.tx.status = TX_DISABLE; - // Remove the task - MsgAlloc_PullMsgFromTxTask(); + // Remove the job + luos_phy_t *robus_phy = Robus_GetPhy(); + phy_job_t *job = Phy_GetJob(robus_phy); + Phy_RmJob(robus_phy, job); } else if (ctx.tx.status == TX_NOK) { // A tx_task failed nbrRetry++; // compute a delay before retry - RobusHAL_ResetTimeout(20 * nbrRetry * (Node_Get()->node_id + 1)); + RobusHAL_ResetTimeout(20 * nbrRetry * (Phy_GetNodeId() + 1)); // Lock the trasmission to be sure no one can send something from this node. ctx.tx.lock = true; ctx.tx.status = TX_DISABLE; @@ -250,4 +249,4 @@ _CRITICAL void Transmit_End(void) ctx.tx.lock = false; // Try to send something if we need to. Transmit_Process(); -} \ No newline at end of file +} diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index aa895d96d..54cf5eba6 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -16,9 +16,9 @@ default_scenario_t default_sc; * Function ******************************************************************************/ static void Detection(service_t *service); -static void App_1_MsgHandler(service_t *service, msg_t *msg); -static void App_2_MsgHandler(service_t *service, msg_t *msg); -static void App_3_MsgHandler(service_t *service, msg_t *msg); +static void App_1_MsgHandler(service_t *service, const msg_t *msg); +static void App_2_MsgHandler(service_t *service, const msg_t *msg); +static void App_3_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief Init scenario @@ -85,7 +85,7 @@ static void Detection(service_t *service) * @param Msg receive * @return None ******************************************************************************/ -static void App_1_MsgHandler(service_t *service, msg_t *msg) +static void App_1_MsgHandler(service_t *service, const msg_t *msg) { memcpy(&default_sc.App_1.last_rx_msg, msg, sizeof(msg_t)); } @@ -96,7 +96,7 @@ static void App_1_MsgHandler(service_t *service, msg_t *msg) * @param Msg receive * @return None ******************************************************************************/ -static void App_2_MsgHandler(service_t *service, msg_t *msg) +static void App_2_MsgHandler(service_t *service, const msg_t *msg) { memcpy(&default_sc.App_2.last_rx_msg, msg, sizeof(msg_t)); } @@ -107,7 +107,7 @@ static void App_2_MsgHandler(service_t *service, msg_t *msg) * @param Msg receive * @return None ******************************************************************************/ -static void App_3_MsgHandler(service_t *service, msg_t *msg) +static void App_3_MsgHandler(service_t *service, const msg_t *msg) { memcpy(&default_sc.App_3.last_rx_msg, msg, sizeof(msg_t)); } diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index 7f8d759dd..0acbe0b55 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -9,7 +9,6 @@ #include "robus_hal.h" #include "luos_engine.h" #include "luos_utils.h" -#include "struct_io.h" #include /******************************************************************************* @@ -36,6 +35,8 @@ extern bool try_state; #define CATCH else +#define END_TRY try_state = false + /******************************************************************************* * Function ******************************************************************************/ diff --git a/test/example_build.py b/test/example_build.py index 4cb1d20f6..80405d4c2 100755 --- a/test/example_build.py +++ b/test/example_build.py @@ -48,7 +48,6 @@ def compile_example(cmd, target, example, clean): if clean: subprocess.call(cmd + " --target clean", shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')) - print("done") if subprocess.call(cmd, shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')): with compiled_example.get_lock(): compiled_example.value += 1 diff --git a/test/test_luos/main.c b/test/test_luos/main.c index d6b56a3f5..8d793fb14 100644 --- a/test/test_luos/main.c +++ b/test/test_luos/main.c @@ -158,8 +158,12 @@ void unittest_Luos_ReceiveData() Init_Context(); msg_t msg; uint32_t bin_data[64] = {0xDEADBEEF}; - NEW_STEP("Verify if we return an error"); - TEST_ASSERT_EQUAL(Luos_ReceiveData((service_t *)10, &msg, bin_data), -1); + TRY + { + NEW_STEP("Verify if we Assert"); + Luos_ReceiveData((service_t *)10, &msg, bin_data); + } + TEST_ASSERT_TRUE(IS_ASSERT()); } NEW_TEST_CASE("Test the regular usage"); diff --git a/test/test_msg_alloc/main.c b/test/test_msg_alloc/main.c index f3762bf3f..035763255 100644 --- a/test/test_msg_alloc/main.c +++ b/test/test_msg_alloc/main.c @@ -7,42 +7,18 @@ int main(int argc, char **argv) UNITY_BEGIN(); // Static functions - UNIT_TEST_RUN(unittest_DoWeHaveSpace); - UNIT_TEST_RUN(unittest_CheckMsgSpace); + + UNIT_TEST_RUN(unittest_SlotPack); + UNIT_TEST_RUN(unittest_GetOldestMsg); UNIT_TEST_RUN(unittest_BufferAvailableSpaceComputation); - UNIT_TEST_RUN(unittest_OldestMsgCandidate); - UNIT_TEST_RUN(unittest_ClearMsgTask); - UNIT_TEST_RUN(unittest_ClearLuosTask); - UNIT_TEST_RUN(unittest_ClearMsgSpace); + UNIT_TEST_RUN(unittest_DoWeHaveSpaceUntilBufferEnd); + UNIT_TEST_RUN(unittest_CheckMsgSpace); // Generic functions - UNIT_TEST_RUN(unittest_MsgAlloc_loop); + UNIT_TEST_RUN(unittest_MsgAlloc_Loop); UNIT_TEST_RUN(unittest_MsgAlloc_Alloc); UNIT_TEST_RUN(unittest_MsgAlloc_IsEmpty); - UNIT_TEST_RUN(unittest_MsgAlloc_UsedMsgEnd); - UNIT_TEST_RUN(unittest_MsgAlloc_GetLuosTaskSourceId); - UNIT_TEST_RUN(unittest_MsgAlloc_GetLuosTaskCmd); - UNIT_TEST_RUN(unittest_MsgAlloc_GetLuosTaskSize); - UNIT_TEST_RUN(unittest_MsgAlloc_TxAllComplete); - UNIT_TEST_RUN(unittest_MsgAlloc_PullMsgToInterpret); - UNIT_TEST_RUN(unittest_MsgAlloc_LuosTaskAlloc); - UNIT_TEST_RUN(unittest_MsgAlloc_LuosTasksNbr); - UNIT_TEST_RUN(unittest_MsgAlloc_PullMsg); - UNIT_TEST_RUN(unittest_MsgAlloc_PullMsgFromLuosTask); - UNIT_TEST_RUN(unittest_MsgAlloc_LookAtLuosTask); - UNIT_TEST_RUN(unittest_MsgAlloc_ClearMsgFromLuosTasks); - UNIT_TEST_RUN(unittest_MsgAlloc_PullMsgFromTxTask); - UNIT_TEST_RUN(unittest_MsgAlloc_PullServiceFromTxTask); - UNIT_TEST_RUN(unittest_MsgAlloc_GetTxTask); + UNIT_TEST_RUN(unittest_MsgAlloc_Free); - // Tx functions - UNIT_TEST_RUN(unittest_SetTxTask_buffer_full); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_too_long); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_overflow); - UNIT_TEST_RUN(unittest_SetTxTask_Tx_fit); - UNIT_TEST_RUN(unittest_SetTxTask_Task_already_exists); - UNIT_TEST_RUN(unittest_SetTxTask_ACK); - UNIT_TEST_RUN(unittest_SetTxTask_internal_localhost); - UNIT_TEST_RUN(unittest_SetTxTask_multihost); UNITY_END(); } diff --git a/test/test_msg_alloc/main.h b/test/test_msg_alloc/main.h index def9a9541..007eccbbf 100644 --- a/test/test_msg_alloc/main.h +++ b/test/test_msg_alloc/main.h @@ -2,42 +2,16 @@ #define MAIN_H // Static functions -void unittest_DoWeHaveSpace(void); -void unittest_CheckMsgSpace(void); +void unittest_SlotPack(void); +void unittest_GetOldestMsg(void); void unittest_BufferAvailableSpaceComputation(void); -void unittest_OldestMsgCandidate(void); -void unittest_ClearMsgTask(void); -void unittest_ClearLuosTask(void); -void unittest_ClearMsgSpace(void); +void unittest_DoWeHaveSpaceUntilBufferEnd(void); +void unittest_CheckMsgSpace(void); -// Generic functions -void unittest_MsgAlloc_loop(void); +// public functions +void unittest_MsgAlloc_Loop(void); void unittest_MsgAlloc_Alloc(void); void unittest_MsgAlloc_IsEmpty(void); -void unittest_MsgAlloc_UsedMsgEnd(void); -void unittest_MsgAlloc_GetLuosTaskSourceId(void); -void unittest_MsgAlloc_GetLuosTaskCmd(void); -void unittest_MsgAlloc_GetLuosTaskSize(void); -void unittest_MsgAlloc_TxAllComplete(void); -void unittest_MsgAlloc_PullMsgToInterpret(void); -void unittest_MsgAlloc_LuosTaskAlloc(void); -void unittest_MsgAlloc_LuosTasksNbr(void); -void unittest_MsgAlloc_PullMsg(void); -void unittest_MsgAlloc_PullMsgFromLuosTask(void); -void unittest_MsgAlloc_LookAtLuosTask(void); -void unittest_MsgAlloc_ClearMsgFromLuosTasks(void); -void unittest_MsgAlloc_PullMsgFromTxTask(void); -void unittest_MsgAlloc_PullServiceFromTxTask(void); -void unittest_MsgAlloc_GetTxTask(void); - -// Tx functions -void unittest_SetTxTask_buffer_full(void); -void unittest_SetTxTask_Tx_too_long(void); -void unittest_SetTxTask_Tx_overflow(void); -void unittest_SetTxTask_Tx_fit(void); -void unittest_SetTxTask_Task_already_exists(void); -void unittest_SetTxTask_ACK(void); -void unittest_SetTxTask_internal_localhost(void); -void unittest_SetTxTask_multihost(void); +void unittest_MsgAlloc_Free(void); -#endif // MAIN_H \ No newline at end of file +#endif // MAIN_H diff --git a/test/test_msg_alloc/unit_test_mem_alloc.c b/test/test_msg_alloc/unit_test_mem_alloc.c new file mode 100644 index 000000000..e9ac151f9 --- /dev/null +++ b/test/test_msg_alloc/unit_test_mem_alloc.c @@ -0,0 +1,770 @@ +#include "main.h" +#include "unit_test.h" +#include "../src/msg_alloc.c" + +/******************************************************************************* + * Static Function + ******************************************************************************/ + +void unittest_SlotPack(void) +{ + uint8_t data = 0; + // This funciton should reorganize the buffer to pack the messages + // Create a already organized buffer with a random data + + NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); + { + alloc_slot_index = MAX_MSG_NB + 1; + TRY + { + MsgAlloc_SlotPack(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if an already organized buffer is not modified"); + { + alloc_slots[0].data = &data; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = &data; + alloc_slots[4].data = 0; + alloc_slot_index = 4; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } + + NEW_TEST_CASE("Check if an unorganized buffer is organized"); + { + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[7].data = 0; + alloc_slot_index = 8; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(0, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(3, alloc_slot_index); + } + + NEW_TEST_CASE("Check how it's managing the buffer to it's limits"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[MAX_MSG_NB - 1].data = &data; + alloc_slot_index = MAX_MSG_NB; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } +} + +void unittest_GetOldestMsg(void) +{ + NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); + { + alloc_slot_index = MAX_MSG_NB + 1; + TRY + { + MsgAlloc_GetOldestMsg(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check the behavior if we dont have any message"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); + } + + NEW_TEST_CASE("Check the behavior if we have a message in the first slot"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + + NEW_TEST_CASE("Check the behavior if we have a message in another place"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[3].data = (uint8_t *)0x1; + alloc_slot_index = 4; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } +} + +void unittest_BufferAvailableSpaceComputation(void) +{ + // This computation is based on the computed oldest message and the data ptr + NEW_TEST_CASE("Check if we assert when data_ptr is out of the buffer"); + { + alloc_slots[0].data = 0; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when olest_msg is out of the buffer"); + { + + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + data_ptr = &msg_buffer[MSG_BUFFER_SIZE]; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + } + + NEW_TEST_CASE("Check the result if we don't have any messages"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); + } + + NEW_TEST_CASE("Check the result in a situation we don't have to loop around the buffer end"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } + + NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); + } + + NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end and data_ptr is set to the begin of the buffer"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } +} + +void unittest_DoWeHaveSpaceUntilBufferEnd(void) +{ + // In this specific function we may have a pointer after the end of the buffer but never before + + NEW_TEST_CASE("Check if we assert when to pointer is before the buffer"); + { + TRY + { + MsgAlloc_DoWeHaveSpaceUntilBufferEnd(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if it return SUCCEED when the pointer is in the buffer"); + { + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[0])); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + + NEW_TEST_CASE("Check if it return FAILED when the pointer is after the buffer"); + { + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE])); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1])); + } +} + +void unittest_CheckMsgSpace(void) +{ + NEW_TEST_CASE("Check if we assert when from pointer is after the to pointer or at the same place"); + { + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[1], (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + } + + NEW_TEST_CASE("Check if we assert when one of the pointer is out of the buffer"); + { + TRY + { + MsgAlloc_CheckMsgSpace(0, (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check the result if we don't have any message yet"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is before the old one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is after the old one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is in the middle of the old one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is at the end of the old one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is at the beginning of the old one"); + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } +} + +/******************************************************************************* + * Public Function + ******************************************************************************/ + +void unittest_MsgAlloc_Loop() +{ + NEW_TEST_CASE("Verify buffer occupation rate stat computing"); + MsgAlloc_Init(NULL); + { + // data_ptr is incremented : buffer occupation computing is verified + // + // msg_buffer + // +-------------------------------------------------------------+ + // |-------------------------------------------------------------| + // ^-------------------------^---------------------^-------------+ + // | | | + // data_ptr data_ptr data_ptr + // (0% occupation) (X% occupation) (etc...) + // + + // Init variables + //--------------- + uint32_t expected_buffer_occupation_ratio; + memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, + .engine_msg_stack_ratio = 0, + .tx_msg_stack_ratio = 0, + .buffer_occupation_ratio = 0, + .msg_drop_number = 0}; + + memset(&memory_stats, 0, sizeof(memory_stats)); + MsgAlloc_Init(&memory_stats); + data_ptr = &msg_buffer[0]; + + // Call function and Verify + //--------------------------- + // Empty buffer + expected_buffer_occupation_ratio = 0; + MsgAlloc_Loop(); + + NEW_STEP("Check that the buffer is empty"); + TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); + + // Buffer occupation from 0 -> 100% + NEW_STEP("Check buffer is full in all cases"); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) + { + data_ptr = &msg_buffer[i]; + expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); + + MsgAlloc_Loop(); + + TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); + } + } +} + +void unittest_MsgAlloc_Alloc() +{ + + NEW_TEST_CASE("Check if we assert when we try to allocate a message with no size and/or no phy"); + { + TRY + { + MsgAlloc_Alloc(0, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Alloc(1, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Alloc(0, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when we try to allocate a message with a size > MSG_BUFFER_SIZE"); + { + TRY + { + MsgAlloc_Alloc(MSG_BUFFER_SIZE + 1, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check an allocation with no message already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with one message already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[10]; + TEST_ASSERT_EQUAL(&msg_buffer[10], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with two messages already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 2; + data_ptr = &msg_buffer[20]; + TEST_ASSERT_EQUAL(&msg_buffer[20], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation overflowing the buffer end"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need before the end of the buffer"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need at the begining of the buffer"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check alignement correction"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[1]; + TEST_ASSERT_EQUAL(&msg_buffer[2], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message at the limit of the space we have"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[2]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(11, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_IsEmpty() +{ + NEW_TEST_CASE("Check if we assert when we have more slot than we can handle"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = MSG_BUFFER_SIZE + 1; + MsgAlloc_IsEmpty(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we return succed when we have no message"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check if we return failed when we have a message"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_Free(void) +{ + NEW_TEST_CASE("Check if we assert when we pass a null pointer"); + { + TRY + { + MsgAlloc_Free(0, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when we pass a philter that is not in the list"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x01; + alloc_slot_index = 1; + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we don't assert when there is no message in the list . (This can happen in case of reset)"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check a normal free situation with the last concerned phy id"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x01; + alloc_slot_index = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_slots[0].data); + TEST_ASSERT_EQUAL(0, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check a normal free situation with the multiple phy id"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x03; + alloc_slot_index = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); + TEST_ASSERT_EQUAL(0x02, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_slots[0].data); + TEST_ASSERT_EQUAL(0x00, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} diff --git a/test/test_msg_alloc/unit_test_mem_alloc_generic.c b/test/test_msg_alloc/unit_test_mem_alloc_generic.c deleted file mode 100644 index 7261480e9..000000000 --- a/test/test_msg_alloc/unit_test_mem_alloc_generic.c +++ /dev/null @@ -1,1395 +0,0 @@ -#include "main.h" -#include "unit_test.h" -#include "msg_alloc.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - service_t *service_pt; /*!< Pointer to the concerned service. */ -} luos_task_t; - -typedef struct -{ - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - service_t *service_pt; /*!< Pointer to the transmitting service. */ -} tx_task_t; - -/******************************************************************************* - * Variables - ******************************************************************************/ -extern memory_stats_t *mem_stat; -extern volatile bool reset_needed; -extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; -extern volatile uint8_t *data_ptr; -extern volatile msg_t *oldest_msg; -extern volatile msg_t *used_msg; -extern volatile msg_t *msg_tasks[MAX_MSG_NB]; -extern volatile uint16_t msg_tasks_stack_id; -extern volatile luos_task_t luos_tasks[MAX_MSG_NB]; -extern volatile uint16_t luos_tasks_stack_id; -extern volatile tx_task_t tx_tasks[MAX_MSG_NB]; -extern volatile uint16_t tx_tasks_stack_id; - -/******************************************************************************* - * Function - ******************************************************************************/ -void unittest_MsgAlloc_loop() -{ - NEW_TEST_CASE("Verify Tx & Rx message tasks stat computing"); - MsgAlloc_Init(NULL); - { - // tx_tasks_stack_id is incremented : buffer occupation computing is verified - // - // tx/rx buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------^---------------------^-------------+ - // | | | - // tx/rx_tasks_stack_id tx/rx_tasks_stack_id tx/rx_tasks_stack_id - // (0% occupation) (X% occupation) (etc...) - // - - // Init variables - //--------------- - uint16_t expected_stat; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - // Call function and Verify - //--------------------------- - // Tx and Rx stat ratio are incremented - for (msg_tasks_stack_id = 0; msg_tasks_stack_id <= MAX_MSG_NB / 2; msg_tasks_stack_id++) - { - tx_tasks_stack_id = msg_tasks_stack_id; - MsgAlloc_loop(); - expected_stat = (msg_tasks_stack_id * 100) / (MAX_MSG_NB); - NEW_STEP_IN_LOOP("Check Tx message stack ratio is correct", msg_tasks_stack_id); - TEST_ASSERT_TRUE(memory_stats.tx_msg_stack_ratio == expected_stat); - NEW_STEP_IN_LOOP("Check Rx message stack ratio is correct", msg_tasks_stack_id); - TEST_ASSERT_TRUE(memory_stats.rx_msg_stack_ratio == expected_stat); - } - // Tx and Rx stat ratio are not incremented - for (msg_tasks_stack_id = MAX_MSG_NB; msg_tasks_stack_id > MAX_MSG_NB / 2; msg_tasks_stack_id--) - { - tx_tasks_stack_id = msg_tasks_stack_id; - MsgAlloc_loop(); - NEW_STEP_IN_LOOP("Check Tx message stack ratio is not incremented", msg_tasks_stack_id); - TEST_ASSERT_TRUE(memory_stats.tx_msg_stack_ratio == 100); - NEW_STEP_IN_LOOP("Check Rx message stack ratio is not incremented", msg_tasks_stack_id); - TEST_ASSERT_TRUE(memory_stats.rx_msg_stack_ratio == 100); - } - } - - NEW_TEST_CASE("Verify buffer occupation rate stat computing"); - MsgAlloc_Init(NULL); - { - // data_ptr is incremented : buffer occupation computing is verified - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------^---------------------^-------------+ - // | | | - // data_ptr data_ptr data_ptr - // (0% occupation) (X% occupation) (etc...) - // - - // Init variables - //--------------- - uint32_t expected_buffer_occupation_ratio; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - data_ptr = &msg_buffer[0]; - - // Call function and Verify - //--------------------------- - // Empty buffer - expected_buffer_occupation_ratio = 0; - MsgAlloc_loop(); - - NEW_STEP("Check buffer is empty"); - TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); - - // Buffer occupation from 0 -> 100% - NEW_STEP("Check buffer is full in all cases"); - oldest_msg = (msg_t *)&msg_buffer[0]; - for (uint16_t i = sizeof(header_t); i < MSG_BUFFER_SIZE; i++) - { - data_ptr = &msg_buffer[0] + i; - expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); - - MsgAlloc_loop(); - - TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); - } - } -} - -void unittest_MsgAlloc_Alloc() {} - -#define COPY_LENGTH 128 -void unittest_MsgAlloc_IsEmpty() -{ - NEW_TEST_CASE("Is Empty"); - MsgAlloc_Init(NULL); - { - // - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------------------------------------------+ - // | - // data_ptr <= return SUCCED only if data_ptr is here (empty buffer) - // - - data_ptr = &msg_buffer[0]; - NEW_STEP("Check NO message has been received since initialization"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); - - NEW_STEP("Check message(s) has been received since initialization"); - for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) - { - data_ptr = &msg_buffer[i]; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); - } - } -} - -void unittest_MsgAlloc_UsedMsgEnd() -{ - NEW_TEST_CASE("Used Message End"); - MsgAlloc_Init(NULL); - { - used_msg = (msg_t *)&msg_buffer[0]; - MsgAlloc_UsedMsgEnd(); - - NEW_STEP("Check \"used message\" is reseted"); - TEST_ASSERT_NULL(used_msg); - } -} - -void unittest_MsgAlloc_PullMsgToInterpret() -{ - NEW_TEST_CASE("Case FAILED"); - MsgAlloc_Init(NULL); - { - // - // msg_tasks - // +---------+<--msg_tasks_stack_id = 0 ==> Assert - // | A 1 | - // |---------| - // | A 2 | - // |---------| - // | A 3 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - msg_t *returned_msg = NULL; - msg_tasks_stack_id = 0; - - NEW_STEP("Check function returns FAILED when \"message tasks stack id\" = 0 "); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_PullMsgToInterpret(&returned_msg)); - NEW_STEP("Check RETURNED MESSAGE is not filled"); - TEST_ASSERT_NULL(returned_msg); - } - - NEW_TEST_CASE("Case SUCCEED"); - MsgAlloc_Init(NULL); - { - // - // msg_tasks init state msg_tasks end state - // +---------+ +---------+ - // | Msg 1 | | Msg 2 |<--"returned_msg" points to 1st message of msg_tasks - // |---------| |---------| - // | Msg 2 | | Msg 3 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------|<--msg_tasks_stack_id - // | LAST | | 0 | - // +---------+<--msg_tasks_stack_id +---------+ - // - - msg_t *expected_message[MAX_MSG_NB]; - msg_t *returned_msg; - error_return_t result; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - expected_message[i] = (msg_t *)&msg_buffer[i]; - msg_tasks[i] = (msg_t *)&msg_buffer[i]; - } - - msg_tasks_stack_id = MAX_MSG_NB; - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - RESET_ASSERT(); - result = MsgAlloc_PullMsgToInterpret(&returned_msg); - NEW_STEP_IN_LOOP("Check NO assert has occured", i); - TEST_ASSERT_FALSE(IS_ASSERT()); - NEW_STEP_IN_LOOP("Check function returns SUCCEED", i); - TEST_ASSERT_EQUAL(SUCCEED, result); - NEW_STEP_IN_LOOP("Check function fills RETURNED MESSAGE pointer", i); - TEST_ASSERT_EQUAL(expected_message[i], returned_msg); - } - } -} - -void unittest_MsgAlloc_LuosTaskAlloc() -{ - NEW_TEST_CASE("No more space in luos_tasks"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks init state luos_tasks end state - // +---------+ +---------+ - // | D 1 | | D 2 |<--"D 1" is removed - // |---------| |---------| - // | D 2 | | D 3 | - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------| - // | Last | | 0 | - // +---------+<--luos_tasks_stack_id +---------+ - // - - luos_task_t expected_luos_task; - service_t service; - - // Init variables - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - luos_tasks_stack_id = MAX_MSG_NB; - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - luos_tasks[i].msg_pt = (msg_t *)&msg_buffer[i]; - } - luos_tasks[0].msg_pt = NULL; - - // Launch Test - MsgAlloc_LuosTaskAlloc(&service, (msg_t *)&msg_buffer[0]); - - // Verify - NEW_STEP("Check Luos stack occupation is 100\%"); - TEST_ASSERT_EQUAL(100, memory_stats.engine_msg_stack_ratio); - NEW_STEP("Check there is 1 dropped message"); - TEST_ASSERT_EQUAL(1, memory_stats.msg_drop_number); - NEW_STEP("Check Oldest Message is removed"); - TEST_ASSERT_EQUAL(&msg_buffer[1], luos_tasks[0].msg_pt); - } - - NEW_TEST_CASE("Allocation"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks init state luos_tasks end state - // - // +---------+<--luos_tasks_stack_id +---------+ - // | 0 | | D 1 | (msg_pt & service_pt are allocated) - // |---------| |---------| - // | 0 | | D 2 | (msg_pt & service_pt are allocated) - // |---------| |---------| - // | etc... | | etc... | - // |---------| |---------| - // | 0 | | Last | (msg_pt & service_pt are allocated) - // +---------+ luos_tasks_stack_id-->+---------+ - // - - msg_t *message; - service_t *service_concerned; - uint16_t expected_luos_tasks_stack_id; - uint8_t expected_mem_stat; - - // Init variables - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - // Init variables - luos_tasks_stack_id = i; - expected_luos_tasks_stack_id = i + 1; - expected_mem_stat = ((i + 1) * 100 / MAX_MSG_NB); - message = (msg_t *)&msg_buffer[0]; - service_concerned = (service_t *)&msg_buffer[0]; - - // Launch Test - MsgAlloc_LuosTaskAlloc(service_concerned, message); - - // Verify - NEW_STEP_IN_LOOP("Check message pointer is allocated", i); - TEST_ASSERT_EQUAL(message, luos_tasks[i].msg_pt); - NEW_STEP_IN_LOOP("Check service pointer is allocated", i); - TEST_ASSERT_EQUAL(service_concerned, luos_tasks[i].service_pt); - NEW_STEP_IN_LOOP("Check \"luos tasks stack id\" is updated", i); - TEST_ASSERT_EQUAL(expected_luos_tasks_stack_id, luos_tasks_stack_id); - NEW_STEP_IN_LOOP("Check \"oldest message\" points to first luos task", i); - TEST_ASSERT_EQUAL(luos_tasks[0].msg_pt, oldest_msg); - NEW_STEP_IN_LOOP("Check luos stack ratio computation", i); - TEST_ASSERT_EQUAL(expected_mem_stat, memory_stats.engine_msg_stack_ratio); - } - } -} - -void unittest_MsgAlloc_LuosTasksNbr(void) -{ - NEW_TEST_CASE("Verify getter for Luos Tasks number"); - MsgAlloc_Init(NULL); - { - // Init variables - //--------------- - luos_tasks_stack_id = 0; - - // Call function and Verify - //--------------------------- - for (uint8_t i = 0; i < MAX_MSG_NB; i++) - { - NEW_STEP_IN_LOOP("Check Luos task number", i); - MsgAlloc_LuosTasksNbr(); - TEST_ASSERT_EQUAL(luos_tasks_stack_id, i); - luos_tasks_stack_id++; - } - } -} - -void unittest_MsgAlloc_PullMsg() -{ - NEW_TEST_CASE("Case FAILED : no message for the service"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - msg_t *returned_message; - service_t *service = (service_t *)0xFFFF; - - // Init variables - luos_tasks_stack_id = MAX_MSG_NB - 1; - for (uintptr_t i = 0; i < MAX_MSG_NB; i++) - { - luos_tasks[i].service_pt = (service_t *)i; - } - - // Launch Test & Verify - NEW_STEP("Function returns FAILED when wanted service doesn't exists"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_PullMsg(service, &returned_message)); - } - - NEW_TEST_CASE("Case SUCCEED : return oldest message for the service"); - MsgAlloc_Init(NULL); - { - // - // Pull a message from a specific service (for example service is in task D3) - // luos_tasks_stack_id = 3 : function will search in messages D1, D2 & D3 - // - // - // msg_buffer msg_buffer after pull - // +------------------------+ +------------------------+ - // |------------------------| |------------------------| - // +--^---^---^-------------+ +--^---^---^-------------+ - // | | | | | | - // D1 D2 D3 ... D1 D2 used_msg ... - // returned_msg - // - // - // luos_tasks luos_tasks - // +---------+ +---------+ - // | D 1 |\ | D 1 | - // |---------| | |---------| - // | D 2 | | | D 2 | - // |---------| | |---------| - // | D 3 |/ | 0 |<-- messaged pulled is cleared - // |---------|<--luos_tasks_stack_id |---------| - // | etc... | | etc... | - // |---------| |---------| - // | LAST | | LAST | - // +---------+ +---------+ - // - - msg_t *returned_message; - msg_t *msg_to_clear; - service_t *service; - luos_task_t expected_luos_tasks[MAX_MSG_NB]; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - - // Init variables - MsgAlloc_Init(NULL); - luos_tasks_stack_id = MAX_MSG_NB; - for (uint16_t j = 0; j < MAX_MSG_NB; j++) - { - luos_tasks[j].service_pt = (service_t *)&msg_buffer[j]; - luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); - expected_luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); - } - service = luos_tasks[i].service_pt; - msg_to_clear = luos_tasks[i].msg_pt; - - // Launch Test & Verify - NEW_STEP_IN_LOOP("Check function returns SUCCEED", i); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_PullMsg(service, &returned_message)); - NEW_STEP_IN_LOOP("Check message pointer is allocated", i); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].msg_pt, returned_message); - NEW_STEP_IN_LOOP("Check \"used message\" is updated", i); - TEST_ASSERT_EQUAL(returned_message, used_msg); - NEW_STEP_IN_LOOP("Check luos task is cleared for required message", i); - // Verify required message has been deleted - for (uint16_t k = 0; k < MAX_MSG_NB; k++) - { - TEST_ASSERT_NOT_EQUAL(msg_to_clear, luos_tasks[k].msg_pt); - } - } - } -} - -void unittest_MsgAlloc_PullMsgFromLuosTask() -{ - NEW_TEST_CASE("Case FAILED : no message for ID"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - msg_t *returned_msg = NULL; - luos_tasks_stack_id = 5; - - for (uint16_t task_id = luos_tasks_stack_id; task_id < luos_tasks_stack_id + 5; task_id++) - { - NEW_STEP_IN_LOOP("Check function returns FAILED when \"luos tasks stack id\" points to a void message", task_id); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_PullMsgFromLuosTask(task_id, &returned_msg)); - } - } - - NEW_TEST_CASE("Case SUCCEED : pull all messages from Luos Tasks"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer msg_buffer after 1st pull msg_buffer after 2nd pull - // +------------------------+ +------------------------+ +------------------------+ - // |------------------------| |------------------------| |------------------------| etc... - // +--^-------^-------^-----+ +--^-------^-------^-----+ +----------^-------^-----+ - // | | | | | | | | - // D1 D2 ... LAST D1 D2 ... LAST D2 ... LAST - // used_msg used_msg - // returned_msg returned_msg - // - // luos_tasks luos_tasks luos_tasks - // +---------+ +---------+ +---------+ - // | D 1 | | D 2 | | D 3 | - // |---------| |---------| |---------| - // | D 2 | | D 3 | | D 4 | - // |---------| |---------| |---------| - // | D 3 | | D 4 | | D 5 | - // |---------| |---------| |---------| - // | etc... | | etc... | | etc... | - // |---------| |---------| |---------| - // | LAST | | 0 | | 0 | - // +---------+ +---------+ +---------+ - - uint16_t task_id; - msg_t *returned_message; - msg_t *msg_to_clear; - service_t *service; - luos_task_t expected_luos_tasks[MAX_MSG_NB]; - - for (uint16_t task_id = 0; task_id < MAX_MSG_NB; task_id++) - { - // Init variables - MsgAlloc_Init(NULL); - luos_tasks_stack_id = MAX_MSG_NB; - for (uint16_t j = 0; j < MAX_MSG_NB; j++) - { - luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); - expected_luos_tasks[j].msg_pt = (msg_t *)(&msg_buffer[0] + MAX_MSG_NB + j); - } - msg_to_clear = luos_tasks[task_id].msg_pt; - - // Launch Test & Verify - NEW_STEP_IN_LOOP("Check function returns SUCCEED", task_id); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_PullMsgFromLuosTask(task_id, &returned_message)); - NEW_STEP_IN_LOOP("Check luos task message pointer is allocated", task_id); - TEST_ASSERT_EQUAL(expected_luos_tasks[task_id].msg_pt, returned_message); - NEW_STEP_IN_LOOP("Check \"used message\" is updated", task_id); - TEST_ASSERT_EQUAL(returned_message, used_msg); - NEW_STEP_IN_LOOP("Check luos task is cleared for required message", task_id); - // Verify required message has been deleted - for (uint16_t k = 0; k < MAX_MSG_NB; k++) - { - TEST_ASSERT_NOT_EQUAL(msg_to_clear, luos_tasks[k].msg_pt); - } - } - } -} - -void unittest_MsgAlloc_LookAtLuosTask() -{ - NEW_TEST_CASE("Case FAILED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - uint16_t task_id; - service_t **allocated_service; - - // Init variables - luos_tasks_stack_id = 0; - task_id = luos_tasks_stack_id; - - // Call function & Verify - NEW_STEP("Check function returns FAILED when \"luos tasks stack id\" points to a void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_LookAtLuosTask(task_id, allocated_service)); - task_id++; - NEW_STEP("Check function returns FAILED when \"luos tasks stack id\" points to another void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_LookAtLuosTask(task_id, allocated_service)); - } - - NEW_TEST_CASE("Case SUCCEED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<-- search this ID (function will fill service pointer associated to D 2 Luos Task) - // |---------| - // | D 3 |<--luos_tasks_stack_id - // |---------| - // | 0 | - // |---------| - // | etc... | - // |---------| - // | 0 | - // +---------+ - // - - // Init variables - service_t *oldest_service = NULL; - luos_tasks_stack_id = MAX_MSG_NB; - - for (uintptr_t i = 0; i < MAX_MSG_NB; i++) - { - luos_tasks[i].service_pt = (service_t *)i; - } - - // Call function & Verify - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - NEW_STEP_IN_LOOP("Check function returns SUCCEED", i); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_LookAtLuosTask(i, &oldest_service)); - NEW_STEP_IN_LOOP("Check if function return the service concerned by the oldest message", i); - TEST_ASSERT_EQUAL(i, oldest_service); - } - } -} - -void unittest_MsgAlloc_GetLuosTaskSourceId() -{ - NEW_TEST_CASE("Case FAILED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - uint16_t task_id; - uint16_t task_id_2; - - // Init variables - luos_tasks_stack_id = MAX_MSG_NB; - task_id = luos_tasks_stack_id; - task_id_2 = luos_tasks_stack_id + 1; - - // Call function & Verify - NEW_STEP("Check function returns FAILED when required task ID points to a void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetLuosTaskSourceId(task_id, NULL)); - NEW_STEP("Check function returns FAILED when required task ID points to another void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetLuosTaskSourceId(task_id_2, NULL)); - } - - NEW_TEST_CASE("Case SUCCEED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------|<--luos_tasks_stack_id : fills SOURCE header pointer - // | D 2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - // Init variables - msg_t message; - uint16_t source_id = 0; - luos_tasks_stack_id = MAX_MSG_NB; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - message.header.source = i; - luos_tasks[i].msg_pt = &message; - - // Call function & Verify - NEW_STEP_IN_LOOP("Check function returns SUCCEED", i); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetLuosTaskSourceId(i, &source_id)); - NEW_STEP_IN_LOOP("Check function fills message SOURCE ID", i); - TEST_ASSERT_EQUAL(i, source_id); - } - } -} - -void unittest_MsgAlloc_GetLuosTaskCmd() -{ - NEW_TEST_CASE("FAILED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - uint16_t task_id; - uint8_t command = 0xFF; - - luos_tasks_stack_id = MAX_MSG_NB; - task_id = luos_tasks_stack_id; - - NEW_STEP("Check function returns FAILED when required task ID points to a void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetLuosTaskCmd(task_id, &command)); - NEW_STEP("Check COMMAND is not filled when required task ID points to a void message"); - TEST_ASSERT_EQUAL(0xFF, command); - - task_id++; - NEW_STEP("Check function returns FAILED when required task ID points to another void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetLuosTaskCmd(task_id, &command)); - NEW_STEP("Check COMMAND is not filled when required task ID points to a void message"); - TEST_ASSERT_EQUAL(0xFF, command); - } - - NEW_TEST_CASE("SUCCEED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------|<--luos_tasks_stack_id : fills COMMAND header pointer - // | D 2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - msg_t message; - uint16_t task_id = 0; - uint8_t command = 0; - uint8_t expected_command = 1; - - luos_tasks_stack_id = MAX_MSG_NB; - - message.header.cmd = expected_command; - luos_tasks[task_id].msg_pt = &message; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetLuosTaskCmd(task_id, &command)); - NEW_STEP("Check function fills message COMMAND"); - TEST_ASSERT_EQUAL(expected_command, command); - } -} - -void unittest_MsgAlloc_GetLuosTaskSize() -{ - NEW_TEST_CASE("FAILED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 |<--luos_tasks_stack_id - // |---------| - // | D 3 |\ - // |---------| | - // | etc... | | <-- search these IDs - // |---------| | (function return FAILED if ID > luos_tasks_stack_id) - // | Last | | - // +---------+/ - // - - uint16_t task_id; - uint16_t size = 0xFF; - luos_tasks_stack_id = MAX_MSG_NB; - task_id = luos_tasks_stack_id; - - NEW_STEP("Check function returns FAILED when required task ID points to a void message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetLuosTaskSize(task_id, &size)); - NEW_STEP("Check SIZE is not filled when required task ID points to a void message"); - TEST_ASSERT_EQUAL(0xFF, size); - } - - NEW_TEST_CASE("SUCCEED"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------|<--luos_tasks_stack_id : fills SIZE header pointer - // | D 2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - msg_t message; - uint16_t expected_size = 128; - uint16_t task_id = 0; - uint16_t size = 0; - - luos_tasks_stack_id = MAX_MSG_NB; - - message.header.size = expected_size; - luos_tasks[task_id].msg_pt = &message; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetLuosTaskSize(task_id, &size)); - NEW_STEP("Check function fills message SIZE"); - TEST_ASSERT_EQUAL(expected_size, size); - } -} - -void unittest_MsgAlloc_ClearMsgFromLuosTasks() -{ - NEW_TEST_CASE("No message to clear"); - MsgAlloc_Init(NULL); - { - // Message to clean is not in Luos_tasks : nothing is done - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +----------^^................^---------------^----------------+ - // || | | - // || Luos_tasks | msg to clean - // || +---------+ | - // +|->| D1 | | - // | |---------| | - // +->| D2 | | - // |---------| | - // | etc... | | - // |---------| | - // | Last |<--+ - // +---------+ - // - - luos_task_t expected_luos_tasks[MAX_MSG_NB]; - msg_t message; - service_t service; - - // Init variables - luos_tasks_stack_id = 0; - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - luos_tasks[i].msg_pt = &message; - luos_tasks[i].service_pt = &service; - expected_luos_tasks[i].msg_pt = &message; - expected_luos_tasks[i].service_pt = &service; - // Call function - MsgAlloc_ClearMsgFromLuosTasks(luos_tasks[i].msg_pt); - - NEW_STEP_IN_LOOP("Check luos message pointer is not cleared", i); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].msg_pt, luos_tasks[i].msg_pt); - NEW_STEP_IN_LOOP("Check luos service pointer is not cleared", i); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].service_pt, luos_tasks[i].service_pt); - } - } - - NEW_TEST_CASE("Clear a specific Luos Task"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +----------^^.......^..................^----------------------+ - // || | | - // || msg to clean = D2 | - // || | - // || Luos_tasks init state | - // || +---------+ | - // +|->| D1 | | - // | |---------| | - // +->| D2 | | - // |---------| | - // | etc... | | - // |---------| | - // | Last |<------------+ - // +---------+ - // - // Luos_tasks ending state - // +---------+ - // | D1 | - // |---------| - // | D3 | - // |---------| - // | etc... | - // |---------| - // | Last | - // |---------| - // | 0 | - // +---------+ - // - - msg_t *msg_to_clear; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - // Init variables - MsgAlloc_Init(NULL); - for (uint16_t j = 0; j < MAX_MSG_NB; j++) - { - luos_tasks[j].msg_pt = (msg_t *)&msg_buffer[j]; - } - - msg_tasks[0] = 0; - tx_tasks[0].data_pt = 0; - luos_tasks_stack_id = MAX_MSG_NB; - msg_to_clear = luos_tasks[i].msg_pt; - // Call function - MsgAlloc_ClearMsgFromLuosTasks(luos_tasks[i].msg_pt); - - // Verify required message has been deleted - for (uint16_t k = 0; k < MAX_MSG_NB; k++) - { - NEW_STEP_IN_LOOP("Check expected message is cleared for all cases", (MAX_MSG_NB * i) + k); - TEST_ASSERT_NOT_EQUAL(msg_to_clear, luos_tasks[k].msg_pt); - } - } - } -} - -void unittest_MsgAlloc_PullMsgFromTxTask() -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { - // tx_tasks - // +---------+ - // | Tx1 | - // |---------| - // | Tx2 | - // |---------| - // | Tx3 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // <--tx_tasks_stack_id overflows ==> Assert - for (uint16_t i = 0; i < MAX_MSG_NB + 2; i++) - { - MsgAlloc_Init(NULL); - RESET_ASSERT(); - tx_tasks_stack_id = i; - - if (tx_tasks_stack_id > MAX_MSG_NB) - { - MsgAlloc_PullMsgFromTxTask(); - NEW_STEP_IN_LOOP("Check assert has occured when \"tx tasks stack id\" overflows", i); - TEST_ASSERT_TRUE(IS_ASSERT()); - } - else - { - MsgAlloc_PullMsgFromTxTask(); - NEW_STEP_IN_LOOP("Check NO assert has occured", i); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - } - RESET_ASSERT(); - } - - NEW_TEST_CASE("Pull Tx message task"); - MsgAlloc_Init(NULL); - { - // - // - // tx_tasks tx_tasks tx_tasks - // +---------+ +---------+ +---------+ - // | Tx1 | | Tx2 | | Tx3 | - // |---------| |---------| |---------| - // | Tx2 | | Tx3 | | Tx4 | - // |---------| |---------| |---------| - // | Tx3 | | Tx4 | | Tx5 | - // |---------| |---------| |---------| - // | etc... | | etc... | | etc... | etc... - // |---------| |---------| tx_tasks_stack_id-->|---------| - // | etc... | | etc... | | 0 | - // |---------| tx_tasks_stack_id-->|---------| |---------| - // | LAST | | 0 | | 0 | - // tx_tasks_stack_id-->+---------+ +---------+ +---------+ - - tx_task_t expected_tx_tasks[MAX_MSG_NB]; - - NEW_STEP("Check Tx task data pointer are correctly allocated after pulling oldest tx task"); - NEW_STEP("Check Tx task size is correctly allocated after pulling oldest tx task"); - for (uint16_t task_id = 0; task_id < MAX_MSG_NB; task_id++) - { - for (uint16_t tasks_stack_id = task_id + 1; tasks_stack_id <= MAX_MSG_NB; tasks_stack_id++) - { - // Initialisation - MsgAlloc_Init(NULL); - tx_tasks_stack_id = tasks_stack_id; - - for (uint16_t pt_value = 0; pt_value < MAX_MSG_NB; pt_value++) - { - // Init tx_tasks pointers - tx_tasks[pt_value].data_pt = (uint8_t *)(&msg_buffer[0] + pt_value); - tx_tasks[pt_value].size = pt_value + 100; - - // Init expected pointers - if (pt_value == (tasks_stack_id - 1)) - { - expected_tx_tasks[pt_value].data_pt = 0; - expected_tx_tasks[pt_value].size = 0; - } - else if (pt_value < task_id) - { - expected_tx_tasks[pt_value].data_pt = (uint8_t *)(&msg_buffer[0] + pt_value + 1); - expected_tx_tasks[pt_value].size = pt_value + 100 + 1; - } - } - - // Launch test - MsgAlloc_PullMsgFromTxTask(); - - // Analyze test results - for (uint8_t i = 0; i < task_id; i++) - { - TEST_ASSERT_EQUAL(expected_tx_tasks[i].data_pt, tx_tasks[i].data_pt); - TEST_ASSERT_EQUAL(expected_tx_tasks[i].size, tx_tasks[i].size); - } - } - } - } - - NEW_TEST_CASE("Verify when Tx task is empty"); - MsgAlloc_Init(NULL); - { - // tx_tasks - // +---------+<--tx_tasks_stack_id = 0 ==> return - // | Tx1 | - // |---------| - // | Tx2 | - // |---------| - // | Tx3 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - NEW_STEP("Check nothing happened when \"tx tasks stack id\" = 0"); - - // Init - tx_tasks_stack_id = 0; - - for (uint8_t i = 0; i < MAX_MSG_NB; i++) - { - tx_tasks[i].data_pt = (uint8_t *)&msg_buffer[i]; - tx_tasks[i].size = i; - } - - // Call function - //--------------------------- - MsgAlloc_PullMsgFromTxTask(); - - // Verify - TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(0, tx_tasks_stack_id); - for (uint8_t i = 0; i < MAX_MSG_NB; i++) - { - TEST_ASSERT_EQUAL(&msg_buffer[i], tx_tasks[i].data_pt); - TEST_ASSERT_EQUAL(i, tx_tasks[i].size); - } - } -} - -void unittest_MsgAlloc_PullServiceFromTxTask() -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { - // - // tx_tasks - // +---------+<--tx_tasks_stack_id = 0 ==> Assert - // | Tx1 | - // |---------| - // | Tx2 | - // |---------| - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // <--tx_tasks_stack_id overflows ==> Assert - // - uint16_t service_id = 1; - - for (uint16_t i = 0; i <= MAX_MSG_NB; i++) - { - MsgAlloc_Init(NULL); - RESET_ASSERT(); - - // Init variables - //--------------- - tx_tasks_stack_id = i; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - msg_tasks[i] = (msg_t *)&msg_buffer[i * 20]; - msg_tasks[i]->header.target = 0; - tx_tasks[i].data_pt = (uint8_t *)msg_tasks[i]; - } - - // Call function and Verify - //--------------------------- - if (tx_tasks_stack_id == 0) - { - NEW_STEP("Check assert has occured when \"tx tasks stack id\" = 0"); - MsgAlloc_PullServiceFromTxTask(service_id); - TEST_ASSERT_TRUE(IS_ASSERT()); - } - else - { - NEW_STEP_IN_LOOP("Check correct cases", i - 1); - MsgAlloc_PullServiceFromTxTask(service_id); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - } - RESET_ASSERT(); - } - - NEW_TEST_CASE("Remove Tx tasks from a service"); - MsgAlloc_Init(NULL); - { - // - // Remove a Tx message from a specific service by analizing "target" in header (for example service is in tx task Tx2) - // tx_tasks_stack_id = 3 : function will search in messages Tx1, Tx2 & Tx3 - // - // tx_tasks tx_tasks - // +---------+ +---------+ - // | Tx1 |\ | Tx1 | - // |---------| | |---------| - // | Tx2 | | | Tx3 |<-- messaged Tx2 has been is cleared - // |---------| | |---------| - // | Tx3 |/ | Tx4 | - // |---------|<--tx_tasks_stack_id |---------| - // | etc... | | etc... | - // |---------| |---------| - // | LAST | | 0 | - // +---------+ +---------+ - // - - tx_task_t expected_tx_tasks[MAX_MSG_NB]; - uint16_t service_id; - - // Init variables - //--------------- - const int task_number = 10; - tx_tasks_stack_id = task_number; - - for (uint16_t i = 0; i < task_number; i++) - { - msg_tasks[i] = (msg_t *)&msg_buffer[i * 20]; - msg_tasks[i]->header.target = i + 1; - tx_tasks[i].data_pt = (uint8_t *)msg_tasks[i]; - } - - // Remove all messages from service 15 (position 0,2,4 in buffer) - service_id = 15; - msg_tasks[0]->header.target = service_id; - msg_tasks[2]->header.target = service_id; - msg_tasks[4]->header.target = service_id; - - expected_tx_tasks[0].data_pt = tx_tasks[1].data_pt; - expected_tx_tasks[1].data_pt = tx_tasks[3].data_pt; - for (uint16_t i = 2; i < task_number - 3; i++) - { - expected_tx_tasks[i].data_pt = tx_tasks[i + 3].data_pt; - } - expected_tx_tasks[task_number - 1].data_pt = 0; - expected_tx_tasks[task_number - 2].data_pt = 0; - expected_tx_tasks[task_number - 3].data_pt = 0; - - // Call function - //--------------- - MsgAlloc_PullServiceFromTxTask(service_id); - - // Verify - //--------------- - for (uint16_t i = 0; i < task_number; i++) - { - NEW_STEP_IN_LOOP("Check Tx task message pointer are correctly allocated after pulling expected service tx task", i); - TEST_ASSERT_EQUAL(expected_tx_tasks[i].data_pt, tx_tasks[i].data_pt); - } - } -} - -void unittest_MsgAlloc_GetTxTask() -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------| - // | D 2 | - // |---------| - // | 0 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // <--luos_tasks_stack_id (overflows ==> Assert) - // - - for (uint8_t i = 0; i < 2; i++) - { - RESET_ASSERT(); - - // Init variables - //--------------- - service_t *service; - uint8_t *data; - uint16_t size = 128; - - tx_tasks[0].data_pt = (uint8_t *)16; - tx_tasks[0].service_pt = (service_t *)32; - tx_tasks[0].size = 128; - - tx_tasks_stack_id = MAX_MSG_NB + i; - - // Call function - //--------------- - MsgAlloc_GetTxTask(&service, &data, &size); - - // Verify - //--------------- - NEW_STEP("Check assert has occured when \"tx tasks stack id\" = max value"); - TEST_ASSERT_TRUE(IS_ASSERT()); - - // Call function - //--------------- - MsgAlloc_GetTxTask(&service, &data, &size); - - // Verify - //--------------- - NEW_STEP("Check assert has occured when \"tx tasks stack id\" overflows"); - TEST_ASSERT_TRUE(IS_ASSERT()); - } - RESET_ASSERT(); - } - - NEW_TEST_CASE("Verify there are no messages"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+<--luos_tasks_stack_id (no message, function return FAILED) - // | D 1 | - // |---------| - // | D 2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - service_t *service; - uint8_t *data; - uint16_t *size; - - // Init variables - //--------------- - tx_tasks_stack_id = 0; - - // Call function & Verify - //-------------------------- - NEW_STEP("Check function returns FAILED when tx task is empty"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_GetTxTask(&service, &data, size)); - } - - NEW_TEST_CASE("Verify there is a message"); - MsgAlloc_Init(NULL); - { - // - // luos_tasks - // +---------+ - // | D 1 | - // |---------|<--luos_tasks_stack_id : tx_tasks[0] is filled with pointers (service, data, size) - // | D 2 | - // |---------| - // | etc... | - // |---------| - // | LAST | - // +---------+ - // - - service_t *service; - uint8_t *data; - uint16_t size; - - // Init variables - //--------------- - tx_tasks_stack_id = 1; - - tx_tasks[0].data_pt = (uint8_t *)16; - tx_tasks[0].service_pt = (service_t *)32; - tx_tasks[0].size = 128; - - // Call function & Verify - //-------------------------- - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_GetTxTask(&service, &data, &size)); - NEW_STEP("Check function returns expected service pointer"); - TEST_ASSERT_EQUAL(tx_tasks[0].service_pt, service); - NEW_STEP("Check function returns expected data"); - TEST_ASSERT_EQUAL(tx_tasks[0].data_pt, data); - NEW_STEP("Check function returns expected size"); - TEST_ASSERT_EQUAL(tx_tasks[0].size, size); - } -} - -void unittest_MsgAlloc_TxAllComplete() -{ - NEW_TEST_CASE("Tx All Complete"); - MsgAlloc_Init(NULL); - { - // - // Tx_tasks - // +---------+<--tx_tasks_stack_id = return SUCCESS (all messages have been transmitted) - // | Tx 1 |\ - // |---------| | - // | Tx 1 | | - // |---------| | <--tx_tasks_stack_id = return FAILED (at least one message has not been transmitted) - // | etc... | | - // |---------| | - // | Last | | - // +---------+/ - // - - tx_tasks_stack_id = 0; - NEW_STEP("Check function returns SUCCEED when \"tx tasks stack id\" = 0 "); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_TxAllComplete()); - - NEW_STEP("Check function returns FAILED when \"tx tasks stack id\" is not 0 "); - while (tx_tasks_stack_id < MSG_BUFFER_SIZE) - { - tx_tasks_stack_id++; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_TxAllComplete()); - } - } -} diff --git a/test/test_msg_alloc/unit_test_mem_alloc_static.c b/test/test_msg_alloc/unit_test_mem_alloc_static.c deleted file mode 100644 index eef242e80..000000000 --- a/test/test_msg_alloc/unit_test_mem_alloc_static.c +++ /dev/null @@ -1,1018 +0,0 @@ -#include "main.h" -#include "unit_test.h" -#include "../src/msg_alloc.c" - -void unittest_DoWeHaveSpace(void) -{ - NEW_TEST_CASE("There is enough space"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^--------------^---------------------------------------------^+ - // | | | - // pointer or pointer or pointer - // - - NEW_STEP("Check function returns SUCCEED"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpace((void *)&msg_buffer[i])); - } - } - - NEW_TEST_CASE("there is not enough space"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // |-------------------------------------------------------------+ ^ - // | - // pointer - // - - NEW_STEP("Check function returns FAILED"); - for (uint16_t i = MSG_BUFFER_SIZE; i < MSG_BUFFER_SIZE + 10; i++) - { - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpace((void *)&msg_buffer[i])); - } - } -} - -void unittest_CheckMsgSpace(void) -{ - NEW_TEST_CASE("There are no used messages in memory space checked"); - MsgAlloc_Init(NULL); - { - // Declaration of dummy message start and end pointer - uintptr_t *mem_start; - uintptr_t *mem_end; - - // Initialize pointer - used_msg = (msg_t *)&msg_buffer[sizeof(msg_t)]; - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |------------------------------| MESSAGES... |------------| - // |--------------^--------------^^------------------------------+ - // | || - // start end | - // used_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)used_msg - 2; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns SUCCEED when we check space before messages"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |--------| MESSAGES... |----------------------------------| - // |--------------------------^^--------------^------------------+ - // || | - // |start end - // used_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)used_msg + 1; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns SUCCEED when we check space after messages"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - } - - NEW_TEST_CASE("The oldest message is not in memory space checked"); - MsgAlloc_Init(NULL); - { - // Declaration of dummy message start and end pointer - uintptr_t *mem_start; - uintptr_t *mem_end; - - // Initialize pointer - oldest_msg = (msg_t *)&msg_buffer[sizeof(msg_t)]; - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |------------------------------| MESSAGES... |------------| - // |--------------^--------------^^------------------------------+ - // | || - // start end | - // oldest_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)oldest_msg - 2; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns SUCCEED when we check space before messages"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |--------| MESSAGES... |----------------------------------| - // |--------------------------^^--------------^------------------+ - // || | - // |start end - // oldest_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)oldest_msg + 1; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns SUCCEED when we check space after messages"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - } - - NEW_TEST_CASE("There are used messages in memory space checked"); - MsgAlloc_Init(NULL); - { - // Declaration of dummy message start and end pointer - uintptr_t *mem_start; - uintptr_t *mem_end; - - // Initialize pointer - used_msg = (msg_t *)&msg_buffer[sizeof(msg_t)]; - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |----------------------------| MESSAGES... |--------------| - // |--------------^-------------^^-------------------------------+ - // | || - // start |end - // used_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)used_msg - 1; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns FAILED when the end of a new message overflows begin of used message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |--------------| MESSAGES... |----------------------------| - // |--------------^------^---------------------------------------+ - // | | - // start end - // & used_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)used_msg; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns FAILED when the beginning of a new message overflows begin of used message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - } - - NEW_TEST_CASE("The oldest message is in memory space checked"); - MsgAlloc_Init(NULL); - { - // Declaration of dummy message start and end pointer - uintptr_t *mem_start; - uintptr_t *mem_end; - - // Initialize pointer - oldest_msg = (msg_t *)&msg_buffer[sizeof(msg_t)]; - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |----------------------------| MESSAGES... |--------------| - // |--------------^-------------^^-------------------------------+ - // | || - // start |end - // oldest_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)oldest_msg - 1; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns FAILED when the end of a new message overflows begin of oldest message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - - // - // msg_buffer - // +-------------------------------------------------------------+ - // |--------------| MESSAGES... |----------------------------| - // |--------------^------^---------------------------------------+ - // | | - // start end - // & oldest_msg - // - // - // Init variables - //--------------- - mem_start = (uintptr_t *)oldest_msg; - mem_end = mem_start + 1; - // Call function and Verify - //--------------------------- - NEW_STEP("Function returns FAILED when the beginning of a new message overflows begin of oldest message"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((void *)mem_start, (void *)mem_end)); - } -} - -void unittest_BufferAvailableSpaceComputation(void) -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { -#define assert_nb 6 - typedef struct - { - bool expected_asserts; // if "true" : expect a Luos assert - msg_t *oldest_msg_position; // oldest_msg position in msg_buffer - } assert_scenario; - - assert_scenario assert_sc[assert_nb]; - uint32_t free_space = MSG_BUFFER_SIZE; - - // Expected Values - assert_sc[0].expected_asserts = true; - assert_sc[1].expected_asserts = false; - assert_sc[2].expected_asserts = false; - assert_sc[3].expected_asserts = false; - assert_sc[4].expected_asserts = true; - assert_sc[5].expected_asserts = true; - - assert_sc[0].oldest_msg_position = (msg_t *)&msg_buffer[0] - 1; - assert_sc[1].oldest_msg_position = (msg_t *)&msg_buffer[0]; - assert_sc[2].oldest_msg_position = (msg_t *)&msg_buffer[1]; - assert_sc[3].oldest_msg_position = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE] - 1; - assert_sc[4].oldest_msg_position = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE]; - assert_sc[5].oldest_msg_position = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE] + 1; - - // Launch test - NEW_STEP("Verify function is asserting when forbidden values are injected"); - for (uint8_t i = 0; i < assert_nb; i++) - { - RESET_ASSERT(); - oldest_msg = assert_sc[i].oldest_msg_position; - MsgAlloc_BufferAvailableSpaceComputation(); - TEST_ASSERT_EQUAL(assert_sc[i].expected_asserts, IS_ASSERT()); - } - } - - NEW_TEST_CASE("No task is available"); - MsgAlloc_Init(NULL); - { - volatile uint32_t free_space = 0; - oldest_msg = (msg_t *)INT_MAX; // No oldest message - - NEW_STEP("Check remaining space computing for all message size cases"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE - 2; i++) - { - // Init variables - //--------------- - data_ptr = (uint8_t *)&msg_buffer[i + 1]; - for (uint32_t j = 0; j < MSG_BUFFER_SIZE - 1; j++) - { - // Test is launched only if "data_ptr" doesn't overflows "msg_buffer" size - if (data_ptr < (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]) - { - RESET_ASSERT(); - // Call function - //--------------- - free_space = MsgAlloc_BufferAvailableSpaceComputation(); - - // Verify - //--------------- - TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, free_space); - - data_ptr++; - } - else - { - break; - } - } - } - } - - NEW_TEST_CASE("Oldest task is between `data_ptr` and the end of message buffer"); - MsgAlloc_Init(NULL); - { - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +------^---------------------^--------------------------------+ - // | | - // |<-----Free space---->| - // | | - // data_ptr oldest_task - - uint32_t free_space = 0; - uint32_t expected_size = 0; - oldest_msg = (msg_t *)&msg_buffer[1]; - data_ptr = (uint8_t *)oldest_msg - 1; - - NEW_STEP("Check remaining space computing for all cases"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE - 1; i++) - { - oldest_msg = (msg_t *)&msg_buffer[1]; - // for (uint8_t j = 0; j < 2; j++) - for (uint16_t j = i; j < MSG_BUFFER_SIZE - 1; j++) - { - if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) - { - RESET_ASSERT(); - expected_size = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; - free_space = MsgAlloc_BufferAvailableSpaceComputation(); - TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(expected_size, free_space); - } - // oldest_msg++; - oldest_msg = (msg_t *)&msg_buffer[j + 1]; - } - data_ptr++; - } - } - - NEW_TEST_CASE("Oldest task is between the begin of the buffer and current_msg`"); - MsgAlloc_Init(NULL); - { - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // +-------------^---------------------------------^-------------+ - // | | - // <-Free space->| |<-Free space-> - // | | - // | | - // oldest_task data_ptr - - uint32_t free_space = 0; - uint32_t expected_size = 0; - data_ptr = (uint8_t *)&msg_buffer[1]; - oldest_msg = (msg_t *)data_ptr - 1; - - NEW_STEP("Check remaining space computing for all cases"); - // Test remaining space computing for all cases - // while (data_end_estimation < &msg_buffer[MSG_BUFFER_SIZE]) - for (uint16_t i = 0; i < MSG_BUFFER_SIZE - 1; i++) - { - oldest_msg = (msg_t *)&msg_buffer[1]; - for (uint16_t j = 0; j < MSG_BUFFER_SIZE - 1; j++) - { - if ((uintptr_t)oldest_msg < (uintptr_t)data_ptr) - { - RESET_ASSERT(); - expected_size = (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr; - expected_size += (uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]; - free_space = MsgAlloc_BufferAvailableSpaceComputation(); - - TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(expected_size, free_space); - } - oldest_msg = (msg_t *)&msg_buffer[j + 1]; - } - data_ptr++; - } - } -} - -void unittest_OldestMsgCandidate(void) -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { -#define assert_nb 6 - typedef struct - { - bool expected_asserts; - msg_t *oldest_stack_msg_pt; - } assert_scenario; - - assert_scenario assert_sc[assert_nb]; - uint32_t free_space = MSG_BUFFER_SIZE; - - // Expected Values - assert_sc[0].expected_asserts = true; - assert_sc[0].oldest_stack_msg_pt = (msg_t *)&msg_buffer[0] - 1; - assert_sc[1].expected_asserts = false; - assert_sc[1].oldest_stack_msg_pt = (msg_t *)&msg_buffer[0]; - assert_sc[2].expected_asserts = false; - assert_sc[2].oldest_stack_msg_pt = (msg_t *)&msg_buffer[1]; - assert_sc[3].expected_asserts = false; - assert_sc[3].oldest_stack_msg_pt = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]; - assert_sc[4].expected_asserts = true; - assert_sc[4].oldest_stack_msg_pt = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE]; - assert_sc[5].expected_asserts = true; - assert_sc[5].oldest_stack_msg_pt = (msg_t *)&msg_buffer[MSG_BUFFER_SIZE] + 1; - - // Launch test - for (uint8_t i = 0; i < assert_nb; i++) - { - RESET_ASSERT(); - MsgAlloc_OldestMsgCandidate(assert_sc[i].oldest_stack_msg_pt); - NEW_STEP_IN_LOOP("Forbidden values are injected -> Verify function is asserting", i); - TEST_ASSERT_EQUAL(assert_sc[i].expected_asserts, IS_ASSERT()); - } - } - - NEW_TEST_CASE("Verify case \"oldest_stack_msg_pt\" is NULL"); - MsgAlloc_Init(NULL); - { - // Pass NULL pointer to MsgAlloc_OldestMsgCandidate => oldest_msg doesn't change - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------------------------------------------+ - // | - // oldest_msg - - oldest_msg = (msg_t *)&msg_buffer[0]; - volatile msg_t *expected_oldest_msg = oldest_msg; - msg_t *oldest_stack_msg_pt = NULL; - - RESET_ASSERT(); - MsgAlloc_OldestMsgCandidate(oldest_stack_msg_pt); - - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - NEW_STEP("Check oldest message doesn't change"); - TEST_ASSERT_EQUAL(expected_oldest_msg, oldest_msg); - } - - NEW_TEST_CASE("Verify other cases"); - MsgAlloc_Init(NULL); - { -#define CASE 18 - msg_t *oldest_stack_msg_pt; - volatile msg_t *expected_oldest_msg; - - // Array with all possible cases - int cases[CASE][4] = {// current_msg oldest_msg oldest_stack_msg_pt expected_oldest_msg - {/* */ 0, /* */ 1, /* */ 2, /* */ 1}, - {/* */ 0, /* */ 2, /* */ 1, /* */ 1}, - {/* */ 1, /* */ 0, /* */ 2, /* */ 2}, - {/* */ 1, /* */ 2, /* */ 0, /* */ 2}, - {/* */ 2, /* */ 0, /* */ 1, /* */ 0}, - {/* */ 2, /* */ 1, /* */ 0, /* */ 0}, - {/* */ 0, /* */ 1, /* */ 0, /* */ 1}, - {/* */ 0, /* */ 2, /* */ 0, /* */ 2}, - {/* */ 1, /* */ 0, /* */ 1, /* */ 0}, - {/* */ 1, /* */ 2, /* */ 1, /* */ 2}, - {/* */ 2, /* */ 0, /* */ 2, /* */ 0}, - {/* */ 2, /* */ 1, /* */ 2, /* */ 1}, - {/* */ 0, /* */ 1, /* */ 1, /* */ 1}, - {/* */ 0, /* */ 2, /* */ 2, /* */ 2}, - {/* */ 1, /* */ 0, /* */ 0, /* */ 0}, - {/* */ 1, /* */ 2, /* */ 2, /* */ 2}, - {/* */ 2, /* */ 0, /* */ 0, /* */ 0}, - {/* */ 2, /* */ 1, /* */ 1, /* */ 1}}; - - for (uint8_t i = 0; i < CASE; i++) - { - data_ptr = (uint8_t *)&msg_buffer[cases[i][0]]; - oldest_msg = (msg_t *)&msg_buffer[cases[i][1]]; - oldest_stack_msg_pt = (msg_t *)&msg_buffer[cases[i][2]]; - expected_oldest_msg = (msg_t *)&msg_buffer[cases[i][3]]; - MsgAlloc_OldestMsgCandidate(oldest_stack_msg_pt); - NEW_STEP_IN_LOOP("Check all pointers cases", i); - TEST_ASSERT_EQUAL(expected_oldest_msg, oldest_msg); - } - } -} - -void unittest_ClearMsgSpace(void) -{ - NEW_TEST_CASE("There is not enough space in memory"); - MsgAlloc_Init(NULL); - { - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // |-------------------------------------------------------------+ ^ - // | - // pointer - // - void *memory_start = (void *)&msg_buffer[0]; - void *memory_end = (void *)&msg_buffer[MSG_BUFFER_SIZE]; - - NEW_STEP("Check function returns FAILED"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_ClearMsgSpace(memory_start, memory_end)); - } - - NEW_TEST_CASE("Drop used messages"); - MsgAlloc_Init(NULL); - { - // used_msg will be dropped - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------^----------^------------------------------------------+ - // | | | - // start used_msg end - - void *memory_start; - void *memory_end; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - used_msg = (msg_t *)&msg_buffer[1]; - memory_start = (void *)&msg_buffer[0]; - memory_end = (void *)&msg_buffer[2]; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_ClearMsgSpace(memory_start, memory_end)); - NEW_STEP("Check buffer occupation is 100\%"); - TEST_ASSERT_EQUAL(100, memory_stats.buffer_occupation_ratio); - NEW_STEP("Check there is 1 dropped message"); - TEST_ASSERT_EQUAL(1, memory_stats.msg_drop_number); - NEW_STEP("Check used message is cleaned"); - TEST_ASSERT_NULL(used_msg); - - NEW_STEP("Check drop counter validity for all cases"); - for (uint8_t i = 1; i < 0xFF; i++) - { - used_msg = (msg_t *)&msg_buffer[1]; - MsgAlloc_ClearMsgSpace(memory_start, memory_end); - TEST_ASSERT_EQUAL(i + 1, memory_stats.msg_drop_number); - } - - used_msg = (msg_t *)&msg_buffer[1]; - memory_stats.msg_drop_number = 255; - MsgAlloc_ClearMsgSpace(memory_start, memory_end); - - NEW_STEP("Check drop counter has reached max value"); - TEST_ASSERT_EQUAL(255, memory_stats.msg_drop_number); - } - - NEW_TEST_CASE("Drop all messages from luos_tasks"); - MsgAlloc_Init(NULL); - { - // All messages of luos_tasks will be dropped - // - // Init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------^----------^-----------------------------^+ - // | | | | - // used_msg start oldest_msg end - // - // Luos_tasks - // +---------+ - // | Task D1 | - // |---------| - // +---------+ - // | Task D2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | LastTask| - // |---------| - - // Ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^------------------------------^------------------------------+ - // | | - // used_msg oldest_msg - // - // Luos_tasks - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | 0 | - // |---------| - - void *memory_start; - void *memory_end; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - luos_tasks[i].msg_pt = (msg_t *)&msg_buffer[i + 2]; - luos_tasks[i].service_pt = (service_t *)&msg_buffer[i + 2]; - } - used_msg = (msg_t *)&msg_buffer[0]; - oldest_msg = (msg_t *)&msg_buffer[2]; - memory_start = (void *)&msg_buffer[1]; - memory_end = (void *)&msg_buffer[MAX_MSG_NB - 1]; - luos_tasks_stack_id = MAX_MSG_NB; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_ClearMsgSpace(memory_start, memory_end)); - NEW_STEP("Check buffer occupation is 100\%"); - TEST_ASSERT_EQUAL(100, memory_stats.buffer_occupation_ratio); - NEW_STEP("Check \"luos tasks stack id\" equals 2"); - TEST_ASSERT_EQUAL(2, luos_tasks_stack_id); - NEW_STEP("Check that MAX_MSG_NB - 2 messages has been dropped"); - TEST_ASSERT_EQUAL(MAX_MSG_NB - 2, memory_stats.msg_drop_number); - NEW_STEP("Check Luos Tasks are all reseted"); - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - TEST_ASSERT_EQUAL(0, luos_tasks[i].msg_pt); - TEST_ASSERT_EQUAL(0, luos_tasks[i].service_pt); - } - } - - NEW_TEST_CASE("Drop all messages from msg_tasks"); - MsgAlloc_Init(NULL); - { - // All messages of msg_tasks will be dropped - // - // Init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------^----------^-----------------------------^+ - // | | | | - // used_msg start oldest_msg end - // - // msg_tasks - // +---------+ - // | Task A1 | - // |---------| - // +---------+ - // | Task A2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | LastTask| - // |---------| - - // Ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^------------------------------^------------------------------+ - // | | - // used_msg oldest_msg - // - // msg_tasks - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | 0 | - // |---------| - - void *memory_start; - void *memory_end; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - msg_tasks[i] = (msg_t *)&msg_buffer[i + 2]; - } - used_msg = (msg_t *)&msg_buffer[0]; - oldest_msg = (msg_t *)&msg_buffer[2]; - memory_start = (void *)&msg_buffer[1]; - memory_end = (void *)&msg_buffer[MAX_MSG_NB - 1]; - msg_tasks_stack_id = MAX_MSG_NB; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_ClearMsgSpace(memory_start, memory_end)); - NEW_STEP("Check buffer occupation is 100\%"); - TEST_ASSERT_EQUAL(100, memory_stats.buffer_occupation_ratio); - NEW_STEP("Check \"luos tasks stack id\" equals 2"); - TEST_ASSERT_EQUAL(2, msg_tasks_stack_id); - NEW_STEP("Check that MAX_MSG_NB - 2 messages has been dropped"); - TEST_ASSERT_EQUAL(MAX_MSG_NB - 2, memory_stats.msg_drop_number); - NEW_STEP("Check Message Tasks are all reseted"); - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - TEST_ASSERT_EQUAL(0, msg_tasks[i]); - } - } - - NEW_TEST_CASE("Drop all messages from tx_tasks"); - MsgAlloc_Init(NULL); - { - // All messages of tx_tasks will be dropped - // - // Init state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------^----------^-----------------------------^+ - // | | | | - // used_msg start oldest_msg end - // - // tx_tasks - // +---------+ - // | Task E1 | - // |---------| - // +---------+ - // | Task E2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | LastTask| - // |---------| - - // Ending state - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^------------------------------^------------------------------+ - // | | - // used_msg oldest_msg - // - // tx_tasks - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | 0 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | 0 | - // |---------| - - void *memory_start; - void *memory_end; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - tx_tasks[i].data_pt = (uint8_t *)&msg_buffer[i + 2]; - tx_tasks[i].size = (uint16_t)i; - } - used_msg = (msg_t *)&msg_buffer[0]; - oldest_msg = (msg_t *)&msg_buffer[2]; - memory_start = (void *)&msg_buffer[1]; - memory_end = (void *)&msg_buffer[MAX_MSG_NB - 1]; - tx_tasks_stack_id = MAX_MSG_NB; - - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_ClearMsgSpace(memory_start, memory_end)); - NEW_STEP("Check buffer occupation is 100\%"); - TEST_ASSERT_EQUAL(100, memory_stats.buffer_occupation_ratio); - NEW_STEP("Check \"luos tasks stack id\" equals 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check that MAX_MSG_NB - 2 messages has been dropped"); - TEST_ASSERT_EQUAL(MAX_MSG_NB - 2, memory_stats.msg_drop_number); - NEW_STEP("Check Tx Tasks are all reseted"); - for (uint16_t i = 0; i < MAX_MSG_NB - 2; i++) - { - TEST_ASSERT_EQUAL(0, tx_tasks[i].data_pt); - TEST_ASSERT_EQUAL(0, tx_tasks[i].size); - } - } -} - -void unittest_ClearMsgTask(void) -{ - NEW_TEST_CASE("Clear Message Task"); - MsgAlloc_Init(NULL); - { - // Last Message Task is cleared - // - // Init state - // msg_tasks - // +---------+ - // | Task A1 | - // |---------| - // +---------+ - // | Task A2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | LastTask| - // |---------| - // - // Ending state - // - // msg_tasks - // +---------+ - // | Task A1 | - // |---------| - // +---------+ - // | Task A2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | 0 | - // |---------| - - msg_t *expected_msg_tasks[MAX_MSG_NB]; - msg_tasks_stack_id = MAX_MSG_NB; - - // To avoid assert - msg_tasks[0] = (msg_t *)&msg_buffer[0]; - luos_tasks[0].msg_pt = (msg_t *)&msg_buffer[0]; - tx_tasks[0].data_pt = (uint8_t *)&msg_buffer[0]; - - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - msg_tasks[i] = (msg_t *)(&msg_buffer[0] + i); - expected_msg_tasks[i] = (msg_t *)(&msg_buffer[0] + i + 1); - } - - // Last Msg Task must be cleared - expected_msg_tasks[MAX_MSG_NB - 1] = 0; - MsgAlloc_ClearMsgTask(); - - NEW_STEP("Check NO assert has occured"); - NEW_STEP("Check last message task is cleared in all cases"); - for (uint16_t i = 0; i < MAX_MSG_NB; i++) - { - TEST_ASSERT_FALSE(IS_ASSERT()); - TEST_ASSERT_EQUAL(expected_msg_tasks[i], msg_tasks[i]); - } - TEST_ASSERT_EQUAL(MAX_MSG_NB - 1, msg_tasks_stack_id); - } -} - -void unittest_ClearLuosTask(void) -{ - NEW_TEST_CASE("Verify assertion cases"); - MsgAlloc_Init(NULL); - { - uint16_t luos_task_id; - - for (uint16_t i = 0; i <= MAX_MSG_NB + 2; i++) - { - MsgAlloc_Init(NULL); - luos_tasks_stack_id = i; - for (uint16_t j = 0; j <= MAX_MSG_NB + 2; j++) - { - luos_task_id = j; - RESET_ASSERT(); - if ((luos_task_id >= luos_tasks_stack_id) || (luos_tasks_stack_id > MAX_MSG_NB)) - { - NEW_STEP_IN_LOOP("Check assert has occured", (MAX_MSG_NB + 2) * i + i + j); - MsgAlloc_ClearLuosTask(luos_task_id); - TEST_ASSERT_TRUE(IS_ASSERT()); - } - else - { - NEW_STEP_IN_LOOP("Check NO assert has occured", (MAX_MSG_NB + 2) * i + i + j); - MsgAlloc_ClearLuosTask(luos_task_id); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - } - } - } - - NEW_TEST_CASE("Clear Luos Tasks"); - MsgAlloc_Init(NULL); - { - // Last Luos Task is cleared - // - // Init state - // Luos_tasks - // +---------+ - // | Task D1 | - // |---------| - // +---------+ - // | Task D2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | LastTask| - // |---------| - // - // Ending state - // - // Luos_tasks - // +---------+ - // | Task D1 | - // |---------| - // +---------+ - // | Task D2 | - // |---------| - // +---------+ - // | etc... | - // |---------| - // +---------+ - // | 0 | - // |---------| - - luos_task_t expected_luos_tasks[MAX_MSG_NB]; - - NEW_STEP("Check Luos Task is cleared in all cases"); - for (uint16_t task_id = 0; task_id < MAX_MSG_NB; task_id++) - { - for (uint16_t tasks_stack_id = task_id + 1; tasks_stack_id <= MAX_MSG_NB; tasks_stack_id++) - { - // Initialisation - MsgAlloc_Init(NULL); - luos_tasks_stack_id = tasks_stack_id; - - for (uint16_t pt_value = 0; pt_value < MAX_MSG_NB; pt_value++) - { - // Init luos_tasks pointers - luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); - luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value); - - // Init expected pointers - if (pt_value == (tasks_stack_id - 1)) - { - expected_luos_tasks[pt_value].msg_pt = 0; - expected_luos_tasks[pt_value].service_pt = 0; - } - else if (pt_value < task_id) - { - expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value); - expected_luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value); - } - else - { - expected_luos_tasks[pt_value].msg_pt = (msg_t *)(&msg_buffer[0] + pt_value + 1); - expected_luos_tasks[pt_value].service_pt = (service_t *)(&msg_buffer[0] + pt_value + 1); - } - } - - // Launch test - RESET_ASSERT(); - MsgAlloc_ClearLuosTask(task_id); - - // Analyze test results - for (uint8_t i = 0; i < tasks_stack_id; i++) - { - TEST_ASSERT_EQUAL(expected_luos_tasks[i].msg_pt, luos_tasks[i].msg_pt); - TEST_ASSERT_EQUAL(expected_luos_tasks[i].service_pt, luos_tasks[i].service_pt); - } - } - } - } -} diff --git a/test/test_msg_alloc/unit_test_mem_alloc_tx.c b/test/test_msg_alloc/unit_test_mem_alloc_tx.c deleted file mode 100644 index e94f295a1..000000000 --- a/test/test_msg_alloc/unit_test_mem_alloc_tx.c +++ /dev/null @@ -1,601 +0,0 @@ -#include "main.h" -#include "unit_test.h" -#include "msg_alloc.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ -#define MSG_START 10 -#undef VERBOSE_LOCALHOST - -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef struct __attribute__((__packed__)) -{ - msg_t *msg_pt; /*!< Start pointer of the msg on msg_buffer. */ - service_t *service_pt; /*!< Pointer to the concerned service. */ -} luos_task_t; - -typedef struct -{ - uint8_t *data_pt; /*!< Start pointer of the data on msg_buffer. */ - uint16_t size; /*!< size of the data. */ - service_t *service_pt; /*!< Pointer to the transmitting service. */ -} tx_task_t; - -/******************************************************************************* - * Variables - ******************************************************************************/ -extern memory_stats_t *mem_stat; -extern volatile bool reset_needed; -extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; -extern volatile uint8_t *data_ptr; -extern volatile msg_t *oldest_msg; -extern volatile msg_t *used_msg; -extern volatile header_t *copy_task_pointer; -extern volatile msg_t *msg_tasks[MAX_MSG_NB]; -extern volatile uint16_t msg_tasks_stack_id; -extern volatile luos_task_t luos_tasks[MAX_MSG_NB]; -extern volatile uint16_t luos_tasks_stack_id; -extern volatile tx_task_t tx_tasks[MAX_MSG_NB]; -extern volatile uint16_t tx_tasks_stack_id; - -/******************************************************************************* - * Function - ******************************************************************************/ -void unittest_SetTxTask_buffer_full() -{ - //************************************************************** - NEW_TEST_CASE("Check if TX message buffer stack is full"); - MsgAlloc_Init(NULL); - { - // tx_tasks_stack_id = MAX_MSG_NB - // - // tx_tasks init state - // - // +---------+ - // | Tx 1 | - // |---------| - // | Tx 2 | - // |---------| - // | etc... | - // |---------| - // | Tx 10 | - // +---------+<--tx_tasks_stack_id - - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Init variables - //--------------- - uint8_t dummy_data = 1; // To avoid assert - tx_tasks_stack_id = MAX_MSG_NB - 1; - - // Call function and Verify - //--------------------------- - for (uint16_t i = MAX_MSG_NB - 1; i < MAX_MSG_NB + 2; i++) - { - RESET_ASSERT(); - NEW_STEP_IN_LOOP("Function returns FAILED when \"tx tasks stack id\" overflows", i - (MAX_MSG_NB - 1)); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, &dummy_data, crc, size, localhost, ack)); - NEW_STEP_IN_LOOP("Check NO assert has occured", i - (MAX_MSG_NB - 1)); - TEST_ASSERT_FALSE(IS_ASSERT()); - } - } -} - -void unittest_SetTxTask_Tx_too_long() -{ - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in msg buffer"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message doesn't fit in msg buffer function should assert - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |---|other msgs|-----------------------------| Tx | - // +-------------------------------------------------------------+ - // - - // Init variables - //--------------- - uint16_t tx_size = 50; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - oldest_msg = (msg_t *)&msg_buffer[10]; // There is a task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check assert has occured"); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - } -} -void unittest_SetTxTask_Tx_overflow() -{ - //************************************************************** - NEW_TEST_CASE("Tx message doesn't fit in message buffer\n" - "There is space at begin of message buffer"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message doesn't fit in msg buffer. - // There is space in the begining of the buffer: move messages and create Tx Task - // - // - // Tx message to copy - // +-------------------------------------------------------------+ - // |--------------------------------------------------| Tx | - // +-------------------------------------------------------------+ - // - // Init variables - //--------------- - tx_task_t expected_tx_task; - uint8_t *expected_data_ptr; - uint16_t tx_size = 50; - uint8_t tx_message[tx_size]; - ack = 0; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size / 2)]; // There are only 25 bytes left in msg buffer - oldest_msg = (msg_t *)&msg_buffer[80]; - tx_tasks_stack_id = 1; - - expected_data_ptr = (uint8_t *)((uintptr_t)msg_buffer + tx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)msg_buffer; - expected_tx_task.service_pt = service_pt; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)msg_buffer, tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, msg_buffer, tx_size - CRC_SIZE); - } -} -void unittest_SetTxTask_Tx_fit() -{ - //************************************************************** - NEW_TEST_CASE("Tx message fit in msg buffer"); - MsgAlloc_Init(NULL); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message fits in msg buffer. - // - // Tx message fit - // +-------------------------------------------------------------+ - // |-------------------------------| Tx |------| - // +-------------------------------------------------------------+ - // - - // Init variables - //--------------- - uint16_t tx_size = 50; - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - (tx_size + 20)]; // There are 70 bytes left in msg buffer // Rx message = 30 bytes - oldest_msg = (msg_t *)((uintptr_t)data_ptr - tx_size); // There is a task before - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} -void unittest_SetTxTask_Task_already_exists() -{ - //************************************************************** - NEW_TEST_CASE("Tx messages fit in message buffer, but there is already a task in memory"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // - // Tx message hit the next task - // +-------------------------------------------------------------+ - // |------------------------| Tx |Task|--------------------| - // +-------------------------------------------------------------+ - // - - // Init variables - //--------------- - uint16_t tx_size = 50; - ack = 0; - localhost = LOCALHOST; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - tx_size]; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - oldest_msg = (msg_t *)&msg_buffer[(uintptr_t)data_ptr + 1]; // There is a Task - tx_tasks_stack_id = 1; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - MsgAlloc_SetTxTask(service_pt, data, crc, tx_size, localhost, ack); - NEW_STEP("Check assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - } -} - -void unittest_SetTxTask_ACK() -{ - //************************************************************** - NEW_TEST_CASE("Ack transmission"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost = EXTERNALHOST; - uint8_t ack; - - // Tx message size > Rx size currently received. - // Tx and Rx messages fit in msg buffer. - // There is space : move messages and create Tx Task - // Add Ack - // - // Tx message + Rx message to copy - // +-------------------------------------------------------------+ - // |----------------------------------| Rx |---------------------| - // |----------------------------------| Tx |-----------------| - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx + Ack | Rx |------| - // +-------------------------------------------------------------+ - - // Init variables - //--------------- - tx_task_t expected_tx_task; - uint8_t *expected_data_ptr; - uint16_t tx_size = 50 + sizeof(ack); - uint8_t tx_message[tx_size]; - ack = 55; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 51 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - - expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); // Rx message will be copied after Tx message - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)data_ptr; - expected_tx_task.service_pt = service_pt; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE - sizeof(ack); i++) - { - tx_message[i] = i; - } - tx_message[tx_size] = ack; - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is incremented to 2"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - - // Check Tx Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check ACK : good value in good memory position"); - TEST_ASSERT_EQUAL(ack, msg_buffer[MSG_START + tx_size - 1]); // Ack - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE - 1); - } -} - -void unittest_SetTxTask_internal_localhost() -{ - //************************************************************** - NEW_TEST_CASE("Internal Localhost"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost; - uint8_t ack; - - // Tx message size > Rx size currently received. - // Tx and Rx messages fit in msg buffer. - // LocalHost : Compute msg_tasks[0] - // - // Tx message + Rx message to copy - // +-------------------------------------------------------------+ - // |----------------------------------| Rx |---------------------| - // |----------------------------------| Tx |-----------------| - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +----------------------------------^--------------------------+ - // | - // msg_tasks[0] - - // Init variables - //--------------- - tx_task_t expected_tx_task; - uint8_t *expected_data_ptr; - uint16_t tx_size = 50; - uint8_t tx_message[tx_size]; - - ack = 0; - localhost = LOCALHOST; // Localhost : to fill msg_task - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - msg_tasks_stack_id = 0; - - expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)data_ptr; - expected_tx_task.service_pt = service_pt; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" = 1"); - TEST_ASSERT_EQUAL(1, tx_tasks_stack_id); - NEW_STEP("Check \"message tasks stack id\" = 1"); - TEST_ASSERT_EQUAL(1, msg_tasks_stack_id); - - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - - // Check Tx Tasks is void - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_NULL(tx_tasks[tx_tasks_stack_id].data_pt); - NEW_STEP("Check Tx task \"size\" = 0"); - TEST_ASSERT_EQUAL(0, tx_tasks[tx_tasks_stack_id].size); - - // Check Message Tasks - NEW_STEP("Check \"message tasks\" points to expected message"); - TEST_ASSERT_EQUAL((msg_t *)&msg_buffer[MSG_START], msg_tasks[msg_tasks_stack_id - 1]); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - } -} - -void unittest_SetTxTask_multihost() -{ //************************************************************** - NEW_TEST_CASE("MultiHost"); - MsgAlloc_Init(NULL); - memset((void *)msg_buffer, 0, sizeof(msg_buffer)); - { - error_return_t result; - uint8_t *data; - service_t *service_pt; - uint16_t crc; - uint16_t size; - luos_localhost_t localhost; - uint8_t ack; - - // Tx message size > Rx size currently received. - // Tx and Rx messages fit in msg buffer. - // MultiHost : Compute msg_tasks[0] + tx_tasks - // - // Tx message + Rx message to copy - // +-------------------------------------------------------------+ - // |----------------------------------| Rx |---------------------| - // |----------------------------------| Tx |-----------------| - // +-------------------------------------------------------------+ - // - // msg_buffer ending state - // +-------------------------------------------------------------+ - // |----------------------------------| Tx | Rx |------------| - // +----------------------------------^--------------------------+ - // | - // msg_tasks[0] - // tx_tasks[x] - - // Init variables - //--------------- - tx_task_t expected_tx_task; - uint8_t *expected_data_ptr; - uint16_t tx_size = 50; - uint8_t tx_message[tx_size]; - - ack = 0; - localhost = MULTIHOST; - service_pt = (service_t *)msg_buffer; // Fake service value - data = (uint8_t *)tx_message; // Tx message = 50 bytes - data_ptr = (uint8_t *)&msg_buffer[MSG_START]; // msg buffer is almost empty - oldest_msg = (msg_t *)&msg_buffer[2 * tx_size + 1]; // No Task - tx_tasks_stack_id = 1; - msg_tasks_stack_id = 0; - - expected_data_ptr = (uint8_t *)((uintptr_t)data_ptr + tx_size); - - expected_tx_task.size = tx_size; - expected_tx_task.data_pt = (uint8_t *)data_ptr; - expected_tx_task.service_pt = service_pt; - - // Init Tx message - for (size_t i = 0; i < tx_size - CRC_SIZE; i++) - { - tx_message[i] = i; - } - - // Call function and Verify - //--------------------------- - RESET_ASSERT(); - NEW_STEP("Check function returns SUCCEED"); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_SetTxTask(service_pt, tx_message, crc, tx_size, localhost, ack)); - NEW_STEP("Check NO assert has occured"); - TEST_ASSERT_FALSE(IS_ASSERT()); - - // Check pointers - NEW_STEP("Check \"tx tasks stack id\" is double incremented"); - TEST_ASSERT_EQUAL(2, tx_tasks_stack_id); // 2 incrementations : 1 for tx_tasks + 1 for message_tasks - NEW_STEP("Check \"message tasks stack id\" = 1"); - TEST_ASSERT_EQUAL(1, msg_tasks_stack_id); - - NEW_STEP("Check \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(expected_data_ptr, data_ptr); - - // Check Tx Tasks AND Message Tasks - tx_tasks_stack_id--; - NEW_STEP("Check Tx task \"size\" is correctly computed"); - TEST_ASSERT_EQUAL(tx_size, tx_tasks[tx_tasks_stack_id].size); - NEW_STEP("Check Tx task \"service pointer\" is correctly computed"); - TEST_ASSERT_EQUAL(service_pt, tx_tasks[tx_tasks_stack_id].service_pt); - NEW_STEP("Check Tx task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[MSG_START], tx_tasks[tx_tasks_stack_id].data_pt); - NEW_STEP("Check message task \"data pointer\" is correctly computed"); - TEST_ASSERT_EQUAL((msg_t *)&msg_buffer[MSG_START], msg_tasks[msg_tasks_stack_id - 1]); - -#ifdef UNIT_TEST_DEBUG - printf("\n"); - for (uint16_t i = 0; i < MSG_BUFFER_SIZE; i++) - { - printf("%d - ", msg_buffer[i]); - } - printf("\n"); -#endif - - // Check messages - NEW_STEP("Check Tx message integrity : correct values in correct memory position"); - TEST_ASSERT_EQUAL_MEMORY(tx_message, (uint8_t *)&msg_buffer[MSG_START], tx_size - CRC_SIZE); - } -} diff --git a/test/test_timestamp/main.c b/test/test_timestamp/main.c index 8059e9e2c..fed8a6f78 100644 --- a/test/test_timestamp/main.c +++ b/test/test_timestamp/main.c @@ -5,7 +5,7 @@ extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; extern default_scenario_t default_sc; -static void MessageHandler(service_t *service, msg_t *msg) +static void MessageHandler(service_t *service, const msg_t *msg) { default_sc.App_1.last_rx_msg.header.config = msg->header.config; default_sc.App_1.last_rx_msg.header.size = msg->header.size; diff --git a/tool_services/gate/TinyJSON/bootloader_ex.h b/tool_services/gate/TinyJSON/bootloader_ex.h index ab1aef3c7..fe5531d51 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.h +++ b/tool_services/gate/TinyJSON/bootloader_ex.h @@ -7,7 +7,6 @@ #ifndef BOOTLOADER_EX_H #define BOOTLOADER_EX_H -#include "struct_io.h" #include "luos_engine.h" #include "tiny-json.h" /******************************************************************************* @@ -26,4 +25,4 @@ void Bootloader_JsonToLuos(service_t *, char *, json_t const *); uint16_t Bootloader_StartData(char *); void Bootloader_EndData(service_t *, char *, char *); -#endif /* BOOTLOADER_H */ \ No newline at end of file +#endif /* BOOTLOADER_H */ diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index daec76345..df0b7a557 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -925,21 +925,6 @@ void Convert_AssertToData(service_t *service, uint16_t source, luos_assert_t ass // Send the message to pipe PipeLink_Send(service, assert_json, strlen(assert_json)); } -// This function generate a Json about excluded services and send it. -void Convert_ExcludedServiceData(service_t *service) -{ - char json[300]; - search_result_t result; - RTFilter_ID(RTFilter_Reset(&result), service->dead_service_spotted); - if (result.result_nbr == 0) - { - // This can happen if a service is excluded during the detection. - return; - } - sprintf(json, "{\"dead_service\":\"%s\"}\n", result.result_table[0]->alias); - // Send the message to pipe - PipeLink_Send(service, json, strlen(json)); -} /******************************************************************************* * Luos routing table information to Json convertion @@ -1079,4 +1064,4 @@ const char *Convert_StringFromType(luos_type_t type) return "Unknown"; break; } -} \ No newline at end of file +} diff --git a/tool_services/gate/convert.h b/tool_services/gate/convert.h index 0f736e7a5..b97360077 100644 --- a/tool_services/gate/convert.h +++ b/tool_services/gate/convert.h @@ -38,7 +38,6 @@ void Convert_VoidData(service_t *service); // Luos default information to Data convertion void Convert_AssertToData(service_t *service, uint16_t source, luos_assert_t assertion); -void Convert_ExcludedServiceData(service_t *service); // Luos routing table information to Json convertion void Convert_RoutingTableData(service_t *service); diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index 2e230f85b..971c92a54 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -61,14 +61,6 @@ void DataManager_collect(service_t *service) // This function manage entirely data conversion void DataManager_Run(service_t *service) { - // Check if there is a dead service. - if (service->dead_service_spotted) - { - Convert_ExcludedServiceData(service); - RoutingTB_RemoveOnRoutingTable(service->dead_service_spotted); - // Reset spotted dead service - service->dead_service_spotted = 0; - } #ifdef GATE_POLLING DataManager_collect(service); #endif @@ -77,20 +69,20 @@ void DataManager_Run(service_t *service) // This function manage only commands incoming from pipe void DataManager_RunPipeOnly(service_t *service) { - msg_t *data_msg; + msg_t data_msg; while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED) { // This message is a command from pipe // Convert the received data into Luos commands static char data_cmd[GATE_BUFF_SIZE]; - if (data_msg->header.cmd == PARAMETERS) + if (data_msg.header.cmd == PARAMETERS) { uintptr_t pointer; - memcpy(&pointer, data_msg->data, sizeof(void *)); + memcpy(&pointer, data_msg.data, sizeof(void *)); PipeLink_SetDirectPipeSend((void *)pointer); continue; } - if (Luos_ReceiveData(service, data_msg, data_cmd) > 0) + if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) { // We finish to receive this data, execute the received command Convert_DataToLuos(service, data_cmd); @@ -99,7 +91,7 @@ void DataManager_RunPipeOnly(service_t *service) if (Luos_ReadMsg(service, &data_msg) == SUCCEED) { // Check if a node send a end detection - if (data_msg->header.cmd == END_DETECTION) + if (data_msg.header.cmd == END_DETECTION) { // Find a pipe PipeLink_Find(service); @@ -120,16 +112,16 @@ void DataManager_RunPipeOnly(service_t *service) // This function will create a data string for services datas void DataManager_Format(service_t *service) { - static uint32_t FirstNoReceptionDate = 0; - static uint32_t LastVoidMsg = 0; char data[GATE_BUFF_SIZE]; - char *data_ptr = data; char boot_data[GATE_BUFF_SIZE]; - char *boot_data_ptr = boot_data; - msg_t *data_msg = 0; - uint8_t data_ok = false; - uint8_t boot_data_ok = false; + msg_t data_msg; search_result_t result; + static uint32_t FirstNoReceptionDate = 0; + static uint32_t LastVoidMsg = 0; + char *data_ptr = data; + char *boot_data_ptr = boot_data; + uint8_t data_ok = false; + uint8_t boot_data_ok = false; RTFilter_Reset(&result); @@ -145,28 +137,28 @@ void DataManager_Format(service_t *service) if (Luos_ReadFromService(service, result.result_table[i]->id, &data_msg) == SUCCEED) { // check if this is an assert - if (data_msg->header.cmd == ASSERT) + if (data_msg.header.cmd == ASSERT) { luos_assert_t assertion; - memcpy(assertion.unmap, data_msg->data, data_msg->header.size); - assertion.unmap[data_msg->header.size] = '\0'; - Convert_AssertToData(service, data_msg->header.source, assertion); + memcpy(assertion.unmap, data_msg.data, data_msg.header.size); + assertion.unmap[data_msg.header.size] = '\0'; + Convert_AssertToData(service, data_msg.header.source, assertion); i++; continue; } // check if a node send a bootloader message - if (data_msg->header.cmd == BOOTLOADER_RESP) + if (data_msg.header.cmd == BOOTLOADER_RESP) { do { - boot_data_ptr += Bootloader_LuosToJson(data_msg, boot_data_ptr); - } while (Luos_ReadFromService(service, data_msg->header.source, &data_msg) == SUCCEED); + boot_data_ptr += Bootloader_LuosToJson(&data_msg, boot_data_ptr); + } while (Luos_ReadFromService(service, data_msg.header.source, &data_msg) == SUCCEED); boot_data_ok = true; i++; continue; } // check if a node send a end detection - if (data_msg->header.cmd == END_DETECTION) + if (data_msg.header.cmd == END_DETECTION) { // find a pipe PipeLink_Find(service); @@ -174,17 +166,17 @@ void DataManager_Format(service_t *service) continue; } // Check if this is a message from pipe - if (data_msg->header.source == PipeLink_GetId()) + if (data_msg.header.source == PipeLink_GetId()) { do { // This message is a command from pipe static char data_cmd[GATE_BUFF_SIZE]; // Convert the received data into Luos commands - if (Luos_ReceiveData(service, data_msg, data_cmd) > 0) + if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) { // We finish to receive this data, execute the received command - if (data_msg->header.cmd == SET_CMD) + if (data_msg.header.cmd == SET_CMD) { Convert_DataToLuos(service, data_cmd); } @@ -203,8 +195,8 @@ void DataManager_Format(service_t *service) // Convert all msgs from this service into data do { - data_ptr += Convert_MsgToData(data_msg, data_ptr); - } while (Luos_ReadFromService(service, data_msg->header.source, &data_msg) == SUCCEED); + data_ptr += Convert_MsgToData(&data_msg, data_ptr); + } while (Luos_ReadFromService(service, data_msg.header.source, &data_msg) == SUCCEED); data_ptr += Convert_EndServiceData(data_ptr); LUOS_ASSERT((data_ptr - data) < GATE_BUFF_SIZE); diff --git a/tool_services/inspector/data_manager.c b/tool_services/inspector/data_manager.c index 94e31f961..a290e3154 100644 --- a/tool_services/inspector/data_manager.c +++ b/tool_services/inspector/data_manager.c @@ -152,7 +152,7 @@ void DataManager_GetPipeMsg(service_t *service, msg_t *data_msg) void DataManager_GetServiceMsg(service_t *service) { // loop into services. - msg_t *data_msg; + msg_t data_msg; search_result_t result; uint8_t i = 0; @@ -163,21 +163,21 @@ void DataManager_GetServiceMsg(service_t *service) if (Luos_ReadFromService(service, result.result_table[i]->id, &data_msg) == SUCCEED) { // drop the messages that are destined to pipe - if (data_msg->header.target == PipeLink_GetId()) + if (data_msg.header.target == PipeLink_GetId()) { i++; continue; } // Check if this is a message from pipe - if (data_msg->header.source == PipeLink_GetId()) + if (data_msg.header.source == PipeLink_GetId()) { // treat message from pipe - DataManager_GetPipeMsg(service, data_msg); + DataManager_GetPipeMsg(service, &data_msg); i++; continue; } // check if this is an assert - if ((data_msg->header.cmd == ASSERT) && (data_msg->header.size > 0)) + if ((data_msg.header.cmd == ASSERT) && (data_msg.header.size > 0)) { if (assert_num >= MAX_ASSERT_NUMBER) { @@ -190,26 +190,26 @@ void DataManager_GetServiceMsg(service_t *service) assert_num--; } // save the assert message to the assert messages buffer - memcpy(&assert_buf[assert_num][0], data_msg->stream, sizeof(header_t) + data_msg->header.size); + memcpy(&assert_buf[assert_num][0], data_msg.stream, sizeof(header_t) + data_msg.header.size); // store the size of this message - assert_buf_size[assert_num] = sizeof(header_t) + data_msg->header.size; + assert_buf_size[assert_num] = sizeof(header_t) + data_msg.header.size; assert_num++; i++; continue; } - if (data_msg->header.cmd == END_DETECTION) + if (data_msg.header.cmd == END_DETECTION) { PipeLink_Find(service); i++; continue; } - if (data_msg->header.cmd == ASK_DETECTION) + if (data_msg.header.cmd == ASK_DETECTION) { i++; continue; } // send any other message to pipe - PipeLink_Send(service, data_msg->stream, (sizeof(uint8_t) * data_msg->header.size) + sizeof(header_t)); + PipeLink_Send(service, data_msg.stream, (sizeof(uint8_t) * data_msg.header.size) + sizeof(header_t)); } i++; } diff --git a/tool_services/pipe/pipe.c b/tool_services/pipe/pipe.c index db64d92f9..10febe874 100644 --- a/tool_services/pipe/pipe.c +++ b/tool_services/pipe/pipe.c @@ -24,7 +24,7 @@ uint8_t tx_Buffer[PIPE_TX_BUFFER_SIZE] = {0}; /******************************************************************************* * Function ******************************************************************************/ -static void Pipe_MsgHandler(service_t *service, msg_t *msg); +static void Pipe_MsgHandler(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init * @param None @@ -53,7 +53,7 @@ void Pipe_Loop(void) * @param Msg receive * @return None ******************************************************************************/ -static void Pipe_MsgHandler(service_t *service, msg_t *msg) +static void Pipe_MsgHandler(service_t *service, const msg_t *msg) { uint16_t size = 0; From 6a8f4c7a4ab51280d68446fff5a7a25ef62e55db Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 3 May 2023 09:57:48 +0200 Subject: [PATCH 055/198] Improve unit tests organization --- test/{ => tests_core}/test_luos/main.c | 0 test/{ => tests_core}/test_luos/main.h | 0 test/{ => tests_core}/test_routing_table/main.c | 0 test/{ => tests_core}/test_routing_table/main.h | 0 test/{ => tests_core}/test_timestamp/main.c | 0 test/{ => tests_core}/test_timestamp/main.h | 0 test/{ => tests_core}/test_topic/main.c | 0 test/{ => tests_core}/test_topic/main.h | 0 test/{ => tests_core}/tests_od/test_angular/main.c | 0 test/{ => tests_core}/tests_od/test_angular/main.h | 0 test/{ => tests_core}/tests_od/test_control/main.c | 0 test/{ => tests_core}/tests_od/test_control/main.h | 0 test/{ => tests_core}/tests_od/test_electric/main.c | 0 test/{ => tests_core}/tests_od/test_electric/main.h | 0 test/{ => tests_core}/tests_od/test_force/main.c | 0 test/{ => tests_core}/tests_od/test_force/main.h | 0 test/{ => tests_core}/tests_od/test_illuminance/main.c | 0 test/{ => tests_core}/tests_od/test_illuminance/main.h | 0 test/{ => tests_core}/tests_od/test_linear/main.c | 0 test/{ => tests_core}/tests_od/test_linear/main.h | 0 test/{ => tests_core}/tests_od/test_pid/main.c | 0 test/{ => tests_core}/tests_od/test_pid/main.h | 0 test/{ => tests_core}/tests_od/test_pressure/main.c | 0 test/{ => tests_core}/tests_od/test_pressure/main.h | 0 test/{ => tests_core}/tests_od/test_ratio/main.c | 0 test/{ => tests_core}/tests_od/test_ratio/main.h | 0 test/{ => tests_core}/tests_od/test_temperature/main.c | 0 test/{ => tests_core}/tests_od/test_temperature/main.h | 0 test/{ => tests_core}/tests_od/test_time/main.c | 0 test/{ => tests_core}/tests_od/test_time/main.h | 0 test/{ => tests_io}/test_msg_alloc/main.c | 0 test/{ => tests_io}/test_msg_alloc/main.h | 0 test/{ => tests_io}/test_msg_alloc/unit_test_mem_alloc.c | 0 33 files changed, 0 insertions(+), 0 deletions(-) rename test/{ => tests_core}/test_luos/main.c (100%) rename test/{ => tests_core}/test_luos/main.h (100%) rename test/{ => tests_core}/test_routing_table/main.c (100%) rename test/{ => tests_core}/test_routing_table/main.h (100%) rename test/{ => tests_core}/test_timestamp/main.c (100%) rename test/{ => tests_core}/test_timestamp/main.h (100%) rename test/{ => tests_core}/test_topic/main.c (100%) rename test/{ => tests_core}/test_topic/main.h (100%) rename test/{ => tests_core}/tests_od/test_angular/main.c (100%) rename test/{ => tests_core}/tests_od/test_angular/main.h (100%) rename test/{ => tests_core}/tests_od/test_control/main.c (100%) rename test/{ => tests_core}/tests_od/test_control/main.h (100%) rename test/{ => tests_core}/tests_od/test_electric/main.c (100%) rename test/{ => tests_core}/tests_od/test_electric/main.h (100%) rename test/{ => tests_core}/tests_od/test_force/main.c (100%) rename test/{ => tests_core}/tests_od/test_force/main.h (100%) rename test/{ => tests_core}/tests_od/test_illuminance/main.c (100%) rename test/{ => tests_core}/tests_od/test_illuminance/main.h (100%) rename test/{ => tests_core}/tests_od/test_linear/main.c (100%) rename test/{ => tests_core}/tests_od/test_linear/main.h (100%) rename test/{ => tests_core}/tests_od/test_pid/main.c (100%) rename test/{ => tests_core}/tests_od/test_pid/main.h (100%) rename test/{ => tests_core}/tests_od/test_pressure/main.c (100%) rename test/{ => tests_core}/tests_od/test_pressure/main.h (100%) rename test/{ => tests_core}/tests_od/test_ratio/main.c (100%) rename test/{ => tests_core}/tests_od/test_ratio/main.h (100%) rename test/{ => tests_core}/tests_od/test_temperature/main.c (100%) rename test/{ => tests_core}/tests_od/test_temperature/main.h (100%) rename test/{ => tests_core}/tests_od/test_time/main.c (100%) rename test/{ => tests_core}/tests_od/test_time/main.h (100%) rename test/{ => tests_io}/test_msg_alloc/main.c (100%) rename test/{ => tests_io}/test_msg_alloc/main.h (100%) rename test/{ => tests_io}/test_msg_alloc/unit_test_mem_alloc.c (100%) diff --git a/test/test_luos/main.c b/test/tests_core/test_luos/main.c similarity index 100% rename from test/test_luos/main.c rename to test/tests_core/test_luos/main.c diff --git a/test/test_luos/main.h b/test/tests_core/test_luos/main.h similarity index 100% rename from test/test_luos/main.h rename to test/tests_core/test_luos/main.h diff --git a/test/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c similarity index 100% rename from test/test_routing_table/main.c rename to test/tests_core/test_routing_table/main.c diff --git a/test/test_routing_table/main.h b/test/tests_core/test_routing_table/main.h similarity index 100% rename from test/test_routing_table/main.h rename to test/tests_core/test_routing_table/main.h diff --git a/test/test_timestamp/main.c b/test/tests_core/test_timestamp/main.c similarity index 100% rename from test/test_timestamp/main.c rename to test/tests_core/test_timestamp/main.c diff --git a/test/test_timestamp/main.h b/test/tests_core/test_timestamp/main.h similarity index 100% rename from test/test_timestamp/main.h rename to test/tests_core/test_timestamp/main.h diff --git a/test/test_topic/main.c b/test/tests_core/test_topic/main.c similarity index 100% rename from test/test_topic/main.c rename to test/tests_core/test_topic/main.c diff --git a/test/test_topic/main.h b/test/tests_core/test_topic/main.h similarity index 100% rename from test/test_topic/main.h rename to test/tests_core/test_topic/main.h diff --git a/test/tests_od/test_angular/main.c b/test/tests_core/tests_od/test_angular/main.c similarity index 100% rename from test/tests_od/test_angular/main.c rename to test/tests_core/tests_od/test_angular/main.c diff --git a/test/tests_od/test_angular/main.h b/test/tests_core/tests_od/test_angular/main.h similarity index 100% rename from test/tests_od/test_angular/main.h rename to test/tests_core/tests_od/test_angular/main.h diff --git a/test/tests_od/test_control/main.c b/test/tests_core/tests_od/test_control/main.c similarity index 100% rename from test/tests_od/test_control/main.c rename to test/tests_core/tests_od/test_control/main.c diff --git a/test/tests_od/test_control/main.h b/test/tests_core/tests_od/test_control/main.h similarity index 100% rename from test/tests_od/test_control/main.h rename to test/tests_core/tests_od/test_control/main.h diff --git a/test/tests_od/test_electric/main.c b/test/tests_core/tests_od/test_electric/main.c similarity index 100% rename from test/tests_od/test_electric/main.c rename to test/tests_core/tests_od/test_electric/main.c diff --git a/test/tests_od/test_electric/main.h b/test/tests_core/tests_od/test_electric/main.h similarity index 100% rename from test/tests_od/test_electric/main.h rename to test/tests_core/tests_od/test_electric/main.h diff --git a/test/tests_od/test_force/main.c b/test/tests_core/tests_od/test_force/main.c similarity index 100% rename from test/tests_od/test_force/main.c rename to test/tests_core/tests_od/test_force/main.c diff --git a/test/tests_od/test_force/main.h b/test/tests_core/tests_od/test_force/main.h similarity index 100% rename from test/tests_od/test_force/main.h rename to test/tests_core/tests_od/test_force/main.h diff --git a/test/tests_od/test_illuminance/main.c b/test/tests_core/tests_od/test_illuminance/main.c similarity index 100% rename from test/tests_od/test_illuminance/main.c rename to test/tests_core/tests_od/test_illuminance/main.c diff --git a/test/tests_od/test_illuminance/main.h b/test/tests_core/tests_od/test_illuminance/main.h similarity index 100% rename from test/tests_od/test_illuminance/main.h rename to test/tests_core/tests_od/test_illuminance/main.h diff --git a/test/tests_od/test_linear/main.c b/test/tests_core/tests_od/test_linear/main.c similarity index 100% rename from test/tests_od/test_linear/main.c rename to test/tests_core/tests_od/test_linear/main.c diff --git a/test/tests_od/test_linear/main.h b/test/tests_core/tests_od/test_linear/main.h similarity index 100% rename from test/tests_od/test_linear/main.h rename to test/tests_core/tests_od/test_linear/main.h diff --git a/test/tests_od/test_pid/main.c b/test/tests_core/tests_od/test_pid/main.c similarity index 100% rename from test/tests_od/test_pid/main.c rename to test/tests_core/tests_od/test_pid/main.c diff --git a/test/tests_od/test_pid/main.h b/test/tests_core/tests_od/test_pid/main.h similarity index 100% rename from test/tests_od/test_pid/main.h rename to test/tests_core/tests_od/test_pid/main.h diff --git a/test/tests_od/test_pressure/main.c b/test/tests_core/tests_od/test_pressure/main.c similarity index 100% rename from test/tests_od/test_pressure/main.c rename to test/tests_core/tests_od/test_pressure/main.c diff --git a/test/tests_od/test_pressure/main.h b/test/tests_core/tests_od/test_pressure/main.h similarity index 100% rename from test/tests_od/test_pressure/main.h rename to test/tests_core/tests_od/test_pressure/main.h diff --git a/test/tests_od/test_ratio/main.c b/test/tests_core/tests_od/test_ratio/main.c similarity index 100% rename from test/tests_od/test_ratio/main.c rename to test/tests_core/tests_od/test_ratio/main.c diff --git a/test/tests_od/test_ratio/main.h b/test/tests_core/tests_od/test_ratio/main.h similarity index 100% rename from test/tests_od/test_ratio/main.h rename to test/tests_core/tests_od/test_ratio/main.h diff --git a/test/tests_od/test_temperature/main.c b/test/tests_core/tests_od/test_temperature/main.c similarity index 100% rename from test/tests_od/test_temperature/main.c rename to test/tests_core/tests_od/test_temperature/main.c diff --git a/test/tests_od/test_temperature/main.h b/test/tests_core/tests_od/test_temperature/main.h similarity index 100% rename from test/tests_od/test_temperature/main.h rename to test/tests_core/tests_od/test_temperature/main.h diff --git a/test/tests_od/test_time/main.c b/test/tests_core/tests_od/test_time/main.c similarity index 100% rename from test/tests_od/test_time/main.c rename to test/tests_core/tests_od/test_time/main.c diff --git a/test/tests_od/test_time/main.h b/test/tests_core/tests_od/test_time/main.h similarity index 100% rename from test/tests_od/test_time/main.h rename to test/tests_core/tests_od/test_time/main.h diff --git a/test/test_msg_alloc/main.c b/test/tests_io/test_msg_alloc/main.c similarity index 100% rename from test/test_msg_alloc/main.c rename to test/tests_io/test_msg_alloc/main.c diff --git a/test/test_msg_alloc/main.h b/test/tests_io/test_msg_alloc/main.h similarity index 100% rename from test/test_msg_alloc/main.h rename to test/tests_io/test_msg_alloc/main.h diff --git a/test/test_msg_alloc/unit_test_mem_alloc.c b/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c similarity index 100% rename from test/test_msg_alloc/unit_test_mem_alloc.c rename to test/tests_io/test_msg_alloc/unit_test_mem_alloc.c From efd61c855a54a6f22899544428b335be77c63004 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 3 May 2023 12:25:56 +0200 Subject: [PATCH 056/198] Add filter unit test --- engine/IO/src/filter.c | 21 +- platformio.ini | 2 +- test/_resources/Unity/unit_test.h | 4 +- test/test_robus/main.c | 44 -- test/tests_io/test_filter/main.c | 718 ++++++++++++++++++ test/tests_io/test_filter/main.h | 4 + .../test_msg_alloc/unit_test_mem_alloc.c | 435 +++++++---- 7 files changed, 1036 insertions(+), 192 deletions(-) create mode 100644 test/tests_io/test_filter/main.c create mode 100644 test/tests_io/test_filter/main.h diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index d531e218e..69c1248d0 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -66,8 +66,9 @@ void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) //--------------------------->|__________| // Shift byte byte Mask of bit address - LUOS_ASSERT(service_id > 0); - LUOS_ASSERT(service_id <= 4096 - MAX_SERVICE_NUMBER); + LUOS_ASSERT((service_id > 0) + && (service_id <= 4096 - MAX_SERVICE_NUMBER) + && (service_number <= MAX_SERVICE_NUMBER)); Filter_IdInit(); uint16_t tempo = 0; filter_ctx.IDShiftMask = (service_id - 1) / 8; // aligned to byte @@ -87,6 +88,7 @@ void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) ******************************************************************************/ void Filter_AddTopic(uint16_t topic_id) { + LUOS_ASSERT(topic_id <= LAST_TOPIC); // Add 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] |= 1 << (topic_id - ((int)(topic_id / 8)) * 8); } @@ -98,6 +100,7 @@ void Filter_AddTopic(uint16_t topic_id) ******************************************************************************/ void Filter_RmTopic(uint16_t topic_id) { + LUOS_ASSERT(topic_id <= LAST_TOPIC); // Remove 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] &= ~(1 << (topic_id - ((int)(topic_id / 8)) * 8)); } @@ -115,7 +118,7 @@ _CRITICAL bool Filter_ServiceID(uint16_t service_id) // In an node, service ID are consecutive // MaskID is byte field wich have the size of MAX_SERVICE_NUMBER // Shift depend od ID of first service in Node (shift = NodeID/8) - + LUOS_ASSERT(service_id <= 4096); uint16_t compare = 0; if ((service_id > (8 * filter_ctx.IDShiftMask))) // IDMask aligned byte @@ -157,10 +160,12 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) * @brief Parse all services type to find if target exists * @param type_id of message * @return bool true if there is one false if not + * We can't do this the same way other are done because identifiers don't have any continuity * _CRITICAL function call in IRQ ******************************************************************************/ _CRITICAL bool Filter_Type(uint16_t type_id) { + LUOS_ASSERT(type_id <= 4096); // Check all service type for (int i = 0; i < Service_GetNumber(); i++) { @@ -203,11 +208,8 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) } break; case BROADCAST: - if (header->target == BROADCAST_VAL) - { - // This concerns Luos phy and Robus - return 0x01 | (0x01 << 1); - } + // This concerns Luos phy and Robus + return 0x01 | (0x01 << 1); break; case NODEIDACK: case NODEID: @@ -225,10 +227,11 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) } break; default: + LUOS_ASSERT(0); // This concerns Robus only return 0x01 << 1; break; } - // This concerns Robus only + // This concerns Robus only by default return 0x01 << 1; } diff --git a/platformio.ini b/platformio.ini index 86e7b38a9..315fce0ab 100644 --- a/platformio.ini +++ b/platformio.ini @@ -32,4 +32,4 @@ build_type = debug test_build_src = true ; To debug a test, replace "test_template" by the directory test name you want to debug (example : "test_msg_alloc") -debug_test = test_msg_alloc +debug_test = tests_io/test_filter diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index 0acbe0b55..ea4baff4a 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -35,7 +35,9 @@ extern bool try_state; #define CATCH else -#define END_TRY try_state = false +#define END_TRY \ + try_state = false; \ + RESET_ASSERT() /******************************************************************************* * Function diff --git a/test/test_robus/main.c b/test/test_robus/main.c index b91a70851..f9da3a0a6 100644 --- a/test/test_robus/main.c +++ b/test/test_robus/main.c @@ -4,51 +4,9 @@ #include "context.h" #include "unit_test.h" #include "default_scenario.h" -#include "filter.h" extern default_scenario_t default_sc; -void unittest_Filter_AddServiceId() -{ - NEW_TEST_CASE("Service ID mask test"); - { - Filter_IdInit(); - - Filter_AddServiceId(7, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + SERVICE_NUMBER - 1)); - - Filter_AddServiceId(8, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + SERVICE_NUMBER - 1)); - - Filter_AddServiceId(9, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + SERVICE_NUMBER - 1)); - } - - NEW_TEST_CASE("Limit 4096"); - { - Filter_IdInit(); - Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER, SERVICE_NUMBER); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_SERVICE_NUMBER)); - } - - NEW_TEST_CASE("Limit 0"); - { - RESET_ASSERT(); - Filter_IdInit(); - TRY - { - Filter_AddServiceId(0, SERVICE_NUMBER); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - RESET_ASSERT(); - } -} - void unittest_Luos_Subscribe(void) { NEW_TEST_CASE("Normal Add to node topic list"); @@ -245,8 +203,6 @@ int main(int argc, char **argv) { UNITY_BEGIN(); - // Big data reception - UNIT_TEST_RUN(unittest_Filter_AddServiceId); UNIT_TEST_RUN(unittest_Luos_Subscribe); UNIT_TEST_RUN(unittest_Robus_TopicUnsubscribe); diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c new file mode 100644 index 000000000..445e39a4e --- /dev/null +++ b/test/tests_io/test_filter/main.c @@ -0,0 +1,718 @@ +#include "main.h" +#include "unit_test.h" +#include "filter.h" +#include "../src/service.c" + +void unittest_Filter_ServiceId() +{ + uint16_t service_number = 10; + NEW_TEST_CASE("Basic Service ID mask test"); + { + Filter_IdInit(); + TRY + { + Filter_AddServiceId(7, service_number); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(8, service_number); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(9, service_number); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(9, 0); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + service_number = MAX_SERVICE_NUMBER; + NEW_TEST_CASE("Service ID mask test with max services"); + { + Filter_IdInit(); + + TRY + { + Filter_AddServiceId(7, service_number); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(8, service_number); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(9, service_number); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(9, 0); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); + TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Overlap the MAX_SERVICE_NUMBER"); + { + Filter_IdInit(); + TRY + { + Filter_AddServiceId(1, MAX_SERVICE_NUMBER + 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test the id 4096 Limit"); + { + Filter_IdInit(); + TRY + { + Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER, service_number); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_SERVICE_NUMBER)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER + 1, service_number); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + + TRY + { + Filter_ServiceID(4096 + 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test the id 0 Limit"); + { + Filter_IdInit(); + TRY + { + Filter_AddServiceId(0, service_number); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_Filter_Topic() +{ + NEW_TEST_CASE("Test the id max Limit"); + { + Filter_TopicInit(); + TRY + { + Filter_AddTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + Filter_TopicInit(); + TRY + { + Filter_AddTopic(LAST_TOPIC + 1); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC + 1)); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + + Filter_TopicInit(); + TRY + { + Filter_AddTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + Filter_RmTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + Filter_TopicInit(); + TRY + { + Filter_RmTopic(LAST_TOPIC + 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test normal topic filtering"); + { + Filter_TopicInit(); + TRY + { + Filter_AddTopic(0); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddTopic(1); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddTopic(3); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(true, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(true, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(0); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(true, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(0); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(true, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(3); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(1); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(1); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_RmTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(2)); + TEST_ASSERT_EQUAL(false, Filter_Topic(3)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Filter_Type() +{ + + NEW_TEST_CASE("Test the id max Limit"); + { + TRY + { + Filter_Type(4096 + 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test the result if there is no service"); + { + TRY + { + service_ctx.number = 0; + TEST_ASSERT_EQUAL(false, Filter_Type(0)); + TEST_ASSERT_EQUAL(false, Filter_Type(1)); + TEST_ASSERT_EQUAL(false, Filter_Type(2)); + TEST_ASSERT_EQUAL(false, Filter_Type(12)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test the result on normal condition"); + { + TRY + { + service_ctx.number = 1; + service_ctx.list[0].type = 0; + TEST_ASSERT_EQUAL(true, Filter_Type(0)); + TEST_ASSERT_EQUAL(false, Filter_Type(1)); + TEST_ASSERT_EQUAL(false, Filter_Type(2)); + TEST_ASSERT_EQUAL(false, Filter_Type(12)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + service_ctx.number = 1; + service_ctx.list[0].type = 1; + TEST_ASSERT_EQUAL(false, Filter_Type(0)); + TEST_ASSERT_EQUAL(true, Filter_Type(1)); + TEST_ASSERT_EQUAL(false, Filter_Type(2)); + TEST_ASSERT_EQUAL(false, Filter_Type(12)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + service_ctx.number = 1; + service_ctx.list[0].type = 12; + TEST_ASSERT_EQUAL(false, Filter_Type(0)); + TEST_ASSERT_EQUAL(false, Filter_Type(1)); + TEST_ASSERT_EQUAL(false, Filter_Type(2)); + TEST_ASSERT_EQUAL(true, Filter_Type(12)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + service_ctx.number = 2; + service_ctx.list[0].type = 1; + service_ctx.list[1].type = 12; + TEST_ASSERT_EQUAL(false, Filter_Type(0)); + TEST_ASSERT_EQUAL(true, Filter_Type(1)); + TEST_ASSERT_EQUAL(false, Filter_Type(2)); + TEST_ASSERT_EQUAL(true, Filter_Type(12)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Filter_GetPhyTarget() +{ + header_t header; + NEW_TEST_CASE("Test a wrong header target_mode"); + { + TRY + { + header.target_mode = 0x0f; + Filter_GetPhyTarget(&header); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test service ID"); + { + TRY + { + Filter_AddServiceId(1, 1); + header.target_mode = SERVICEIDACK; + header.target = 1; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 1); + header.target_mode = SERVICEIDACK; + header.target = 2; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 1); + header.target_mode = SERVICEID; + header.target = 1; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 1); + header.target_mode = SERVICEID; + header.target = 2; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 2); + header.target_mode = SERVICEIDACK; + header.target = 2; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 2); + header.target_mode = SERVICEIDACK; + header.target = 3; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 2); + header.target_mode = SERVICEID; + header.target = 2; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Filter_AddServiceId(1, 2); + header.target_mode = SERVICEID; + header.target = 3; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test Type"); + { + TRY + { + service_ctx.number = 1; + service_ctx.list[0].type = 0; + header.target_mode = TYPE; + header.target = 0; + // We should have Luos and Robus + TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + service_ctx.number = 1; + service_ctx.list[0].type = 0; + header.target_mode = TYPE; + header.target = 1; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test Broadcast"); + { + TRY + { + header.target_mode = BROADCAST; + header.target = BROADCAST_VAL; + // We should have Luos and Robus + TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + header.target_mode = BROADCAST; + header.target = 1; + // We should have Luos and Robus + TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test Node ID"); + { + TRY + { + Node_Get()->node_id = 1; + header.target_mode = NODEIDACK; + header.target = 1; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Node_Get()->node_id = 1; + header.target_mode = NODEIDACK; + header.target = 2; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Node_Get()->node_id = 1; + header.target_mode = NODEID; + header.target = 1; + // We should have Luos only + TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + Node_Get()->node_id = 1; + header.target_mode = NODEID; + header.target = 2; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test Topic"); + { + TRY + { + Filter_TopicInit(); + Filter_AddTopic(3); + header.target_mode = TOPIC; + header.target = 3; + // We should have Luos and Robus + TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + header.target = 2; + // We should have Robus only + TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_Filter_ServiceId); + UNIT_TEST_RUN(unittest_Filter_Topic); + UNIT_TEST_RUN(unittest_Filter_Type); + UNIT_TEST_RUN(unittest_Filter_GetPhyTarget); + + UNITY_END(); +} diff --git a/test/tests_io/test_filter/main.h b/test/tests_io/test_filter/main.h new file mode 100644 index 000000000..415b31450 --- /dev/null +++ b/test/tests_io/test_filter/main.h @@ -0,0 +1,4 @@ +#ifndef MAIN_H +#define MAIN_H + +#endif // MAIN_H diff --git a/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c b/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c index e9ac151f9..37a806604 100644 --- a/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c +++ b/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c @@ -25,67 +25,88 @@ void unittest_SlotPack(void) NEW_TEST_CASE("Check if an already organized buffer is not modified"); { - alloc_slots[0].data = &data; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = &data; - alloc_slots[4].data = 0; - alloc_slot_index = 4; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); + TRY + { + alloc_slots[0].data = &data; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = &data; + alloc_slots[4].data = 0; + alloc_slot_index = 4; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check if an unorganized buffer is organized"); { - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[7].data = 0; - alloc_slot_index = 8; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(0, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(3, alloc_slot_index); + TRY + { + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[7].data = 0; + alloc_slot_index = 8; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(0, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(3, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check how it's managing the buffer to it's limits"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[MAX_MSG_NB - 1].data = &data; - alloc_slot_index = MAX_MSG_NB; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[MAX_MSG_NB - 1].data = &data; + alloc_slot_index = MAX_MSG_NB; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } } @@ -104,51 +125,93 @@ void unittest_GetOldestMsg(void) NEW_TEST_CASE("Check the behavior if we dont have any message"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the behavior if we have a message in the first slot"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the behavior if we have a message in another place"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[3].data = (uint8_t *)0x1; - alloc_slot_index = 4; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[3].data = (uint8_t *)0x1; + alloc_slot_index = 4; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the behavior if we have a message in the last slot"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } } @@ -190,37 +253,65 @@ void unittest_BufferAvailableSpaceComputation(void) NEW_TEST_CASE("Check the result if we don't have any messages"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - data_ptr = (uint8_t *)&msg_buffer[0]; - TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result in a situation we don't have to loop around the buffer end"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[0]; - TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end and data_ptr is set to the begin of the buffer"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } } @@ -240,14 +331,28 @@ void unittest_DoWeHaveSpaceUntilBufferEnd(void) NEW_TEST_CASE("Check if it return SUCCEED when the pointer is in the buffer"); { - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[0])); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + TRY + { + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[0])); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check if it return FAILED when the pointer is after the buffer"); { - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE])); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1])); + TRY + { + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE])); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } } @@ -299,49 +404,91 @@ void unittest_CheckMsgSpace(void) NEW_TEST_CASE("Check the result if we don't have any message yet"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result if we have one message and the new one is before the old one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result if we have one message and the new one is after the old one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result if we have one message and the new one is in the middle of the old one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result if we have one message and the new one is at the end of the old one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } NEW_TEST_CASE("Check the result if we have one message and the new one is at the beginning of the old one"); { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } } } @@ -381,24 +528,38 @@ void unittest_MsgAlloc_Loop() // Call function and Verify //--------------------------- // Empty buffer - expected_buffer_occupation_ratio = 0; - MsgAlloc_Loop(); + TRY + { + expected_buffer_occupation_ratio = 0; + MsgAlloc_Loop(); - NEW_STEP("Check that the buffer is empty"); - TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); + NEW_STEP("Check that the buffer is empty"); + TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } - // Buffer occupation from 0 -> 100% - NEW_STEP("Check buffer is full in all cases"); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) + TRY { - data_ptr = &msg_buffer[i]; - expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); + // Buffer occupation from 0 -> 100% + NEW_STEP("Check buffer is full in all cases"); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) + { + data_ptr = &msg_buffer[i]; + expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); - MsgAlloc_Loop(); + MsgAlloc_Loop(); - TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); + TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); } } } From 2610c1cfd877164a24bd1dee17b53861eb3709d3 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 3 May 2023 19:58:32 +0200 Subject: [PATCH 057/198] Add luos_phy unit test --- engine/IO/src/luos_phy.c | 65 +- test/test_robus/main.c | 1 + test/tests_io/test_filter/main.c | 1 - test/tests_io/test_filter/main.h | 4 - test/tests_io/test_phy/main.c | 1507 ++++++++++++++++++++++++++++++ 5 files changed, 1555 insertions(+), 23 deletions(-) delete mode 100644 test/tests_io/test_filter/main.h create mode 100644 test/tests_io/test_phy/main.c diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 67cd09567..18e414fd2 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -139,11 +139,11 @@ void Phy_Loop(void) // This is only needed for Robus for now. if (phy_ctx.phy[1].rx_alloc_job) { - Phy_alloc(phy_ctx.phy); + Phy_alloc(&phy_ctx.phy[1]); } + Phy_ManageFailedJob(); // Manage complete message received dispatching Phy_Dispatch(); - Phy_ManageFailedJob(); // Compute phy job statistics /* uint8_t stat = (uint8_t)((job nbr * 100) / (MAX_MSG_NB)); @@ -160,7 +160,6 @@ void Phy_Loop(void) ******************************************************************************/ luos_phy_t *Phy_Create(PHY_CB phy_cb) { - LUOS_ASSERT((phy_ctx.phy_nb < PHY_NB) && (phy_ctx.phy_nb > 0)); return Phy_Get(phy_ctx.phy_nb++, phy_cb); } @@ -172,6 +171,8 @@ luos_phy_t *Phy_Create(PHY_CB phy_cb) ******************************************************************************/ luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb) { + LUOS_ASSERT((id <= PHY_NB) + && (phy_cb != NULL)); // Set the callback phy_ctx.phy[id].phy_cb = phy_cb; // Return the phy pointer @@ -183,9 +184,9 @@ luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb) * @param phy_ptr Pointer to the phy concerned by this message * @return None ******************************************************************************/ -inline void Phy_ComputeHeader(luos_phy_t *phy_ptr) +_CRITICAL void Phy_ComputeHeader(luos_phy_t *phy_ptr) { - + LUOS_ASSERT(phy_ptr != NULL); // Compute the size of the data to allocate if (((header_t *)phy_ptr->rx_buffer_base)->size > MAX_DATA_MSG_SIZE) { @@ -195,11 +196,11 @@ inline void Phy_ComputeHeader(luos_phy_t *phy_ptr) else { phy_ptr->rx_size = ((header_t *)phy_ptr->rx_buffer_base)->size + sizeof(header_t); - // We need to check if we have a timestamped message and increase the data size if yes - if (Luos_IsMsgTimstamped((msg_t *)(phy_ptr->rx_data)) == true) - { - phy_ptr->rx_size += sizeof(time_luos_t); - } + } + // We need to check if we have a timestamped message and increase the data size if yes + if (Luos_IsMsgTimstamped((msg_t *)(phy_ptr->rx_data)) == true) + { + phy_ptr->rx_size += sizeof(time_luos_t); } // Compute the phy concerned by this message @@ -287,6 +288,7 @@ uint16_t Phy_GetNodeId(void) ******************************************************************************/ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) { + LUOS_ASSERT(phy_ptr != NULL); void *rx_data; void *copy_from; @@ -298,9 +300,10 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) return; } // Check if we receive enougth data to be able to allocate the complete message - LUOS_ASSERT((phy_ptr->received_data >= sizeof(header_t)) && (phy_ptr->received_data <= MAX_DATA_MSG_SIZE + sizeof(header_t))); - // Check if their is a mistake on the buffer allocation. In this case, the phy.rx_data was not properly set to rx_buffer_base before the data reception. - LUOS_ASSERT(phy_ptr->rx_data == phy_ptr->rx_buffer_base); + LUOS_ASSERT((phy_ptr->received_data >= sizeof(header_t)) + && (phy_ptr->received_data <= MAX_DATA_MSG_SIZE + sizeof(header_t)) + // Check if their is a mistake on the buffer allocation. In this case, the phy.rx_data was not properly set to rx_buffer_base before the data reception. + && (phy_ptr->rx_data == phy_ptr->rx_buffer_base)); LuosHAL_SetIrqState(true); // Now we can check if we need to store the received data @@ -363,7 +366,6 @@ static void Phy_Dispatch(void) { return; } - running = true; // Interpreat received messages and create tasks for it. LuosHAL_SetIrqState(false); while (i < phy_ctx.io_job_nb) @@ -372,6 +374,10 @@ static void Phy_Dispatch(void) // Get the oldest job IO_job_t *job = &phy_ctx.io_job[i]; i++; + running = false; + LUOS_ASSERT((job->alloc_msg != NULL) + && (job->size >= sizeof(header_t))); + running = true; // If message is timestamped, convert the latency to date if (Luos_IsMsgTimstamped(job->alloc_msg)) { @@ -413,14 +419,24 @@ static void Phy_Dispatch(void) _CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) { // A phy failed to send a message, we need to be sure that our node don't try to contact this target again. - LUOS_ASSERT(job->msg_pt->header.target_mode == NODEIDACK || job->msg_pt->header.target_mode == SERVICEIDACK || job->msg_pt->header.target_mode == NODEID || job->msg_pt->header.target_mode == SERVICEID); + LUOS_ASSERT((job != NULL) + && (phy_ptr != NULL)); + LUOS_ASSERT((job->msg_pt != NULL) + && (job->msg_pt->header.target_mode == NODEIDACK + || job->msg_pt->header.target_mode == SERVICEIDACK + || job->msg_pt->header.target_mode == NODEID + || job->msg_pt->header.target_mode == SERVICEID)); + // Store the job in the dead service spotted list phy_ctx.failed_job[phy_ctx.failed_job_nb++] = *job; + uint16_t target = job->msg_pt->header.target; + uint16_t target_mode = job->msg_pt->header.target_mode; // Remove all job targeting this target on this phy job queue; - for (int i = 0; i < phy_ptr->job_nb; i++) + int i = 0; + while (i < phy_ptr->job_nb) { - if ((phy_ptr->job[i].msg_pt->header.target == job->msg_pt->header.target) && (phy_ptr->job[i].msg_pt->header.target_mode == job->msg_pt->header.target_mode)) + if ((phy_ptr->job[i].msg_pt->header.target == target) && (phy_ptr->job[i].msg_pt->header.target_mode == target_mode)) { // This job is targeting the dead target, remove it from the queue phy_ptr->job_nb--; @@ -429,6 +445,11 @@ _CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) phy_ptr->job[j] = phy_ptr->job[j + 1]; } } + else + { + // Treat the next job + i++; + } } } @@ -514,11 +535,16 @@ _CRITICAL inline phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr) ******************************************************************************/ inline int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job) { + LUOS_ASSERT((phy_ptr != NULL) + && (job >= phy_ptr->job) + && (job < &phy_ptr->job[MAX_MSG_NB])); return (((uintptr_t)job - (uintptr_t)phy_ptr->job) / sizeof(phy_job_t)); } inline int Phy_GetPhyId(luos_phy_t *phy_ptr) { + LUOS_ASSERT((phy_ptr >= phy_ctx.phy) + && (phy_ptr < &phy_ctx.phy[PHY_NB])); return ((uintptr_t)phy_ptr - (uintptr_t)phy_ctx.phy) / sizeof(luos_phy_t); } @@ -529,7 +555,9 @@ inline int Phy_GetPhyId(luos_phy_t *phy_ptr) ******************************************************************************/ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) { - LUOS_ASSERT((phy_ptr != NULL) && (job != NULL)); + LUOS_ASSERT((phy_ptr != NULL) + && (job >= phy_ptr->job) + && (job < &phy_ptr->job[MAX_MSG_NB])); if (phy_ptr->job_nb == 0) { return; @@ -555,6 +583,7 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) ******************************************************************************/ _CRITICAL inline uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr) { + LUOS_ASSERT(phy_ptr != NULL); return phy_ptr->job_nb; } diff --git a/test/test_robus/main.c b/test/test_robus/main.c index f9da3a0a6..b146d0bff 100644 --- a/test/test_robus/main.c +++ b/test/test_robus/main.c @@ -4,6 +4,7 @@ #include "context.h" #include "unit_test.h" #include "default_scenario.h" +#include "filter.h" extern default_scenario_t default_sc; diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index 445e39a4e..8c9691cbc 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -1,4 +1,3 @@ -#include "main.h" #include "unit_test.h" #include "filter.h" #include "../src/service.c" diff --git a/test/tests_io/test_filter/main.h b/test/tests_io/test_filter/main.h deleted file mode 100644 index 415b31450..000000000 --- a/test/tests_io/test_filter/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c new file mode 100644 index 000000000..e52b31234 --- /dev/null +++ b/test/tests_io/test_phy/main.c @@ -0,0 +1,1507 @@ +#include "unit_test.h" +#include "../src/luos_phy.c" +#include "../src/msg_alloc.c" +#include "../src/luos_io.c" + +luos_phy_t *robus_phy; +uint8_t buffer[512]; +phy_job_t *Luos_handled_job = NULL; +phy_job_t *Robus_handled_job = NULL; +bool Luos_get_deadTarget = false; +bool Robus_get_deadTarget = false; + +static void phy_luos_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + // Test dispatch re-entry protection + volatile uint16_t initial_job_nb = phy_ctx.io_job_nb; + Phy_Dispatch(); + TEST_ASSERT_EQUAL(initial_job_nb, phy_ctx.io_job_nb); + Luos_handled_job = job; + if (job->msg_pt->header.cmd == DEADTARGET) + { + Luos_get_deadTarget = true; + } +} + +static void phy_robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + // Test dispatch re-entry protection + volatile uint16_t initial_job_nb = phy_ctx.io_job_nb; + Phy_Dispatch(); + TEST_ASSERT_EQUAL(initial_job_nb, phy_ctx.io_job_nb); + Robus_handled_job = job; + if (job->msg_pt->header.cmd == DEADTARGET) + { + Robus_get_deadTarget = true; + } +} + +static void phy_test_reset(void) +{ + Phy_Init(); + luos_phy = Phy_Get(0, phy_luos_MsgHandler); + TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); + TEST_ASSERT_EQUAL(1, phy_ctx.phy_nb); + robus_phy = Phy_Create(phy_robus_MsgHandler); + TEST_ASSERT_EQUAL(&phy_ctx.phy[1], robus_phy); + TEST_ASSERT_EQUAL(2, phy_ctx.phy_nb); +} + +/******************************************************************************* + * File function + ******************************************************************************/ + +void unittest_phy_alloc() +{ + NEW_TEST_CASE("Check assertion condition"); + { + TRY + { + phy_test_reset(); + Phy_alloc(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t) - 1; + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = MAX_DATA_MSG_SIZE + sizeof(header_t) + 1; + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = MAX_DATA_MSG_SIZE + sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = 0; + Phy_alloc(luos_phy); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = 0; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = false; + luos_phy->received_data = sizeof(header_t) - 1; + luos_phy->rx_buffer_base = 0; + luos_phy->rx_data = buffer; + Phy_alloc(luos_phy); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check that we don't allocate anything if we don't need to keep the data"); + { + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + luos_phy->rx_keep = false; + Phy_alloc(luos_phy); + TEST_ASSERT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check normal allocation condition"); + { + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + luos_phy->rx_keep = true; + // Message computed details + memcpy(buffer, "123test", sizeof("123test")); + luos_phy->rx_size = 10; + luos_phy->rx_phy_filter = 1; + Phy_alloc(luos_phy); + TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); + TEST_ASSERT_NOT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + TEST_ASSERT_EQUAL_STRING("123test", luos_phy->rx_data); + TEST_ASSERT_EQUAL_STRING("123test", msg_buffer); + // write the data we receive next + luos_phy->rx_data[sizeof(header_t)] = '3'; + luos_phy->rx_data[sizeof(header_t) + 1] = '2'; + luos_phy->rx_data[sizeof(header_t) + 2] = '1'; + TEST_ASSERT_EQUAL_STRING("123test321", msg_buffer); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + // Allocate a second message + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + luos_phy->rx_keep = true; + // Message computed details + memcpy(buffer, "123test", sizeof("123test")); + luos_phy->rx_size = 10; + luos_phy->rx_phy_filter = 1; + Phy_alloc(luos_phy); + TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); + TEST_ASSERT_NOT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + TEST_ASSERT_EQUAL_STRING("123test", luos_phy->rx_data); + TEST_ASSERT_EQUAL_STRING("123test321123test", msg_buffer); + // write the data we receive next + luos_phy->rx_data[sizeof(header_t)] = '3'; + luos_phy->rx_data[sizeof(header_t) + 1] = '2'; + luos_phy->rx_data[sizeof(header_t) + 2] = '1'; + TEST_ASSERT_EQUAL_STRING("123test321123test321", msg_buffer); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check allocation overflow"); + { + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + // Put a fake message in allocation + alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[7]; + TRY + { + phy_test_reset(); + luos_phy->rx_alloc_job = true; + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_buffer_base = buffer; + luos_phy->rx_data = buffer; + luos_phy->rx_keep = true; + // Message computed details + memcpy(buffer, "123test", sizeof("123test")); + luos_phy->rx_size = 10; + luos_phy->rx_phy_filter = 1; + Phy_alloc(luos_phy); + + TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(false, luos_phy->rx_keep); + TEST_ASSERT_EQUAL_STRING(NULL, luos_phy->rx_data); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + // In the same condition than the previous one we should assert in any other phy than the Luos one. + phy_test_reset(); + robus_phy->rx_alloc_job = true; + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_buffer_base = buffer; + robus_phy->rx_data = buffer; + robus_phy->rx_keep = true; + // Message computed details + robus_phy->rx_size = 10; + robus_phy->rx_phy_filter = 1; + Phy_alloc(robus_phy); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_phy_dispatch() +{ + NEW_TEST_CASE("Check re-entry protection and single dispatching with all values"); + { + TRY + { + phy_test_reset(); + // Create a fake job + phy_ctx.io_job_nb = 1; + /// Create msg data + phy_ctx.io_job[0].alloc_msg = (msg_t *)&msg_buffer[0]; + phy_ctx.io_job[0].alloc_msg->header.config = TIMESTAMP_PROTOCOL; + phy_ctx.io_job[0].alloc_msg->header.size = 3; + phy_ctx.io_job[0].alloc_msg->header.target_mode = NODEIDACK; + phy_ctx.io_job[0].size = 10; + phy_ctx.io_job[0].phy_filter = 0x01; // Target Luos phy only + phy_ctx.io_job[0].timestamp = 10; // This represent the reception date + time_luos_t timestamp_latency = TimeOD_TimeFrom_ns(10); + memcpy(&phy_ctx.io_job[0].alloc_msg->data[phy_ctx.io_job[0].alloc_msg->header.size], ×tamp_latency, sizeof(time_luos_t)); + + Phy_Dispatch(); + + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&luos_phy->job[0], Luos_handled_job); + TEST_ASSERT_EQUAL(&msg_buffer[0], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(10, luos_phy->job[0].size); + TEST_ASSERT_EQUAL(true, luos_phy->job[0].ack); + TEST_ASSERT_EQUAL(true, luos_phy->job[0].timestamp); + time_luos_t timestamp_date; + memcpy(×tamp_date, &phy_ctx.io_job[0].alloc_msg->data[phy_ctx.io_job[0].alloc_msg->header.size], sizeof(time_luos_t)); + TEST_ASSERT_FLOAT_WITHIN(1.0, 20.0, TimeOD_TimeTo_ns(timestamp_date)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check re-entry protection and multiple dispatching with all values"); + { + TRY + { + phy_test_reset(); + memset(&luos_phy->job[0], 0, sizeof(phy_job_t)); + luos_phy->job_nb = 0; + + // Create a fake job + phy_ctx.io_job_nb = 1; + /// Create msg data + phy_ctx.io_job[0].alloc_msg = (msg_t *)&msg_buffer[0]; + phy_ctx.io_job[0].alloc_msg->header.config = TIMESTAMP_PROTOCOL; + phy_ctx.io_job[0].alloc_msg->header.size = 3; + phy_ctx.io_job[0].alloc_msg->header.target_mode = NODEIDACK; + phy_ctx.io_job[0].size = 10; + phy_ctx.io_job[0].phy_filter = 0x03; // Target Luos and Robus phy + phy_ctx.io_job[0].timestamp = 10; // This represent the reception date + time_luos_t timestamp_latency = TimeOD_TimeFrom_ns(10); + memcpy(&phy_ctx.io_job[0].alloc_msg->data[phy_ctx.io_job[0].alloc_msg->header.size], ×tamp_latency, sizeof(time_luos_t)); + + Phy_Dispatch(); + + time_luos_t timestamp_date; + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&luos_phy->job[0], Luos_handled_job); + TEST_ASSERT_EQUAL(&msg_buffer[0], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(10, luos_phy->job[0].size); + TEST_ASSERT_EQUAL(true, luos_phy->job[0].ack); + TEST_ASSERT_EQUAL(true, luos_phy->job[0].timestamp); + memcpy(×tamp_date, &luos_phy->job[0].msg_pt->data[luos_phy->job[0].msg_pt->header.size], sizeof(time_luos_t)); + TEST_ASSERT_FLOAT_WITHIN(1.0, 20.0, TimeOD_TimeTo_ns(timestamp_date)); + + TEST_ASSERT_EQUAL(1, robus_phy->job_nb); + TEST_ASSERT_EQUAL(&robus_phy->job[0], Robus_handled_job); + TEST_ASSERT_EQUAL(&msg_buffer[0], robus_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(10, robus_phy->job[0].size); + TEST_ASSERT_EQUAL(true, robus_phy->job[0].ack); + TEST_ASSERT_EQUAL(true, robus_phy->job[0].timestamp); + memcpy(×tamp_date, &robus_phy->job[0].msg_pt->data[robus_phy->job[0].msg_pt->header.size], sizeof(time_luos_t)); + TEST_ASSERT_FLOAT_WITHIN(1.0, 20.0, TimeOD_TimeTo_ns(timestamp_date)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Try to dispatch corrupted jobs"); + { + TRY + { + phy_test_reset(); + // Create a fake job + phy_ctx.io_job_nb = 1; + /// Create msg data + phy_ctx.io_job[0].alloc_msg = 0; + phy_ctx.io_job[0].size = 10; + phy_ctx.io_job[0].phy_filter = 0x01; // Target Luos phy only + phy_ctx.io_job[0].timestamp = 10; // This represent the reception date + + Phy_Dispatch(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + // Create a fake job + phy_ctx.io_job_nb = 1; + /// Create msg data + phy_ctx.io_job[0].alloc_msg = (msg_t *)&msg_buffer[0]; + phy_ctx.io_job[0].alloc_msg->header.config = TIMESTAMP_PROTOCOL; + phy_ctx.io_job[0].alloc_msg->header.size = 3; + phy_ctx.io_job[0].alloc_msg->header.target_mode = NODEIDACK; + phy_ctx.io_job[0].size = 0; + phy_ctx.io_job[0].phy_filter = 0x01; // Target Luos phy only + phy_ctx.io_job[0].timestamp = 10; // This represent the reception date + time_luos_t timestamp_latency = TimeOD_TimeFrom_ns(10); + memcpy(&phy_ctx.io_job[0].alloc_msg->data[phy_ctx.io_job[0].alloc_msg->header.size], ×tamp_latency, sizeof(time_luos_t)); + + Phy_Dispatch(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_phy_deadTarget() +{ + NEW_TEST_CASE("Check DeadTargetSpotted assertion conditions"); + { + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 1; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + Phy_DeadTargetSpotted(luos_phy, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 1; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + Phy_DeadTargetSpotted(0, &luos_phy->job[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 1; + luos_phy->job[0].data_pt = 0; + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 1; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = 0x0f; + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check DeadTargetSpotted failed job creation"); + { + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 1; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; + + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check DeadTargetSpotted phy job removal"); + { + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; + + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[0].data_pt); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + phy_test_reset(); + // Create a fake phy job + luos_phy->job_nb = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)msg_buffer; // All jobs should be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; + + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check Failed job management and user notification"); + { + TRY + { + phy_test_reset(); + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + // Create a fake phy job + luos_phy->job_nb = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; + + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[0].data_pt); + + TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); + TEST_ASSERT_EQUAL(false, Luos_get_deadTarget); + TEST_ASSERT_EQUAL(false, Robus_get_deadTarget); + Phy_ManageFailedJob(); + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + Phy_Dispatch(); // Deal with messages + TEST_ASSERT_EQUAL(true, Luos_get_deadTarget); + TEST_ASSERT_EQUAL(true, Robus_get_deadTarget); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_phy_loop() +{ + + NEW_TEST_CASE("Check allocation"); + { + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + TRY + { + phy_test_reset(); + robus_phy->rx_alloc_job = true; + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_buffer_base = buffer; + robus_phy->rx_data = buffer; + robus_phy->rx_keep = true; + // Message computed details + robus_phy->rx_size = 10; + robus_phy->rx_phy_filter = 1; + Phy_Loop(); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check dispatching and Failed job management"); + { + TRY + { + phy_test_reset(); + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + // Create a fake phy job + luos_phy->job_nb = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; + Luos_get_deadTarget = false; + Robus_get_deadTarget = false; + + Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + + TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); + Phy_Loop(); + TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); + TEST_ASSERT_EQUAL(true, Luos_get_deadTarget); + TEST_ASSERT_EQUAL(true, Robus_get_deadTarget); + Luos_get_deadTarget = false; + Robus_get_deadTarget = false; + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_phy_ComputeHeader() +{ + NEW_TEST_CASE("Check ComputeHeader assertion conditions"); + { + TRY + { + Phy_ComputeHeader(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a non timestamped message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + // Luos can target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = false; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = 0; + luos_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(luos_phy); + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); + TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); + TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a timestamped message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = TIMESTAMP_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + // Luos can target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = false; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = 0; + luos_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(luos_phy); + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); + TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); + TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a non timestamped large message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = SERVICEID; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 600; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + // Luos can target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = false; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = 0; + luos_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(luos_phy); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); + TEST_ASSERT_EQUAL(false, luos_phy->rx_ack); + TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a timestamped large message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = TIMESTAMP_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 600; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + // Luos can target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = false; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = 0; + luos_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(luos_phy); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); + TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); + TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a timestamped large message needed by Robus"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = TIMESTAMP_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 600; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = false; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = 0; + luos_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(luos_phy); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); + TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); + TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x02, luos_phy->rx_phy_filter); // A Robus node is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader for a timestamped large message not needed by any phy"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Filter_AddServiceId(1, 1); + + msg_t msg; + msg.header.config = TIMESTAMP_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 600; + msg.data[0] = 0xAE; + + // Save message information in the Luos phy struct + // Robus cannot target himself. + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = robus_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); + TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(0x00, robus_phy->rx_phy_filter); // No service is targeted + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_phy_ValidMsg() +{ + NEW_TEST_CASE("Check ValidMsg assertion conditions"); + { + TRY + { + Phy_ValidMsg(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check ValidMsg job creation"); + { + TRY + { + phy_test_reset(); + + msg_t msg; + // Save message information in the Luos phy struct + // Robus cannot target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = msg_buffer; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = true; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); + luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted + luos_phy->rx_timestamp = 10; + + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + Phy_ValidMsg(luos_phy); + TEST_ASSERT_EQUAL(1, phy_ctx.io_job_nb); + TEST_ASSERT_EQUAL(10, phy_ctx.io_job[0].timestamp); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.io_job[0].alloc_msg); + TEST_ASSERT_EQUAL(0x02, phy_ctx.io_job[0].phy_filter); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), phy_ctx.io_job[0].size); + TEST_ASSERT_EQUAL(0, luos_phy->received_data); + TEST_ASSERT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check that ValidMsg don't create job if we don't need it"); + { + TRY + { + phy_test_reset(); + + msg_t msg; + // Save message information in the Luos phy struct + // Robus cannot target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = msg_buffer; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = false; + luos_phy->rx_ack = true; + luos_phy->rx_alloc_job = false; + luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); + luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted + luos_phy->rx_timestamp = 10; + + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + Phy_ValidMsg(luos_phy); + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ValidMsg allocation"); + { + TRY + { + phy_test_reset(); + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + + msg_t msg; + // Save message information in the Luos phy struct + // Robus cannot target himself. + luos_phy->rx_buffer_base = (uint8_t *)&msg; + luos_phy->rx_data = (uint8_t *)&msg; + // For now let just consider that we received the header allowing us to compute the message things based on it. + luos_phy->received_data = sizeof(header_t); + luos_phy->rx_keep = true; // Tell phy that we want to keep this message + luos_phy->rx_ack = true; + luos_phy->rx_alloc_job = true; + luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); + luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted + luos_phy->rx_timestamp = 10; + + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + Phy_ValidMsg(luos_phy); + TEST_ASSERT_EQUAL(1, phy_ctx.io_job_nb); + TEST_ASSERT_EQUAL(10, phy_ctx.io_job[0].timestamp); + TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.io_job[0].alloc_msg); + TEST_ASSERT_EQUAL(0x02, phy_ctx.io_job[0].phy_filter); + TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), phy_ctx.io_job[0].size); + TEST_ASSERT_EQUAL(0, luos_phy->received_data); + TEST_ASSERT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_phy_ComputeTimestamp() +{ + NEW_TEST_CASE("Check ComputeTimestamp assertion conditions"); + { + TRY + { + Phy_ComputeTimestamp(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_job_t job; + job.timestamp = false; + job.data_pt = (uint8_t *)msg_buffer; + Phy_ComputeTimestamp(&job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_job_t job; + job.timestamp = true; + job.data_pt = NULL; + Phy_ComputeTimestamp(&job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check ComputeTimestamp normal conditions"); + { + TRY + { + phy_test_reset(); + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + + phy_job_t job; + job.timestamp = true; + job.data_pt = (uint8_t *)msg_buffer; + + msg_t *msg = (msg_t *)msg_buffer; + msg->header.config = TIMESTAMP_PROTOCOL; + msg->header.target_mode = SERVICEIDACK; + msg->header.target = 1; + msg->header.cmd = IO_STATE; + msg->header.size = 1; + msg->data[0] = 0xAE; + + time_luos_t timestamp = TimeOD_TimeFrom_ns(10); + memcpy(&msg->data[msg->header.size], ×tamp, sizeof(time_luos_t)); + + time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); + + TEST_ASSERT_EQUAL(0xAE, job.msg_pt->data[0]); + TEST_ASSERT_NOT_EQUAL(TimeOD_TimeTo_ns(timestamp), TimeOD_TimeTo_ns(resulting_latency)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_GetNodeId() +{ + NEW_TEST_CASE("Check GetNodeId "); + { + TRY + { + uint16_t node_id = Phy_GetNodeId(); + TEST_ASSERT_EQUAL(Node_Get()->node_id, node_id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_AddJob() +{ + NEW_TEST_CASE("Check AddJob assertion conditions"); + { + TRY + { + phy_job_t phy_job; + luos_phy->job_nb = 0; + phy_job_t *resulting_job = Phy_AddJob(luos_phy, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_job_t phy_job; + luos_phy->job_nb = 0; + phy_job_t *resulting_job = Phy_AddJob(NULL, &phy_job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + phy_job_t phy_job; + luos_phy->job_nb = MAX_MSG_NB; + phy_job_t *resulting_job = Phy_AddJob(luos_phy, &phy_job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check AddJob normal conditions"); + { + TRY + { + phy_job_t phy_job; + luos_phy->job_nb = 0; + phy_job_t *resulting_job = Phy_AddJob(luos_phy, &phy_job); + TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + phy_job_t phy_job; + luos_phy->job_nb = 3; + phy_job_t *resulting_job = Phy_AddJob(luos_phy, &phy_job); + TEST_ASSERT_EQUAL(&luos_phy->job[3], resulting_job); + TEST_ASSERT_EQUAL(4, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_GetJob() +{ + NEW_TEST_CASE("Check GetJob assertion conditions"); + { + TRY + { + luos_phy->job_nb = 0; + phy_job_t *resulting_job = Phy_GetJob(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check GetJob normal conditions"); + { + TRY + { + luos_phy->job_nb = 0; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); + TEST_ASSERT_EQUAL(NULL, resulting_job); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 1; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); + TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 3; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); + TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); + TEST_ASSERT_EQUAL(3, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_GetJobId() +{ + NEW_TEST_CASE("Check GetJobId assertion conditions"); + { + TRY + { + int value = Phy_GetJobId(NULL, &luos_phy->job[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + int value = Phy_GetJobId(luos_phy, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + int value = Phy_GetJobId(luos_phy, &luos_phy->job[MAX_MSG_NB]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check GetJobId normal conditions"); + { + TRY + { + for (int i = 0; i < MAX_MSG_NB; i++) + { + int value = Phy_GetJobId(luos_phy, &luos_phy->job[i]); + TEST_ASSERT_EQUAL(i, value); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 1; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); + TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 3; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); + TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); + TEST_ASSERT_EQUAL(3, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_GetPhyId() +{ + NEW_TEST_CASE("Check GetPhyId assertion conditions"); + { + TRY + { + int value = Phy_GetPhyId(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + int value = Phy_GetPhyId(&phy_ctx.phy[PHY_NB]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check GetPhyId normal conditions"); + { + TRY + { + for (int i = 0; i < PHY_NB; i++) + { + int value = Phy_GetPhyId(&phy_ctx.phy[i]); + TEST_ASSERT_EQUAL(i, value); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_RmJob() +{ + NEW_TEST_CASE("Check RmJob assertion conditions"); + { + TRY + { + Phy_RmJob(NULL, &luos_phy->job[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + Phy_RmJob(luos_phy, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + Phy_RmJob(luos_phy, &luos_phy->job[MAX_MSG_NB]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check RmJob normal conditions"); + { + + phy_test_reset(); + memory_stats_t memory_stats; + MsgAlloc_Init(&memory_stats); + TRY + { + luos_phy->job_nb = 0; + Phy_RmJob(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + for (int i = 0; i < PHY_NB; i++) + { + luos_phy->job_nb = i + 1; + luos_phy->job[i].data_pt = (uint8_t *)&msg_buffer[i]; + Phy_RmJob(luos_phy, &luos_phy->job[i]); + TEST_ASSERT_EQUAL(i, luos_phy->job_nb); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[i].data_pt); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + for (int i = 0; i < PHY_NB - 1; i++) + { + luos_phy->job_nb = i + 2; + luos_phy->job[i].data_pt = (uint8_t *)&msg_buffer[i]; + luos_phy->job[i + 1].data_pt = (uint8_t *)&msg_buffer[i + 1]; + Phy_RmJob(luos_phy, &luos_phy->job[i]); + TEST_ASSERT_EQUAL(i + 1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&msg_buffer[i + 1], luos_phy->job[i].data_pt); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_GetJobNbr() +{ + NEW_TEST_CASE("Check GetJobNbr assertion conditions"); + { + TRY + { + uint16_t value = Phy_GetJobNbr(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check GetPhyId normal conditions"); + { + TRY + { + for (int i = 0; i < MAX_MSG_NB; i++) + { + luos_phy->job_nb = i; + uint16_t value = Phy_GetJobNbr(luos_phy); + TEST_ASSERT_EQUAL(i, value); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_phy_TxAllComplete() +{ + NEW_TEST_CASE("Check TxAllComplete normal conditions"); + { + TRY + { + luos_phy->job_nb = 1; + robus_phy->job_nb = 1; + error_return_t result = Phy_TxAllComplete(); + TEST_ASSERT_EQUAL(FAILED, result); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 0; + robus_phy->job_nb = 1; + error_return_t result = Phy_TxAllComplete(); + TEST_ASSERT_EQUAL(FAILED, result); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 1; + robus_phy->job_nb = 0; + error_return_t result = Phy_TxAllComplete(); + TEST_ASSERT_EQUAL(SUCCEED, result); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_phy_alloc); + UNIT_TEST_RUN(unittest_phy_dispatch); + UNIT_TEST_RUN(unittest_phy_deadTarget); + UNIT_TEST_RUN(unittest_phy_loop); + UNIT_TEST_RUN(unittest_phy_ComputeHeader); + UNIT_TEST_RUN(unittest_phy_ValidMsg); + UNIT_TEST_RUN(unittest_phy_ComputeTimestamp); + UNIT_TEST_RUN(unittest_phy_GetNodeId); + UNIT_TEST_RUN(unittest_phy_AddJob); + UNIT_TEST_RUN(unittest_phy_GetJob); + UNIT_TEST_RUN(unittest_phy_GetJobId); + UNIT_TEST_RUN(unittest_phy_GetPhyId); + UNIT_TEST_RUN(unittest_phy_RmJob); + UNIT_TEST_RUN(unittest_phy_GetJobNbr); + UNIT_TEST_RUN(unittest_phy_TxAllComplete); + + UNITY_END(); +} From 18638874bd580444b642225f15a914ab8657955b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 5 May 2023 16:31:15 +0200 Subject: [PATCH 058/198] Add luos_io unit test --- engine/IO/src/luos_io.c | 26 +- test/tests_io/test_luos_io/main.c | 992 ++++++++++++++++++++++++++++++ 2 files changed, 1007 insertions(+), 11 deletions(-) create mode 100644 test/tests_io/test_luos_io/main.c diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 9497d5d5a..8fa5be12a 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -94,12 +94,14 @@ void LuosIO_Loop(void) Robus_Loop(); if (Flag_DetectServices == true) { + LUOS_ASSERT(detection_service != NULL); Flag_DetectServices = false; // Set the detection launcher id to 1 detection_service->id = 1; // Generate the filters Service_GenerateId(1); RoutingTB_DetectServices(detection_service); + detection_service = NULL; } } @@ -110,6 +112,9 @@ void LuosIO_Loop(void) ******************************************************************************/ static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) { + LUOS_ASSERT((phy_ptr == luos_phy) + && (job >= luos_phy->job) + && (job < &luos_phy->job[MAX_MSG_NB])); // Check if this message is a protocol one if (LuosIO_ConsumeMsg(job->msg_pt) == FAILED) { @@ -273,6 +278,7 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) ******************************************************************************/ error_return_t LuosIO_ConsumeMsg(const msg_t *input) { + LUOS_ASSERT(input != NULL); msg_t output_msg; node_bootstrap_t node_bootstrap; time_luos_t time; @@ -292,7 +298,6 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) // Someone asking us a new node id (we are the detecting service) // Increase the number of node_nb and send it back last_node++; - output_msg.header.config = BASE_PROTOCOL; output_msg.header.cmd = WRITE_NODE_ID; output_msg.header.size = sizeof(uint16_t); output_msg.header.target = input->header.source; @@ -310,7 +315,6 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) Robus_SaveNodeID(node_bootstrap.nodeid); // Now we can send it to the next node node_bootstrap.prev_nodeid = Node_Get()->node_id; - output_msg.header.config = BASE_PROTOCOL; output_msg.header.cmd = WRITE_NODE_ID; output_msg.header.size = sizeof(node_bootstrap_t); output_msg.header.target = 0; @@ -403,13 +407,10 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; case ASK_DETECTION: - if (input->header.size == 0) + if (Node_GetState() < LOCAL_DETECTION) { - if (Node_GetState() < LOCAL_DETECTION) - { - detection_service = service; - Flag_DetectServices = true; - } + detection_service = service; + Flag_DetectServices = true; } return SUCCEED; break; @@ -442,9 +443,9 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) { output_msg.header.cmd = REVISION; output_msg.header.target_mode = SERVICEID; + output_msg.header.size = sizeof(revision_t); + output_msg.header.target = input->header.source; memcpy(output_msg.data, service->revision.unmap, sizeof(revision_t)); - output_msg.header.size = sizeof(revision_t); - output_msg.header.target = input->header.source; Luos_SendMsg(service, &output_msg); return SUCCEED; } @@ -488,7 +489,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; case UPDATE_PUB: - // this service need to be auto updated + // This service need to be auto updated TimeOD_TimeFromMsg(&time, input); service->auto_refresh.target = input->header.source; service->auto_refresh.time_ms = (uint16_t)TimeOD_TimeTo_ms(time); @@ -517,6 +518,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) ******************************************************************************/ static inline void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg) { + LUOS_ASSERT(routeTB_msg != NULL); uint16_t entry_nb = 0; routing_table_t local_routing_table[Service_GetNumber() + 1]; @@ -596,6 +598,8 @@ error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job) ******************************************************************************/ void LuosIO_RmJob(phy_job_t *job) { + LUOS_ASSERT((job >= luos_phy->job) + && (job < &luos_phy->job[luos_phy->job_nb])); // Be sure every service has finished to use this job if (*(service_filter_t *)job->phy_data != 0) { diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c new file mode 100644 index 000000000..f4480ab3a --- /dev/null +++ b/test/tests_io/test_luos_io/main.c @@ -0,0 +1,992 @@ +#include "unit_test.h" +#include "../src/luos_io.c" +#include "../src/luos_phy.c" +#include "../src/msg_alloc.c" +#include "../src/service.c" +#include "../src/routing_table.c" + +phy_job_t *Luos_handled_job = NULL; +phy_job_t *Robus_handled_job = NULL; + +static void phy_luos_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + Luos_handled_job = job; +} + +static void phy_robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + Robus_handled_job = job; +} + +static void luosIO_reset_overlap_callback(void) +{ + LuosIO_Init(); + // Overlap the normal callbacks + luos_phy = Phy_Get(0, phy_luos_MsgHandler); + Phy_Get(1, phy_robus_MsgHandler); + TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); +} + +/******************************************************************************* + * File function + ******************************************************************************/ + +void unittest_luosIO_init() +{ + NEW_TEST_CASE("Basic init test"); + { + TRY + { + luos_phy = NULL; + LuosIO_Init(); + TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_luosIO_loop() +{ + NEW_TEST_CASE("Check that allocation treatment is done in loop"); + { + TRY + { + LuosIO_Init(); + alloc_slot_index = 3; + LuosIO_Loop(); + TEST_ASSERT_EQUAL(0, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check that phy treatment is done in loop"); + { + TRY + { + LuosIO_Init(); + phy_ctx.phy[1].rx_alloc_job = true; + phy_ctx.phy[1].received_data = sizeof(header_t); + phy_ctx.phy[1].rx_buffer_base = (uint8_t *)msg_buffer; + phy_ctx.phy[1].rx_data = (uint8_t *)msg_buffer; + phy_ctx.phy[1].rx_keep = true; + // Message computed details + phy_ctx.phy[1].rx_size = 10; + phy_ctx.phy[1].rx_phy_filter = 1; + LuosIO_Loop(); + TEST_ASSERT_EQUAL(false, phy_ctx.phy[1].rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check detection assertion condition in loop"); + { + TRY + { + LuosIO_Init(); + Flag_DetectServices = true; + detection_service = NULL; + LuosIO_Loop(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check that the detection treatment is done in loop"); + { + TRY + { + LuosIO_Init(); + Flag_DetectServices = true; + detection_service = &service_ctx.list[0]; + LuosIO_Loop(); + TEST_ASSERT_EQUAL(NULL, detection_service); + TEST_ASSERT_EQUAL(false, Flag_DetectServices); + TEST_ASSERT_EQUAL(1, service_ctx.list[0].id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_luosIO_TransmitLocalRoutingTable() +{ + NEW_TEST_CASE("Check assert condition for TransmitLocalRoutingTable"); + { + TRY + { + LuosIO_Init(); + LuosIO_TransmitLocalRoutingTable(NULL, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check that the routing table is sent"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Node_Get()->node_id = 1; + service_ctx.number = 2; + msg.header.cmd = RTB; + msg.header.target_mode = NODEIDACK; + msg.header.target = 1; + + LuosIO_TransmitLocalRoutingTable(NULL, &msg); + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_EQUAL(RTB, Luos_handled_job->msg_pt->header.cmd); + TEST_ASSERT_EQUAL(1, Luos_handled_job->msg_pt->header.target); + TEST_ASSERT_EQUAL(3 * sizeof(routing_table_t), Luos_handled_job->msg_pt->header.size); + TEST_ASSERT_EQUAL(NODEIDACK, Luos_handled_job->msg_pt->header.target_mode); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_luosIO_ConsumeMsg() +{ + NEW_TEST_CASE("Check assert condition for ConsumeMsg"); + { + TRY + { + LuosIO_Init(); + LuosIO_ConsumeMsg(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check WRITE_NODE_ID size 0 treatment (node id generation)"); + { + TRY + { + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + last_node = 1; + Node_Get()->node_id = 1; + msg_t msg; + msg.header.cmd = WRITE_NODE_ID; + msg.header.size = 0; + msg.header.source = 1; + + LuosIO_ConsumeMsg(&msg); + + TEST_ASSERT_EQUAL(2, last_node); + // Check received message content + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_EQUAL(WRITE_NODE_ID, Luos_handled_job->msg_pt->header.cmd); + TEST_ASSERT_EQUAL(sizeof(uint16_t), Luos_handled_job->msg_pt->header.size); + TEST_ASSERT_EQUAL(msg.header.source, Luos_handled_job->msg_pt->header.target); + TEST_ASSERT_EQUAL(NODEIDACK, Luos_handled_job->msg_pt->header.target_mode); + TEST_ASSERT_EQUAL(1, service_ctx.list[0].id); + uint16_t id; + memcpy((void *)&id, (void *)Luos_handled_job->msg_pt->data, sizeof(uint16_t)); + TEST_ASSERT_EQUAL(2, id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check WRITE_NODE_ID size 2 treatment (node id received from the detector)"); + { + TRY + { + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + Node_Get()->node_id = 1; + msg_t msg; + msg.header.cmd = WRITE_NODE_ID; + msg.header.size = 2; + msg.header.source = 1; + uint16_t id = 2; + memcpy((void *)msg.data, (void *)&id, sizeof(uint16_t)); + + LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_NOT_EQUAL(NULL, Robus_handled_job); + TEST_ASSERT_EQUAL(WRITE_NODE_ID, Robus_handled_job->msg_pt->header.cmd); + TEST_ASSERT_EQUAL(sizeof(node_bootstrap_t), Robus_handled_job->msg_pt->header.size); + TEST_ASSERT_EQUAL(0, Robus_handled_job->msg_pt->header.target); + TEST_ASSERT_EQUAL(NODEIDACK, Robus_handled_job->msg_pt->header.target_mode); + node_bootstrap_t node_bootstrap; + memcpy((void *)&node_bootstrap, (void *)Robus_handled_job->msg_pt->data, sizeof(node_bootstrap_t)); + TEST_ASSERT_EQUAL(2, node_bootstrap.nodeid); + TEST_ASSERT_EQUAL(1, node_bootstrap.prev_nodeid); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check WRITE_NODE_ID sizeof node_bootstrap_t treatment (nodereceiving it's id and the previous one)"); + { + TRY + { + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + Node_Get()->node_id = 0; + msg_t msg; + msg.header.cmd = WRITE_NODE_ID; + msg.header.size = sizeof(node_bootstrap_t); + msg.header.source = 1; + + node_bootstrap_t node_bootstrap; + node_bootstrap.nodeid = 2; + node_bootstrap.prev_nodeid = 1; + memcpy((void *)msg.data, (void *)&node_bootstrap, sizeof(node_bootstrap_t)); + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_EQUAL(NULL, Robus_handled_job); + TEST_ASSERT_EQUAL(2, Node_Get()->node_id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check LOCAL_RTB assert condition"); + { + TRY + { + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + last_node = 1; + Node_Get()->node_id = 1; + msg_t msg; + msg.header.cmd = LOCAL_RTB; + msg.header.size = 3; + msg.header.source = 1; + + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check LOCAL_RTB size 0 treatment (send of the local rtb)"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + // Generate the filters + Service_GenerateId(1); + + msg.header.cmd = LOCAL_RTB; + msg.header.size = 0; + msg.header.source = 1; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_EQUAL(NULL, Robus_handled_job); + TEST_ASSERT_EQUAL(RTB, Luos_handled_job->msg_pt->header.cmd); + TEST_ASSERT_EQUAL(1, Luos_handled_job->msg_pt->header.target); + TEST_ASSERT_EQUAL(3 * sizeof(routing_table_t), Luos_handled_job->msg_pt->header.size); + TEST_ASSERT_EQUAL(SERVICEIDACK, Luos_handled_job->msg_pt->header.target_mode); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check LOCAL_RTB size 2 treatment (generation of service id + send of local rtb)"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + // Generate the filters + Service_GenerateId(1); + + msg.header.cmd = LOCAL_RTB; + msg.header.size = 2; + msg.header.source = 1; + uint16_t first_id = 1; + memcpy((void *)msg.data, (void *)&first_id, sizeof(uint16_t)); + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + TEST_ASSERT_EQUAL(NULL, Robus_handled_job); + TEST_ASSERT_EQUAL(RTB, Luos_handled_job->msg_pt->header.cmd); + TEST_ASSERT_EQUAL(1, Luos_handled_job->msg_pt->header.target); + TEST_ASSERT_EQUAL(3 * sizeof(routing_table_t), Luos_handled_job->msg_pt->header.size); + TEST_ASSERT_EQUAL(SERVICEIDACK, Luos_handled_job->msg_pt->header.target_mode); + routing_table_t rtb[3]; + memcpy((void *)rtb, (void *)Luos_handled_job->msg_pt->data, 3 * sizeof(routing_table_t)); + TEST_ASSERT_EQUAL(NODE, rtb[0].mode); + TEST_ASSERT_EQUAL(SERVICE, rtb[1].mode); + TEST_ASSERT_EQUAL(SERVICE, rtb[2].mode); + TEST_ASSERT_EQUAL(1, rtb[1].id); + TEST_ASSERT_EQUAL(2, rtb[2].id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check START_DETECTION"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + phy_ctx.io_job_nb = 3; + alloc_slot_index = 3; + Node_SetState(DETECTION_OK); + service_ctx.list[0].id = 1; + service_ctx.list[1].id = 2; + + msg.header.cmd = START_DETECTION; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); + TEST_ASSERT_EQUAL(0, alloc_slot_index); + TEST_ASSERT_EQUAL(EXTERNAL_DETECTION, Node_GetState()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check END_DETECTION"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Node_SetState(EXTERNAL_DETECTION); + service_ctx.list[0].id = 1; + service_ctx.list[1].id = 2; + + msg.header.cmd = END_DETECTION; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + TEST_ASSERT_EQUAL(DETECTION_OK, Node_GetState()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check ASK_DETECTION"); + { + // No detection running + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Node_SetState(NO_DETECTION); + detection_service = NULL; + msg.header.cmd = ASK_DETECTION; + msg.header.target_mode = BROADCAST; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(true, Flag_DetectServices); + TEST_ASSERT_EQUAL(&service_ctx.list[0], detection_service); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + // Detection running + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Node_SetState(LOCAL_DETECTION); + detection_service = NULL; + Flag_DetectServices = false; + msg.header.cmd = ASK_DETECTION; + msg.header.target_mode = BROADCAST; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(false, Flag_DetectServices); + TEST_ASSERT_EQUAL(NULL, detection_service); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check ASSERT"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + detection_service = NULL; + msg.header.cmd = ASSERT; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + + routing_table_t *rtb = RoutingTB_Get(); + rtb[0].mode = NODE; + rtb[0].node_id = 1; + rtb[1].mode = SERVICE; + rtb[1].id = 1; + last_routing_table_entry = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + TEST_ASSERT_EQUAL(1, last_routing_table_entry); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check DEADTARGET"); + { + // Dead node + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + detection_service = NULL; + msg.header.cmd = DEADTARGET; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = sizeof(dead_target_t); + + dead_target_t *dead_target = (dead_target_t *)msg.data; + dead_target->node_id = 1; + dead_target->service_id = 0; + + routing_table_t *rtb = RoutingTB_Get(); + rtb[0].mode = NODE; + rtb[0].node_id = 1; + rtb[1].mode = SERVICE; + rtb[1].id = 1; + last_routing_table_entry = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + TEST_ASSERT_EQUAL(1, last_routing_table_entry); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + // Dead service + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + detection_service = NULL; + msg.header.cmd = DEADTARGET; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = sizeof(dead_target_t); + + dead_target_t *dead_target = (dead_target_t *)msg.data; + dead_target->node_id = 0; + dead_target->service_id = 1; + + routing_table_t *rtb = RoutingTB_Get(); + rtb[0].mode = NODE; + rtb[0].node_id = 1; + rtb[1].mode = SERVICE; + rtb[1].id = 1; + last_routing_table_entry = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + TEST_ASSERT_EQUAL(1, last_routing_table_entry); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check REVISION"); + { + // User send a revivision message with a revision on it + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + msg.header.cmd = REVISION; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + // manage a revision request + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + // Generate the filters + Service_GenerateId(1); + + msg.header.cmd = REVISION; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + revision_t revision; + memcpy(&revision, Luos_handled_job->msg_pt->data, sizeof(revision_t)); + TEST_ASSERT_EQUAL(service_ctx.list[0].revision.major, revision.major); + TEST_ASSERT_EQUAL(sizeof(revision_t), Luos_handled_job->msg_pt->header.size); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check LUOS_REVISION"); + { + // User send a revivision message with a revision on it + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + msg.header.cmd = LUOS_REVISION; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + // manage a revision request + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + // Generate the filters + Service_GenerateId(1); + + msg.header.cmd = LUOS_REVISION; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); + revision_t revision; + memcpy(&revision, Luos_handled_job->msg_pt->data, sizeof(revision_t)); + const revision_t *luos_version = Luos_GetVersion(); + TEST_ASSERT_EQUAL(luos_version->major, revision.major); + TEST_ASSERT_EQUAL(sizeof(revision_t), Luos_handled_job->msg_pt->header.size); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check LUOS_STATISTICS"); + { + // User send a revivision message with a revision on it + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + msg.header.cmd = LUOS_STATISTICS; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 2; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + // manage a revision request + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + // Generate the filters + Service_GenerateId(1); + + msg.header.cmd = WRITE_ALIAS; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + memcpy(msg.data, "test", 4); + msg.header.size = 4; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + TEST_ASSERT_EQUAL_STRING("test", service_ctx.list[0].alias); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check UPDATE_PUB"); + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + Robus_handled_job = NULL; + + Node_Get()->node_id = 1; + service_ctx.number = 2; + service_ctx.list[0].id = 1; + service_ctx.list[0].auto_refresh.target = 0; + service_ctx.list[0].auto_refresh.time_ms = 0; + service_ctx.list[0].auto_refresh.last_update = 0; + // Generate the filters + Service_GenerateId(1); + + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + time_luos_t time = TimeOD_TimeFrom_s(1); + TimeOD_TimeToMsg(&time, &msg); + msg.header.cmd = UPDATE_PUB; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(1, service_ctx.list[0].auto_refresh.target); + TEST_ASSERT_EQUAL((uint16_t)TimeOD_TimeTo_ms(time), service_ctx.list[0].auto_refresh.time_ms); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check BOOTLOADER_CMD"); + { + // User send a revivision message with a revision on it + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + msg.header.cmd = BOOTLOADER_CMD; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(SUCCEED, ret_val); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check any other cmd"); + { + for (uint8_t i = LUOS_LAST_RESERVED_CMD; i < 0xFF; i++) + { + TRY + { + msg_t msg; + luosIO_reset_overlap_callback(); + msg.header.cmd = i; + msg.header.target_mode = BROADCAST; + msg.header.source = 1; + msg.header.size = 0; + + error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + + // Check received message content + TEST_ASSERT_EQUAL(FAILED, ret_val); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + } +} + +void unittest_luosIO_DetectNextNodes() +{ + NEW_TEST_CASE("This function is highly intricated with Robus for now. It makes it difficult to test. We will keep it for later"); + { + } +} + +void unittest_luosIO_TryToGetJob() +{ + NEW_TEST_CASE("Check assert condition for TryToGetJob"); + { + TRY + { + LuosIO_Init(); + LuosIO_TryToGetJob(0, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check TryToGetJob"); + { + for (uint8_t i = 0; i < 2; i++) + { + TRY + { + LuosIO_Init(); + phy_job_t *job = NULL; + luos_phy->job_nb = 2; + luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; + + error_return_t returned_val = LuosIO_TryToGetJob(i, &job); + + TEST_ASSERT_EQUAL(SUCCEED, returned_val); + TEST_ASSERT_EQUAL(&msg_buffer[i], job->data_pt); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + TRY + { + LuosIO_Init(); + phy_job_t *job = NULL; + luos_phy->job_nb = 2; + luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; + + error_return_t returned_val = LuosIO_TryToGetJob(2, &job); + + TEST_ASSERT_EQUAL(FAILED, returned_val); + TEST_ASSERT_EQUAL(NULL, job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_luosIO_RmJob() +{ + NEW_TEST_CASE("Check assert condition for RmJob"); + { + TRY + { + LuosIO_Init(); + LuosIO_RmJob(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + LuosIO_Init(); + luos_phy->job_nb = 3; + LuosIO_RmJob(&luos_phy->job[luos_phy->job_nb]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check RmJob"); + { + TRY + { + LuosIO_Init(); + service_filter[0] = 0x00; + service_filter[1] = 0x01; + phy_job_t *job = NULL; + luos_phy->job_nb = 2; + luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; + luos_phy->job[0].phy_data = &service_filter[0]; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; + luos_phy->job[1].phy_data = &service_filter[1]; + + LuosIO_RmJob(&luos_phy->job[0]); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[0].data_pt); + + // Job 2 is not removed because service_filter is not equal to 0x00 + LuosIO_RmJob(&luos_phy->job[0]); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[0].data_pt); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_luosIO_GetJobNb() +{ + NEW_TEST_CASE("Check GetJobNb"); + { + TRY + { + LuosIO_Init(); + luos_phy->job_nb = 3; + + uint16_t jobNb = LuosIO_GetJobNb(); + TEST_ASSERT_EQUAL(luos_phy->job_nb, jobNb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_luosIO_init); + UNIT_TEST_RUN(unittest_luosIO_loop); + UNIT_TEST_RUN(unittest_luosIO_TransmitLocalRoutingTable); + UNIT_TEST_RUN(unittest_luosIO_ConsumeMsg); + UNIT_TEST_RUN(unittest_luosIO_DetectNextNodes); + UNIT_TEST_RUN(unittest_luosIO_TryToGetJob); + UNIT_TEST_RUN(unittest_luosIO_RmJob); + UNIT_TEST_RUN(unittest_luosIO_GetJobNb); + + UNITY_END(); +} From a34d44db156c89003fcd67b5935e7a7e31403c21 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 5 May 2023 17:30:38 +0200 Subject: [PATCH 059/198] Improve UNIT_TEST_RUN macro to correctly manage function name passing to unity. --- platformio.ini | 2 +- test/_resources/Unity/unit_test.c | 17 +---------------- test/_resources/Unity/unit_test.h | 8 +++++++- test/tests_core/test_topic/main.c | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/platformio.ini b/platformio.ini index 315fce0ab..99c0e2b68 100644 --- a/platformio.ini +++ b/platformio.ini @@ -32,4 +32,4 @@ build_type = debug test_build_src = true ; To debug a test, replace "test_template" by the directory test name you want to debug (example : "test_msg_alloc") -debug_test = tests_io/test_filter +debug_test = tests_io/test_msg_alloc diff --git a/test/_resources/Unity/unit_test.c b/test/_resources/Unity/unit_test.c index 42b14d326..6984c2e5c 100644 --- a/test/_resources/Unity/unit_test.c +++ b/test/_resources/Unity/unit_test.c @@ -27,21 +27,6 @@ bool try_state = false; * Function ******************************************************************************/ -/****************************************************************************** - * @brief Launch a unit test - * @param None - * @return None - ******************************************************************************/ -void RUN(const char *name, void (*function)(void)) -{ - printf("\n\n===============================================================================================================\n"); - printf("Unit test function : %s\n", name); - printf("===============================================================================================================\n"); - - test_case_number = 0; - RUN_TEST(function); -} - /****************************************************************************** * @brief Start a new test case * @param title (test description title) @@ -150,4 +135,4 @@ void setUp(void) void tearDown(void) { -} \ No newline at end of file +} diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index ea4baff4a..6375e4149 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -24,9 +24,15 @@ extern jmp_buf err_ctx; extern bool try_state; +extern uint16_t test_case_number; #ifndef UNIT_TEST_RUN - #define UNIT_TEST_RUN(f) RUN(#f, f) + #define UNIT_TEST_RUN(f) \ + printf("\n\n===============================================================================================================\n"); \ + printf("Unit test function : %s\n", #f); \ + printf("===============================================================================================================\n"); \ + test_case_number = 0; \ + RUN_TEST(f) #endif #define TRY \ diff --git a/test/tests_core/test_topic/main.c b/test/tests_core/test_topic/main.c index a13432548..2cfba349f 100644 --- a/test/tests_core/test_topic/main.c +++ b/test/tests_core/test_topic/main.c @@ -129,4 +129,4 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_Luos_Unsubscribe); UNITY_END(); -} \ No newline at end of file +} From 24753d3d23b0a945e00874fb02e47f9a31a57930 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 5 May 2023 19:25:21 +0200 Subject: [PATCH 060/198] Improve pub_sub unit tests --- engine/IO/src/filter.c | 6 +- engine/core/src/pub_sub.c | 14 +- test/test_robus/main.c | 211 ------------- test/test_robus/main.h | 6 - test/tests_core/test_pub_sub/main.c | 454 ++++++++++++++++++++++++++++ test/tests_core/test_topic/main.c | 132 -------- test/tests_core/test_topic/main.h | 4 - test/tests_io/test_filter/main.c | 50 +-- 8 files changed, 488 insertions(+), 389 deletions(-) delete mode 100644 test/test_robus/main.c delete mode 100644 test/test_robus/main.h create mode 100644 test/tests_core/test_pub_sub/main.c delete mode 100644 test/tests_core/test_topic/main.c delete mode 100644 test/tests_core/test_topic/main.h diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 69c1248d0..d0a2ecca8 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -88,7 +88,7 @@ void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) ******************************************************************************/ void Filter_AddTopic(uint16_t topic_id) { - LUOS_ASSERT(topic_id <= LAST_TOPIC); + LUOS_ASSERT(topic_id < LAST_TOPIC); // Add 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] |= 1 << (topic_id - ((int)(topic_id / 8)) * 8); } @@ -100,7 +100,7 @@ void Filter_AddTopic(uint16_t topic_id) ******************************************************************************/ void Filter_RmTopic(uint16_t topic_id) { - LUOS_ASSERT(topic_id <= LAST_TOPIC); + LUOS_ASSERT(topic_id < LAST_TOPIC); // Remove 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] &= ~(1 << (topic_id - ((int)(topic_id / 8)) * 8)); } @@ -144,7 +144,7 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) { uint8_t compare = 0; // Make sure there is a topic that can be received by the node - if (topic_id <= LAST_TOPIC) + if (topic_id < LAST_TOPIC) { compare = topic_id - ((topic_id / 8) * 8); // Search if topic exists in mask diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index 92aab9eb1..ebbe41f1f 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -30,6 +30,8 @@ ******************************************************************************/ uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id) { + LUOS_ASSERT((topic_id < LAST_TOPIC) + && (service != NULL)); unsigned char i; for (i = 0; i < service->last_topic_position; i++) { @@ -48,8 +50,8 @@ uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id) error_return_t Luos_Subscribe(service_t *service, uint16_t topic) { // Assert if we add a topic that is greater than the max topic value - LUOS_ASSERT(topic <= LAST_TOPIC); - LUOS_ASSERT(service != 0); + LUOS_ASSERT((topic < LAST_TOPIC) + && (service != 0)); // Put this topic in the multicast bank Filter_AddTopic(topic); @@ -72,8 +74,8 @@ error_return_t Luos_Subscribe(service_t *service, uint16_t topic) ******************************************************************************/ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { - LUOS_ASSERT(topic <= LAST_TOPIC); - LUOS_ASSERT(service != 0); + LUOS_ASSERT((topic < LAST_TOPIC) + && (service != 0)); error_return_t err = FAILED; // Delete topic from service list @@ -81,10 +83,6 @@ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { if (service->topic_list[i] == topic) { - if (service->last_topic_position >= LAST_TOPIC) - { - break; - } memcpy(&service->topic_list[i], &service->topic_list[i + 1], service->last_topic_position - i); service->last_topic_position--; err = SUCCEED; diff --git a/test/test_robus/main.c b/test/test_robus/main.c deleted file mode 100644 index b146d0bff..000000000 --- a/test/test_robus/main.c +++ /dev/null @@ -1,211 +0,0 @@ -#include -#include "main.h" -#include "robus.h" -#include "context.h" -#include "unit_test.h" -#include "default_scenario.h" -#include "filter.h" - -extern default_scenario_t default_sc; - -void unittest_Luos_Subscribe(void) -{ - NEW_TEST_CASE("Normal Add to node topic list"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(false, Filter_Topic(18)); - Luos_Subscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(false, Filter_Topic(18)); - Luos_Subscribe(default_sc.App_1.app, 6); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(false, Filter_Topic(18)); - Luos_Subscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - } - NEW_TEST_CASE("Assert when adding last topic"); - { - // Init default scenario context - Init_Context(); - - RESET_ASSERT(); - - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); - TEST_ASSERT_FALSE(IS_ASSERT()); - - TRY - { - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC + 1); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - } - NEW_TEST_CASE("Add same topic multiple times"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - Luos_Subscribe(default_sc.App_2.app, 0); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - Luos_Subscribe(default_sc.App_3.app, 0); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - - Luos_Subscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - Luos_Subscribe(default_sc.App_2.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - Luos_Subscribe(default_sc.App_3.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - } -} - -void unittest_Robus_TopicUnsubscribe(void) -{ - NEW_TEST_CASE("Remove from an empty list"); - { - // Init default scenario context - Init_Context(); - - error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, 3); - TEST_ASSERT_EQUAL(FAILED, err); - } - NEW_TEST_CASE("Normal Remove from topic list"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 0); - Luos_Subscribe(default_sc.App_1.app, 4); - Luos_Subscribe(default_sc.App_1.app, 6); - Luos_Subscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 0); - TEST_ASSERT_EQUAL(false, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 6); - TEST_ASSERT_EQUAL(false, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(false, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(false, Filter_Topic(18)); - } - NEW_TEST_CASE("Demand to remove last topic"); - { - // Init default scenario context - Init_Context(); - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); - Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); - error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC); - TEST_ASSERT_EQUAL(err, FAILED); - } - NEW_TEST_CASE("Remove multiple times same topic"); - { - // Init default scenario context - Init_Context(); - Luos_Subscribe(default_sc.App_1.app, 0); - Luos_Subscribe(default_sc.App_1.app, 4); - Luos_Subscribe(default_sc.App_2.app, 4); - Luos_Subscribe(default_sc.App_3.app, 4); - Luos_Subscribe(default_sc.App_2.app, 6); - Luos_Subscribe(default_sc.App_3.app, 6); - Luos_Subscribe(default_sc.App_1.app, 18); - Luos_Subscribe(default_sc.App_2.app, 18); - - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_2.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(true, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_3.app, 4); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_2.app, 6); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_3.app, 6); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_1.app, 18); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(true, Filter_Topic(18)); - - Luos_Unsubscribe(default_sc.App_2.app, 18); - TEST_ASSERT_EQUAL(true, Filter_Topic(0)); - TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(6)); - TEST_ASSERT_EQUAL(false, Filter_Topic(18)); - } -} - -int main(int argc, char **argv) -{ - UNITY_BEGIN(); - - UNIT_TEST_RUN(unittest_Luos_Subscribe); - UNIT_TEST_RUN(unittest_Robus_TopicUnsubscribe); - - UNITY_END(); -} diff --git a/test/test_robus/main.h b/test/test_robus/main.h deleted file mode 100644 index 29d5b83a3..000000000 --- a/test/test_robus/main.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#define SERVICE_NUMBER 5 - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/test_pub_sub/main.c b/test/tests_core/test_pub_sub/main.c new file mode 100644 index 000000000..f0de19953 --- /dev/null +++ b/test/tests_core/test_pub_sub/main.c @@ -0,0 +1,454 @@ +#include "context.h" +#include "pub_sub.h" +#include +#include "unit_test.h" +#include +#include "filter.h" + +extern default_scenario_t default_sc; + +void unittest_PubSub_IsTopicSubscribed(void) +{ + NEW_TEST_CASE("Test IsTopicSubscribed assert conditions"); + { + TRY + { + PubSub_IsTopicSubscribed(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + // Init default scenario context + Init_Context(); + PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Search Topics"); + { + TRY + { + // Init default scenario context + Init_Context(); + Luos_Subscribe(default_sc.App_1.app, 1); + Luos_Subscribe(default_sc.App_2.app, 18); + + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 1)); + TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 18)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 18)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Luos_Subscribe(void) +{ + + NEW_TEST_CASE("Test Subscribe assert conditions"); + { + TRY + { + Luos_Subscribe(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + // Init default scenario context + Init_Context(); + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Add random Topics"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 1)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 2)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[1]); + TEST_ASSERT_EQUAL(LAST_TOPIC - 1, default_sc.App_1.app->topic_list[2]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Add max topics number"); + { + TRY + { + // Init default scenario context + Init_Context(); + + for (uint8_t i = 0; i < LAST_TOPIC; i++) + { + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, i)); + TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->last_topic_position); + } + + TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->last_topic_position); + + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC - 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Normal Add to node topic list"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 0); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); + Luos_Subscribe(default_sc.App_1.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); + Luos_Subscribe(default_sc.App_1.app, 6); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); + Luos_Subscribe(default_sc.App_1.app, 18); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Assert when adding last topic"); + { + // Init default scenario context + Init_Context(); + + RESET_ASSERT(); + + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); + TEST_ASSERT_FALSE(IS_ASSERT()); + + TRY + { + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + } + + NEW_TEST_CASE("Add same topic multiple times"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 0); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + Luos_Subscribe(default_sc.App_2.app, 0); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + Luos_Subscribe(default_sc.App_3.app, 0); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + + Luos_Subscribe(default_sc.App_1.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + Luos_Subscribe(default_sc.App_2.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + Luos_Subscribe(default_sc.App_3.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_Unsubscribe(void) +{ + NEW_TEST_CASE("Remove from an empty list"); + { + TRY + { + // Init default scenario context + Init_Context(); + + error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, 3); + TEST_ASSERT_EQUAL(FAILED, err); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Normal Remove from topic list"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 0); + Luos_Subscribe(default_sc.App_1.app, 4); + Luos_Subscribe(default_sc.App_1.app, 6); + Luos_Subscribe(default_sc.App_1.app, 18); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 0); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 6); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 18); + TEST_ASSERT_EQUAL(false, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Demand to remove last topic"); + { + TRY + { + // Init default scenario context + Init_Context(); + Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(err, FAILED); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Remove multiple times same topic"); + { + TRY + { + // Init default scenario context + Init_Context(); + Luos_Subscribe(default_sc.App_1.app, 0); + Luos_Subscribe(default_sc.App_1.app, 4); + Luos_Subscribe(default_sc.App_2.app, 4); + Luos_Subscribe(default_sc.App_3.app, 4); + Luos_Subscribe(default_sc.App_2.app, 6); + Luos_Subscribe(default_sc.App_3.app, 6); + Luos_Subscribe(default_sc.App_1.app, 18); + Luos_Subscribe(default_sc.App_2.app, 18); + + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_2.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(true, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_3.app, 4); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_2.app, 6); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(true, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_3.app, 6); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_1.app, 18); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(true, Filter_Topic(18)); + + Luos_Unsubscribe(default_sc.App_2.app, 18); + TEST_ASSERT_EQUAL(true, Filter_Topic(0)); + TEST_ASSERT_EQUAL(false, Filter_Topic(4)); + TEST_ASSERT_EQUAL(false, Filter_Topic(6)); + TEST_ASSERT_EQUAL(false, Filter_Topic(18)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Remove random topics"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 2); + Luos_Subscribe(default_sc.App_1.app, 7); + Luos_Subscribe(default_sc.App_1.app, 17); + TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(7, default_sc.App_1.app->topic_list[1]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[2]); + + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 7)); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); + + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 18)); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); + + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 17)); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); + + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); + TEST_ASSERT_EQUAL(0, default_sc.App_1.app->last_topic_position); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Remove same topic"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 2); + Luos_Subscribe(default_sc.App_1.app, 17); + + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); + + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); + TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Last topic position is already removed"); + { + TRY + { + // Init default scenario context + Init_Context(); + + Luos_Subscribe(default_sc.App_1.app, 2); + default_sc.App_1.app->last_topic_position = LAST_TOPIC; + TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); + TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_PubSub_IsTopicSubscribed); + UNIT_TEST_RUN(unittest_Luos_Subscribe); + UNIT_TEST_RUN(unittest_Luos_Unsubscribe); + + UNITY_END(); +} diff --git a/test/tests_core/test_topic/main.c b/test/tests_core/test_topic/main.c deleted file mode 100644 index 2cfba349f..000000000 --- a/test/tests_core/test_topic/main.c +++ /dev/null @@ -1,132 +0,0 @@ -#include "main.h" -#include "robus.h" -#include "context.h" -#include "pub_sub.h" -#include -#include - -extern default_scenario_t default_sc; - -void unittest_PubSub_IsTopicSubscribed(void) -{ - NEW_TEST_CASE("Search Topics"); - { - // Init default scenario context - Init_Context(); - Luos_Subscribe(default_sc.App_1.app, 1); - Luos_Subscribe(default_sc.App_2.app, 18); - - TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 1)); - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 1)); - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app, 18)); - TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_2.app, 18)); - } -} - -void unittest_Luos_Subscribe(void) -{ - NEW_TEST_CASE("Add random Topics"); - { - // Init default scenario context - Init_Context(); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 1)); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 18)); - TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 27)); - TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->topic_list[0]); - TEST_ASSERT_EQUAL(18, default_sc.App_1.app->topic_list[1]); - TEST_ASSERT_EQUAL(27, default_sc.App_1.app->topic_list[2]); - } - NEW_TEST_CASE("Add max topics number"); - { - // Init default scenario context - Init_Context(); - - for (uint8_t i = 0; i < LAST_TOPIC; i++) - { - TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, i)); - TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->last_topic_position); - } - - TEST_ASSERT_EQUAL(FAILED, Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC)); - TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->last_topic_position); - - TEST_ASSERT_FALSE(PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC)); - } -} - -void unittest_Luos_Unsubscribe(void) -{ - NEW_TEST_CASE("Remove random topics"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 2); - Luos_Subscribe(default_sc.App_1.app, 7); - Luos_Subscribe(default_sc.App_1.app, 17); - TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); - TEST_ASSERT_EQUAL(7, default_sc.App_1.app->topic_list[1]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[2]); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 7)); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); - - TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 18)); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[1]); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 17)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[0]); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(0, default_sc.App_1.app->last_topic_position); - } - NEW_TEST_CASE("Remove same topic"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 2); - Luos_Subscribe(default_sc.App_1.app, 17); - - TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); - - TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(1, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_EQUAL(17, default_sc.App_1.app->topic_list[0]); - } - - NEW_TEST_CASE("Last topic position is corrupted"); - { - // Init default scenario context - Init_Context(); - - Luos_Subscribe(default_sc.App_1.app, 2); - default_sc.App_1.app->last_topic_position = LAST_TOPIC - 1; - TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - - Luos_Subscribe(default_sc.App_1.app, 2); - default_sc.App_1.app->last_topic_position = LAST_TOPIC; - TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); - } -} -int main(int argc, char **argv) -{ - UNITY_BEGIN(); - - UNIT_TEST_RUN(unittest_PubSub_IsTopicSubscribed); - UNIT_TEST_RUN(unittest_Luos_Subscribe); - UNIT_TEST_RUN(unittest_Luos_Unsubscribe); - - UNITY_END(); -} diff --git a/test/tests_core/test_topic/main.h b/test/tests_core/test_topic/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/test_topic/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index 8c9691cbc..b8ed62c91 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -166,8 +166,8 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + Filter_AddTopic(LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -177,18 +177,18 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC + 1); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC + 1)); + Filter_AddTopic(LAST_TOPIC); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); } TEST_ASSERT_TRUE(IS_ASSERT()); Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); - Filter_RmTopic(LAST_TOPIC); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + Filter_AddTopic(LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + Filter_RmTopic(LAST_TOPIC - 1); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -198,7 +198,7 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_RmTopic(LAST_TOPIC + 1); + Filter_RmTopic(LAST_TOPIC); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -215,7 +215,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -230,7 +230,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -245,7 +245,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -254,13 +254,13 @@ void unittest_Filter_Topic() TRY { - Filter_AddTopic(LAST_TOPIC); + Filter_AddTopic(LAST_TOPIC - 1); TEST_ASSERT_EQUAL(true, Filter_Topic(0)); TEST_ASSERT_EQUAL(true, Filter_Topic(1)); TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -275,7 +275,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -290,7 +290,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -305,7 +305,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -320,7 +320,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -335,7 +335,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -344,13 +344,13 @@ void unittest_Filter_Topic() TRY { - Filter_RmTopic(LAST_TOPIC); + Filter_RmTopic(LAST_TOPIC - 1); TEST_ASSERT_EQUAL(false, Filter_Topic(0)); TEST_ASSERT_EQUAL(false, Filter_Topic(1)); TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); } CATCH { @@ -708,10 +708,10 @@ int main(int argc, char **argv) { UNITY_BEGIN(); - UNIT_TEST_RUN(unittest_Filter_ServiceId); - UNIT_TEST_RUN(unittest_Filter_Topic); - UNIT_TEST_RUN(unittest_Filter_Type); - UNIT_TEST_RUN(unittest_Filter_GetPhyTarget); + RUN_TEST(unittest_Filter_ServiceId); + RUN_TEST(unittest_Filter_Topic); + RUN_TEST(unittest_Filter_Type); + RUN_TEST(unittest_Filter_GetPhyTarget); UNITY_END(); } From 04aa84466827f1089d9826ee549db313549756d5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 29 May 2023 11:37:32 +0200 Subject: [PATCH 061/198] Remove useless main.h Od tests files --- test/tests_core/tests_od/test_angular/main.h | 4 ---- test/tests_core/tests_od/test_control/main.h | 4 ---- test/tests_core/tests_od/test_electric/main.h | 4 ---- test/tests_core/tests_od/test_force/main.h | 4 ---- test/tests_core/tests_od/test_illuminance/main.h | 4 ---- test/tests_core/tests_od/test_linear/main.h | 4 ---- test/tests_core/tests_od/test_pid/main.h | 4 ---- test/tests_core/tests_od/test_pressure/main.h | 4 ---- test/tests_core/tests_od/test_ratio/main.h | 4 ---- test/tests_core/tests_od/test_temperature/main.h | 4 ---- test/tests_core/tests_od/test_time/main.h | 4 ---- 11 files changed, 44 deletions(-) delete mode 100644 test/tests_core/tests_od/test_angular/main.h delete mode 100644 test/tests_core/tests_od/test_control/main.h delete mode 100644 test/tests_core/tests_od/test_electric/main.h delete mode 100644 test/tests_core/tests_od/test_force/main.h delete mode 100644 test/tests_core/tests_od/test_illuminance/main.h delete mode 100644 test/tests_core/tests_od/test_linear/main.h delete mode 100644 test/tests_core/tests_od/test_pid/main.h delete mode 100644 test/tests_core/tests_od/test_pressure/main.h delete mode 100644 test/tests_core/tests_od/test_ratio/main.h delete mode 100644 test/tests_core/tests_od/test_temperature/main.h delete mode 100644 test/tests_core/tests_od/test_time/main.h diff --git a/test/tests_core/tests_od/test_angular/main.h b/test/tests_core/tests_od/test_angular/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_angular/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_control/main.h b/test/tests_core/tests_od/test_control/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_control/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_electric/main.h b/test/tests_core/tests_od/test_electric/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_electric/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_force/main.h b/test/tests_core/tests_od/test_force/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_force/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_illuminance/main.h b/test/tests_core/tests_od/test_illuminance/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_illuminance/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_linear/main.h b/test/tests_core/tests_od/test_linear/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_linear/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_pid/main.h b/test/tests_core/tests_od/test_pid/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_pid/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_pressure/main.h b/test/tests_core/tests_od/test_pressure/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_pressure/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_ratio/main.h b/test/tests_core/tests_od/test_ratio/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_ratio/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_temperature/main.h b/test/tests_core/tests_od/test_temperature/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_temperature/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file diff --git a/test/tests_core/tests_od/test_time/main.h b/test/tests_core/tests_od/test_time/main.h deleted file mode 100644 index 56f0a9bb3..000000000 --- a/test/tests_core/tests_od/test_time/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -#endif // MAIN_H \ No newline at end of file From fafe8825380be068ad32acb8d3354223db0b651a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 31 May 2023 11:17:27 +0200 Subject: [PATCH 062/198] Improve timestamp unit tests --- engine/core/src/timestamp.c | 8 +- test/tests_core/test_timestamp/main.c | 101 ++++++++++++++++++++++---- test/tests_core/test_timestamp/main.h | 7 -- 3 files changed, 93 insertions(+), 23 deletions(-) delete mode 100644 test/tests_core/test_timestamp/main.h diff --git a/engine/core/src/timestamp.c b/engine/core/src/timestamp.c index c1fd55e71..6407a3d3b 100644 --- a/engine/core/src/timestamp.c +++ b/engine/core/src/timestamp.c @@ -62,6 +62,7 @@ time_luos_t Luos_Timestamp(void) { return TimeOD_TimeFrom_ns((double)LuosHAL_GetTimestamp()); } + /****************************************************************************** * @brief Check if the message is a timestamp message * @param msg : Message to check @@ -69,8 +70,10 @@ time_luos_t Luos_Timestamp(void) ******************************************************************************/ _CRITICAL inline bool Luos_IsMsgTimstamped(const msg_t *msg) { + LUOS_ASSERT(msg != NULL); return (msg->header.config == TIMESTAMP_PROTOCOL); } + /****************************************************************************** * @brief Get the timestamp associated to a message * @param msg : Message to get the timestamp from @@ -78,6 +81,7 @@ _CRITICAL inline bool Luos_IsMsgTimstamped(const msg_t *msg) ******************************************************************************/ time_luos_t Luos_GetMsgTimestamp(msg_t *msg) { + LUOS_ASSERT(msg != NULL); time_luos_t timestamp = {0.0f}; if (Luos_IsMsgTimstamped(msg)) { @@ -96,6 +100,7 @@ time_luos_t Luos_GetMsgTimestamp(msg_t *msg) ******************************************************************************/ void Timestamp_EncodeMsg(msg_t *msg, time_luos_t timestamp) { + LUOS_ASSERT(msg != NULL); // Update message header protocol msg->header.config = TIMESTAMP_PROTOCOL; // Timestamp is at the end of the message copy it @@ -109,7 +114,7 @@ void Timestamp_EncodeMsg(msg_t *msg, time_luos_t timestamp) ******************************************************************************/ _CRITICAL time_luos_t Timestamp_ConvertToLatency(const msg_t *msg) { - + LUOS_ASSERT(msg != NULL); time_luos_t timestamp_date; memcpy(×tamp_date, &msg->data[msg->header.size], sizeof(time_luos_t)); // Compute the latency from date @@ -125,6 +130,7 @@ _CRITICAL time_luos_t Timestamp_ConvertToLatency(const msg_t *msg) ******************************************************************************/ _CRITICAL inline void Timestamp_ConvertToDate(msg_t *msg, uint64_t reception_date) { + LUOS_ASSERT(msg != NULL); time_luos_t timestamp_latency = {0.0f}; // Get latency memcpy(×tamp_latency, &msg->data[msg->header.size], sizeof(time_luos_t)); diff --git a/test/tests_core/test_timestamp/main.c b/test/tests_core/test_timestamp/main.c index fed8a6f78..e1f60cd09 100644 --- a/test/tests_core/test_timestamp/main.c +++ b/test/tests_core/test_timestamp/main.c @@ -1,17 +1,74 @@ -#include "main.h" #include -#include +#include "default_scenario.h" +#include "_timestamp.h" extern volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; extern default_scenario_t default_sc; -static void MessageHandler(service_t *service, const msg_t *msg) +void unittest_Luos_IsMsgTimstamped(void) { - default_sc.App_1.last_rx_msg.header.config = msg->header.config; - default_sc.App_1.last_rx_msg.header.size = msg->header.size; - for (uint16_t i = 0; i < default_sc.App_1.last_rx_msg.header.size; i++) + NEW_TEST_CASE("Test Luos_IsMsgTimstamped assert conditions"); { - default_sc.App_1.last_rx_msg.data[i] = msg->data[i]; + TRY + { + Luos_IsMsgTimstamped(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_Luos_GetMsgTimestamp(void) +{ + NEW_TEST_CASE("Test Luos_GetMsgTimestamp assert conditions"); + { + TRY + { + Luos_GetMsgTimestamp(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_Timestamp_EncodeMsg(void) +{ + NEW_TEST_CASE("Test Timestamp_EncodeMsg assert conditions"); + { + TRY + { + time_luos_t timestamp; + Timestamp_EncodeMsg(NULL, timestamp); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_Timestamp_ConvertToLatency(void) +{ + NEW_TEST_CASE("Test Timestamp_ConvertToLatency assert conditions"); + { + TRY + { + Timestamp_ConvertToLatency(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } +} + +void unittest_Timestamp_ConvertToDate(void) +{ + NEW_TEST_CASE("Test Timestamp_ConvertToDate assert conditions"); + { + TRY + { + uint64_t reception_date; + Timestamp_ConvertToDate(NULL, reception_date); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; } } @@ -43,7 +100,7 @@ void unittest_Timestamp() NEW_STEP("Transmit timestamps"); // Init scenario context - // Init default scenario context + // Init default scenario context Init_Context(); Luos_Loop(); @@ -55,30 +112,39 @@ void unittest_Timestamp() msg.header.cmd = IO_STATE; msg.data[0] = true; - // Send the 1st message to receiver with both the 1st timestamp + // Send the 1st message to receiver with the 1st timestamp TEST_ASSERT_EQUAL(SUCCEED, Luos_SendTimestampMsg(default_sc.App_1.app, &msg, event_a_timestamp)); Luos_Loop(); - // Get the message received msg_t *rx_msg; rx_msg = &default_sc.App_2.last_rx_msg; uint64_t low_level_rx_timestamp; + // Check the message size + TEST_ASSERT_EQUAL(msg.header.size, rx_msg->header.size); + // Check that the message is timestamped + TEST_ASSERT_EQUAL(true, Luos_IsMsgTimstamped(rx_msg)); // Get back the 1st timestamp time_luos_t rx_event_a_timestamp = Luos_GetMsgTimestamp(rx_msg); - // Send the 2nd message to receiver with both the 2nd timestamp - msg.header.size = 1; + TEST_ASSERT_FALSE(IS_ASSERT()); + + // Send the 2nd message to receiver with the 2nd timestamp + msg.header.size = 2; TEST_ASSERT_EQUAL(SUCCEED, Luos_SendTimestampMsg(default_sc.App_1.app, &msg, event_b_timestamp)); Luos_Loop(); - // Get the message received rx_msg = &default_sc.App_2.last_rx_msg; + // Check the message size + TEST_ASSERT_EQUAL(msg.header.size, rx_msg->header.size); + // Check that the message is timestamped + TEST_ASSERT_EQUAL(true, Luos_IsMsgTimstamped(rx_msg)); // Get back the 2nd timestamp time_luos_t rx_event_b_timestamp = Luos_GetMsgTimestamp(rx_msg); + TEST_ASSERT_FALSE(IS_ASSERT()); // check the time elapsed between the two events - time_elapsed = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(rx_event_b_timestamp) - TimeOD_TimeTo_s(rx_event_a_timestamp)); + time_luos_t time_elapsed2 = TimeOD_TimeFrom_s(TimeOD_TimeTo_s(rx_event_b_timestamp) - TimeOD_TimeTo_s(rx_event_a_timestamp)); // Verify - TEST_ASSERT_EQUAL(((TimeOD_TimeTo_ms(time_elapsed) > 1.15) && (TimeOD_TimeTo_ms(time_elapsed) < 1.25)), true); + TEST_ASSERT_EQUAL(TimeOD_TimeTo_ms(time_elapsed2), TimeOD_TimeTo_ms(time_elapsed)); } } @@ -87,6 +153,11 @@ int main(int argc, char **argv) UNITY_BEGIN(); // Timestamp function + UNIT_TEST_RUN(unittest_Luos_IsMsgTimstamped); + UNIT_TEST_RUN(unittest_Luos_GetMsgTimestamp); + UNIT_TEST_RUN(unittest_Timestamp_EncodeMsg); + UNIT_TEST_RUN(unittest_Timestamp_ConvertToLatency); + UNIT_TEST_RUN(unittest_Timestamp_ConvertToDate); UNIT_TEST_RUN(unittest_Timestamp); UNITY_END(); diff --git a/test/tests_core/test_timestamp/main.h b/test/tests_core/test_timestamp/main.h deleted file mode 100644 index 8c6c524cd..000000000 --- a/test/tests_core/test_timestamp/main.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -// Sreaming functions -void unittest_Timestamp(void); - -#endif // MAIN_H \ No newline at end of file From 20625646799ffc8ed1b2aea806133c6ac0d878f9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 31 May 2023 15:13:03 +0200 Subject: [PATCH 063/198] Improve routing table unit tests --- engine/core/inc/routing_table.h | 1 - engine/core/src/routing_table.c | 106 ++-- test/tests_core/test_routing_table/main.c | 704 +++++++++++++++++++--- test/tests_core/test_routing_table/main.h | 11 - 4 files changed, 702 insertions(+), 120 deletions(-) delete mode 100644 test/tests_core/test_routing_table/main.h diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index 1b228b142..9ddf32e52 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -80,7 +80,6 @@ void RoutingTB_RemoveNode(uint16_t nodeid); void RoutingTB_RemoveService(uint16_t id); void RoutingTB_Erase(void); routing_table_t *RoutingTB_Get(void); -uint16_t RoutingTB_GetLastService(void); uint16_t *RoutingTB_GetLastNode(void); uint16_t RoutingTB_GetLastEntry(void); diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index d500f4f72..f5c879a71 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -15,15 +15,13 @@ #include "luos_io.h" #include "service.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ /******************************************************************************* * Variables ******************************************************************************/ routing_table_t routing_table[MAX_RTB_ENTRY]; volatile uint16_t last_service = 0; volatile uint16_t last_routing_table_entry = 0; + /******************************************************************************* * Function ******************************************************************************/ @@ -47,6 +45,7 @@ static void RoutingTB_SendEndDetection(service_t *service); ******************************************************************************/ uint16_t RoutingTB_IDFromAlias(char *alias) { + LUOS_ASSERT(alias); if (*alias != -1) { for (int i = 0; i <= last_routing_table_entry; i++) @@ -62,6 +61,7 @@ uint16_t RoutingTB_IDFromAlias(char *alias) } return 0; } + /****************************************************************************** * @brief Return a Nodeid from service id * @param id : Id of service @@ -69,7 +69,9 @@ uint16_t RoutingTB_IDFromAlias(char *alias) ******************************************************************************/ uint16_t RoutingTB_NodeIDFromID(uint16_t id) { - for (int32_t i = (int32_t)RoutingTB_GetServiceIndex(id); i >= 0; i--) + LUOS_ASSERT(id != 0); // Services can't have id 0. + // In RTB, node are always before service, so we can search backward and start just before the service index. + for (int16_t i = RoutingTB_GetServiceIndex(id) - 1; i >= 0; i--) { if (routing_table[i].mode == NODE) { @@ -78,6 +80,7 @@ uint16_t RoutingTB_NodeIDFromID(uint16_t id) } return 0; } + /****************************************************************************** * @brief Return service Alias from ID * @param id : Id service look at @@ -85,6 +88,7 @@ uint16_t RoutingTB_NodeIDFromID(uint16_t id) ******************************************************************************/ char *RoutingTB_AliasFromId(uint16_t id) { + LUOS_ASSERT(id != 0); // Services can't have id 0. for (int i = 0; i <= last_routing_table_entry; i++) { if (routing_table[i].mode == SERVICE) @@ -97,6 +101,7 @@ char *RoutingTB_AliasFromId(uint16_t id) } return (char *)0; } + /****************************************************************************** * @brief Return bigest service ID in list * @param None @@ -104,19 +109,9 @@ char *RoutingTB_AliasFromId(uint16_t id) ******************************************************************************/ uint16_t RoutingTB_BigestID(void) { - uint16_t max_id = 0; - for (uint16_t i = 0; i < last_routing_table_entry; i++) - { - if (routing_table[i].mode == SERVICE) - { - if (routing_table[i].id > max_id) - { - max_id = routing_table[i].id; - } - } - } - return max_id; + return (uint16_t)last_service; } + /****************************************************************************** * @brief Return bigest node ID in list * @param None @@ -124,27 +119,24 @@ uint16_t RoutingTB_BigestID(void) ******************************************************************************/ static uint16_t RoutingTB_BigestNodeID(void) { - uint16_t max_id = 0; - for (uint16_t i = 0; i < last_routing_table_entry; i++) + for (int32_t i = last_routing_table_entry; i >= 0; i--) { if (routing_table[i].mode == NODE) { - if (routing_table[i].node_id > max_id) - { - max_id = routing_table[i].node_id; - } + return routing_table[i].node_id; } } - return max_id; + return 0; } /****************************************************************************** * @brief Get Index of service on the routing table - * @param id : Routing table id - * @return Index + * @param id : service id + * @return Routing table Index ******************************************************************************/ uint16_t RoutingTB_GetServiceIndex(uint16_t id) { + LUOS_ASSERT(id != 0); // Services can't have id 0. for (uint8_t i = 0; i < last_routing_table_entry; i++) { if (routing_table[i].mode == SERVICE && routing_table[i].id == id) @@ -179,6 +171,7 @@ void RoutingTB_ComputeRoutingTableEntryNB(void) // Routing table space is full. last_routing_table_entry = MAX_RTB_ENTRY - 1; } + /****************************************************************************** * @brief Manage service name increment to never have same alias * @param alias : Alias to change @@ -187,6 +180,7 @@ void RoutingTB_ComputeRoutingTableEntryNB(void) ******************************************************************************/ static void RoutingTB_AddNumToAlias(char *alias, uint8_t num) { + LUOS_ASSERT(alias); uint8_t intsize = 1; if (num > 9) { @@ -213,6 +207,7 @@ static void RoutingTB_AddNumToAlias(char *alias, uint8_t num) char *alias_copy = alias; sprintf(alias, "%s%d", alias_copy, num); } + /****************************************************************************** * @brief Time out to receive en route table from * @param service : Service receive @@ -221,6 +216,7 @@ static void RoutingTB_AddNumToAlias(char *alias, uint8_t num) ******************************************************************************/ bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg) { + LUOS_ASSERT((service != 0) && (intro_msg != 0)); const uint8_t timeout = 15; // timeout in ms const uint16_t entry_bkp = last_routing_table_entry; Luos_SendMsg(service, intro_msg); @@ -236,6 +232,7 @@ bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg) } return false; } + /****************************************************************************** * @brief Generate Complete route table with local route table receive * @param service : Service in node @@ -244,6 +241,7 @@ bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg) ******************************************************************************/ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) { + LUOS_ASSERT(service); // Asks for introduction for every found node (even the one detecting). uint16_t try_nb = 0; uint16_t last_node_id = RoutingTB_BigestNodeID(); @@ -294,6 +292,7 @@ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) } } } + /****************************************************************************** * @brief Send the complete route table to each node on the network * @param service : Service who send @@ -302,6 +301,7 @@ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) ******************************************************************************/ static void RoutingTB_Share(service_t *service, uint16_t nb_node) { + LUOS_ASSERT(service); // Make sure that the detection is not interrupted if (Node_GetState() == EXTERNAL_DETECTION) { @@ -339,6 +339,7 @@ static void RoutingTB_Share(service_t *service, uint16_t nb_node) ******************************************************************************/ void RoutingTB_SendEndDetection(service_t *service) { + LUOS_ASSERT(service); // Make sure that the detection is not interrupted if (Node_GetState() == EXTERNAL_DETECTION) { @@ -363,6 +364,7 @@ void RoutingTB_SendEndDetection(service_t *service) ******************************************************************************/ void RoutingTB_DetectServices(service_t *service) { + LUOS_ASSERT(service); // Starts the topology detection. uint16_t nb_node = LuosIO_TopologyDetection(service); // Clear data reception state @@ -378,6 +380,7 @@ void RoutingTB_DetectServices(service_t *service) // Clear statistic of node who start the detction Luos_ResetStatistic(); } + /****************************************************************************** * @brief Entry in routable node with associate service * @param entry : Route table @@ -386,12 +389,14 @@ void RoutingTB_DetectServices(service_t *service) ******************************************************************************/ void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node) { + LUOS_ASSERT((node != NULL) && (entry != NULL)); // Check if the NBR_PORT config is too high to fit into routing table. LUOS_ASSERT(sizeof(node_t) <= (sizeof(routing_table_t) - 1)); memset(entry, 0, sizeof(routing_table_t)); entry->mode = NODE; memcpy(entry->unmap_data, node->unmap, sizeof(node_t)); } + /****************************************************************************** * @brief Entry in routable service associate to a node * @param entry : Route table @@ -400,6 +405,7 @@ void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node) ******************************************************************************/ void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service) { + LUOS_ASSERT((service != NULL) && (entry != NULL)); entry->type = service->type; entry->id = service->id; entry->mode = SERVICE; @@ -408,6 +414,7 @@ void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *s entry->alias[i] = service->alias[i]; } } + /****************************************************************************** * @brief Remove an entire node * @param nodeid : Node id to remove from RTB @@ -415,7 +422,8 @@ void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *s ******************************************************************************/ void RoutingTB_RemoveNode(uint16_t nodeid) { - // instead of removing a node just remove all the service in it to make it unusable + LUOS_ASSERT(nodeid != 0); + // Instead of removing a node just remove all the service in it to make it unusable // We could add a param (CONTROL for example) to declare the node as STOP // find the node for (uint16_t i = 0; i < last_routing_table_entry; i++) @@ -425,7 +433,7 @@ void RoutingTB_RemoveNode(uint16_t nodeid) if (routing_table[i].node_id == nodeid) { i++; - // We find our node remove all services + // We foundd our node remove all services in it while (routing_table[i].mode == SERVICE) { RoutingTB_RemoveService(routing_table[i].id); @@ -435,6 +443,7 @@ void RoutingTB_RemoveNode(uint16_t nodeid) } } } + /****************************************************************************** * @brief Remove an entry from routing_table * @param id : Id of service @@ -442,6 +451,7 @@ void RoutingTB_RemoveNode(uint16_t nodeid) ******************************************************************************/ void RoutingTB_RemoveService(uint16_t serviceid) { + LUOS_ASSERT(serviceid != 0); Service_RmAutoUpdateTarget(serviceid); // Find the service for (uint16_t i = 0; i < last_routing_table_entry; i++) @@ -452,10 +462,23 @@ void RoutingTB_RemoveService(uint16_t serviceid) memcpy(&routing_table[i], &routing_table[i + 1], sizeof(routing_table_t) * (last_routing_table_entry - (i + 1))); last_routing_table_entry--; memset(&routing_table[last_routing_table_entry], 0, sizeof(routing_table_t)); + if (serviceid == last_service) + { + last_service = 0; + for (uint16_t i = last_routing_table_entry; i > 0; i--) + { + if (routing_table[i].mode == SERVICE) + { + last_service = routing_table[i].id; + break; + } + } + } return; } } } + /****************************************************************************** * @brief Erase routing_table * @param None @@ -467,6 +490,7 @@ void RoutingTB_Erase(void) last_service = 0; last_routing_table_entry = 0; } + /****************************************************************************** * @brief Get routing_table * @param None @@ -476,15 +500,7 @@ routing_table_t *RoutingTB_Get(void) { return routing_table; } -/****************************************************************************** - * @brief Return the last ID registered into the routing_table - * @param None - * @return Last service ID - ******************************************************************************/ -uint16_t RoutingTB_GetLastService(void) -{ - return (uint16_t)last_service; -} + /****************************************************************************** * @brief Return the last ID registered into the routing_table * @param None @@ -501,9 +517,9 @@ uint16_t RoutingTB_GetLastEntry(void) * @param result : Pointer to search result structure * @return SUCCEED : If the result address is available, else FAILED ******************************************************************************/ - error_return_t RTFilter_InitCheck(search_result_t *result) { + LUOS_ASSERT(result != NULL); // check if we fund the address of the result in routing table if ((result->result_table[0] >= &routing_table[0]) && (result->result_table[0] <= &routing_table[last_routing_table_entry - 1])) { @@ -511,6 +527,7 @@ error_return_t RTFilter_InitCheck(search_result_t *result) } return FAILED; } + /****************************************************************************** * @brief Initialize the Result table pointers * @param result : Pointer to result table @@ -518,6 +535,7 @@ error_return_t RTFilter_InitCheck(search_result_t *result) ******************************************************************************/ search_result_t *RTFilter_Reset(search_result_t *result) { + LUOS_ASSERT(result != NULL); // the initialization is to keep a pointer to all the servicesentries of the routing table result->result_nbr = 0; for (uint8_t i = 0; i < last_routing_table_entry; i++) @@ -530,6 +548,7 @@ search_result_t *RTFilter_Reset(search_result_t *result) } return result; } + /****************************************************************************** * @brief Find the service with a specific Id * @param result : Pointer to previous result research structure @@ -538,6 +557,7 @@ search_result_t *RTFilter_Reset(search_result_t *result) ******************************************************************************/ search_result_t *RTFilter_ID(search_result_t *result, uint16_t id) { + LUOS_ASSERT((result != NULL) && (id != 0)); uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); @@ -563,6 +583,7 @@ search_result_t *RTFilter_ID(search_result_t *result, uint16_t id) // return a pointer to the search structure return (result); } + /****************************************************************************** * @brief Search all the services with the same type * @param result : Pointer to previous result research structure @@ -571,6 +592,7 @@ search_result_t *RTFilter_ID(search_result_t *result, uint16_t id) ******************************************************************************/ search_result_t *RTFilter_Type(search_result_t *result, luos_type_t type) { + LUOS_ASSERT((result != NULL)); uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); @@ -596,6 +618,7 @@ search_result_t *RTFilter_Type(search_result_t *result, luos_type_t type) // return a pointer to the search structure return (result); } + /****************************************************************************** * @brief Search all the services of the same node * @param result : Pointer to previous result research structure @@ -604,6 +627,7 @@ search_result_t *RTFilter_Type(search_result_t *result, luos_type_t type) ******************************************************************************/ search_result_t *RTFilter_Node(search_result_t *result, uint16_t node_id) { + LUOS_ASSERT((result != NULL) && (node_id != 0)); uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); @@ -631,8 +655,15 @@ search_result_t *RTFilter_Node(search_result_t *result, uint16_t node_id) return (result); } +/****************************************************************************** + * @brief Search all the services with the same alias + * @param result : Pointer to previous result research structure + * @param alias : Alias that we want to find + * @return New result research structure + ******************************************************************************/ search_result_t *RTFilter_Alias(search_result_t *result, char *alias) { + LUOS_ASSERT((result != NULL) && (alias != 0)); uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); @@ -668,6 +699,7 @@ search_result_t *RTFilter_Alias(search_result_t *result, char *alias) ******************************************************************************/ search_result_t *RTFilter_Service(search_result_t *result, service_t *service) { + LUOS_ASSERT((result != NULL) && (service != 0)); uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); diff --git a/test/tests_core/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c index fda93c220..f44e5a633 100644 --- a/test/tests_core/test_routing_table/main.c +++ b/test/tests_core/test_routing_table/main.c @@ -1,11 +1,507 @@ -#include "main.h" #include #include +#include "routing_table.c" extern default_scenario_t default_sc; +void unittest_RoutingTB_IDFromAlias(void) +{ + NEW_TEST_CASE("Test RoutingTB_IDFromAlias assert conditions"); + { + TRY + { + RoutingTB_IDFromAlias(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_IDFromAlias return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(1, RoutingTB_IDFromAlias("Dummy_App_1")); + TEST_ASSERT_EQUAL(2, RoutingTB_IDFromAlias("Dummy_App_2")); + TEST_ASSERT_EQUAL(3, RoutingTB_IDFromAlias("Dummy_App_3")); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_GetServiceIndex(void) +{ + NEW_TEST_CASE("Test RoutingTB_GetServiceIndex assert conditions"); + { + TRY + { + RoutingTB_GetServiceIndex(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_GetServiceIndex return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(1, RoutingTB_GetServiceIndex(1)); + TEST_ASSERT_EQUAL(2, RoutingTB_GetServiceIndex(2)); + TEST_ASSERT_EQUAL(3, RoutingTB_GetServiceIndex(3)); + TEST_ASSERT_EQUAL(0, RoutingTB_GetServiceIndex(4)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_NodeIDFromID(void) +{ + NEW_TEST_CASE("Test RoutingTB_NodeIDFromID assert conditions"); + { + TRY + { + RoutingTB_NodeIDFromID(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_NodeIDFromID return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(1, RoutingTB_NodeIDFromID(1)); + TEST_ASSERT_EQUAL(1, RoutingTB_NodeIDFromID(2)); + TEST_ASSERT_EQUAL(1, RoutingTB_NodeIDFromID(3)); + TEST_ASSERT_EQUAL(0, RoutingTB_NodeIDFromID(4)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_ComputeRoutingTableEntryNB(void) +{ + NEW_TEST_CASE("check RoutingTB_NodeIDFromID return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + TEST_ASSERT_EQUAL(4, last_routing_table_entry); // 3 services + 1 nodes + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_AliasFromId(void) +{ + NEW_TEST_CASE("Test RoutingTB_AliasFromId assert conditions"); + { + TRY + { + RoutingTB_AliasFromId(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_AliasFromId return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL_STRING("Dummy_App_1", RoutingTB_AliasFromId(1)); + TEST_ASSERT_EQUAL_STRING("Dummy_App_2", RoutingTB_AliasFromId(2)); + TEST_ASSERT_EQUAL_STRING("Dummy_App_3", RoutingTB_AliasFromId(3)); + TEST_ASSERT_EQUAL_STRING(0, RoutingTB_AliasFromId(4)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_BigestID(void) +{ + NEW_TEST_CASE("check RoutingTB_BigestID return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(3, RoutingTB_BigestID()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_BigestNodeID(void) +{ + NEW_TEST_CASE("check RoutingTB_BigestNodeID return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + TEST_ASSERT_EQUAL(1, RoutingTB_BigestNodeID()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_AddNumToAlias(void) +{ + NEW_TEST_CASE("Test RoutingTB_AddNumToAlias assert conditions"); + { + TRY + { + RoutingTB_AddNumToAlias(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_AddNumToAlias return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + char alias[MAX_ALIAS_SIZE] = "Dummy_App"; + RoutingTB_AddNumToAlias(alias, 1); + TEST_ASSERT_EQUAL_STRING("Dummy_App1", alias); + RoutingTB_AddNumToAlias(alias, 2); + TEST_ASSERT_EQUAL_STRING("Dummy_App12", alias); + RoutingTB_AddNumToAlias(alias, 3); + TEST_ASSERT_EQUAL_STRING("Dummy_App123", alias); + + char alias_big[MAX_ALIAS_SIZE] = "Dummy_App123456"; + RoutingTB_AddNumToAlias(alias_big, 1); + TEST_ASSERT_EQUAL_STRING("Dummy_App123451", alias_big); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_ConvertNodeToRoutingTable(void) +{ + NEW_TEST_CASE("Test RoutingTB_ConvertNodeToRoutingTable assert conditions"); + { + TRY + { + node_t node; + RoutingTB_ConvertNodeToRoutingTable(NULL, &node); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + routing_table_t entry; + RoutingTB_ConvertNodeToRoutingTable(&entry, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_ConvertNodeToRoutingTable return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + routing_table_t entry; + node_t node; + node.certified = false; + node.node_id = 10; + node.node_info = 20; + node.port_table[0] = 30; + node.port_table[1] = 40; + + RoutingTB_ConvertNodeToRoutingTable(&entry, &node); + TEST_ASSERT_EQUAL(NODE, entry.mode); + TEST_ASSERT_EQUAL(false, entry.certified); + TEST_ASSERT_EQUAL(10, entry.node_id); + TEST_ASSERT_EQUAL(20, entry.node_info); + TEST_ASSERT_EQUAL(30, entry.port_table[0]); + TEST_ASSERT_EQUAL(40, entry.port_table[1]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_ConvertServiceToRoutingTable(void) +{ + NEW_TEST_CASE("Test RoutingTB_ConvertServiceToRoutingTable assert conditions"); + { + TRY + { + service_t service; + RoutingTB_ConvertServiceToRoutingTable(NULL, &service); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + routing_table_t entry; + RoutingTB_ConvertServiceToRoutingTable(&entry, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_ConvertServiceToRoutingTable return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + routing_table_t entry; + service_t service; + service.id = 10; + strcpy(service.alias, "Dummy_App"); + service.type = DISTANCE_TYPE; + + RoutingTB_ConvertServiceToRoutingTable(&entry, &service); + TEST_ASSERT_EQUAL(SERVICE, entry.mode); + TEST_ASSERT_EQUAL(10, entry.id); + TEST_ASSERT_EQUAL_STRING("Dummy_App", entry.alias); + TEST_ASSERT_EQUAL(DISTANCE_TYPE, entry.type); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_RemoveService(void) +{ + NEW_TEST_CASE("Test RoutingTB_RemoveService assert conditions"); + { + TRY + { + RoutingTB_RemoveService(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_RemoveService return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + + RoutingTB_RemoveService(2); + TEST_ASSERT_EQUAL(3, last_routing_table_entry); + TEST_ASSERT_EQUAL(1, routing_table[1].id); + TEST_ASSERT_EQUAL(3, routing_table[2].id); + TEST_ASSERT_EQUAL(0, routing_table[3].id); + TEST_ASSERT_EQUAL(3, last_service); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + // Init default scenario context + Init_Context(); + + RoutingTB_RemoveService(3); + TEST_ASSERT_EQUAL(3, last_routing_table_entry); + TEST_ASSERT_EQUAL(1, routing_table[1].id); + TEST_ASSERT_EQUAL(2, routing_table[2].id); + TEST_ASSERT_EQUAL(0, routing_table[3].id); + TEST_ASSERT_EQUAL(2, last_service); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_RemoveNode(void) +{ + NEW_TEST_CASE("Test RoutingTB_RemoveNode assert conditions"); + { + TRY + { + RoutingTB_RemoveNode(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("check RoutingTB_RemoveNode return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + RoutingTB_RemoveNode(1); + TEST_ASSERT_EQUAL(1, last_routing_table_entry); + TEST_ASSERT_EQUAL(0, routing_table[1].id); + TEST_ASSERT_EQUAL(0, last_service); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_Erase(void) +{ + NEW_TEST_CASE("check RoutingTB_Erase return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + RoutingTB_Erase(); + TEST_ASSERT_EQUAL(0, last_routing_table_entry); + TEST_ASSERT_EQUAL(0, last_service); + TEST_ASSERT_EQUAL(0, routing_table[0].id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_Get(void) +{ + NEW_TEST_CASE("check RoutingTB_Get return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + TEST_ASSERT_EQUAL(routing_table, RoutingTB_Get()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RoutingTB_GetLastEntry(void) +{ + NEW_TEST_CASE("check RoutingTB_GetLastEntry return value"); + { + TRY + { + // Init default scenario context + Init_Context(); + TEST_ASSERT_EQUAL(last_routing_table_entry, RoutingTB_GetLastEntry()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_RTFilter_InitCheck(void) +{ + NEW_TEST_CASE("Test RTFilter_InitCheck assert conditions"); + { + TRY + { + RTFilter_InitCheck(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test the result initialization check function"); + { + // Init default scenario context + Init_Context(); + // Init variables + search_result_t result; + + NEW_STEP("Verify that we have not initialized the result"); + TEST_ASSERT_EQUAL(FAILED, RTFilter_InitCheck(&result)); + + NEW_STEP("Verify that we have initialized the result"); + RTFilter_Reset(&result); + TEST_ASSERT_EQUAL(SUCCEED, RTFilter_InitCheck(&result)); + } +} + void unittest_RTFilter_Reset(void) { + NEW_TEST_CASE("Test RTFilter_Reset assert conditions"); + { + TRY + { + RTFilter_Reset(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } NEW_TEST_CASE("Test the services in the result table"); { uint32_t ExpectedServiceNB; @@ -39,31 +535,65 @@ void unittest_RTFilter_Reset(void) } } -void unittest_RTFilter_InitCheck(void) +void unittest_RTFilter_ID(void) { - NEW_TEST_CASE("Test the result initialization check function"); + NEW_TEST_CASE("Test RTFilter_ID assert conditions"); { + TRY + { + RTFilter_ID(NULL, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + search_result_t result; + RTFilter_ID(&result, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test the id filtering result number"); + { + uint32_t ExpectedServiceNB; + // Init default scenario context Init_Context(); // Init variables + ExpectedServiceNB = 1; search_result_t result; - uint8_t value; + // Add samples - NEW_STEP("Verify that we have not initialized the result"); - value = RTFilter_InitCheck(&result); - // Verify - TEST_ASSERT_EQUAL(FAILED, value); + NEW_STEP("Verify that we have 1 service with this exact id"); + RTFilter_ID(RTFilter_Reset(&result), 2); + TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); - NEW_STEP("Verify that we have initialized the result"); - RTFilter_Reset(&result); - value = RTFilter_InitCheck(&result); - // Verify - TEST_ASSERT_EQUAL(SUCCEED, value); + NEW_STEP("Verify that we have the right id"); + TEST_ASSERT_EQUAL(2, result.result_table[0]->id); + + NEW_STEP("Verify that we have no service with id bigger than 3"); + ExpectedServiceNB = 0; + RTFilter_ID(RTFilter_Reset(&result), 4); + TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); + + NEW_STEP("Verify that we have no service with id 0"); + ExpectedServiceNB = 0; + RTFilter_ID(RTFilter_Reset(&result), 0); + TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); } } void unittest_RTFilter_Type(void) { + NEW_TEST_CASE("Test RTFilter_Type assert conditions"); + { + TRY + { + RTFilter_Type(NULL, VOID_TYPE); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } NEW_TEST_CASE("Test the type filtering without initialization"); { RESET_ASSERT(); @@ -137,6 +667,22 @@ void unittest_RTFilter_Type(void) void unittest_RTFilter_Node(void) { + NEW_TEST_CASE("Test RTFilter_Node assert conditions"); + { + TRY + { + RTFilter_Node(NULL, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + search_result_t result; + RTFilter_Node(&result, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } NEW_TEST_CASE("Test the node filtering result number"); { uint32_t ExpectedServiceNB; @@ -159,67 +705,24 @@ void unittest_RTFilter_Node(void) } } -void unittest_RTFilter_ID(void) -{ - NEW_TEST_CASE("Test the id filtering result number"); - { - uint32_t ExpectedServiceNB; - - // Init default scenario context - Init_Context(); - // Init variables - ExpectedServiceNB = 1; - search_result_t result; - // Add samples - - NEW_STEP("Verify that we have 1 service with this exact id"); - RTFilter_ID(RTFilter_Reset(&result), 2); - TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); - - NEW_STEP("Verify that we have the right id"); - TEST_ASSERT_EQUAL(2, result.result_table[0]->id); - - NEW_STEP("Verify that we have no service with id bigger than 3"); - ExpectedServiceNB = 0; - RTFilter_ID(RTFilter_Reset(&result), 4); - TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); - - NEW_STEP("Verify that we have no service with id 0"); - ExpectedServiceNB = 0; - RTFilter_ID(RTFilter_Reset(&result), 0); - TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); - } -} - -void unittest_RTFilter_Service(void) +void unittest_RTFilter_Alias() { - NEW_TEST_CASE("Test the id filtering result number"); + NEW_TEST_CASE("Test RTFilter_Alias assert conditions"); { - uint32_t ExpectedServiceNB; - - // Init default scenario context - Init_Context(); - ExpectedServiceNB = 1; - search_result_t result; - // Add samples - - NEW_STEP("Verify that we have 1 service found with this pointer"); - RTFilter_Service(RTFilter_Reset(&result), default_sc.App_3.app); - TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); - - NEW_STEP("Verify that we have assert if we put 0 at service pointer"); - // Init variables - ExpectedServiceNB = 0; - RTFilter_Reset(&result); - result.result_nbr = 0; - - RTFilter_Service(&result, 0); + TRY + { + RTFilter_Alias(NULL, "Dummy"); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + search_result_t result; + RTFilter_Alias(&result, NULL); + } TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; } -} - -void unittest_RTFilter_Alias() -{ NEW_TEST_CASE("Test the alias filtering result number"); { uint32_t ExpectedServiceNB; @@ -270,11 +773,70 @@ void unittest_RTFilter_Alias() TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); } } + +void unittest_RTFilter_Service(void) +{ + NEW_TEST_CASE("Test RTFilter_Service assert conditions"); + { + TRY + { + service_t service; + RTFilter_Service(NULL, &service); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + search_result_t result; + RTFilter_Service(&result, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test the id filtering result number"); + { + uint32_t ExpectedServiceNB; + + // Init default scenario context + Init_Context(); + ExpectedServiceNB = 1; + search_result_t result; + // Add samples + + NEW_STEP("Verify that we have 1 service found with this pointer"); + RTFilter_Service(RTFilter_Reset(&result), default_sc.App_3.app); + TEST_ASSERT_EQUAL(ExpectedServiceNB, result.result_nbr); + + NEW_STEP("Verify that we have assert if we put 0 at service pointer"); + // Init variables + ExpectedServiceNB = 0; + RTFilter_Reset(&result); + result.result_nbr = 0; + + RTFilter_Service(&result, 0); + TEST_ASSERT_TRUE(IS_ASSERT()); + } +} + int main(int argc, char **argv) { UNITY_BEGIN(); - // Streaming functions + UNIT_TEST_RUN(unittest_RoutingTB_IDFromAlias); + UNIT_TEST_RUN(unittest_RoutingTB_GetServiceIndex); + UNIT_TEST_RUN(unittest_RoutingTB_NodeIDFromID); + UNIT_TEST_RUN(unittest_RoutingTB_AliasFromId); + UNIT_TEST_RUN(unittest_RoutingTB_BigestID); + UNIT_TEST_RUN(unittest_RoutingTB_BigestNodeID); + UNIT_TEST_RUN(unittest_RoutingTB_ComputeRoutingTableEntryNB); + UNIT_TEST_RUN(unittest_RoutingTB_AddNumToAlias); + UNIT_TEST_RUN(unittest_RoutingTB_ConvertNodeToRoutingTable); + UNIT_TEST_RUN(unittest_RoutingTB_ConvertServiceToRoutingTable); + UNIT_TEST_RUN(unittest_RoutingTB_RemoveService); + UNIT_TEST_RUN(unittest_RoutingTB_RemoveNode); + UNIT_TEST_RUN(unittest_RoutingTB_Erase); + UNIT_TEST_RUN(unittest_RoutingTB_Get); + UNIT_TEST_RUN(unittest_RoutingTB_GetLastEntry); UNIT_TEST_RUN(unittest_RTFilter_Reset); UNIT_TEST_RUN(unittest_RTFilter_InitCheck); UNIT_TEST_RUN(unittest_RTFilter_Type); diff --git a/test/tests_core/test_routing_table/main.h b/test/tests_core/test_routing_table/main.h deleted file mode 100644 index f3bf1968f..000000000 --- a/test/tests_core/test_routing_table/main.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -// Sreaming functions -void unittest_RTFilter_Reset(void); -void unittest_RTFilter_InitCheck(void); -void unittest_RTFilter_Type(void); -void unittest_RTFilter_Node(void); -void unittest_RTFilter_Alias(void); - -#endif // MAIN_H \ No newline at end of file From df9d4a37a208ec0ca4a2d7109abb9089e04868ef Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 31 May 2023 17:34:51 +0200 Subject: [PATCH 064/198] Add streaming unit test --- engine/core/src/streaming.c | 29 +- test/tests_core/test_luos/main.c | 120 ----- test/tests_core/test_streaming/main.c | 715 ++++++++++++++++++++++++++ 3 files changed, 735 insertions(+), 129 deletions(-) create mode 100644 test/tests_core/test_streaming/main.c diff --git a/engine/core/src/streaming.c b/engine/core/src/streaming.c index 36db3eaa6..427034be7 100644 --- a/engine/core/src/streaming.c +++ b/engine/core/src/streaming.c @@ -8,13 +8,6 @@ #include "luos_engine.h" #include "streaming.h" #include "luos_utils.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ /******************************************************************************* * Function @@ -30,7 +23,7 @@ streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size) { streaming_channel_t stream; - LUOS_ASSERT((ring_buffer != NULL) || (ring_buffer_size > 0) || (data_size > 0)); + LUOS_ASSERT((ring_buffer != NULL) && (ring_buffer_size > 0) && (data_size > 0)); // Save ring buffer informations stream.ring_buffer = (void *)ring_buffer; stream.data_size = data_size; @@ -41,6 +34,7 @@ streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ri stream.sample_ptr = stream.ring_buffer; return stream; } + /****************************************************************************** * @brief Re initialize a streaming channel. * @param stream : Streaming channel pointer @@ -48,9 +42,11 @@ streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ri ******************************************************************************/ void Streaming_ResetChannel(streaming_channel_t *stream) { + LUOS_ASSERT(stream != NULL); stream->data_ptr = stream->ring_buffer; stream->sample_ptr = stream->ring_buffer; } + /****************************************************************************** * @brief Set data into ring buffer. * @param stream : Streaming channel pointer @@ -60,6 +56,7 @@ void Streaming_ResetChannel(streaming_channel_t *stream) ******************************************************************************/ uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size) { + LUOS_ASSERT((stream != NULL) && (data != NULL) && (size > 0)); // check if we exceed ring buffer capacity LUOS_ASSERT((Streaming_GetAvailableSampleNB(stream) + size) <= (stream->end_ring_buffer - stream->ring_buffer)); if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) @@ -82,6 +79,7 @@ uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint } return Streaming_GetAvailableSampleNB(stream); } + /****************************************************************************** * @brief Copy a sample from ring buffer to a data. * @param stream : Streaming channel pointer @@ -91,6 +89,7 @@ uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint ******************************************************************************/ uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size) { + LUOS_ASSERT((stream != NULL) && (data != NULL) && (size > 0)); uint16_t nb_available_samples = Streaming_GetAvailableSampleNB(stream); if (nb_available_samples >= size) { @@ -121,6 +120,7 @@ uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t s } return nb_available_samples; } + /****************************************************************************** * @brief Return the number of available samples * @param stream : Streaming channel pointer @@ -128,6 +128,7 @@ uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t s ******************************************************************************/ uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) { + LUOS_ASSERT(stream != NULL); int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; if (nb_available_sample < 0) { @@ -137,6 +138,7 @@ uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) LUOS_ASSERT(nb_available_sample >= 0); return (uint16_t)nb_available_sample; } + /****************************************************************************** * @brief Get sample number availabled in buffer * @param stream : Streaming channel pointer @@ -144,6 +146,7 @@ uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) ******************************************************************************/ uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) { + LUOS_ASSERT(stream != NULL); int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; if (nb_available_sample < 0) { @@ -153,6 +156,7 @@ uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *strea LUOS_ASSERT(nb_available_sample >= 0); return (uint16_t)nb_available_sample; } + /****************************************************************************** * @brief Set a number of sample available in buffer * @param stream : Streaming channel pointer @@ -161,6 +165,7 @@ uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *strea ******************************************************************************/ uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) { + LUOS_ASSERT(stream != NULL); LUOS_ASSERT((uint32_t)(Streaming_GetAvailableSampleNB(stream) + size) < (uint32_t)(stream->end_ring_buffer - stream->ring_buffer)); if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) { @@ -174,6 +179,7 @@ uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t si } return Streaming_GetAvailableSampleNB(stream); } + /****************************************************************************** * @brief Remove a specific number of samples in buffer * @param stream : Streaming channel pointer @@ -182,6 +188,7 @@ uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t si ******************************************************************************/ uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size) { + LUOS_ASSERT(stream != NULL); LUOS_ASSERT(Streaming_GetAvailableSampleNB(stream) >= size); // Check if we exceed ring buffer capacity if (((size * stream->data_size) + stream->sample_ptr) > stream->end_ring_buffer) @@ -215,8 +222,9 @@ void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *str // Compute number of message needed to send available datas on ring buffer Luos_SendStreamingSize(service, msg, stream, Streaming_GetAvailableSampleNB(stream)); } + /****************************************************************************** - * @brief Send a number of datas of a streaming channel + * @brief Send a number of datas of a streaming channel to transmit * @param service : Who send * @param msg : Message to send * @param stream : Streaming channel pointer @@ -225,6 +233,7 @@ void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *str ******************************************************************************/ void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size) { + LUOS_ASSERT((service != NULL) && (msg != NULL) && (stream != NULL)); // Compute number of message needed to send available datas on ring buffer int msg_number = 1; int data_size = Streaming_GetAvailableSampleNB(stream); @@ -277,6 +286,7 @@ void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t } } } + /****************************************************************************** * @brief Receive a streaming channel datas * @param service : Who send @@ -286,6 +296,7 @@ void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t ******************************************************************************/ error_return_t Luos_ReceiveStreaming(service_t *service, const msg_t *msg, streaming_channel_t *stream) { + LUOS_ASSERT((service != NULL) && (msg != NULL) && (stream != NULL)); // Get chunk size unsigned short chunk_size = 0; if (msg->header.size > MAX_DATA_MSG_SIZE) diff --git a/test/tests_core/test_luos/main.c b/test/tests_core/test_luos/main.c index 8d793fb14..8c09ccf65 100644 --- a/test/tests_core/test_luos/main.c +++ b/test/tests_core/test_luos/main.c @@ -5,124 +5,6 @@ extern default_scenario_t default_sc; -void unittest_Luos_SendStreamingStreamingSize() -{ - NEW_TEST_CASE("Sample size sent to streaming < Available samples"); - { - uint32_t ExpectedMaxSize; - msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); - - // Init default scenario context - Init_Context(); - // Init variable - ExpectedMaxSize = 1; - // Add samples - Streaming_AddAvailableSampleNB(&streamChannel, 2); - - NEW_STEP("Verify 1 byte is received when stream channels size is 2"); - Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 1); - Luos_Loop(); - // Verify - TEST_ASSERT_EQUAL(ExpectedMaxSize, default_sc.App_2.last_rx_msg.header.size); - } - - NEW_TEST_CASE("Sample size sent to streaming = available samples"); - { - uint32_t ExpectedMaxSize; - msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); - - // Init default scenario context - Init_Context(); - // Init variable - ExpectedMaxSize = 2; - // Add samples - Streaming_AddAvailableSampleNB(&streamChannel, 2); - - NEW_STEP("Verify 2 byte are received when stream channels size is 2"); - Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 2); - Luos_Loop(); - // Verify - TEST_ASSERT_EQUAL(ExpectedMaxSize, default_sc.App_2.last_rx_msg.header.size); - } - - NEW_TEST_CASE("Sample size sent to streaming > available samples"); - { - uint32_t ExpectedMaxSize; - msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); - - // Init default scenario context - Init_Context(); - - // Init variable - ExpectedMaxSize = 2; - - NEW_STEP("Verify 2 byte are received when we try to send 3 bytes"); - // Add samples - Streaming_AddAvailableSampleNB(&streamChannel, 2); - Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 3); - Luos_Loop(); - // Verify - TEST_ASSERT_EQUAL(ExpectedMaxSize, default_sc.App_2.last_rx_msg.header.size); - } - - NEW_TEST_CASE("Limit test"); - { - uint32_t ExpectedMaxSize; - msg_t tx_msg; - tx_msg.header.target = 2; - tx_msg.header.target_mode = SERVICEIDACK; - tx_msg.header.cmd = DEFAULT_CMD; - uint8_t Streaming_Buffer[Streaming_BUFFER_SIZE] = {0}; - streaming_channel_t streamChannel = Streaming_CreateChannel(Streaming_Buffer, Streaming_BUFFER_SIZE, 1); - - // Init default scenario context - Init_Context(); - - // Init variable test case - - NEW_STEP("Try to send 0 byte : it does nothing"); - - // Init variable new step - ExpectedMaxSize = 0; - tx_msg.header.target = 3; - - // Add samples - Streaming_AddAvailableSampleNB(&streamChannel, 2); - Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 0); - Luos_Loop(); - // Verify - TEST_ASSERT_EQUAL(ExpectedMaxSize, default_sc.App_3.last_rx_msg.header.size); - - NEW_STEP("try to send 128 byte the max size of a msg"); - - // Init variable - ExpectedMaxSize = 128; - tx_msg.header.target = 2; - - // Add samples - Streaming_AddAvailableSampleNB(&streamChannel, 128); - Luos_SendStreamingSize(default_sc.App_1.app, &tx_msg, &streamChannel, 128); - Luos_Loop(); - // Verify - TEST_ASSERT_EQUAL(ExpectedMaxSize, default_sc.App_2.last_rx_msg.header.size); - } -} - void unittest_Luos_ReceiveData() { NEW_TEST_CASE("Try to send a void message argument"); @@ -222,8 +104,6 @@ int main(int argc, char **argv) // Big data reception UNIT_TEST_RUN(unittest_Luos_ReceiveData); - // Streaming functions - UNIT_TEST_RUN(unittest_Luos_SendStreamingStreamingSize); UNITY_END(); } diff --git a/test/tests_core/test_streaming/main.c b/test/tests_core/test_streaming/main.c new file mode 100644 index 000000000..23aec6773 --- /dev/null +++ b/test/tests_core/test_streaming/main.c @@ -0,0 +1,715 @@ +#include "context.h" +#include "pub_sub.h" +#include +#include "unit_test.h" +#include +#include "filter.h" + +extern default_scenario_t default_sc; +streaming_channel_t rxchannel = {0}; + +static void MessageHandler(service_t *service, const msg_t *msg) +{ + if (msg->header.cmd == IO_STATE) + { + Luos_ReceiveStreaming(service, msg, &rxchannel); + } +} + +void unittest_Streaming_CreateChannel(void) +{ + uint8_t buffer[100]; + NEW_TEST_CASE("Test Streaming_CreateChannel assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_CreateChannel(NULL, 100, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + // Test assert conditions + Streaming_CreateChannel(buffer, 0, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + // Test assert conditions + Streaming_CreateChannel(buffer, 100, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test Streaming_CreateChannel"); + { + TRY + { + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + TEST_ASSERT_EQUAL(buffer, channel.data_ptr); + TEST_ASSERT_EQUAL(buffer, channel.ring_buffer); + TEST_ASSERT_EQUAL(1, channel.data_size); + TEST_ASSERT_EQUAL(100, channel.end_ring_buffer - channel.ring_buffer); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_ResetChannel(void) +{ + uint8_t buffer[100]; + NEW_TEST_CASE("Test Streaming_ResetChannel assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_ResetChannel(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test Streaming_ResetChannel"); + { + TRY + { + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + channel.data_ptr = buffer + 10; + channel.sample_ptr = buffer + 30; + Streaming_ResetChannel(&channel); + TEST_ASSERT_EQUAL(buffer, channel.data_ptr); + TEST_ASSERT_EQUAL(buffer, channel.ring_buffer); + TEST_ASSERT_EQUAL(buffer, channel.sample_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_PutSample(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_PutSample assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_PutSample(NULL, buffer, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_PutSample(&channel, NULL, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_PutSample(&channel, buffer, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_PutSample(&channel, buffer, 101); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_PutSample(&channel, buffer, 100); + } + TEST_ASSERT_FALSE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Test Streaming_PutSample simple case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + TEST_ASSERT_EQUAL(1, Streaming_PutSample(&channel, data, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, *(uint8_t *)(channel.sample_ptr)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(2, Streaming_PutSample(&channel, data + 1, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 2, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, *(uint8_t *)(channel.sample_ptr)); + TEST_ASSERT_EQUAL(20, *(uint8_t *)(channel.sample_ptr + 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(4, Streaming_PutSample(&channel, data + 1, 2)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 4, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, *(uint8_t *)(channel.sample_ptr)); + TEST_ASSERT_EQUAL(20, *(uint8_t *)(channel.sample_ptr + 1)); + TEST_ASSERT_EQUAL(20, *(uint8_t *)(channel.sample_ptr + 2)); + TEST_ASSERT_EQUAL(30, *(uint8_t *)(channel.sample_ptr + 3)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Test Streaming_PutSample buffer loop case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_PutSample(&channel, data, 3)); + TEST_ASSERT_EQUAL(30, buffer[0]); + TEST_ASSERT_EQUAL(10, buffer[98]); + TEST_ASSERT_EQUAL(20, buffer[99]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_GetSample(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_GetSample assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_GetSample(NULL, buffer, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_GetSample(&channel, NULL, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_GetSample(&channel, buffer, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Streaming_GetSample simple case"); + { + uint8_t data[3] = {10, 20, 30}; + uint8_t result[3]; + TRY + { + TEST_ASSERT_EQUAL(1, Streaming_PutSample(&channel, data, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, *(uint8_t *)(channel.sample_ptr)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetSample(&channel, result, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, result[0]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(1, Streaming_PutSample(&channel, data + 1, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 2, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.sample_ptr); + TEST_ASSERT_EQUAL(20, *(uint8_t *)(channel.sample_ptr)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetSample(&channel, result, 1)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 2, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 2, channel.sample_ptr); + TEST_ASSERT_EQUAL(20, result[0]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(2, Streaming_PutSample(&channel, data + 1, 2)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 4, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 2, channel.sample_ptr); + TEST_ASSERT_EQUAL(20, *(uint8_t *)(channel.sample_ptr)); + TEST_ASSERT_EQUAL(30, *(uint8_t *)(channel.sample_ptr + 1)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetSample(&channel, result, 2)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 4, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 4, channel.sample_ptr); + TEST_ASSERT_EQUAL(20, result[0]); + TEST_ASSERT_EQUAL(30, result[1]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_GetSample buffer loop case"); + { + uint8_t data[3] = {10, 20, 30}; + uint8_t result[2]; + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_PutSample(&channel, data, 3)); + TEST_ASSERT_EQUAL(30, buffer[0]); + TEST_ASSERT_EQUAL(10, buffer[98]); + TEST_ASSERT_EQUAL(20, buffer[99]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetSample(&channel, result, 3)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.sample_ptr); + TEST_ASSERT_EQUAL(10, result[0]); + TEST_ASSERT_EQUAL(20, result[1]); + TEST_ASSERT_EQUAL(30, result[2]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_GetSample no sample available"); + { + uint8_t data[3] = {10, 20, 30}; + uint8_t result[2]; + TRY + { + Streaming_ResetChannel(&channel); + TEST_ASSERT_EQUAL(0, Streaming_GetSample(&channel, result, 3)); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.data_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_GetAvailableSampleNB(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNB assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_GetAvailableSampleNB(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNB simple case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetAvailableSampleNB(&channel)); + TEST_ASSERT_EQUAL(1, Streaming_PutSample(&channel, data, 1)); + TEST_ASSERT_EQUAL(1, Streaming_GetAvailableSampleNB(&channel)); + TEST_ASSERT_EQUAL(2, Streaming_PutSample(&channel, data + 1, 1)); + TEST_ASSERT_EQUAL(2, Streaming_GetAvailableSampleNB(&channel)); + TEST_ASSERT_EQUAL(4, Streaming_PutSample(&channel, data + 1, 2)); + TEST_ASSERT_EQUAL(4, Streaming_GetAvailableSampleNB(&channel)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNB buffer loop case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_PutSample(&channel, data, 3)); + TEST_ASSERT_EQUAL(3, Streaming_GetAvailableSampleNB(&channel)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_GetAvailableSampleNBUntilEndBuffer(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNBUntilEndBuffer assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_GetAvailableSampleNBUntilEndBuffer(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNBUntilEndBuffer simple case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_GetAvailableSampleNBUntilEndBuffer(&channel)); + TEST_ASSERT_EQUAL(1, Streaming_PutSample(&channel, data, 1)); + TEST_ASSERT_EQUAL(1, Streaming_GetAvailableSampleNBUntilEndBuffer(&channel)); + TEST_ASSERT_EQUAL(2, Streaming_PutSample(&channel, data + 1, 1)); + TEST_ASSERT_EQUAL(2, Streaming_GetAvailableSampleNBUntilEndBuffer(&channel)); + TEST_ASSERT_EQUAL(4, Streaming_PutSample(&channel, data + 1, 2)); + TEST_ASSERT_EQUAL(4, Streaming_GetAvailableSampleNBUntilEndBuffer(&channel)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_GetAvailableSampleNBUntilEndBuffer buffer loop case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_PutSample(&channel, data, 3)); + TEST_ASSERT_EQUAL(2, Streaming_GetAvailableSampleNBUntilEndBuffer(&channel)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_AddAvailableSampleNB(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_AddAvailableSampleNB assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_AddAvailableSampleNB(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_AddAvailableSampleNB(&channel, 101); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Streaming_AddAvailableSampleNB simple case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_AddAvailableSampleNB(&channel, 0)); + TEST_ASSERT_EQUAL(1, Streaming_AddAvailableSampleNB(&channel, 1)); + TEST_ASSERT_EQUAL(2, Streaming_AddAvailableSampleNB(&channel, 1)); + TEST_ASSERT_EQUAL(4, Streaming_AddAvailableSampleNB(&channel, 2)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_AddAvailableSampleNB buffer loop case"); + { + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + uint8_t data[3] = {10, 20, 30}; + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(2, Streaming_AddAvailableSampleNB(&channel, 2)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 98, channel.sample_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.data_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_AddAvailableSampleNB(&channel, 3)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 98, channel.sample_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Streaming_RmvAvailableSampleNB(void) +{ + uint8_t buffer[100]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 100, 1); + NEW_TEST_CASE("Test Streaming_RmvAvailableSampleNB assert conditions"); + { + TRY + { + // Test assert conditions + Streaming_RmvAvailableSampleNB(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Streaming_RmvAvailableSampleNB(&channel, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Streaming_RmvAvailableSampleNB simple case"); + { + uint8_t data[3] = {10, 20, 30}; + TRY + { + TEST_ASSERT_EQUAL(0, Streaming_RmvAvailableSampleNB(&channel, 0)); + TEST_ASSERT_EQUAL(1, Streaming_AddAvailableSampleNB(&channel, 1)); + TEST_ASSERT_EQUAL(0, Streaming_RmvAvailableSampleNB(&channel, 1)); + TEST_ASSERT_EQUAL(2, Streaming_AddAvailableSampleNB(&channel, 2)); + TEST_ASSERT_EQUAL(0, Streaming_RmvAvailableSampleNB(&channel, 2)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + NEW_TEST_CASE("Test Streaming_RmvAvailableSampleNB buffer loop case"); + { + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(3, Streaming_AddAvailableSampleNB(&channel, 3)); + TEST_ASSERT_EQUAL(0, Streaming_RmvAvailableSampleNB(&channel, 3)); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.sample_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer + 1, channel.data_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + TRY + { + Streaming_ResetChannel(&channel); + channel.sample_ptr = channel.ring_buffer + 98; + channel.data_ptr = channel.ring_buffer + 98; + TEST_ASSERT_EQUAL(2, Streaming_AddAvailableSampleNB(&channel, 2)); + TEST_ASSERT_EQUAL(0, Streaming_RmvAvailableSampleNB(&channel, 2)); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.sample_ptr); + TEST_ASSERT_EQUAL(channel.ring_buffer, channel.data_ptr); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_Luos_Send_and_receive_Streaming(void) +{ + uint8_t buffer[200]; + uint8_t rxbuffer[200]; + streaming_channel_t channel = {0}; + channel = Streaming_CreateChannel(buffer, 200, 1); + rxchannel = Streaming_CreateChannel(buffer, 200, 1); + Init_Context(); + NEW_TEST_CASE("Test Luos_SendStreamingSize assert conditions"); + { + msg_t msg; + TRY + { + // Test assert conditions + Luos_SendStreamingSize(NULL, &msg, &channel, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Luos_SendStreamingSize(default_sc.App_1.app, NULL, &channel, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Luos_SendStreamingSize(default_sc.App_1.app, &msg, NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + // Test assert conditions + Luos_ReceiveStreaming(NULL, &msg, &channel); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Luos_ReceiveStreaming(default_sc.App_1.app, NULL, &channel); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + // Test assert conditions + Luos_ReceiveStreaming(default_sc.App_1.app, &msg, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test send receive streaming"); + { + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(MessageHandler, VOID_TYPE, "Test_App", revision); + // Detection + Luos_Detect(service); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + msg_t msg; + msg.header.target = service->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = IO_STATE; + TRY + { + TEST_ASSERT_EQUAL(1, Streaming_AddAvailableSampleNB(&channel, 1)); + Luos_SendStreamingSize(default_sc.App_1.app, &msg, &channel, 1); + Luos_Loop(); + TEST_ASSERT_EQUAL(1, Streaming_GetAvailableSampleNB(&rxchannel)); + + TEST_ASSERT_EQUAL(2, Streaming_AddAvailableSampleNB(&channel, 2)); + Luos_SendStreamingSize(default_sc.App_1.app, &msg, &channel, 2); + Luos_Loop(); + TEST_ASSERT_EQUAL(3, Streaming_GetAvailableSampleNB(&rxchannel)); + + TEST_ASSERT_EQUAL(150, Streaming_AddAvailableSampleNB(&channel, 150)); + Luos_SendStreamingSize(default_sc.App_1.app, &msg, &channel, 150); + Luos_Loop(); + TEST_ASSERT_EQUAL(153, Streaming_GetAvailableSampleNB(&rxchannel)); + + // Check buffer loop + Streaming_RmvAvailableSampleNB(&rxchannel, 153); + TEST_ASSERT_EQUAL(150, Streaming_AddAvailableSampleNB(&channel, 150)); + Luos_SendStreamingSize(default_sc.App_1.app, &msg, &channel, 150); + Luos_Loop(); + TEST_ASSERT_EQUAL(150, Streaming_GetAvailableSampleNB(&rxchannel)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_Streaming_CreateChannel); + UNIT_TEST_RUN(unittest_Streaming_ResetChannel); + UNIT_TEST_RUN(unittest_Streaming_PutSample); + UNIT_TEST_RUN(unittest_Streaming_GetSample); + UNIT_TEST_RUN(unittest_Streaming_GetAvailableSampleNB); + UNIT_TEST_RUN(unittest_Streaming_GetAvailableSampleNBUntilEndBuffer); + UNIT_TEST_RUN(unittest_Streaming_AddAvailableSampleNB); + UNIT_TEST_RUN(unittest_Streaming_RmvAvailableSampleNB); + UNIT_TEST_RUN(unittest_Luos_Send_and_receive_Streaming); + + UNITY_END(); +} From 1953b6556603e23b26f8a80c982131d9aef64ed0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 1 Jun 2023 11:17:02 +0200 Subject: [PATCH 065/198] Add service unit test --- engine/core/src/service.c | 18 +- test/tests_core/test_service/main.c | 546 ++++++++++++++++++++++++++++ 2 files changed, 558 insertions(+), 6 deletions(-) create mode 100644 test/tests_core/test_service/main.c diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 04e5c695e..2abbb0f6f 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -75,7 +75,7 @@ void Service_ResetStatistics(void) } /****************************************************************************** - * @brief API to generate a service ID + * @brief API to generate all service ID * @param baseId : base ID of the services, this value will be increased for eeach services * @return None ******************************************************************************/ @@ -119,7 +119,7 @@ void Service_ClearId(void) uint16_t Service_GetIndex(service_t *service) { LUOS_ASSERT((service >= service_ctx.list) && (service < &service_ctx.list[service_ctx.number])); - return (service - service_ctx.list) / sizeof(service_t); + return ((uintptr_t)service - (uintptr_t)service_ctx.list) / sizeof(service_t); } /****************************************************************************** @@ -139,6 +139,7 @@ void Service_RmAutoUpdateTarget(uint16_t service_id) } } } + /****************************************************************************** * @brief Auto update call for services * @param none @@ -146,7 +147,7 @@ void Service_RmAutoUpdateTarget(uint16_t service_id) ******************************************************************************/ void Service_AutoUpdateManager(void) { - // check all services timed_update_t contexts + // Check all services timed_update_t contexts for (uint16_t i = 0; i < service_ctx.number; i++) { // check if services have an actual ID. If not, we are in detection mode and should reset the auto refresh @@ -281,6 +282,7 @@ error_return_t Service_Deliver(phy_job_t *job) ******************************************************************************/ service_filter_t Service_GetFilter(const msg_t *msg) { + LUOS_ASSERT(msg); uint16_t i = 0; service_filter_t filter = 0; @@ -400,14 +402,14 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a } /****************************************************************************** - * @brief Store alias name service in flash - * @param service : Service to store + * @brief Change a service alias name (this name is not persistent, please check How to have flexible and resilient aliases => https://www.luos.io/tutorials/resilient-alias) + * @param service : Service to store the alias in * @param alias : Alias to store * @return SUCCEED : If the alias is correctly updated ******************************************************************************/ error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t size) { - + LUOS_ASSERT(service && alias); if ((size == 0) || (alias[0] == '\0')) { // This is a void alias just replace it with the default alias, write it @@ -440,6 +442,10 @@ error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t case ' ': clean_alias[i] = '_'; break; + case '\0': + // This is the end of the string + size = i + 1; + break; default: // This is a wrong character, don't do anything and return FAILED return FAILED; diff --git a/test/tests_core/test_service/main.c b/test/tests_core/test_service/main.c new file mode 100644 index 000000000..b0c768919 --- /dev/null +++ b/test/tests_core/test_service/main.c @@ -0,0 +1,546 @@ +#include "service.h" +#include "service.c" +#include +#include "unit_test.h" +#include + +extern default_scenario_t default_sc; + +void unittest_Service_Init(void) +{ + uint8_t buffer[100]; + NEW_TEST_CASE("Test Service_Init"); + { + TRY + { + service_ctx.number = 10; + Service_Init(); + TEST_ASSERT_EQUAL(0, service_ctx.number); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GetTable(void) +{ + NEW_TEST_CASE("Test Service_GetTable"); + { + TRY + { + TEST_ASSERT_EQUAL(service_ctx.list, Service_GetTable()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GetNumber(void) +{ + NEW_TEST_CASE("Test Service_GetNumber"); + { + TRY + { + TEST_ASSERT_EQUAL(service_ctx.number, Service_GetNumber()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_ResetStatistics(void) +{ + NEW_TEST_CASE("Test Service_ResetStatistics"); + { + TRY + { + service_ctx.number = 10; + service_ctx.list[0].statistics.max_retry = 5; + service_ctx.list[9].statistics.max_retry = 9; + Service_ResetStatistics(); + TEST_ASSERT_EQUAL(0, service_ctx.list[0].statistics.max_retry); + TEST_ASSERT_EQUAL(0, service_ctx.list[9].statistics.max_retry); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GenerateId(void) +{ + NEW_TEST_CASE("Test Service_GenerateId assert conditions"); + TRY + { + Service_GenerateId(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + NEW_TEST_CASE("Test Service_GenerateId"); + { + TRY + { + service_ctx.number = 10; + Service_GenerateId(1); // This is a special case, because detector already saved his ID so the first id will be 2 + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (service_ctx.list[i].id != 1) + { + TEST_ASSERT_EQUAL(i + 2, service_ctx.list[i].id); + } + } + + // Force the first one to have id 1 + service_ctx.list[0].id = 1; + Service_GenerateId(1); // This is a special case, because detector already saved his ID so the first id will be 2 + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (service_ctx.list[i].id != 1) + { + TEST_ASSERT_EQUAL(i + 1, service_ctx.list[i].id); + } + } + + service_ctx.list[0].id = 0; + Service_GenerateId(5); + for (uint16_t i = 0; i < service_ctx.number; i++) + { + if (service_ctx.list[i].id != 1) + { + TEST_ASSERT_EQUAL(i + 5, service_ctx.list[i].id); + } + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_ClearId(void) +{ + NEW_TEST_CASE("Test Service_ClearId"); + { + TRY + { + service_ctx.number = 10; + for (uint16_t i = 0; i < service_ctx.number; i++) + { + service_ctx.list[i].id = i + 1; + } + Service_ClearId(); + for (uint16_t i = 0; i < service_ctx.number; i++) + { + TEST_ASSERT_EQUAL(0, service_ctx.list[i].id); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GetIndex(void) +{ + + NEW_TEST_CASE("Test Service_GetIndex assert conditions"); + { + TRY + { + + service_ctx.number = 10; + Service_GetIndex(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + + service_ctx.number = 10; + Service_GetIndex(service_ctx.list - 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + service_ctx.number = 10; + Service_GetIndex(&service_ctx.list[11]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Service_GetIndex"); + { + TRY + { + service_ctx.number = 10; + TEST_ASSERT_EQUAL(0, Service_GetIndex(&service_ctx.list[0])); + TEST_ASSERT_EQUAL(1, Service_GetIndex(&service_ctx.list[1])); + TEST_ASSERT_EQUAL(2, Service_GetIndex(&service_ctx.list[2])); + TEST_ASSERT_EQUAL(3, Service_GetIndex(&service_ctx.list[3])); + TEST_ASSERT_EQUAL(4, Service_GetIndex(&service_ctx.list[4])); + TEST_ASSERT_EQUAL(5, Service_GetIndex(&service_ctx.list[5])); + TEST_ASSERT_EQUAL(6, Service_GetIndex(&service_ctx.list[6])); + TEST_ASSERT_EQUAL(7, Service_GetIndex(&service_ctx.list[7])); + TEST_ASSERT_EQUAL(8, Service_GetIndex(&service_ctx.list[8])); + TEST_ASSERT_EQUAL(9, Service_GetIndex(&service_ctx.list[9])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_RmAutoUpdateTarget(void) +{ + NEW_TEST_CASE("Test Service_RmAutoUpdateTarget"); + { + TRY + { + service_ctx.number = 10; + service_ctx.list[2].auto_refresh.target = 2; + service_ctx.list[2].auto_refresh.time_ms = 20; + service_ctx.list[2].auto_refresh.last_update = 30; + Service_RmAutoUpdateTarget(2); + TEST_ASSERT_EQUAL(0, service_ctx.list[2].auto_refresh.target); + TEST_ASSERT_EQUAL(0, service_ctx.list[2].auto_refresh.time_ms); + TEST_ASSERT_EQUAL(0, service_ctx.list[2].auto_refresh.last_update); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_AutoUpdateManager(void) +{ + NEW_TEST_CASE("Test Service_AutoUpdateManager"); + { + TRY + { + // Init default scenario context + Init_Context(); + Luos_Loop(); + service_ctx.list[2].auto_refresh.target = 1; + service_ctx.list[2].auto_refresh.time_ms = 10; + service_ctx.list[2].auto_refresh.last_update = 30; + Service_AutoUpdateManager(); + TEST_ASSERT_NOT_EQUAL(30, service_ctx.list[2].auto_refresh.last_update); + TEST_ASSERT_EQUAL(GET_CMD, default_sc.App_3.last_rx_msg.header.cmd); + TEST_ASSERT_EQUAL(1, default_sc.App_3.last_rx_msg.header.source); + TEST_ASSERT_EQUAL(3, default_sc.App_3.last_rx_msg.header.target); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GetConcerned(void) +{ + NEW_TEST_CASE("Test Service_GetConcerned assert conditions"); + { + TRY + { + Service_GetConcerned(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Service_GetConcerned"); + { + TRY + { + header_t header; + header.target_mode = SERVICEIDACK; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(default_sc.App_3.app, Service_GetConcerned(&header)); + + header.target_mode = SERVICEID; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(default_sc.App_3.app, Service_GetConcerned(&header)); + + header.target_mode = TYPE; + header.target = default_sc.App_3.app->type; + header.source = default_sc.App_2.app->id; + // It will be the first service because all type are the same... + TEST_ASSERT_EQUAL(default_sc.App_1.app, Service_GetConcerned(&header)); + + header.target_mode = BROADCAST; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(default_sc.App_1.app, Service_GetConcerned(&header)); + + header.target_mode = NODEIDACK; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(default_sc.App_1.app, Service_GetConcerned(&header)); + + header.target_mode = NODEID; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(default_sc.App_1.app, Service_GetConcerned(&header)); + + header.target_mode = TOPIC; + header.target = default_sc.App_3.app->id; + header.source = default_sc.App_2.app->id; + TEST_ASSERT_EQUAL(NULL, Service_GetConcerned(&header)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_GetFilter(void) +{ + NEW_TEST_CASE("Test Service_GetFilter assert conditions"); + { + TRY + { + Service_GetFilter(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Service_GetFilter"); + { + TRY + { + msg_t msg; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = default_sc.App_3.app->id; + TEST_ASSERT_EQUAL(0b00000100, Service_GetFilter(&msg)); + + msg.header.target_mode = SERVICEID; + msg.header.target = default_sc.App_3.app->id; + TEST_ASSERT_EQUAL(0b00000100, Service_GetFilter(&msg)); + + msg.header.target_mode = TYPE; + msg.header.target = default_sc.App_3.app->type; + // It will be the first service because all type are the same... + TEST_ASSERT_EQUAL(0b00000111, Service_GetFilter(&msg)); + + msg.header.target_mode = BROADCAST; + msg.header.target = default_sc.App_3.app->id; + TEST_ASSERT_EQUAL(0b00000111, Service_GetFilter(&msg)); + + msg.header.target_mode = NODEIDACK; + msg.header.target = 1; + TEST_ASSERT_EQUAL(0b00000111, Service_GetFilter(&msg)); + + msg.header.target_mode = NODEID; + msg.header.target = 1; + TEST_ASSERT_EQUAL(0b00000111, Service_GetFilter(&msg)); + + msg.header.target_mode = TOPIC; + msg.header.target = default_sc.App_3.app->id; + TEST_ASSERT_EQUAL(0b00000000, Service_GetFilter(&msg)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Service_Deliver(void) +{ + NEW_TEST_CASE("Test Service_Deliver assert conditions"); + { + TRY + { + Service_Deliver(NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Service_Deliver"); + { + TRY + { + // Init default scenario context + Init_Context(); + Luos_Loop(); + // Send a message to the service + phy_job_t job; + msg_t msg; + msg.header.target_mode = NODEID; + msg.header.target = 1; + msg.header.source = 4; + msg.header.cmd = GET_CMD; + msg.header.size = 0; + job.msg_pt = &msg; + + service_filter_t filter = Service_GetFilter(&msg); + TEST_ASSERT_EQUAL(0b00000111, filter); + job.phy_data = &filter; + TEST_ASSERT_EQUAL(SUCCEED, Service_Deliver(&job)); + // All services consume this message + TEST_ASSERT_EQUAL(0b00000000, filter); + // Check that all services received the message + TEST_ASSERT_EQUAL(4, default_sc.App_1.last_rx_msg.header.source); + TEST_ASSERT_EQUAL(4, default_sc.App_2.last_rx_msg.header.source); + TEST_ASSERT_EQUAL(4, default_sc.App_3.last_rx_msg.header.source); + + // Add a new service with no callback + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + default_sc.App_1.app = Luos_CreateService(NULL, VOID_TYPE, "Test_App", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + + filter = Service_GetFilter(&msg); + TEST_ASSERT_EQUAL(0b00001111, filter); + job.phy_data = &filter; + TEST_ASSERT_EQUAL(FAILED, Service_Deliver(&job)); + // All services consume this message + TEST_ASSERT_EQUAL(0b00001000, filter); + // Check that all services received the message + TEST_ASSERT_EQUAL(4, default_sc.App_1.last_rx_msg.header.source); + TEST_ASSERT_EQUAL(4, default_sc.App_2.last_rx_msg.header.source); + TEST_ASSERT_EQUAL(4, default_sc.App_3.last_rx_msg.header.source); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_UpdateAlias(void) +{ + NEW_TEST_CASE("Test Luos_UpdateAlias assert conditions"); + { + Init_Context(); + Luos_Loop(); + char new_alias[16] = "new_alias"; + TRY + { + Luos_UpdateAlias(NULL, new_alias, 16); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + Luos_UpdateAlias(default_sc.App_1.app, NULL, 16); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Luos_UpdateAlias"); + { + Init_Context(); + Luos_Loop(); + char new_alias[40] = "new_alias1"; + TRY + { + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, 16)); + TEST_ASSERT_EQUAL_STRING(new_alias, default_sc.App_1.app->alias); + + strcpy(new_alias, "new alias"); + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, strlen(new_alias))); + TEST_ASSERT_EQUAL_STRING("new_alias", default_sc.App_1.app->alias); + + strcpy(new_alias, "new_alias!"); + TEST_ASSERT_EQUAL(FAILED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, strlen(new_alias))); + TEST_ASSERT_EQUAL_STRING("new_alias", default_sc.App_1.app->alias); + + strcpy(new_alias, "new_alias_with_a_very_long_size"); + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, strlen(new_alias))); + TEST_ASSERT_EQUAL_STRING("new_alias_with_", default_sc.App_1.app->alias); + + strcpy(new_alias, "new_alias"); + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, 0)); + TEST_ASSERT_EQUAL_STRING(default_sc.App_1.app->default_alias, default_sc.App_1.app->alias); + + strcpy(new_alias, "new_alias"); + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, strlen(new_alias))); + TEST_ASSERT_EQUAL_STRING("new_alias", default_sc.App_1.app->alias); + + new_alias[0] = '\0'; + TEST_ASSERT_EQUAL(SUCCEED, Luos_UpdateAlias(default_sc.App_1.app, new_alias, 16)); + TEST_ASSERT_EQUAL_STRING(default_sc.App_1.app->default_alias, default_sc.App_1.app->alias); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_ServicesClear(void) +{ + NEW_TEST_CASE("Test Luos_ServicesClear"); + { + Init_Context(); + Luos_Loop(); + TRY + { + Luos_ServicesClear(); + TEST_ASSERT_EQUAL(0, service_ctx.number); + TEST_ASSERT_EQUAL(0, service_ctx.list[0].id); + TEST_ASSERT_EQUAL(0, service_ctx.list[3].id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_Service_Init); + UNIT_TEST_RUN(unittest_Service_GetTable); + UNIT_TEST_RUN(unittest_Service_GetNumber); + UNIT_TEST_RUN(unittest_Service_ResetStatistics); + UNIT_TEST_RUN(unittest_Service_GenerateId); + UNIT_TEST_RUN(unittest_Service_ClearId); + UNIT_TEST_RUN(unittest_Service_GetIndex); + UNIT_TEST_RUN(unittest_Service_RmAutoUpdateTarget); + UNIT_TEST_RUN(unittest_Service_AutoUpdateManager); + UNIT_TEST_RUN(unittest_Service_GetConcerned); + UNIT_TEST_RUN(unittest_Service_GetFilter); + UNIT_TEST_RUN(unittest_Service_Deliver); + UNIT_TEST_RUN(unittest_Luos_UpdateAlias); + UNIT_TEST_RUN(unittest_Luos_ServicesClear); + + UNITY_END(); +} From 02b1f2ac9a35ca8abae0135693e11fe8bbf4c223 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 1 Jun 2023 16:02:44 +0200 Subject: [PATCH 066/198] Add node unit test --- engine/core/inc/node.h | 6 +- engine/core/src/node.c | 10 +- test/tests_core/test_node/main.c | 180 +++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 7 deletions(-) create mode 100644 test/tests_core/test_node/main.c diff --git a/engine/core/inc/node.h b/engine/core/inc/node.h index 60549ac06..34ccb0708 100644 --- a/engine/core/inc/node.h +++ b/engine/core/inc/node.h @@ -6,6 +6,10 @@ ******************************************************************************/ #ifndef __NODE_H_ #define __NODE_H_ + +#include +#include "engine_config.h" + /******************************************************************************* * Definitions ******************************************************************************/ @@ -48,4 +52,4 @@ node_t *Node_Get(void); node_state_t Node_GetState(void); void Node_SetState(node_state_t); -#endif /* __NODE_H_ */ \ No newline at end of file +#endif /* __NODE_H_ */ diff --git a/engine/core/src/node.c b/engine/core/src/node.c index 491161c32..d51283fbc 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -79,7 +79,7 @@ void Node_Loop(void) // if timeout is reached, go back to link-down state if (Luos_GetSystick() - node_ctx.timeout > DETECTION_TIMEOUT_MS) { - node_ctx.state = NO_DETECTION; + Node_SetState(NO_DETECTION); } } } @@ -90,11 +90,12 @@ void Node_Loop(void) * @return None * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL inline void Node_SetState(node_state_t state) +void Node_SetState(node_state_t state) { switch (state) { case NO_DETECTION: + case DETECTION_OK: node_ctx.timeout_run = false; node_ctx.timeout = 0; break; @@ -103,11 +104,8 @@ _CRITICAL inline void Node_SetState(node_state_t state) node_ctx.timeout_run = true; node_ctx.timeout = Luos_GetSystick(); break; - case DETECTION_OK: - node_ctx.timeout_run = false; - node_ctx.timeout = 0; - break; default: + LUOS_ASSERT(false); break; } node_ctx.state = state; diff --git a/test/tests_core/test_node/main.c b/test/tests_core/test_node/main.c new file mode 100644 index 000000000..161c87da7 --- /dev/null +++ b/test/tests_core/test_node/main.c @@ -0,0 +1,180 @@ +#include "node.c" +#include +#include "unit_test.h" +#include + +extern default_scenario_t default_sc; + +void unittest_Node_Get(void) +{ + NEW_TEST_CASE("Test Node_Get"); + { + TRY + { + TEST_ASSERT_EQUAL(&node_ctx.info, Node_Get()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Node_GetState(void) +{ + NEW_TEST_CASE("Test Node_GetState"); + { + TRY + { + TEST_ASSERT_EQUAL(node_ctx.state, Node_GetState()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Node_Init(void) +{ + NEW_TEST_CASE("Test Node_Init"); + { + TRY + { + node_ctx.info.node_id = 10; + node_ctx.info.certified = true; + node_ctx.info.node_info = 1; + node_ctx.timeout_run = true; + node_ctx.timeout = 1; + Node_Init(); + TEST_ASSERT_EQUAL(DEFAULTID, node_ctx.info.node_id); + TEST_ASSERT_EQUAL(false, node_ctx.info.certified); + TEST_ASSERT_EQUAL(0, node_ctx.info.node_info); + TEST_ASSERT_EQUAL(false, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(0, node_ctx.timeout); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Node_SetState(void) +{ + NEW_TEST_CASE("Test Node_SetState assert condition"); + { + TRY + { + Node_SetState(EXTERNAL_DETECTION + 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Node_SetState"); + { + TRY + { + + node_ctx.state = LOCAL_DETECTION; + node_ctx.timeout_run = false; + node_ctx.timeout = 1; + Node_SetState(NO_DETECTION); + TEST_ASSERT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_EQUAL(false, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(NO_DETECTION, node_ctx.state); + + node_ctx.state = LOCAL_DETECTION; + node_ctx.timeout_run = false; + node_ctx.timeout = 1; + Node_SetState(DETECTION_OK); + TEST_ASSERT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_EQUAL(false, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(DETECTION_OK, node_ctx.state); + + node_ctx.state = NO_DETECTION; + node_ctx.timeout_run = true; + node_ctx.timeout = 1; + Node_SetState(LOCAL_DETECTION); + TEST_ASSERT_NOT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_EQUAL(true, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(LOCAL_DETECTION, node_ctx.state); + + node_ctx.state = NO_DETECTION; + node_ctx.timeout_run = true; + node_ctx.timeout = 1; + Node_SetState(EXTERNAL_DETECTION); + TEST_ASSERT_NOT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_EQUAL(true, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(EXTERNAL_DETECTION, node_ctx.state); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Node_Loop(void) +{ + NEW_TEST_CASE("Test Node_Loop"); + { + TRY + { + node_ctx.state = LOCAL_DETECTION; + node_ctx.timeout_run = true; + node_ctx.timeout = 1; + // wait some time to trigger the timeout condition + while (Luos_GetSystick() - node_ctx.timeout <= DETECTION_TIMEOUT_MS) + ; + Node_Loop(); + TEST_ASSERT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_EQUAL(false, node_ctx.timeout_run); + TEST_ASSERT_EQUAL(NO_DETECTION, node_ctx.state); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_IsDetected(void) +{ + NEW_TEST_CASE("Test Luos_IsDetected"); + TRY + { + node_ctx.state = NO_DETECTION; + TEST_ASSERT_EQUAL(false, Luos_IsDetected()); + node_ctx.state = LOCAL_DETECTION; + TEST_ASSERT_EQUAL(false, Luos_IsDetected()); + node_ctx.state = EXTERNAL_DETECTION; + TEST_ASSERT_EQUAL(false, Luos_IsDetected()); + node_ctx.state = DETECTION_OK; + TEST_ASSERT_EQUAL(true, Luos_IsDetected()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; +} + +int main(int argc, char **argv) +{ + UNITY_BEGIN(); + + UNIT_TEST_RUN(unittest_Node_Get); + UNIT_TEST_RUN(unittest_Node_GetState); + UNIT_TEST_RUN(unittest_Node_Init); + UNIT_TEST_RUN(unittest_Node_SetState); + UNIT_TEST_RUN(unittest_Node_Loop); + UNIT_TEST_RUN(unittest_Luos_IsDetected); + + UNITY_END(); +} From b157634021694ee67fb18c8180d0ae2ef002bf2e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 1 Jun 2023 16:03:28 +0200 Subject: [PATCH 067/198] Remove unused Luos_SetFilterState function --- engine/core/inc/luos_engine.h | 1 - engine/core/src/node.c | 12 ------------ tool_services/inspector/data_manager.c | 4 ++-- tool_services/inspector/inspector.c | 2 +- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 0f3474d57..707cc218e 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -34,7 +34,6 @@ const revision_t *Luos_GetVersion(void); // ***************** Node management ***************** uint32_t Luos_GetSystick(void); bool Luos_IsDetected(void); -void Luos_SetFilterState(uint8_t state, service_t *service); // ***************** Package management ***************** void Luos_AddPackage(void (*Init)(void), void (*Loop)(void)); diff --git a/engine/core/src/node.c b/engine/core/src/node.c index d51283fbc..fe8f2cee0 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -130,15 +130,3 @@ bool Luos_IsDetected(void) { return (node_ctx.state == DETECTION_OK); } - -/****************************************************************************** - * @brief Function that changes the filter value - * @param state : Put to "1" if we want to disable the filter , "0" to enable - * @param service - * @return None - ******************************************************************************/ -void Luos_SetFilterState(uint8_t state, service_t *service) -{ - // Enable or disable the filter for a given service - // This function have been disabled since 3.0.0 -} \ No newline at end of file diff --git a/tool_services/inspector/data_manager.c b/tool_services/inspector/data_manager.c index a290e3154..97d610cea 100644 --- a/tool_services/inspector/data_manager.c +++ b/tool_services/inspector/data_manager.c @@ -94,13 +94,13 @@ void DataManager_GetPipeMsg(service_t *service, msg_t *data_msg) if (data_msg->data[7] == true) { // check if data is true so that the inspector needs to start - Luos_SetFilterState(false, service); + // Luos_SetFilterState(false, service); inspector_state = STARTED; } else { // if we receive a false we should reactivate the filtering - inspector stopped - Luos_SetFilterState(true, service); + // Luos_SetFilterState(true, service); inspector_state = STOPPED; } break; diff --git a/tool_services/inspector/inspector.c b/tool_services/inspector/inspector.c index 8183b2303..4b5edaff2 100644 --- a/tool_services/inspector/inspector.c +++ b/tool_services/inspector/inspector.c @@ -56,6 +56,6 @@ void Inspector_Loop(void) // if the network is not yet detected reset the pipe id pipe_id = 0; // send to Luos a flag in order to filter the messages - Luos_SetFilterState(true, inspector); + // Luos_SetFilterState(true, inspector); } } From 91cbec526b125a07dc6bfe9dfb332985678cf4b8 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 5 Jun 2023 13:28:22 +0200 Subject: [PATCH 068/198] Fix some warnings --- engine/core/src/routing_table.c | 11 ++++------- .../NUCLEO-L073RZ/gate_serialcom/node_config.h | 4 ++-- .../NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.c | 8 ++++---- .../STM32L4S5_discovery/gate_serialcom/node_config.h | 12 ++++++------ examples/projects/native/gate_wscom/node_config.h | 4 ++-- network/robus/HAL/ESP32/luos_engine/CMakeLists.txt | 10 +++++++++- tool_services/pipe/SERIAL/serial_protocol.h | 4 ++-- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index f5c879a71..b417ba5a9 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -46,16 +46,13 @@ static void RoutingTB_SendEndDetection(service_t *service); uint16_t RoutingTB_IDFromAlias(char *alias) { LUOS_ASSERT(alias); - if (*alias != -1) + for (int i = 0; i <= last_routing_table_entry; i++) { - for (int i = 0; i <= last_routing_table_entry; i++) + if (routing_table[i].mode == SERVICE) { - if (routing_table[i].mode == SERVICE) + if (strcmp(routing_table[i].alias, alias) == 0) { - if (strcmp(routing_table[i].alias, alias) == 0) - { - return routing_table[i].id; - } + return routing_table[i].id; } } } diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h index e560d2acb..cc23fa12b 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h @@ -109,8 +109,8 @@ * :-------------------------|------------------------------------------------------ * MAX_RTB_ENTRY | 40 | max number entry in routing table * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TO_LUOS_BUFFER_SIZE | 1024 | Receive pipe buffer size - * LUOS_TO_PIPE_BUFFER_SIZE | 2048 | Transmit pipe buffer size + * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size + * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ #define MAX_RTB_ENTRY 40 diff --git a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.c b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.c index cc23084b5..7370db245 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.c +++ b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.c @@ -30,8 +30,8 @@ service_t *pin[9]; /******************************************************************************* * Function ******************************************************************************/ -static void rx_digit_write_cb(service_t *service, msg_t *msg); -static void rx_digit_read_cb(service_t *service, msg_t *msg); +static void rx_digit_write_cb(service_t *service, const msg_t *msg); +static void rx_digit_read_cb(service_t *service, const msg_t *msg); /****************************************************************************** * @brief init must be call in project init @@ -63,7 +63,7 @@ void GpioDev_Loop(void) { } -static void rx_digit_read_cb(service_t *service, msg_t *msg) +static void rx_digit_read_cb(service_t *service, const msg_t *msg) { if (msg->header.cmd == GET_CMD) { @@ -107,7 +107,7 @@ static void rx_digit_read_cb(service_t *service, msg_t *msg) } } -static void rx_digit_write_cb(service_t *service, msg_t *msg) +static void rx_digit_write_cb(service_t *service, const msg_t *msg) { if (msg->header.cmd == IO_STATE) { diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h index 85c0bed2a..200c21575 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h @@ -172,14 +172,14 @@ * :-------------------------|------------------------------------------------------ * MAX_RTB_ENTRY | 40 | max number entry in routing table * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TO_LUOS_BUFFER_SIZE | 1024 | Receive pipe buffer size - * LUOS_TO_PIPE_BUFFER_SIZE | 2048 | Transmit pipe buffer size + * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size + * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 -#define GATE_BUFF_SIZE 1024 -#define PIPE_TO_LUOS_BUFFER_SIZE 1024 -#define LUOS_TO_PIPE_BUFFER_SIZE 2048 +#define MAX_RTB_ENTRY 40 +#define GATE_BUFF_SIZE 1024 +#define PIPE_RX_BUFFER_SIZE 1024 +#define PIPE_TX_BUFFER_SIZE 2048 /******************************************************************************* * OTHER GATE PARAMETERS diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index a369c17e0..749bd8af9 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -101,8 +101,8 @@ * :-------------------------|------------------------------------------------------ * MAX_RTB_ENTRY | 40 | max number entry in routing table * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TO_LUOS_BUFFER_SIZE | 1024 | Receive pipe buffer size - * LUOS_TO_PIPE_BUFFER_SIZE | 2048 | Transmit pipe buffer size + * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size + * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ #define MAX_RTB_ENTRY 40 diff --git a/network/robus/HAL/ESP32/luos_engine/CMakeLists.txt b/network/robus/HAL/ESP32/luos_engine/CMakeLists.txt index fa82b2a68..eb286ed18 100644 --- a/network/robus/HAL/ESP32/luos_engine/CMakeLists.txt +++ b/network/robus/HAL/ESP32/luos_engine/CMakeLists.txt @@ -1,12 +1,19 @@ set(srcs "../../../../../engine/core/src/luos_engine.c" "../../../../../engine/core/src/luos_utils.c" + "../../../../../engine/core/src/node.c" "../../../../../engine/core/src/profile_core.c" + "../../../../../engine/core/src/pub_sub.c" "../../../../../engine/core/src/routing_table.c" + "../../../../../engine/core/src/service.c" + "../../../../../engine/core/src/stats.c" "../../../../../engine/core/src/streaming.c" "../../../../../engine/core/src/timestamp.c" "../../../../../engine/bootloader/bootloader_core.c" "../../../../../engine/HAL/ESP32/luos_hal.c" - "../../../src/msg_alloc.c" + "../../../../../engine/IO/src/msg_alloc.c" + "../../../../../engine/IO/src/luos_phy.c" + "../../../../../engine/IO/src/luos_io.c" + "../../../../../engine/IO/src/filter.c" "../../../src/port_manager.c" "../../../src/reception.c" "../../../src/robus.c" @@ -15,6 +22,7 @@ set(srcs "../../../../../engine/core/src/luos_engine.c" "../../../HAL/ESP32/robus_hal.c") set(inc "../../../../../engine/core/inc" + "../../../../../engine/IO/inc" "../../../../../engine/OD" "../../../../../engine/HAL/ESP32" "../../../../../engine/bootloader" diff --git a/tool_services/pipe/SERIAL/serial_protocol.h b/tool_services/pipe/SERIAL/serial_protocol.h index 17633d721..d2639e47f 100644 --- a/tool_services/pipe/SERIAL/serial_protocol.h +++ b/tool_services/pipe/SERIAL/serial_protocol.h @@ -79,7 +79,7 @@ static inline void SerialProtocol_CreateTxMsg(void) { size_to_update = (uint8_t *)((int)serialTx_StreamChannel->end_ring_buffer - 2); } - else if (serialTx_StreamChannel->data_ptr == serialTx_StreamChannel->ring_buffer + serialTx_StreamChannel->data_size) + else if ((uintptr_t)serialTx_StreamChannel->data_ptr == (uintptr_t)serialTx_StreamChannel->ring_buffer + (uintptr_t)serialTx_StreamChannel->data_size) { size_to_update = (uint8_t *)((int)serialTx_StreamChannel->end_ring_buffer - 1); } @@ -185,4 +185,4 @@ static inline uint8_t SerialProtocol_IsMsgComplete(uint16_t *size) } } return false; -} \ No newline at end of file +} From da5e7be7ff71dd0188ba2ac5f58cd140eba55f14 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 5 Jun 2023 13:29:18 +0200 Subject: [PATCH 069/198] Move compilation error using `example_build.py` to err.log file --- test/example_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/example_build.py b/test/example_build.py index 80405d4c2..aee638086 100755 --- a/test/example_build.py +++ b/test/example_build.py @@ -48,7 +48,7 @@ def compile_example(cmd, target, example, clean): if clean: subprocess.call(cmd + " --target clean", shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')) - if subprocess.call(cmd, shell=True, stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')): + if subprocess.call(cmd, shell=True, stdout=open(os.devnull, 'wb'), stderr=open("err.log", 'wb')): with compiled_example.get_lock(): compiled_example.value += 1 value = FAIL+"FAILED " + str(join(target, example) + ENDC) From 9c053e4e7accea0f1f9d8bb118c45f8bad62836f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 6 Jun 2023 11:13:38 +0200 Subject: [PATCH 070/198] Fix some windows unit_test compilation optimization mistakes --- test/tests_core/test_node/main.c | 2 +- test/tests_core/test_routing_table/main.c | 2 +- test/tests_io/test_phy/main.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tests_core/test_node/main.c b/test/tests_core/test_node/main.c index 161c87da7..5dccc73a1 100644 --- a/test/tests_core/test_node/main.c +++ b/test/tests_core/test_node/main.c @@ -99,7 +99,7 @@ void unittest_Node_SetState(void) node_ctx.timeout_run = true; node_ctx.timeout = 1; Node_SetState(LOCAL_DETECTION); - TEST_ASSERT_NOT_EQUAL(0, node_ctx.timeout); + TEST_ASSERT_NOT_EQUAL(0, (volatile uint32_t)node_ctx.timeout); TEST_ASSERT_EQUAL(true, node_ctx.timeout_run); TEST_ASSERT_EQUAL(LOCAL_DETECTION, node_ctx.state); diff --git a/test/tests_core/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c index f44e5a633..82e816615 100644 --- a/test/tests_core/test_routing_table/main.c +++ b/test/tests_core/test_routing_table/main.c @@ -480,7 +480,7 @@ void unittest_RTFilter_InitCheck(void) // Init default scenario context Init_Context(); // Init variables - search_result_t result; + search_result_t result = {0}; NEW_STEP("Verify that we have not initialized the result"); TEST_ASSERT_EQUAL(FAILED, RTFilter_InitCheck(&result)); diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index e52b31234..aca26df63 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -1084,10 +1084,10 @@ void unittest_phy_ComputeTimestamp() msg->header.size = 1; msg->data[0] = 0xAE; - time_luos_t timestamp = TimeOD_TimeFrom_ns(10); + volatile time_luos_t timestamp = TimeOD_TimeFrom_ns(10); memcpy(&msg->data[msg->header.size], ×tamp, sizeof(time_luos_t)); - time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); + volatile time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); TEST_ASSERT_EQUAL(0xAE, job.msg_pt->data[0]); TEST_ASSERT_NOT_EQUAL(TimeOD_TimeTo_ns(timestamp), TimeOD_TimeTo_ns(resulting_latency)); From c82d9c6a76444f593332bfec5a7399fd29221bb9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 6 Jun 2023 11:48:31 +0200 Subject: [PATCH 071/198] Improve luos_engine unit test --- engine/core/src/luos_engine.c | 37 +- test/tests_core/test_luos/main.c | 603 +++++++++-- test/tests_core/test_luos/main.h | 7 - test/tests_io/test_msg_alloc/main.c | 956 +++++++++++++++++- test/tests_io/test_msg_alloc/main.h | 17 - .../test_msg_alloc/unit_test_mem_alloc.c | 931 ----------------- 6 files changed, 1521 insertions(+), 1030 deletions(-) delete mode 100644 test/tests_core/test_luos/main.h delete mode 100644 test/tests_io/test_msg_alloc/main.h delete mode 100644 test/tests_io/test_msg_alloc/unit_test_mem_alloc.c diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 4bc35f325..276d7263c 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -140,6 +140,7 @@ const revision_t *Luos_GetVersion(void) ******************************************************************************/ error_return_t Luos_SendMsg(service_t *service, msg_t *msg) { + LUOS_ASSERT(msg != 0); // set protocol version msg->header.config = BASE_PROTOCOL; return Luos_Send(service, msg); @@ -168,6 +169,7 @@ error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t ******************************************************************************/ static error_return_t Luos_Send(service_t *service, msg_t *msg) { + LUOS_ASSERT(msg != 0); if (service == 0) { // There is no service specified here, take the first one @@ -197,13 +199,14 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) } /****************************************************************************** - * @brief Read last message from buffer for a specifig service - * @param service : Who receives the message we are looking for - * @param msg_to_write : Message to write - * @return SUCCEED : If the message is passed to the user, else FAILED + * @brief Read last message + * @param service : The service asking for a message + * @param msg_to_write : Message where the received message will be copied + * @return SUCCEED : If a message is passed to the user, else FAILED ******************************************************************************/ error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) { + LUOS_ASSERT((msg_to_write != 0) && (service != 0)); uint8_t service_index = Service_GetIndex(service); int remaining_job_number = 0; phy_job_t *job; @@ -214,14 +217,19 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) // Check if our service is concerned by this job if (((*(uint8_t *)job->phy_data) >> service_index) & 0x01) { + uint16_t msg_size = job->msg_pt->header.size; // This job is for our service, copy the job message to the user message + if (msg_size > MAX_DATA_MSG_SIZE) + { + msg_size = MAX_DATA_MSG_SIZE; + } if (Luos_IsMsgTimstamped(job->msg_pt) == true) { - memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size + sizeof(time_luos_t)); + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + msg_size + sizeof(time_luos_t)); } else { - memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + job->msg_pt->header.size); + memcpy(msg_to_write, job->msg_pt, sizeof(header_t) + msg_size); } // Remove this service from the job filter *(uint8_t *)job->phy_data &= ~(1 << service_index); @@ -235,15 +243,18 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) LUOS_MUTEX_UNLOCK return FAILED; } + /****************************************************************************** - * @brief Read last msg from buffer from a specific id service - * @param service : Who receive the message we are looking for + * @brief Read last msg from a specific service id + * @param service : The service asking for a message * @param id : Who sent the message we are looking for - * @param msg_to_write : Message to write - * @return FAILED if no message available + * @param msg_to_write : Message where the received message will be copied + * @return SUCCEED : If a message is passed to the user, else FAILED ******************************************************************************/ error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write) { + + LUOS_ASSERT((msg_to_write != 0) && (service != 0) && (id != 0)); uint16_t remaining_job_number = 0; phy_job_t *job; uint8_t service_index = Service_GetIndex(service); @@ -275,6 +286,7 @@ error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_ LUOS_MUTEX_UNLOCK return FAILED; } + /****************************************************************************** * @brief Send large among of data and formating to send into multiple msg * @param service : Who send @@ -285,6 +297,7 @@ error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_ ******************************************************************************/ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size) { + LUOS_ASSERT((msg != 0) && (bin_data != 0) && (size != 0)); // Compute number of message needed to send this data uint16_t msg_number = 1; uint16_t sent_size = 0; @@ -325,6 +338,7 @@ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size sent_size = sent_size + chunk_size; } } + /****************************************************************************** * @brief Receive a multi msg data * @param service : who receive @@ -402,6 +416,7 @@ int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data) } return 0; } + /****************************************************************************** * @brief Return the number of messages available * @param None @@ -411,6 +426,7 @@ uint16_t Luos_NbrAvailableMsg(void) { return LuosIO_GetJobNb(); } + /****************************************************************************** * @brief Check if all Tx message are complete * @param None @@ -420,6 +436,7 @@ error_return_t Luos_TxComplete(void) { return LuosIO_TxAllComplete(); } + /****************************************************************************** * @brief Register a new package * @param Init : Init function name diff --git a/test/tests_core/test_luos/main.c b/test/tests_core/test_luos/main.c index 8c09ccf65..1b51992ac 100644 --- a/test/tests_core/test_luos/main.c +++ b/test/tests_core/test_luos/main.c @@ -1,100 +1,570 @@ -#include "main.h" #include #include -#define Streaming_BUFFER_SIZE 1024 +#include "luos_engine.c" extern default_scenario_t default_sc; -void unittest_Luos_ReceiveData() +// Init and Loop are used and tested in the default scenario + +void unittest_Luos_GetVersion(void) { - NEW_TEST_CASE("Try to send a void message argument"); + NEW_TEST_CASE("Test Luos_GetVersion"); { - // Init default scenario context - Init_Context(); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; - service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); - uint32_t bin_data[64] = {0xDEADBEEF}; + TRY + { + const revision_t *rev = Luos_GetVersion(); + TEST_ASSERT_EQUAL(&luos_version, rev); + } + } +} + +void unittest_Luos_Send(void) +{ + NEW_TEST_CASE("Test Luos_Send assert conditions"); + { + TRY + { + NEW_STEP("Try to send a void message argument"); + Luos_Send(NULL, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Luos_Send normal conditions"); + { + TRY + { + NEW_STEP("Try to send in a prohibited condition"); + // Init default scenario context + Init_Context(); + // fake detection condition + default_sc.App_3.app->id = 0; + msg_t msg; + msg.header.target = default_sc.App_2.app->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + TEST_ASSERT_EQUAL(PROHIBITED, Luos_Send(default_sc.App_3.app, &msg)); + + NEW_STEP("Try to send with no service and check if the first service is used"); + // Init default scenario context + Init_Context(); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Send(NULL, &msg)); + TEST_ASSERT_EQUAL(default_sc.App_1.app->id, msg.header.source); + Luos_Loop(); + TEST_ASSERT_EQUAL(default_sc.App_1.app->id, default_sc.App_2.last_rx_msg.header.source); + + NEW_STEP("Try to send with a not configured service"); + // Init default scenario context + Init_Context(); + default_sc.App_3.app->id = 0; + msg.header.cmd = LUOS_LAST_RESERVED_CMD - 1; + TEST_ASSERT_EQUAL(SUCCEED, Luos_Send(default_sc.App_3.app, &msg)); + TEST_ASSERT_EQUAL(Node_Get()->node_id, msg.header.source); + Luos_Loop(); + TEST_ASSERT_EQUAL(Node_Get()->node_id, default_sc.App_2.last_rx_msg.header.source); - NEW_STEP("Verify if we assert"); - RESET_ASSERT(); - TEST_ASSERT_EQUAL(Luos_ReceiveData(NULL, 0, bin_data), -1); - RESET_ASSERT(); + NEW_STEP("Try to do a normal send"); + // Init default scenario context + Init_Context(); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Send(default_sc.App_3.app, &msg)); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, msg.header.source); + Luos_Loop(); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, default_sc.App_2.last_rx_msg.header.source); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; } +} - NEW_TEST_CASE("Try to send a void table argument"); +void unittest_Luos_SendMsg(void) +{ + NEW_TEST_CASE("Test Luos_SendMsg assert conditions"); { - // Init default scenario context - Init_Context(); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; - service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); - msg_t msg; - NEW_STEP("Verify function returns -1"); - Luos_ReceiveData(service, &msg, 0); + TRY + { + Luos_SendMsg(NULL, 0); + } TEST_ASSERT_TRUE(IS_ASSERT()); - RESET_ASSERT(); + END_TRY; + } + NEW_TEST_CASE("Test Luos_SendMsg normal conditions"); + { + + TRY + { + // Init default scenario context + Init_Context(); + msg_t msg; + msg.header.target = default_sc.App_2.app->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + TEST_ASSERT_EQUAL(SUCCEED, Luos_SendMsg(default_sc.App_3.app, &msg)); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, msg.header.source); + TEST_ASSERT_EQUAL(BASE_PROTOCOL, msg.header.config); + Luos_Loop(); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, default_sc.App_2.last_rx_msg.header.source); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; } +} - NEW_TEST_CASE("Try to send a shity service argument"); +void unittest_Luos_SendTimestampMsg(void) +{ + NEW_TEST_CASE("Test Luos_SendTimestampMsg assert conditions"); { - // Init default scenario context - Init_Context(); - msg_t msg; - uint32_t bin_data[64] = {0xDEADBEEF}; TRY { - NEW_STEP("Verify if we Assert"); - Luos_ReceiveData((service_t *)10, &msg, bin_data); + time_luos_t timestamp; + Luos_SendTimestampMsg(NULL, 0, timestamp); } TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; } + NEW_TEST_CASE("Test Luos_SendTimestampMsg normal conditions"); + { - NEW_TEST_CASE("Test the regular usage"); + TRY + { + // Init default scenario context + Init_Context(); + msg_t msg; + msg.header.target = default_sc.App_2.app->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + + time_luos_t timestamp = TimeOD_TimeFrom_s(2); + TEST_ASSERT_EQUAL(SUCCEED, Luos_SendTimestampMsg(default_sc.App_3.app, &msg, timestamp)); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, msg.header.source); + TEST_ASSERT_EQUAL(TIMESTAMP_PROTOCOL, msg.header.config); + Luos_Loop(); + TEST_ASSERT_EQUAL(default_sc.App_3.app->id, default_sc.App_2.last_rx_msg.header.source); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_ReadMsg(void) +{ + NEW_TEST_CASE("Test Luos_ReadMsg assert conditions"); { - // Init default scenario context - Init_Context(); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; - service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + TRY + { + NEW_STEP("Try to missspecify the service pointer"); + msg_t msg; + Luos_ReadMsg(NULL, &msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + NEW_STEP("Try to miss-specify the service pointer"); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, STATE_TYPE, "mycustom_service", revision); + Luos_ReadMsg(service, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Luos_ReadMsg normal conditions"); + { + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, STATE_TYPE, "mycustom_service", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + + NEW_STEP("Check end detection reception"); + msg_t rx_msg; + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + + NEW_STEP("Check normal reception"); + msg_t msg; + msg.header.target = service->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + TEST_ASSERT_EQUAL(SUCCEED, Luos_SendMsg(default_sc.App_3.app, &msg)); + Luos_Loop(); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(msg.header.source, rx_msg.header.source); + TEST_ASSERT_EQUAL(rx_msg.header.config, msg.header.config); + + NEW_STEP("Try receive but no message available"); + TEST_ASSERT_EQUAL(FAILED, Luos_ReadMsg(service, &rx_msg)); + + NEW_STEP("Check timestamped reception"); + time_luos_t timestamp = TimeOD_TimeFrom_s(2); + TEST_ASSERT_EQUAL(SUCCEED, Luos_SendTimestampMsg(default_sc.App_3.app, &msg, timestamp)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(msg.header.source, rx_msg.header.source); + TEST_ASSERT_EQUAL(rx_msg.header.config, msg.header.config); + time_luos_t rx_timestamp = Luos_GetMsgTimestamp(&rx_msg); + TEST_ASSERT_EQUAL(TimeOD_TimeTo_s(timestamp), TimeOD_TimeTo_s(rx_timestamp)); + + NEW_STEP("Try receive but no message available"); + TEST_ASSERT_EQUAL(FAILED, Luos_ReadMsg(service, &rx_msg)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_ReadFromService(void) +{ + + NEW_TEST_CASE("Test Luos_ReadFromService assert conditions"); + { + TRY + { + NEW_STEP("Try to missspecify the service pointer"); + msg_t msg; + Luos_ReadFromService(NULL, 1, &msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + NEW_STEP("Try to miss-specify the service pointer"); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, STATE_TYPE, "mycustom_service", revision); + Luos_ReadFromService(service, 1, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + NEW_STEP("Try to miss-specify the targeted service id"); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, STATE_TYPE, "mycustom_service", revision); + msg_t msg; + Luos_ReadFromService(service, 0, &msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Test Luos_ReadFromService normal conditions"); + { + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, STATE_TYPE, "mycustom_service", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + + NEW_STEP("Check end detection reception"); + msg_t rx_msg; + TEST_ASSERT_EQUAL(FAILED, Luos_ReadFromService(service, 2, &rx_msg)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadFromService(service, 1, &rx_msg)); + + NEW_STEP("Check normal reception"); + msg_t msg; + msg.header.target = service->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + TEST_ASSERT_EQUAL(SUCCEED, Luos_SendMsg(default_sc.App_3.app, &msg)); + Luos_Loop(); + TEST_ASSERT_EQUAL(FAILED, Luos_ReadFromService(service, 1, &rx_msg)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadFromService(service, 3, &rx_msg)); + TEST_ASSERT_EQUAL(msg.header.source, rx_msg.header.source); + TEST_ASSERT_EQUAL(rx_msg.header.config, msg.header.config); + + NEW_STEP("Try receive but no message available"); + TEST_ASSERT_EQUAL(FAILED, Luos_ReadFromService(service, 3, &rx_msg)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_Send_ReceiveData() +{ + NEW_TEST_CASE("Test Luos_SendData assert condition"); + { + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + uint32_t bin_data[64] = {0xDEADBEEF}; msg_t msg; - uint8_t bin_data[256] = {0}; - NEW_STEP("Verify that the first message return 0 meaning message is not completely received"); - // Set first message - msg.header.size = 256; - memset(msg.data, 0xAA, 128); - TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 0); + NEW_STEP("Try to send a void message argument"); + { + TRY + { + Luos_SendData(service, 0, bin_data, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_STEP("Try to send a void table argument"); + { + TRY + { + Luos_SendData(service, &msg, NULL, 10); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_STEP("Try to send a shity size"); + { + TRY + { + Luos_SendData(service, &msg, bin_data, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + } + NEW_TEST_CASE("Test Luos_ReceiveData assert condition"); + { + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + uint32_t bin_data[64] = {0xDEADBEEF}; + msg_t msg; + + NEW_STEP("Try to send a void message argument"); + { + TRY + { + Luos_ReceiveData(service, 0, bin_data); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_STEP("Try to send a void table argument"); + { + TRY + { + Luos_ReceiveData(service, &msg, NULL); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_STEP("Try to send a shity service argument"); + { + TRY + { + Luos_ReceiveData((service_t *)10, &msg, bin_data); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_STEP("Try to send a shity service pointer"); + { + TRY + { + TEST_ASSERT_EQUAL(-1, Luos_ReceiveData(NULL, &msg, bin_data)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + } + + NEW_TEST_CASE("Test the regular usage"); + { + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + msg_t msg; + uint8_t tx_data[256] = {0}; + uint8_t rx_data[256] = {0}; + msg_t rx_msg; + // Catch the end of detection + Luos_ReadMsg(service, &rx_msg); + + NEW_STEP("Verify that the first message return 0 meaning message is not completely received"); + { + // Set first message + memset(tx_data, 0xAA, 256); + msg.header.target = service->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + Luos_SendData(default_sc.App_1.app, &msg, tx_data, 256); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(256, rx_msg.header.size); + TEST_ASSERT_EQUAL(0, Luos_ReceiveData(service, &rx_msg, rx_data)); + } - NEW_STEP("Verify that the second message return 256 byte received"); - msg.header.size = 128; - TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 256); + NEW_STEP("Verify that the second message return 256 byte received"); + { + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(128, rx_msg.header.size); + TEST_ASSERT_EQUAL(256, Luos_ReceiveData(service, &rx_msg, rx_data)); + } - NEW_STEP("Check if the data is OK"); - for (int i = 0; i < 256; i++) + NEW_STEP("Check if the data is OK"); + { + for (int i = 0; i < 256; i++) + { + TEST_ASSERT_EQUAL(rx_data[i], 0xAA); + } + } + } + CATCH { - TEST_ASSERT_EQUAL(bin_data[i], 0xAA); + TEST_ASSERT_TRUE(false); } + END_TRY; + } + + NEW_TEST_CASE("Try to break the message"); + { + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + msg_t msg; + uint8_t tx_data[380] = {0}; + uint8_t rx_data[380] = {0}; + msg_t rx_msg; + // Catch the end of detection + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + + NEW_STEP("Check that the first message return 0 meaning message is not completely received"); + { + // Set first message + msg.header.target = service->id; + msg.header.target_mode = SERVICEIDACK; + msg.header.cmd = LUOS_LAST_RESERVED_CMD + 1; + msg.header.size = 0; + Luos_SendData(default_sc.App_1.app, &msg, tx_data, 380); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(380, rx_msg.header.size); + TEST_ASSERT_EQUAL(0, Luos_ReceiveData(service, &rx_msg, rx_data)); + } + + NEW_STEP("Remove the second message but receive the second one and check if the data manager reset"); + { + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(252, rx_msg.header.size); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(124, rx_msg.header.size); + TEST_ASSERT_EQUAL(-1, Luos_ReceiveData(service, &rx_msg, rx_data)); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; } NEW_TEST_CASE("Try to send a void service argument to reset the data reception"); { - // Init default scenario context - Init_Context(); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; - service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); - msg_t msg; - uint8_t bin_data[256] = {0}; + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + msg_t msg; + uint8_t bin_data[256] = {0}; - NEW_STEP("Verify that the first message return 0 meaning message is not completely received"); - // Set first message - msg.header.size = 256; - memset(msg.data, 0xAA, 128); - TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 0); + NEW_STEP("Verify that the first message return 0 meaning message is not completely received"); + // Set first message + msg.header.size = 256; + memset(msg.data, 0xAA, 128); + TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 0); - NEW_STEP("Verify if we return an error which mean the data reception have been reseted"); - TEST_ASSERT_EQUAL(Luos_ReceiveData(0, &msg, bin_data), -1); + NEW_STEP("Verify if we return an error which mean the data reception have been reseted"); + TEST_ASSERT_EQUAL(Luos_ReceiveData(0, &msg, bin_data), -1); - NEW_STEP("Verify that the second message return 128 byte received half of the transmitted data because we reset it in the middle"); - msg.header.size = 128; - TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 128); + NEW_STEP("Verify that the second message return 128 byte received half of the transmitted data because we reset it in the middle"); + msg.header.size = 128; + TEST_ASSERT_EQUAL(Luos_ReceiveData(service, &msg, bin_data), 128); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} + +void unittest_Luos_NbrAvailableMsg(void) +{ + + NEW_TEST_CASE("Test the regular usage"); + { + TRY + { + // Init default scenario context + Init_Context(); + revision_t revision = {.major = 1, .minor = 0, .build = 0}; + service_t *service = Luos_CreateService(0, VOID_TYPE, "Dummy_App", revision); + Luos_Detect(default_sc.App_1.app); + do + { + Luos_Loop(); + } while (!Luos_IsDetected()); + msg_t msg; + uint8_t tx_data[256] = {0}; + uint8_t rx_data[256] = {0}; + msg_t rx_msg; + // Catch the end of detection + TEST_ASSERT_EQUAL(1, Luos_NbrAvailableMsg()); + TEST_ASSERT_EQUAL(SUCCEED, Luos_ReadMsg(service, &rx_msg)); + TEST_ASSERT_EQUAL(0, Luos_NbrAvailableMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; } } @@ -103,7 +573,14 @@ int main(int argc, char **argv) UNITY_BEGIN(); // Big data reception - UNIT_TEST_RUN(unittest_Luos_ReceiveData); + UNIT_TEST_RUN(unittest_Luos_GetVersion); + UNIT_TEST_RUN(unittest_Luos_Send); + UNIT_TEST_RUN(unittest_Luos_SendMsg); + UNIT_TEST_RUN(unittest_Luos_SendTimestampMsg); + UNIT_TEST_RUN(unittest_Luos_ReadMsg); + UNIT_TEST_RUN(unittest_Luos_ReadFromService); + UNIT_TEST_RUN(unittest_Luos_Send_ReceiveData); + UNIT_TEST_RUN(unittest_Luos_NbrAvailableMsg); UNITY_END(); } diff --git a/test/tests_core/test_luos/main.h b/test/tests_core/test_luos/main.h deleted file mode 100644 index 486ae2f27..000000000 --- a/test/tests_core/test_luos/main.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -// Sreaming functions -void unittest_Luos_SendStreamingStreamingSize(void); - -#endif //MAIN_H \ No newline at end of file diff --git a/test/tests_io/test_msg_alloc/main.c b/test/tests_io/test_msg_alloc/main.c index 035763255..e2f61a01c 100644 --- a/test/tests_io/test_msg_alloc/main.c +++ b/test/tests_io/test_msg_alloc/main.c @@ -1,6 +1,958 @@ -#include "main.h" #include "unit_test.h" -#include "msg_alloc.h" +#include "../src/msg_alloc.c" + +void unittest_SlotPack(void) +{ + uint8_t data = 0; + // This funciton should reorganize the buffer to pack the messages + // Create a already organized buffer with a random data + + NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); + { + alloc_slot_index = MAX_MSG_NB + 1; + TRY + { + MsgAlloc_SlotPack(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if an already organized buffer is not modified"); + { + TRY + { + alloc_slots[0].data = &data; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = &data; + alloc_slots[4].data = 0; + alloc_slot_index = 4; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check if an unorganized buffer is organized"); + { + TRY + { + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[7].data = 0; + alloc_slot_index = 8; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(0, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(3, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check how it's managing the buffer to it's limits"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = 0; + alloc_slots[1].data = &data; + alloc_slots[2].data = &data; + alloc_slots[3].data = 0; + alloc_slots[4].data = 0; + alloc_slots[5].data = 0; + alloc_slots[6].data = &data; + alloc_slots[MAX_MSG_NB - 1].data = &data; + alloc_slot_index = MAX_MSG_NB; + MsgAlloc_SlotPack(); + TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); + TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); + TEST_ASSERT_EQUAL(0, alloc_slots[4].data); + TEST_ASSERT_EQUAL(0, alloc_slots[5].data); + TEST_ASSERT_EQUAL(0, alloc_slots[6].data); + TEST_ASSERT_EQUAL(0, alloc_slots[7].data); + TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); + TEST_ASSERT_EQUAL(4, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_GetOldestMsg(void) +{ + NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); + { + alloc_slot_index = MAX_MSG_NB + 1; + TRY + { + MsgAlloc_GetOldestMsg(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check the behavior if we dont have any message"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the behavior if we have a message in the first slot"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the behavior if we have a message in another place"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[3].data = (uint8_t *)0x1; + alloc_slot_index = 4; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)0x1; + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; + alloc_slot_index = MAX_MSG_NB; + TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_BufferAvailableSpaceComputation(void) +{ + // This computation is based on the computed oldest message and the data ptr + NEW_TEST_CASE("Check if we assert when data_ptr is out of the buffer"); + { + alloc_slots[0].data = 0; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when olest_msg is out of the buffer"); + { + + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + data_ptr = &msg_buffer[MSG_BUFFER_SIZE]; + TRY + { + MsgAlloc_BufferAvailableSpaceComputation(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + } + + NEW_TEST_CASE("Check the result if we don't have any messages"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result in a situation we don't have to loop around the buffer end"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[0]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end and data_ptr is set to the begin of the buffer"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_DoWeHaveSpaceUntilBufferEnd(void) +{ + // In this specific function we may have a pointer after the end of the buffer but never before + + NEW_TEST_CASE("Check if we assert when to pointer is before the buffer"); + { + TRY + { + MsgAlloc_DoWeHaveSpaceUntilBufferEnd(0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if it return SUCCEED when the pointer is in the buffer"); + { + TRY + { + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[0])); + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check if it return FAILED when the pointer is after the buffer"); + { + TRY + { + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE])); + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_CheckMsgSpace(void) +{ + NEW_TEST_CASE("Check if we assert when from pointer is after the to pointer or at the same place"); + { + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[1], (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + } + + NEW_TEST_CASE("Check if we assert when one of the pointer is out of the buffer"); + { + TRY + { + MsgAlloc_CheckMsgSpace(0, (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check the result if we don't have any message yet"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is before the old one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is after the old one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is in the middle of the old one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is at the end of the old one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check the result if we have one message and the new one is at the beginning of the old one"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_Loop() +{ + NEW_TEST_CASE("Verify buffer occupation rate stat computing"); + MsgAlloc_Init(NULL); + { + // data_ptr is incremented : buffer occupation computing is verified + // + // msg_buffer + // +-------------------------------------------------------------+ + // |-------------------------------------------------------------| + // ^-------------------------^---------------------^-------------+ + // | | | + // data_ptr data_ptr data_ptr + // (0% occupation) (X% occupation) (etc...) + // + + // Init variables + //--------------- + uint32_t expected_buffer_occupation_ratio; + memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, + .engine_msg_stack_ratio = 0, + .tx_msg_stack_ratio = 0, + .buffer_occupation_ratio = 0, + .msg_drop_number = 0}; + + memset(&memory_stats, 0, sizeof(memory_stats)); + MsgAlloc_Init(&memory_stats); + data_ptr = &msg_buffer[0]; + + // Call function and Verify + //--------------------------- + // Empty buffer + TRY + { + expected_buffer_occupation_ratio = 0; + MsgAlloc_Loop(); + + NEW_STEP("Check that the buffer is empty"); + TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + // Buffer occupation from 0 -> 100% + NEW_STEP("Check buffer is full in all cases"); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) + { + data_ptr = &msg_buffer[i]; + expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); + + MsgAlloc_Loop(); + + TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_Alloc() +{ + + NEW_TEST_CASE("Check if we assert when we try to allocate a message with no size and/or no phy"); + { + TRY + { + MsgAlloc_Alloc(0, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Alloc(1, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Alloc(0, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when we try to allocate a message with a size > MSG_BUFFER_SIZE"); + { + TRY + { + MsgAlloc_Alloc(MSG_BUFFER_SIZE + 1, 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check an allocation with no message already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with one message already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[10]; + TEST_ASSERT_EQUAL(&msg_buffer[10], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with two messages already registered"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 2; + data_ptr = &msg_buffer[20]; + TEST_ASSERT_EQUAL(&msg_buffer[20], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation overflowing the buffer end"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need before the end of the buffer"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message into the space we need at the begining of the buffer"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check alignement correction"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[1]; + TEST_ASSERT_EQUAL(&msg_buffer[2], MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check alignement correction limits by looping on it"); + { + volatile int i; + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = 0; + alloc_slot_index = 0; + data_ptr = &msg_buffer[0]; + for (i = 0; i < 600; i++) + { + volatile uint8_t *data; + data = MsgAlloc_Alloc(7, 0x01); + // Check if the data pointer moved accordingly => 7 + 1 for alignement + if (((i + 1) * 8) >= MSG_BUFFER_SIZE) + { + TEST_ASSERT_EQUAL((i * 8) - MSG_BUFFER_SIZE + (MSG_BUFFER_SIZE - (8 * (int)(MSG_BUFFER_SIZE / 8))), ((uintptr_t)data) - (uintptr_t)&msg_buffer[0]); + } + else + { + TEST_ASSERT_EQUAL((i * 8), ((uintptr_t)data) - (uintptr_t)&msg_buffer[0]); + } + MsgAlloc_Free(0, (const uint8_t *)data); + // Sort the allocator + MsgAlloc_Loop(); + } + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check an allocation with a message at the limit of the space we have"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[2]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[0]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(11, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; + TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_IsEmpty() +{ + NEW_TEST_CASE("Check if we assert when we have more slot than we can handle"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = MSG_BUFFER_SIZE + 1; + MsgAlloc_IsEmpty(); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we return succed when we have no message"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } + + NEW_TEST_CASE("Check if we return failed when we have a message"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slot_index = 1; + TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_Free(void) +{ + NEW_TEST_CASE("Check if we assert when we pass a null pointer"); + { + TRY + { + MsgAlloc_Free(0, 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we assert when we pass a philter that is not in the list"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x01; + alloc_slot_index = 1; + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check if we don't assert when there is no message in the list . (This can happen in case of reset)"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slot_index = 0; + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check a normal free situation with the last concerned phy id"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x01; + alloc_slot_index = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_slots[0].data); + TEST_ASSERT_EQUAL(0, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check a normal free situation with the multiple phy id"); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x03; + alloc_slot_index = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); + TEST_ASSERT_EQUAL(0x02, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_slots[0].data); + TEST_ASSERT_EQUAL(0x00, alloc_slots[0].phy_filter); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } +} int main(int argc, char **argv) { diff --git a/test/tests_io/test_msg_alloc/main.h b/test/tests_io/test_msg_alloc/main.h deleted file mode 100644 index 007eccbbf..000000000 --- a/test/tests_io/test_msg_alloc/main.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef MAIN_H -#define MAIN_H - -// Static functions -void unittest_SlotPack(void); -void unittest_GetOldestMsg(void); -void unittest_BufferAvailableSpaceComputation(void); -void unittest_DoWeHaveSpaceUntilBufferEnd(void); -void unittest_CheckMsgSpace(void); - -// public functions -void unittest_MsgAlloc_Loop(void); -void unittest_MsgAlloc_Alloc(void); -void unittest_MsgAlloc_IsEmpty(void); -void unittest_MsgAlloc_Free(void); - -#endif // MAIN_H diff --git a/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c b/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c deleted file mode 100644 index 37a806604..000000000 --- a/test/tests_io/test_msg_alloc/unit_test_mem_alloc.c +++ /dev/null @@ -1,931 +0,0 @@ -#include "main.h" -#include "unit_test.h" -#include "../src/msg_alloc.c" - -/******************************************************************************* - * Static Function - ******************************************************************************/ - -void unittest_SlotPack(void) -{ - uint8_t data = 0; - // This funciton should reorganize the buffer to pack the messages - // Create a already organized buffer with a random data - - NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); - { - alloc_slot_index = MAX_MSG_NB + 1; - TRY - { - MsgAlloc_SlotPack(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if an already organized buffer is not modified"); - { - TRY - { - alloc_slots[0].data = &data; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = &data; - alloc_slots[4].data = 0; - alloc_slot_index = 4; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check if an unorganized buffer is organized"); - { - TRY - { - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[7].data = 0; - alloc_slot_index = 8; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(0, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(3, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check how it's managing the buffer to it's limits"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[MAX_MSG_NB - 1].data = &data; - alloc_slot_index = MAX_MSG_NB; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_GetOldestMsg(void) -{ - NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); - { - alloc_slot_index = MAX_MSG_NB + 1; - TRY - { - MsgAlloc_GetOldestMsg(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check the behavior if we dont have any message"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the first slot"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in another place"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[3].data = (uint8_t *)0x1; - alloc_slot_index = 4; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_BufferAvailableSpaceComputation(void) -{ - // This computation is based on the computed oldest message and the data ptr - NEW_TEST_CASE("Check if we assert when data_ptr is out of the buffer"); - { - alloc_slots[0].data = 0; - TRY - { - MsgAlloc_BufferAvailableSpaceComputation(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]; - TRY - { - MsgAlloc_BufferAvailableSpaceComputation(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if we assert when olest_msg is out of the buffer"); - { - - TRY - { - MsgAlloc_BufferAvailableSpaceComputation(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - data_ptr = &msg_buffer[MSG_BUFFER_SIZE]; - TRY - { - MsgAlloc_BufferAvailableSpaceComputation(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - } - - NEW_TEST_CASE("Check the result if we don't have any messages"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - data_ptr = (uint8_t *)&msg_buffer[0]; - TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result in a situation we don't have to loop around the buffer end"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[0]; - TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result in a situation we have to loop around the buffer end and data_ptr is set to the begin of the buffer"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_DoWeHaveSpaceUntilBufferEnd(void) -{ - // In this specific function we may have a pointer after the end of the buffer but never before - - NEW_TEST_CASE("Check if we assert when to pointer is before the buffer"); - { - TRY - { - MsgAlloc_DoWeHaveSpaceUntilBufferEnd(0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if it return SUCCEED when the pointer is in the buffer"); - { - TRY - { - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[0])); - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check if it return FAILED when the pointer is after the buffer"); - { - TRY - { - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE])); - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_DoWeHaveSpaceUntilBufferEnd((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_CheckMsgSpace(void) -{ - NEW_TEST_CASE("Check if we assert when from pointer is after the to pointer or at the same place"); - { - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[0]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[1], (uint8_t *)&msg_buffer[0]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - } - - NEW_TEST_CASE("Check if we assert when one of the pointer is out of the buffer"); - { - TRY - { - MsgAlloc_CheckMsgSpace(0, (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE + 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1], 0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check the result if we don't have any message yet"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result if we have one message and the new one is before the old one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result if we have one message and the new one is after the old one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result if we have one message and the new one is in the middle of the old one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result if we have one message and the new one is at the end of the old one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the result if we have one message and the new one is at the beginning of the old one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -/******************************************************************************* - * Public Function - ******************************************************************************/ - -void unittest_MsgAlloc_Loop() -{ - NEW_TEST_CASE("Verify buffer occupation rate stat computing"); - MsgAlloc_Init(NULL); - { - // data_ptr is incremented : buffer occupation computing is verified - // - // msg_buffer - // +-------------------------------------------------------------+ - // |-------------------------------------------------------------| - // ^-------------------------^---------------------^-------------+ - // | | | - // data_ptr data_ptr data_ptr - // (0% occupation) (X% occupation) (etc...) - // - - // Init variables - //--------------- - uint32_t expected_buffer_occupation_ratio; - memory_stats_t memory_stats = {.rx_msg_stack_ratio = 0, - .engine_msg_stack_ratio = 0, - .tx_msg_stack_ratio = 0, - .buffer_occupation_ratio = 0, - .msg_drop_number = 0}; - - memset(&memory_stats, 0, sizeof(memory_stats)); - MsgAlloc_Init(&memory_stats); - data_ptr = &msg_buffer[0]; - - // Call function and Verify - //--------------------------- - // Empty buffer - TRY - { - expected_buffer_occupation_ratio = 0; - MsgAlloc_Loop(); - - NEW_STEP("Check that the buffer is empty"); - TEST_ASSERT_EQUAL(0, memory_stats.buffer_occupation_ratio); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - // Buffer occupation from 0 -> 100% - NEW_STEP("Check buffer is full in all cases"); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) - { - data_ptr = &msg_buffer[i]; - expected_buffer_occupation_ratio = (i * 100) / (MSG_BUFFER_SIZE); - - MsgAlloc_Loop(); - - TEST_ASSERT_EQUAL(expected_buffer_occupation_ratio, memory_stats.buffer_occupation_ratio); - } - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_MsgAlloc_Alloc() -{ - - NEW_TEST_CASE("Check if we assert when we try to allocate a message with no size and/or no phy"); - { - TRY - { - MsgAlloc_Alloc(0, 1); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_Alloc(1, 0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - TRY - { - MsgAlloc_Alloc(0, 0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if we assert when we try to allocate a message with a size > MSG_BUFFER_SIZE"); - { - TRY - { - MsgAlloc_Alloc(MSG_BUFFER_SIZE + 1, 1); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check an allocation with no message already registered"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - data_ptr = &msg_buffer[0]; - TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with one message already registered"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[10]; - TEST_ASSERT_EQUAL(&msg_buffer[10], MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with two messages already registered"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 2; - data_ptr = &msg_buffer[20]; - TEST_ASSERT_EQUAL(&msg_buffer[20], MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation overflowing the buffer end"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; - TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with a message into the space we need"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[5]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with a message into the space we need before the end of the buffer"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with a message into the space we need at the begining of the buffer"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check alignement correction"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[1]; - TEST_ASSERT_EQUAL(&msg_buffer[2], MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check an allocation with a message at the limit of the space we have"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[0]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[2]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[0]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(11, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; - TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_MsgAlloc_IsEmpty() -{ - NEW_TEST_CASE("Check if we assert when we have more slot than we can handle"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = MSG_BUFFER_SIZE + 1; - MsgAlloc_IsEmpty(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if we return succed when we have no message"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check if we return failed when we have a message"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_MsgAlloc_Free(void) -{ - NEW_TEST_CASE("Check if we assert when we pass a null pointer"); - { - TRY - { - MsgAlloc_Free(0, 0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if we assert when we pass a philter that is not in the list"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slots[0].phy_filter = 0x01; - alloc_slot_index = 1; - MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if we don't assert when there is no message in the list . (This can happen in case of reset)"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } - - NEW_TEST_CASE("Check a normal free situation with the last concerned phy id"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slots[0].phy_filter = 0x01; - alloc_slot_index = 1; - MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL(0, alloc_slots[0].data); - TEST_ASSERT_EQUAL(0, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } - - NEW_TEST_CASE("Check a normal free situation with the multiple phy id"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slots[0].phy_filter = 0x03; - alloc_slot_index = 1; - MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); - TEST_ASSERT_EQUAL(0x02, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); - MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL(0, alloc_slots[0].data); - TEST_ASSERT_EQUAL(0x00, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } -} From 6405a1bb7dcfc7bcb2e4f21e3e1f61b543f6ab44 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 6 Jun 2023 17:33:21 +0200 Subject: [PATCH 072/198] Exclude some test for windows because it fail to execute it --- test/tests_core/test_node/main.c | 6 +++++- test/tests_io/test_phy/main.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/tests_core/test_node/main.c b/test/tests_core/test_node/main.c index 5dccc73a1..c58bd0a88 100644 --- a/test/tests_core/test_node/main.c +++ b/test/tests_core/test_node/main.c @@ -99,7 +99,9 @@ void unittest_Node_SetState(void) node_ctx.timeout_run = true; node_ctx.timeout = 1; Node_SetState(LOCAL_DETECTION); +#ifndef _WIN32 TEST_ASSERT_NOT_EQUAL(0, (volatile uint32_t)node_ctx.timeout); +#endif TEST_ASSERT_EQUAL(true, node_ctx.timeout_run); TEST_ASSERT_EQUAL(LOCAL_DETECTION, node_ctx.state); @@ -107,7 +109,9 @@ void unittest_Node_SetState(void) node_ctx.timeout_run = true; node_ctx.timeout = 1; Node_SetState(EXTERNAL_DETECTION); - TEST_ASSERT_NOT_EQUAL(0, node_ctx.timeout); +#ifndef _WIN32 + TEST_ASSERT_NOT_EQUAL(0, (volatile uint32_t)node_ctx.timeout); +#endif TEST_ASSERT_EQUAL(true, node_ctx.timeout_run); TEST_ASSERT_EQUAL(EXTERNAL_DETECTION, node_ctx.state); } diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index aca26df63..645461d57 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -1090,7 +1090,9 @@ void unittest_phy_ComputeTimestamp() volatile time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); TEST_ASSERT_EQUAL(0xAE, job.msg_pt->data[0]); +#ifndef _WIN32 TEST_ASSERT_NOT_EQUAL(TimeOD_TimeTo_ns(timestamp), TimeOD_TimeTo_ns(resulting_latency)); +#endif } CATCH { From e9910d0e1784cb3658d8cd27b3dd609ad1cf27f8 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 5 Jun 2023 10:17:46 +0200 Subject: [PATCH 073/198] Enable test coverage report --- .github/workflows/build.yml | 11 +++++++++++ .gitignore | 3 +++ platformio.ini | 3 ++- source_filter_script.py | 9 +++++++-- test/code_coverage.py | 5 +++++ 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 test/code_coverage.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81e547de2..1840bd926 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,16 @@ jobs: # Run Unit tests platformio test -vvv + - if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get install -y lcov + lcov -d .pio/build/native/ -c -o lcov.info + lcov --remove lcov.info '*/usr/*' '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o lcov.info + + - if: matrix.os == 'ubuntu-latest' + name: Coveralls + uses: coverallsapp/github-action@v2 + unit-tests: name: Unit tests needs: tests-run @@ -51,6 +61,7 @@ jobs: steps: - run: echo "Tests succeed!" + code-format: name: Code format runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 54745e067..e4450ea08 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ **/.gitignore *.out *.log +*.info +*.profraw +cov/* /examples/projects/NUCLEO-G431KB/button/.mxproject /examples/projects/NUCLEO-G431KB/button/Button.gpdsc /examples/projects/NUCLEO-L432KC/button/Button.gpdsc diff --git a/platformio.ini b/platformio.ini index 99c0e2b68..efd7d324a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,10 +23,11 @@ lib_extra_dirs = $PROJECT_DIR/../ build_unflags = -Os build_flags = - -O1 + -O0 -include ./test/_resources/node_config.h -DUNIT_TEST -D LUOSHAL=STUB + --coverage build_type = debug test_build_src = true diff --git a/source_filter_script.py b/source_filter_script.py index 629f4e5a9..7c208ab38 100644 --- a/source_filter_script.py +++ b/source_filter_script.py @@ -125,6 +125,11 @@ if resources.is_dir(): env.Append(CPPPATH=[(resources.path)]) + if (current_os == 'Darwin'): + env.Append(LINKFLAGS=["--coverage"]) + + if (current_os == 'Linux') or (current_os == 'Windows'): + env.Append(LINKFLAGS=["-lgcov", "--coverage", "-fprofile-arcs"]) # CODE COVERAGE WILL BE ADDED SOON # if (current_os == 'Linux') or (current_os == 'Darwin') or (current_os == 'Windows'): # env.Append(LINKFLAGS=["-lgcov"]) @@ -136,9 +141,9 @@ # env.Execute(".pio/build/native/program test/"+file) # env.Execute("lcov -d .pio/build/native/ -c -o lcov.info") # env.Execute( - # "lcov --remove lcov.info '*/tool-unity/*' '*/test/*' -o filtered_lcov.info") + # "lcov --remove lcov.info '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o filtered_lcov.info") # env.Execute( - # "genhtml -o cov/ --demangle-cpp filtered_lcov.info") + # "genhtml filtered_lcov.info -o cov/ --demangle-cpp") # Generate code coverage when testing workflow is ended # env.AddPostAction(".pio/build/native/program", generateCoverageInfo) diff --git a/test/code_coverage.py b/test/code_coverage.py new file mode 100755 index 000000000..675188bce --- /dev/null +++ b/test/code_coverage.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python +import os +os.system("lcov -d .pio/build/native/ -c -o lcov.info") +os.system("lcov --remove lcov.info '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o filtered_lcov.info") +os.system("genhtml filtered_lcov.info -o cov/ --demangle-cpp") From 51f8a9f8d402d0cf872f0b70707a9fad9adb0a7c Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 10:47:51 +0200 Subject: [PATCH 074/198] Minor code cleanup. --- engine/IO/src/filter.c | 2 -- engine/IO/src/luos_phy.c | 7 +++---- engine/IO/src/msg_alloc.c | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index d0a2ecca8..5e051b6f5 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -228,8 +228,6 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) break; default: LUOS_ASSERT(0); - // This concerns Robus only - return 0x01 << 1; break; } // This concerns Robus only by default diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 18e414fd2..24b8e5d1a 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -319,16 +319,15 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now allocate it rx_data = MsgAlloc_Alloc(phy_ptr->rx_size, (uint8_t)phy_ptr->rx_phy_filter); phy_ptr->rx_data = rx_data; - // Assert if the allocation failed. We don't allow to loose a message comming from outside. if ((phy_ptr == &phy_ctx.phy[0]) && (rx_data == NULL)) { - // We don't successfully allocated the message. - // This is luos trying to send something, return and Luos will wait... + // We don't successfully allocated the message we are trying to send. + // return and the transmitter will be able to wait to get more space... LuosHAL_SetIrqState(true); phy_ptr->rx_keep = false; return; } - LUOS_ASSERT(rx_data != NULL); + LUOS_ASSERT(rx_data != NULL); // Assert if the allocation failed. We don't allow to loose a message comming from outside. // Job is done LuosHAL_SetIrqState(true); copy_from = (void *)phy_ptr->rx_buffer_base; diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 937bf9496..0e35637c5 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -77,10 +77,10 @@ volatile uint16_t alloc_slot_index; /*!< Index of the next slot able to be wri static inline void MsgAlloc_SlotPack(void); // msg buffering -_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(void *to); +_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(const void *to); // Allocator task stack TX check space -static inline error_return_t MsgAlloc_CheckMsgSpace(void *from, void *to); +static inline error_return_t MsgAlloc_CheckMsgSpace(const void *from, const void *to); // Available buffer space evaluation static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void); @@ -264,7 +264,7 @@ _CRITICAL static inline uint8_t *MsgAlloc_GetOldestMsg(void) * @return error_return_t * _CRITICAL function call in IRQ ******************************************************************************/ -_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(void *to) +_CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(const void *to) { LUOS_ASSERT((uintptr_t)to >= (uintptr_t)&msg_buffer[0]); if ((uintptr_t)to > ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - 1])) @@ -411,7 +411,7 @@ error_return_t MsgAlloc_IsEmpty(void) * @param to : stop of the memory space to check * @return error_return_t ******************************************************************************/ -static inline error_return_t MsgAlloc_CheckMsgSpace(void *from, void *to) +static inline error_return_t MsgAlloc_CheckMsgSpace(const void *from, const void *to) { LUOS_ASSERT(((uintptr_t)from < (uintptr_t)to) && ((uintptr_t)from >= (uintptr_t)&msg_buffer[0]) From 15819d3deb3f8a483ba9ebdc3362301f62bb90c8 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 10:48:16 +0200 Subject: [PATCH 075/198] Fix a missing node init in case of detection start message reception --- engine/IO/src/luos_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 8fa5be12a..0d0734b2d 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -391,6 +391,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) case START_DETECTION: Phy_Reset(); MsgAlloc_Init(NULL); + Node_Init(); Node_SetState(EXTERNAL_DETECTION); Service_ClearId(); // Reset the data reception context From 2566b111b113766d955e776d6a9f0b3960acd9d3 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 10:55:00 +0200 Subject: [PATCH 076/198] [Gate]Update data_manager to avoid to avoid hazardous function access asserting on the new Luos_engine version. --- tool_services/gate/data_manager.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index 971c92a54..b25220a33 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -70,22 +70,25 @@ void DataManager_Run(service_t *service) void DataManager_RunPipeOnly(service_t *service) { msg_t data_msg; - while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED) + if (PipeLink_GetId() != 0) { - // This message is a command from pipe - // Convert the received data into Luos commands - static char data_cmd[GATE_BUFF_SIZE]; - if (data_msg.header.cmd == PARAMETERS) + while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED) { - uintptr_t pointer; - memcpy(&pointer, data_msg.data, sizeof(void *)); - PipeLink_SetDirectPipeSend((void *)pointer); - continue; - } - if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) - { - // We finish to receive this data, execute the received command - Convert_DataToLuos(service, data_cmd); + // This message is a command from pipe + // Convert the received data into Luos commands + static char data_cmd[GATE_BUFF_SIZE]; + if (data_msg.header.cmd == PARAMETERS) + { + uintptr_t pointer; + memcpy(&pointer, data_msg.data, sizeof(void *)); + PipeLink_SetDirectPipeSend((void *)pointer); + continue; + } + if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) + { + // We finish to receive this data, execute the received command + Convert_DataToLuos(service, data_cmd); + } } } if (Luos_ReadMsg(service, &data_msg) == SUCCEED) From a4356470cc6364f301ec2ca5af433ba2176f6979 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 10:55:29 +0200 Subject: [PATCH 077/198] Secure job removal --- engine/IO/src/luos_io.c | 6 +++++- engine/IO/src/luos_phy.c | 7 ++----- test/tests_io/test_phy/main.c | 19 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 0d0734b2d..551928653 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -130,7 +130,11 @@ static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) else { // This message was a protocol one, we can remove it. - Phy_RmJob(luos_phy, job); + // When we receive a start detection we reset everything so we don't need to remove the message anymore. + if (luos_phy->job_nb != 0) + { + Phy_RmJob(luos_phy, job); + } } } diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 24b8e5d1a..a39875863 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -556,11 +556,8 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) { LUOS_ASSERT((phy_ptr != NULL) && (job >= phy_ptr->job) - && (job < &phy_ptr->job[MAX_MSG_NB])); - if (phy_ptr->job_nb == 0) - { - return; - } + && (job < &phy_ptr->job[MAX_MSG_NB]) + && (phy_ptr->job_nb != 0)); // We potentially need to free this message from msg allocator // Get the Phy index int phy_index = Phy_GetPhyId(phy_ptr); diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 645461d57..0bb767af5 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -1359,6 +1359,15 @@ void unittest_phy_RmJob() } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; + + TRY + { + luos_phy->job_nb = 0; + Phy_RmJob(luos_phy, &luos_phy->job[0]); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; } NEW_TEST_CASE("Check RmJob normal conditions"); @@ -1367,16 +1376,6 @@ void unittest_phy_RmJob() phy_test_reset(); memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); - TRY - { - luos_phy->job_nb = 0; - Phy_RmJob(luos_phy, &luos_phy->job[0]); - TEST_ASSERT_EQUAL(0, luos_phy->job_nb); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } TRY { From 5eebf1dadd45e7e45305fc4d6f21f156f7ba23fc Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 13:13:32 +0200 Subject: [PATCH 078/198] Fix a memory leak in case of dead target --- engine/IO/src/luos_phy.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index a39875863..550a54c27 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -438,11 +438,7 @@ _CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) if ((phy_ptr->job[i].msg_pt->header.target == target) && (phy_ptr->job[i].msg_pt->header.target_mode == target_mode)) { // This job is targeting the dead target, remove it from the queue - phy_ptr->job_nb--; - for (int j = i; j < phy_ptr->job_nb; j++) - { - phy_ptr->job[j] = phy_ptr->job[j + 1]; - } + Phy_RmJob(phy_ptr, &phy_ptr->job[i]); } else { From 4399fb0713b597b7380f6235f20e0bedb71cc4bb Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 9 Jun 2023 13:23:08 +0200 Subject: [PATCH 079/198] Separate allocation and referencing of the allocation avoiding memory leak in case of corrupted reception. --- engine/IO/inc/msg_alloc.h | 1 + engine/IO/src/luos_phy.c | 3 ++ engine/IO/src/msg_alloc.c | 15 +++++--- test/tests_io/test_msg_alloc/main.c | 56 ++++++++++++++++++++++++++--- 4 files changed, 66 insertions(+), 9 deletions(-) diff --git a/engine/IO/inc/msg_alloc.h b/engine/IO/inc/msg_alloc.h index 8a99a115b..4f23511c3 100644 --- a/engine/IO/inc/msg_alloc.h +++ b/engine/IO/inc/msg_alloc.h @@ -19,6 +19,7 @@ void MsgAlloc_Loop(void); // Msg buffering functions uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter); +void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter); void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data); error_return_t MsgAlloc_IsEmpty(void); diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 550a54c27..5a59b86fe 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -246,6 +246,9 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) } if (phy_ptr->rx_keep == true) { + // This message is ok we can reference it in the allocator + MsgAlloc_Reference((uint8_t *)phy_ptr->rx_data, (uint8_t)phy_ptr->rx_phy_filter); + // Now we can create a phy_job to dispatch the tx_job later LUOS_ASSERT(phy_ctx.io_job_nb < MAX_MSG_NB); LuosHAL_SetIrqState(false); diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 0e35637c5..906ed3f36 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -344,16 +344,21 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) // We don't have the space to store the message, return NULL to indicate that there is no more space return NULL; } - - // We consider this space as occupied, save its reference into the alloc_slots - alloc_slots[alloc_slot_index].data = returned_ptr; - alloc_slots[alloc_slot_index].phy_filter = phy_filter; - alloc_slot_index++; + // We consider this space as occupied // Move data to the next available space data_ptr = (uint8_t *)((uintptr_t)returned_ptr + data_size); return returned_ptr; } +_CRITICAL void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter) +{ + LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0) && (alloc_slot_index < MAX_MSG_NB)); + // Reference a space into the alloc_slots + alloc_slots[alloc_slot_index].data = rx_data; + alloc_slots[alloc_slot_index].phy_filter = phy_filter; + alloc_slot_index++; +} + /****************************************************************************** * @brief Free a message * @param uint8_t phy_id : id of the phy that free the message diff --git a/test/tests_io/test_msg_alloc/main.c b/test/tests_io/test_msg_alloc/main.c index e2f61a01c..596f2a320 100644 --- a/test/tests_io/test_msg_alloc/main.c +++ b/test/tests_io/test_msg_alloc/main.c @@ -744,9 +744,9 @@ void unittest_MsgAlloc_Alloc() { TEST_ASSERT_EQUAL((i * 8), ((uintptr_t)data) - (uintptr_t)&msg_buffer[0]); } - MsgAlloc_Free(0, (const uint8_t *)data); - // Sort the allocator - MsgAlloc_Loop(); + // MsgAlloc_Free(0, (const uint8_t *)data); + // // Sort the allocator + // MsgAlloc_Loop(); } } CATCH @@ -824,7 +824,54 @@ void unittest_MsgAlloc_Alloc() } } -void unittest_MsgAlloc_IsEmpty() +void unittest_MsgAlloc_Reference(void) +{ + + NEW_TEST_CASE("Check if we assert when we try to reference a message with a bad data and/or no phy"); + { + + memset(alloc_slots, 0, sizeof(alloc_slots)); + TRY + { + MsgAlloc_Reference((uint8_t *)(msg_buffer - 1), 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Reference((uint8_t *)&msg_buffer[MSG_BUFFER_SIZE], 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + TRY + { + MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 0); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + TRY + { + alloc_slot_index = MAX_MSG_NB; + MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + NEW_TEST_CASE("Check normal referencing condition"); + { + TRY + { + alloc_slot_index = 0; + MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); + TEST_ASSERT_EQUAL(&msg_buffer[0], alloc_slots[0].data); + TEST_ASSERT_EQUAL(1, alloc_slot_index); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + +void unittest_MsgAlloc_IsEmpty(void) { NEW_TEST_CASE("Check if we assert when we have more slot than we can handle"); { @@ -969,6 +1016,7 @@ int main(int argc, char **argv) // Generic functions UNIT_TEST_RUN(unittest_MsgAlloc_Loop); UNIT_TEST_RUN(unittest_MsgAlloc_Alloc); + UNIT_TEST_RUN(unittest_MsgAlloc_Reference); UNIT_TEST_RUN(unittest_MsgAlloc_IsEmpty); UNIT_TEST_RUN(unittest_MsgAlloc_Free); From 89fc79d2d9ecf3e3952562341618d1233292ec66 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 14:12:29 +0200 Subject: [PATCH 080/198] Move data_ptr in alloc if there is no space for at least a header. --- engine/IO/src/msg_alloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 906ed3f36..2625b86ba 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -300,7 +300,7 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) if ((uintptr_t)data_ptr % 2 == 1) { data_ptr++; - if (data_ptr == &msg_buffer[MSG_BUFFER_SIZE]) + if ((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - -sizeof(header_t)]) { data_ptr = &msg_buffer[0]; } @@ -347,6 +347,11 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) // We consider this space as occupied // Move data to the next available space data_ptr = (uint8_t *)((uintptr_t)returned_ptr + data_size); + // Move the data_ptr to the begin of the buffer if we don't have space for at least a header + if ((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - sizeof(header_t)]) + { + data_ptr = &msg_buffer[0]; + } return returned_ptr; } From ba1cce500b5c97a0db1231f23777127a8bccb0a5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 16:38:10 +0200 Subject: [PATCH 081/198] Secure job.phy_data initialization avoiding data-race during the creation of the job. --- engine/IO/src/luos_phy.c | 1 + network/robus/src/robus.c | 2 ++ network/robus/src/transmission.c | 26 +++++++++++++++----------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 5a59b86fe..e78e4748f 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -398,6 +398,7 @@ static void Phy_Dispatch(void) phy_job.size = job->size; phy_job.ack = ((job->alloc_msg->header.target_mode == NODEIDACK) || (job->alloc_msg->header.target_mode == SERVICEIDACK)); phy_job.timestamp = Luos_IsMsgTimstamped(job->alloc_msg); + phy_job.phy_data = NULL; // Write the job in the phy queue and get back the pointer to it phy_job_t *job_ptr = Phy_AddJob(&phy_ctx.phy[y], &phy_job); diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index 44ff4edc7..f811cdd37 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -80,7 +80,9 @@ void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) encaps[encaps_index].size = CRC_SIZE; // Save the precomputed encapsulation in the job + LuosHAL_SetIrqState(false); job->phy_data = (void *)&encaps[encaps_index]; + LuosHAL_SetIrqState(true); // Get the next encapsulation index for the next job encaps_index++; diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 45fefe952..405d7f441 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -56,7 +56,6 @@ * Variables ******************************************************************************/ volatile uint8_t nbrRetry = 0; -robus_encaps_t *end = NULL; /******************************************************************************* * Function @@ -129,9 +128,10 @@ _CRITICAL void Transmit_Process() phy_job_t *job = Phy_GetJob(robus_phy); static uint8_t tx_data[sizeof(msg_t) + sizeof(robus_encaps_t)]; // Get the message encapsulation - if ((job != NULL) && (Transmit_GetLockStatus() == false)) + if ((job != NULL) && (Transmit_GetLockStatus() == false) && (job->phy_data != 0)) { - robus_encaps_t *encaps = (robus_encaps_t *)job->phy_data; + LUOS_ASSERT((job->phy_data != NULL) && (job->size != 0) && (job->size < sizeof(msg_t))); + robus_encaps_t *jobEncaps = (robus_encaps_t *)job->phy_data; // We have something to send // Check if we already try to send it multiple times and save it on stats if it is if (nbrRetry >= NBR_RETRY) @@ -174,8 +174,10 @@ _CRITICAL void Transmit_Process() if (!nbrRetry) { // This is the first time we try to send this message, we need to backup the original crc value and the job data to the TX_data buffer - crc_val = encaps->crc; + crc_val = jobEncaps->crc; memcpy(tx_data, job->data_pt, job->size); + // Add the end of the message in the end of the buffer + memcpy(&tx_data[job->size], jobEncaps->unmaped, jobEncaps->size); } // Put timestamping on data here @@ -183,19 +185,20 @@ _CRITICAL void Transmit_Process() { // Convert date to a sendable timestamp and put it on the encapsulation - encaps->timestamp = Phy_ComputeTimestamp(job); + jobEncaps->timestamp = Phy_ComputeTimestamp(job); - encaps->timestamped_crc = ll_crc_compute(encaps->unmaped, sizeof(time_luos_t), crc_val); - encaps->size = sizeof(time_luos_t) + CRC_SIZE; + jobEncaps->timestamped_crc = ll_crc_compute(jobEncaps->unmaped, sizeof(time_luos_t), crc_val); + jobEncaps->size = sizeof(time_luos_t) + CRC_SIZE; + // Add the end of the message in the end of the buffer + memcpy(&tx_data[job->size], jobEncaps->unmaped, jobEncaps->size); } // Transmit data if (Phy_GetJobNbr(robus_phy) != 0) { - // Add the end of the message in the end of the buffer - memcpy(&tx_data[job->size], encaps->unmaped, encaps->size); + LUOS_ASSERT((job->size + jobEncaps->size) >= 9); // We still have something to send, no reset occured - RobusHAL_ComTransmit(tx_data, (job->size + encaps->size)); + RobusHAL_ComTransmit(tx_data, (job->size + jobEncaps->size)); } } } @@ -233,6 +236,7 @@ _CRITICAL void Transmit_End(void) // Remove the job luos_phy_t *robus_phy = Robus_GetPhy(); phy_job_t *job = Phy_GetJob(robus_phy); + job->phy_data = 0; Phy_RmJob(robus_phy, job); } else if (ctx.tx.status == TX_NOK) @@ -241,7 +245,7 @@ _CRITICAL void Transmit_End(void) nbrRetry++; // compute a delay before retry RobusHAL_ResetTimeout(20 * nbrRetry * (Phy_GetNodeId() + 1)); - // Lock the trasmission to be sure no one can send something from this node. + // Lock the trasmission to be sure no one can send something from this node until next timeout. ctx.tx.lock = true; ctx.tx.status = TX_DISABLE; return; From eb234a44fb62caa282b10d1d7e847d09a38e1d2d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 17:04:56 +0200 Subject: [PATCH 082/198] Avoid potential job removal when system have been reseted during a transmission --- network/robus/src/transmission.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 405d7f441..a6df7e588 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -128,7 +128,7 @@ _CRITICAL void Transmit_Process() phy_job_t *job = Phy_GetJob(robus_phy); static uint8_t tx_data[sizeof(msg_t) + sizeof(robus_encaps_t)]; // Get the message encapsulation - if ((job != NULL) && (Transmit_GetLockStatus() == false) && (job->phy_data != 0)) + if ((job != NULL) && (Transmit_GetLockStatus() == false) && (job->phy_data != NULL)) { LUOS_ASSERT((job->phy_data != NULL) && (job->size != 0) && (job->size < sizeof(msg_t))); robus_encaps_t *jobEncaps = (robus_encaps_t *)job->phy_data; @@ -236,8 +236,12 @@ _CRITICAL void Transmit_End(void) // Remove the job luos_phy_t *robus_phy = Robus_GetPhy(); phy_job_t *job = Phy_GetJob(robus_phy); - job->phy_data = 0; - Phy_RmJob(robus_phy, job); + // We may had a reset during this transmission, so we need to check if we still have something to transmit + if (robus_phy->job_nb > 0) + { + job->phy_data = 0; + Phy_RmJob(robus_phy, job); + } } else if (ctx.tx.status == TX_NOK) { From 8b3d34a0ec46a27aa6ef1677f9dc201a1dac5dda Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 17:18:00 +0200 Subject: [PATCH 083/198] Fix phy_data protection --- network/robus/src/transmission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index a6df7e588..6c6d2d35d 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -130,7 +130,7 @@ _CRITICAL void Transmit_Process() // Get the message encapsulation if ((job != NULL) && (Transmit_GetLockStatus() == false) && (job->phy_data != NULL)) { - LUOS_ASSERT((job->phy_data != NULL) && (job->size != 0) && (job->size < sizeof(msg_t))); + LUOS_ASSERT((job->phy_data != NULL) && (job->size != 0) && (job->size <= sizeof(msg_t))); robus_encaps_t *jobEncaps = (robus_encaps_t *)job->phy_data; // We have something to send // Check if we already try to send it multiple times and save it on stats if it is From 4621de79c8d64a2fb72a90da84c120eac8290340 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 17:19:24 +0200 Subject: [PATCH 084/198] Avoid assert in case of corrupted message reception. Properly trash it. --- engine/IO/src/filter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 5e051b6f5..ebfeb537b 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -227,7 +227,9 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) } break; default: - LUOS_ASSERT(0); + // We can be here in case of corrupted message. + // In this case nobody is concerned by this message. + return 0x00; break; } // This concerns Robus only by default From 503222971360c567db111979a21ec038118b76fc Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 18:16:25 +0200 Subject: [PATCH 085/198] Fix daisy chained detection infinite loop due to msg_dispatch recursive call protection. --- engine/IO/src/luos_io.c | 12 ++++++++---- engine/IO/src/luos_phy.c | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 551928653..d1be5b727 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -37,7 +37,7 @@ typedef struct __attribute__((__packed__)) } node_bootstrap_t; static error_return_t LuosIO_StartTopologyDetection(service_t *service); -static error_return_t LuosIO_DetectNextNodes(service_t *service); +static error_return_t LuosIO_DetectNextNodes(service_t *service, bool wait_for_answer); static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); static error_return_t LuosIO_ConsumeMsg(const msg_t *input); static void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); @@ -211,7 +211,7 @@ uint16_t LuosIO_TopologyDetection(service_t *service) // Setup sending service id service->id = 1; - if (LuosIO_DetectNextNodes(service) == FAILED) + if (LuosIO_DetectNextNodes(service, true) == FAILED) { // check the number of retry we made LUOS_ASSERT((redetect_nb <= 4)); @@ -344,7 +344,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) Node_Get()->node_id = node_bootstrap.nodeid; Robus_SaveNodeID(node_bootstrap.prev_nodeid); // Continue the topology detection on our other ports. - LuosIO_DetectNextNodes(service); + LuosIO_DetectNextNodes(service, false); break; default: LUOS_ASSERT(0); @@ -543,7 +543,7 @@ static inline void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *r * @param service pointer to the detecting service * @return None. ******************************************************************************/ -static error_return_t LuosIO_DetectNextNodes(service_t *service) +static error_return_t LuosIO_DetectNextNodes(service_t *service, bool wait_for_answer) { // Lets try to poke other nodes while (Robus_FindNeighbour() == SUCCEED) @@ -557,6 +557,10 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) msg.header.cmd = WRITE_NODE_ID; msg.header.size = 0; Luos_SendMsg(service, &msg); + if (wait_for_answer == false) + { + return SUCCEED; + } // Wait the end of transmission while (Phy_TxAllComplete() == FAILED) ; diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index e78e4748f..ae2528e06 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -322,6 +322,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now allocate it rx_data = MsgAlloc_Alloc(phy_ptr->rx_size, (uint8_t)phy_ptr->rx_phy_filter); phy_ptr->rx_data = rx_data; + // Check if this message is a luos transmission and if allocation succeed if ((phy_ptr == &phy_ctx.phy[0]) && (rx_data == NULL)) { // We don't successfully allocated the message we are trying to send. From b63d8c39221ffe96fe81c957b4f64009f325674a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 12 Jun 2023 19:21:32 +0200 Subject: [PATCH 086/198] !fix corrupted messages --- test/tests_io/test_filter/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index b8ed62c91..c0f1522c0 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -459,7 +459,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = 0x0f; Filter_GetPhyTarget(&header); } - TEST_ASSERT_TRUE(IS_ASSERT()); + TEST_ASSERT_TRUE(!IS_ASSERT()); END_TRY; } From c174d4818088eb68c4ca66268ab1e8286c583d45 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 13 Jun 2023 17:21:25 +0200 Subject: [PATCH 087/198] Modify job management to avoid any job pointer movement allowing to share jobs to functions. --- engine/IO/inc/luos_io.h | 2 +- engine/IO/inc/luos_phy.h | 13 +- engine/IO/src/luos_io.c | 12 +- engine/IO/src/luos_phy.c | 96 +++++++++-- engine/core/src/luos_engine.c | 28 +--- test/tests_io/test_luos_io/main.c | 57 +++---- test/tests_io/test_phy/main.c | 254 +++++++++++++++++++++++------- 7 files changed, 327 insertions(+), 135 deletions(-) diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index 2c8bfb91a..36b24dd0e 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -29,7 +29,7 @@ uint16_t LuosIO_TopologyDetection(service_t *service); error_return_t LuosIO_Send(service_t *service, msg_t *msg); // Job management -error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job); +error_return_t LuosIO_GetNextJob(phy_job_t **job); void LuosIO_RmJob(phy_job_t *job); uint16_t LuosIO_GetJobNb(void); error_return_t LuosIO_TxAllComplete(void); diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index d18987a1f..aca89ffcd 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -51,10 +51,12 @@ typedef struct luos_phy_t phy_target_t rx_phy_filter; // The phy concerned by this message. // *************** TX informations *************** - // Jobs are stores from the newest to the oldest to optimize pulling time allowing to do it in IRQ. - // So adding a job is done by moving all job up and adding the new one at 0, then add 1 to job_nb. - phy_job_t job[MAX_MSG_NB]; // List of phy jobs to send. - uint8_t job_nb; // Number of jobs to send. + // Jobs are used to send messages. during the message send phy may save a job pointer so we cann't move any job in the job list. + // When a job is created we have to guarantee that the job will stay. So we have to manage it as a circular buffer. + phy_job_t job[MAX_MSG_NB]; // List of phy jobs to send. + uint8_t job_nb; // Number of jobs to send. + uint16_t oldest_job_index; // Index of the oldest job. + uint16_t available_job_index; // Index of the next available job. void (*phy_cb)(struct luos_phy_t *phy_ptr, phy_job_t *job); // Callback } luos_phy_t; @@ -74,7 +76,8 @@ uint16_t Phy_GetNodeId(void); // Job management void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead -phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the next job to send. +phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. +phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr); // Use it to get the number of job you currently have to send on your phy_ptr.job list. diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index d1be5b727..b47b93ce3 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -586,13 +586,14 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service, bool wait_for_a * @param job pointer to the job pointer * @return SUCEED if the job is available, FAILED if not. ******************************************************************************/ -error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job) +error_return_t LuosIO_GetNextJob(phy_job_t **job) { LUOS_ASSERT(job != NULL); MSGALLOC_MUTEX_LOCK - if (job_id < luos_phy->job_nb) + phy_job_t *the_job = Phy_GetNextJob(luos_phy, *job); + *job = the_job; + if (the_job != NULL) { - *job = &luos_phy->job[job_id]; MSGALLOC_MUTEX_UNLOCK return SUCCEED; } @@ -607,8 +608,9 @@ error_return_t LuosIO_TryToGetJob(uint16_t job_id, phy_job_t **job) ******************************************************************************/ void LuosIO_RmJob(phy_job_t *job) { - LUOS_ASSERT((job >= luos_phy->job) - && (job < &luos_phy->job[luos_phy->job_nb])); + LUOS_ASSERT((job >= &luos_phy->job[0]) + && (job < &luos_phy->job[MAX_MSG_NB]) + && (job->phy_data != NULL)); // Be sure every service has finished to use this job if (*(service_filter_t *)job->phy_data != 0) { diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index ae2528e06..4263b32a9 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -124,7 +124,9 @@ void Phy_Reset(void) for (uint8_t i = 0; i < phy_ctx.phy_nb; i++) { memset((void *)&phy_ctx.phy[i].job, 0, sizeof(phy_ctx.phy[0].job)); - phy_ctx.phy[i].job_nb = 0; + phy_ctx.phy[i].job_nb = 0; + phy_ctx.phy[i].oldest_job_index = 0; + phy_ctx.phy[i].available_job_index = 0; } } @@ -437,18 +439,22 @@ _CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) uint16_t target_mode = job->msg_pt->header.target_mode; // Remove all job targeting this target on this phy job queue; - int i = 0; - while (i < phy_ptr->job_nb) + + int i = phy_ptr->oldest_job_index; + while (i != phy_ptr->available_job_index) { - if ((phy_ptr->job[i].msg_pt->header.target == target) && (phy_ptr->job[i].msg_pt->header.target_mode == target_mode)) + if (phy_ptr->job[i].msg_pt != NULL) { - // This job is targeting the dead target, remove it from the queue - Phy_RmJob(phy_ptr, &phy_ptr->job[i]); + if ((phy_ptr->job[i].msg_pt->header.target == target) && (phy_ptr->job[i].msg_pt->header.target_mode == target_mode)) + { + // This job is targeting the dead target, remove it from the queue + Phy_RmJob(phy_ptr, &phy_ptr->job[i]); + } } - else + i++; + if (i >= MAX_MSG_NB) { - // Treat the next job - i++; + i = 0; } } } @@ -506,10 +512,17 @@ static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) LUOS_ASSERT((phy_job != NULL) && (phy_ptr != NULL)); LUOS_ASSERT(phy_ptr->job_nb < MAX_MSG_NB); // Add the job to the queue + phy_job_t *returned_job = &phy_ptr->job[phy_ptr->available_job_index]; LuosHAL_SetIrqState(false); - phy_ptr->job[phy_ptr->job_nb++] = *phy_job; + phy_ptr->job[phy_ptr->available_job_index++] = *phy_job; + if (phy_ptr->available_job_index >= MAX_MSG_NB) + { + phy_ptr->available_job_index = 0; + } + LUOS_ASSERT(phy_ptr->available_job_index != phy_ptr->oldest_job_index); + phy_ptr->job_nb++; LuosHAL_SetIrqState(true); - return &phy_ptr->job[phy_ptr->job_nb - 1]; + return returned_job; } /****************************************************************************** @@ -524,7 +537,39 @@ _CRITICAL inline phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr) { return NULL; } - return &phy_ptr->job[0]; + return &phy_ptr->job[phy_ptr->oldest_job_index]; +} + +/****************************************************************************** + * @brief Get the next job from the phy queue + * @param phy_ptr Phy to get the job from + * @return Job pointer + ******************************************************************************/ +_CRITICAL phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job) +{ + LUOS_ASSERT(phy_ptr != NULL); + if (job == NULL) + { + return Phy_GetJob(phy_ptr); + } + if (phy_ptr->job_nb == 0) + { + return NULL; + } + int job_id = Phy_GetJobId(phy_ptr, job); + do + { + job_id++; + if (job_id >= MAX_MSG_NB) + { + job_id = 0; + } + if (job_id == phy_ptr->available_job_index) + { + return NULL; + } + } while (phy_ptr->job[job_id].msg_pt == NULL); + return &phy_ptr->job[job_id]; } /****************************************************************************** @@ -541,6 +586,11 @@ inline int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job) return (((uintptr_t)job - (uintptr_t)phy_ptr->job) / sizeof(phy_job_t)); } +/****************************************************************************** + * @brief Get the phy id from the phy pointer + * @param phy_ptr Phy pointer + * @return Phy id + ******************************************************************************/ inline int Phy_GetPhyId(luos_phy_t *phy_ptr) { LUOS_ASSERT((phy_ptr >= phy_ctx.phy) @@ -564,13 +614,27 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) int phy_index = Phy_GetPhyId(phy_ptr); MsgAlloc_Free(phy_index, job->data_pt); - // Remove the job from the queue + // Clear this job values + memset(job, 0, sizeof(phy_job_t)); + // Remove the job from the list + phy_ptr->job_nb--; uint8_t id = Phy_GetJobId(phy_ptr, job); - for (int i = id; i < phy_ptr->job_nb; i++) + if (id == phy_ptr->oldest_job_index) { - phy_ptr->job[i] = phy_ptr->job[i + 1]; + // We are removing the oldest job + while (phy_ptr->oldest_job_index != phy_ptr->available_job_index) + { + phy_ptr->oldest_job_index++; + if (phy_ptr->oldest_job_index >= MAX_MSG_NB) + { + phy_ptr->oldest_job_index = 0; + } + if (phy_ptr->job[phy_ptr->oldest_job_index].data_pt != NULL) + { + break; + } + } } - phy_ptr->job_nb--; } /****************************************************************************** diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 276d7263c..00faf4fc4 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -59,8 +59,7 @@ void Luos_Init(void) void Luos_Loop(void) { static uint32_t last_loop_date; - uint16_t remaining_job_number = 0; - phy_job_t *job; + phy_job_t *job = NULL; #ifdef WITH_BOOTLOADER // After 3 Luos_Loop, consider this application as safe and write a flag to let the booloader know it can jump to the application safely. @@ -86,18 +85,11 @@ void Luos_Loop(void) LuosIO_Loop(); // Look at all received jobs LUOS_MUTEX_LOCK - while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) + while (LuosIO_GetNextJob(&job) != FAILED) { // We got a job // Try to deliver it to the services - if (Service_Deliver(job) == FAILED) - { - // Some services wasn't able to get this job, they are in polling mode keep it for later. -#ifndef BOOTLOADER - remaining_job_number++; -#endif - } - else + if (Service_Deliver(job) != FAILED) { // Services consume this job. remove it LuosIO_RmJob(job); @@ -207,11 +199,10 @@ static error_return_t Luos_Send(service_t *service, msg_t *msg) error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) { LUOS_ASSERT((msg_to_write != 0) && (service != 0)); - uint8_t service_index = Service_GetIndex(service); - int remaining_job_number = 0; - phy_job_t *job; + uint8_t service_index = Service_GetIndex(service); + phy_job_t *job = NULL; LUOS_MUTEX_LOCK - while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) + while (LuosIO_GetNextJob(&job) != FAILED) { // We got a job // Check if our service is concerned by this job @@ -238,7 +229,6 @@ error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write) LUOS_MUTEX_UNLOCK return SUCCEED; } - remaining_job_number++; } LUOS_MUTEX_UNLOCK return FAILED; @@ -255,11 +245,10 @@ error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_ { LUOS_ASSERT((msg_to_write != 0) && (service != 0) && (id != 0)); - uint16_t remaining_job_number = 0; - phy_job_t *job; + phy_job_t *job = NULL; uint8_t service_index = Service_GetIndex(service); LUOS_MUTEX_LOCK - while (LuosIO_TryToGetJob(remaining_job_number, &job) != FAILED) + while (LuosIO_GetNextJob(&job) != FAILED) { // We got a job // Check if our service is concerned by this job @@ -281,7 +270,6 @@ error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_ LUOS_MUTEX_UNLOCK return SUCCEED; } - remaining_job_number++; } LUOS_MUTEX_UNLOCK return FAILED; diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index f4480ab3a..00dfcc95e 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -844,32 +844,34 @@ void unittest_luosIO_DetectNextNodes() } } -void unittest_luosIO_TryToGetJob() +void unittest_luosIO_GetNextJob() { - NEW_TEST_CASE("Check assert condition for TryToGetJob"); + NEW_TEST_CASE("Check assert condition for GetNextJob"); { TRY { LuosIO_Init(); - LuosIO_TryToGetJob(0, NULL); + LuosIO_GetNextJob(NULL); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; } - NEW_TEST_CASE("Check TryToGetJob"); + NEW_TEST_CASE("Check GetNextJob"); { + LuosIO_Init(); + phy_job_t *job = NULL; + luos_phy->job_nb = 2; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 2; for (uint8_t i = 0; i < 2; i++) { TRY { - LuosIO_Init(); - phy_job_t *job = NULL; - luos_phy->job_nb = 2; luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; - error_return_t returned_val = LuosIO_TryToGetJob(i, &job); + error_return_t returned_val = LuosIO_GetNextJob(&job); TEST_ASSERT_EQUAL(SUCCEED, returned_val); TEST_ASSERT_EQUAL(&msg_buffer[i], job->data_pt); @@ -883,13 +885,7 @@ void unittest_luosIO_TryToGetJob() TRY { - LuosIO_Init(); - phy_job_t *job = NULL; - luos_phy->job_nb = 2; - luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; - luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; - - error_return_t returned_val = LuosIO_TryToGetJob(2, &job); + error_return_t returned_val = LuosIO_GetNextJob(&job); TEST_ASSERT_EQUAL(FAILED, returned_val); TEST_ASSERT_EQUAL(NULL, job); @@ -917,7 +913,9 @@ void unittest_luosIO_RmJob() TRY { LuosIO_Init(); - luos_phy->job_nb = 3; + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; LuosIO_RmJob(&luos_phy->job[luos_phy->job_nb]); } TEST_ASSERT_TRUE(IS_ASSERT()); @@ -929,23 +927,26 @@ void unittest_luosIO_RmJob() TRY { LuosIO_Init(); - service_filter[0] = 0x00; - service_filter[1] = 0x01; - phy_job_t *job = NULL; - luos_phy->job_nb = 2; - luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; - luos_phy->job[0].phy_data = &service_filter[0]; - luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; - luos_phy->job[1].phy_data = &service_filter[1]; + service_filter[0] = 0x00; + service_filter[1] = 0x01; + phy_job_t *job = NULL; + luos_phy->job_nb = 2; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 2; + luos_phy->job[0].data_pt = (uint8_t *)&msg_buffer[0]; + luos_phy->job[0].phy_data = &service_filter[0]; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[1]; + luos_phy->job[1].phy_data = &service_filter[1]; LuosIO_RmJob(&luos_phy->job[0]); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); - TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[1].data_pt); // Job 2 is not removed because service_filter is not equal to 0x00 - LuosIO_RmJob(&luos_phy->job[0]); + LuosIO_RmJob(&luos_phy->job[1]); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); - TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(&msg_buffer[1], luos_phy->job[1].data_pt); } CATCH { @@ -984,7 +985,7 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_luosIO_TransmitLocalRoutingTable); UNIT_TEST_RUN(unittest_luosIO_ConsumeMsg); UNIT_TEST_RUN(unittest_luosIO_DetectNextNodes); - UNIT_TEST_RUN(unittest_luosIO_TryToGetJob); + UNIT_TEST_RUN(unittest_luosIO_GetNextJob); UNIT_TEST_RUN(unittest_luosIO_RmJob); UNIT_TEST_RUN(unittest_luosIO_GetJobNb); diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 0bb767af5..1aab3e2b1 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -337,7 +337,9 @@ void unittest_phy_dispatch() { phy_test_reset(); memset(&luos_phy->job[0], 0, sizeof(phy_job_t)); - luos_phy->job_nb = 0; + luos_phy->job_nb = 0; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 0; // Create a fake job phy_ctx.io_job_nb = 1; @@ -358,6 +360,8 @@ void unittest_phy_dispatch() TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + TEST_ASSERT_EQUAL(0, luos_phy->oldest_job_index); + TEST_ASSERT_EQUAL(1, luos_phy->available_job_index); TEST_ASSERT_EQUAL(&luos_phy->job[0], Luos_handled_job); TEST_ASSERT_EQUAL(&msg_buffer[0], luos_phy->job[0].data_pt); TEST_ASSERT_EQUAL(10, luos_phy->job[0].size); @@ -480,11 +484,13 @@ void unittest_phy_deadTarget() { phy_test_reset(); // Create a fake phy job - luos_phy->job_nb = 1; - luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - msg_t *msg = (msg_t *)msg_buffer; - msg->header.target_mode = NODEIDACK; - msg->header.target = 1; + luos_phy->job_nb = 1; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 1; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); @@ -504,20 +510,24 @@ void unittest_phy_deadTarget() { phy_test_reset(); // Create a fake phy job - luos_phy->job_nb = 3; - luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed - luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; - msg_t *msg = (msg_t *)msg_buffer; - msg->header.target_mode = NODEIDACK; - msg->header.target = 1; + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); - TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[1].data_pt); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[2].data_pt); } CATCH { @@ -529,19 +539,23 @@ void unittest_phy_deadTarget() { phy_test_reset(); // Create a fake phy job - luos_phy->job_nb = 3; - luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - luos_phy->job[1].data_pt = (uint8_t *)msg_buffer; // All jobs should be removed - luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; - msg_t *msg = (msg_t *)msg_buffer; - msg->header.target_mode = NODEIDACK; - msg->header.target = 1; + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)msg_buffer; // All jobs should be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + TEST_ASSERT_EQUAL(3, luos_phy->oldest_job_index); + TEST_ASSERT_EQUAL(3, luos_phy->available_job_index); } CATCH { @@ -558,19 +572,23 @@ void unittest_phy_deadTarget() memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); // Create a fake phy job - luos_phy->job_nb = 3; - luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed - luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; - msg_t *msg = (msg_t *)msg_buffer; - msg->header.target_mode = NODEIDACK; - msg->header.target = 1; + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; + luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed + luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; + msg_t *msg = (msg_t *)msg_buffer; + msg->header.target_mode = NODEIDACK; + msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); - TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[0].data_pt); + TEST_ASSERT_EQUAL(&msg_buffer[20], luos_phy->job[1].data_pt); + TEST_ASSERT_EQUAL(NULL, luos_phy->job[2].data_pt); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(false, Luos_get_deadTarget); @@ -1085,7 +1103,7 @@ void unittest_phy_ComputeTimestamp() msg->data[0] = 0xAE; volatile time_luos_t timestamp = TimeOD_TimeFrom_ns(10); - memcpy(&msg->data[msg->header.size], ×tamp, sizeof(time_luos_t)); + memcpy(&msg->data[msg->header.size], (void *)×tamp, sizeof(time_luos_t)); volatile time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); @@ -1167,10 +1185,14 @@ void unittest_phy_AddJob() TRY { phy_job_t phy_job; - luos_phy->job_nb = 3; - phy_job_t *resulting_job = Phy_AddJob(luos_phy, &phy_job); + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + phy_job_t *resulting_job = Phy_AddJob(luos_phy, &phy_job); TEST_ASSERT_EQUAL(&luos_phy->job[3], resulting_job); TEST_ASSERT_EQUAL(4, luos_phy->job_nb); + TEST_ASSERT_EQUAL(4, luos_phy->available_job_index); + TEST_ASSERT_EQUAL(0, luos_phy->oldest_job_index); } CATCH { @@ -1196,8 +1218,10 @@ void unittest_phy_GetJob() { TRY { - luos_phy->job_nb = 0; - phy_job_t *resulting_job = Phy_GetJob(luos_phy); + luos_phy->job_nb = 0; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 0; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); TEST_ASSERT_EQUAL(NULL, resulting_job); TEST_ASSERT_EQUAL(0, luos_phy->job_nb); } @@ -1208,8 +1232,10 @@ void unittest_phy_GetJob() TRY { - luos_phy->job_nb = 1; - phy_job_t *resulting_job = Phy_GetJob(luos_phy); + luos_phy->job_nb = 1; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 1; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); } @@ -1220,8 +1246,10 @@ void unittest_phy_GetJob() TRY { - luos_phy->job_nb = 3; - phy_job_t *resulting_job = Phy_GetJob(luos_phy); + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + phy_job_t *resulting_job = Phy_GetJob(luos_phy); TEST_ASSERT_EQUAL(&luos_phy->job[0], resulting_job); TEST_ASSERT_EQUAL(3, luos_phy->job_nb); } @@ -1232,6 +1260,74 @@ void unittest_phy_GetJob() } } +void unittest_phy_GetNextJob() +{ + NEW_TEST_CASE("Check GetNextJob assertion conditions"); + { + TRY + { + luos_phy->job_nb = 0; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 0; + phy_job_t *job = NULL; + phy_job_t *resulting_job = Phy_GetNextJob(NULL, job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + } + + NEW_TEST_CASE("Check GetNextJob normal conditions"); + { + TRY + { + luos_phy->job_nb = 0; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 0; + phy_job_t *job = NULL; + job = Phy_GetNextJob(luos_phy, job); + TEST_ASSERT_EQUAL(NULL, job); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + phy_job_t *job = NULL; + TRY + { + luos_phy->job_nb = 1; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 1; + luos_phy->job[0].msg_pt = &msg_buffer[0]; + job = Phy_GetNextJob(luos_phy, job); + TEST_ASSERT_EQUAL(&luos_phy->job[0], job); + TEST_ASSERT_EQUAL(1, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + + TRY + { + luos_phy->job_nb = 3; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 3; + luos_phy->job[0].msg_pt = &msg_buffer[0]; + luos_phy->job[1].msg_pt = &msg_buffer[1]; + luos_phy->job[2].msg_pt = &msg_buffer[2]; + job = Phy_GetNextJob(luos_phy, job); + TEST_ASSERT_EQUAL(&luos_phy->job[1], job); + TEST_ASSERT_EQUAL(3, luos_phy->job_nb); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + } +} + void unittest_phy_GetJobId() { NEW_TEST_CASE("Check GetJobId assertion conditions"); @@ -1379,12 +1475,14 @@ void unittest_phy_RmJob() TRY { - for (int i = 0; i < PHY_NB; i++) + for (int i = 0; i < MAX_MSG_NB - 1; i++) { - luos_phy->job_nb = i + 1; - luos_phy->job[i].data_pt = (uint8_t *)&msg_buffer[i]; + luos_phy->job_nb = 1; + luos_phy->oldest_job_index = i; + luos_phy->available_job_index = i + 1; + luos_phy->job[i].data_pt = (uint8_t *)&msg_buffer[i]; Phy_RmJob(luos_phy, &luos_phy->job[i]); - TEST_ASSERT_EQUAL(i, luos_phy->job_nb); + TEST_ASSERT_EQUAL(0, luos_phy->job_nb); TEST_ASSERT_EQUAL(NULL, luos_phy->job[i].data_pt); } } @@ -1392,22 +1490,47 @@ void unittest_phy_RmJob() { TEST_ASSERT_TRUE(false); } + } +} - TRY +void unittest_add_and_remove_jobs(void) +{ + NEW_TEST_CASE("Try to add and remove jobs massively"); + { + Phy_Init(); + for (int i = 0; i < MAX_MSG_NB - 1; i++) { - for (int i = 0; i < PHY_NB - 1; i++) + for (int y = 0; y <= i; y++) { - luos_phy->job_nb = i + 2; - luos_phy->job[i].data_pt = (uint8_t *)&msg_buffer[i]; - luos_phy->job[i + 1].data_pt = (uint8_t *)&msg_buffer[i + 1]; - Phy_RmJob(luos_phy, &luos_phy->job[i]); - TEST_ASSERT_EQUAL(i + 1, luos_phy->job_nb); - TEST_ASSERT_EQUAL(&msg_buffer[i + 1], luos_phy->job[i].data_pt); + phy_job_t job; + job.data_pt = (uint8_t *)&msg_buffer[0]; + Phy_AddJob(luos_phy, &job); + TEST_ASSERT_EQUAL(y + 1, luos_phy->job_nb); + } + for (int y = 0; y <= i; y++) + { + phy_job_t *job_get = Phy_GetJob(luos_phy); + Phy_RmJob(luos_phy, job_get); + TEST_ASSERT_EQUAL(i - y, luos_phy->job_nb); + } + for (int y = 0; y <= i; y++) + { + phy_job_t job; + job.data_pt = (uint8_t *)&msg_buffer[0]; + Phy_AddJob(luos_phy, &job); + TEST_ASSERT_EQUAL(y + 1, luos_phy->job_nb); + } + for (int y = i; y >= 0; y--) + { + uint16_t get_id = luos_phy->oldest_job_index + y; + if (get_id >= MAX_MSG_NB) + { + get_id -= MAX_MSG_NB; + } + phy_job_t *job_get = &luos_phy->job[get_id]; + Phy_RmJob(luos_phy, job_get); + TEST_ASSERT_EQUAL(y, luos_phy->job_nb); } - } - CATCH - { - TEST_ASSERT_TRUE(false); } } } @@ -1448,9 +1571,14 @@ void unittest_phy_TxAllComplete() { TRY { - luos_phy->job_nb = 1; - robus_phy->job_nb = 1; - error_return_t result = Phy_TxAllComplete(); + luos_phy->job_nb = 1; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 1; + robus_phy->job_nb = 1; + robus_phy->oldest_job_index = 0; + robus_phy->available_job_index = 1; + phy_ctx.phy_nb = 2; + error_return_t result = Phy_TxAllComplete(); TEST_ASSERT_EQUAL(FAILED, result); } CATCH @@ -1460,9 +1588,13 @@ void unittest_phy_TxAllComplete() TRY { - luos_phy->job_nb = 0; - robus_phy->job_nb = 1; - error_return_t result = Phy_TxAllComplete(); + luos_phy->job_nb = 0; + luos_phy->oldest_job_index = 0; + luos_phy->available_job_index = 0; + robus_phy->job_nb = 1; + robus_phy->oldest_job_index = 0; + robus_phy->available_job_index = 1; + error_return_t result = Phy_TxAllComplete(); TEST_ASSERT_EQUAL(FAILED, result); } CATCH @@ -1498,9 +1630,11 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_phy_GetNodeId); UNIT_TEST_RUN(unittest_phy_AddJob); UNIT_TEST_RUN(unittest_phy_GetJob); + UNIT_TEST_RUN(unittest_phy_GetNextJob); UNIT_TEST_RUN(unittest_phy_GetJobId); UNIT_TEST_RUN(unittest_phy_GetPhyId); UNIT_TEST_RUN(unittest_phy_RmJob); + UNIT_TEST_RUN(unittest_add_and_remove_jobs); UNIT_TEST_RUN(unittest_phy_GetJobNbr); UNIT_TEST_RUN(unittest_phy_TxAllComplete); From 2000d4bb1d675d4c729a643c5b05ba6d1fde99ee Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 13 Jun 2023 17:21:59 +0200 Subject: [PATCH 088/198] Clear auto-refresh when we clear service IDs. --- engine/core/src/service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 2abbb0f6f..16ec1a777 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -107,7 +107,10 @@ void Service_ClearId(void) { for (uint16_t i = 0; i < service_ctx.number; i++) { - service_ctx.list[i].id = DEFAULTID; + service_ctx.list[i].id = DEFAULTID; + service_ctx.list[i].auto_refresh.target = 0; + service_ctx.list[i].auto_refresh.time_ms = 0; + service_ctx.list[i].auto_refresh.last_update = 0; } } From 4323a23e6cf05a463a6d71573022bafac8208036 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 15 Jun 2023 11:18:22 +0200 Subject: [PATCH 089/198] Modify aloc slots management avoiding pointer movement and limiting IRQ disabling. --- engine/IO/src/luos_phy.c | 2 +- engine/IO/src/msg_alloc.c | 137 +++---- test/tests_io/test_luos_io/main.c | 17 - test/tests_io/test_msg_alloc/main.c | 548 ++++++++++++---------------- test/tests_io/test_phy/main.c | 14 +- 5 files changed, 296 insertions(+), 422 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 4263b32a9..c98f6c5d0 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -367,7 +367,7 @@ static void Phy_Dispatch(void) { static bool running = false; int i = 0; - if (running) + if ((running) || (phy_ctx.io_job_nb == 0)) { return; } diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 2625b86ba..57f19e589 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -66,16 +66,15 @@ memory_stats_t *mem_stat = NULL; volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; /*!< Memory space used to save and alloc messages. */ volatile uint8_t *data_ptr; /*!< Pointer to the next data able to be written into msgbuffer. */ -alloc_slot_t alloc_slots[MAX_MSG_NB]; /*!< Slots used to save the index of the first byte of a message. */ -volatile uint16_t alloc_slot_index; /*!< Index of the next slot able to be written. */ +alloc_slot_t alloc_slots[MAX_MSG_NB]; /*!< Slots used to save the index of the first byte of a message. */ +volatile uint8_t alloc_nb; // Number of referenced allocations. +volatile uint16_t oldest_alloc_slot; // Index of the oldest allocation. +volatile uint16_t available_alloc_slot; // Index of the next available allocation slot. /******************************************************************************* * Functions ******************************************************************************/ -// Pack allocated messages -static inline void MsgAlloc_SlotPack(void); - // msg buffering _CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(const void *to); @@ -85,9 +84,6 @@ static inline error_return_t MsgAlloc_CheckMsgSpace(const void *from, const void // Available buffer space evaluation static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void); -// Find get the oldest message -_CRITICAL static inline uint8_t *MsgAlloc_GetOldestMsg(void); - /******************************************************************************* * Functions --> generic ******************************************************************************/ @@ -101,8 +97,10 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** LuosHAL_SetIrqState(false); - data_ptr = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; memset((void *)alloc_slots, 0, sizeof(alloc_slots)); LuosHAL_SetIrqState(true); if (memory_stats != NULL) @@ -118,8 +116,6 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) ******************************************************************************/ void MsgAlloc_Loop(void) { - // Pack the list of allocated messages - MsgAlloc_SlotPack(); // Compute buffer occupation rate uint8_t stat = 0; stat = (uint8_t)(((MSG_BUFFER_SIZE - MsgAlloc_BufferAvailableSpaceComputation()) * 100) / (MSG_BUFFER_SIZE)); @@ -129,46 +125,6 @@ void MsgAlloc_Loop(void) } } -/****************************************************************************** - * @brief re-organize the list of allocated messages - * @param None - * @return None - ******************************************************************************/ -static inline void MsgAlloc_SlotPack(void) -{ - LUOS_ASSERT(alloc_slot_index <= MAX_MSG_NB); - // Pack the list of allocated messages - uint16_t i = 0; - uint16_t decay = 0; - LuosHAL_SetIrqState(false); - for (i = 0; i < alloc_slot_index; i++) - { - if (alloc_slots[i].data == 0) - { - decay++; - } - else - { - if (decay == 0) - { - continue; - } - if (i < MAX_MSG_NB) - { - alloc_slots[i - decay] = alloc_slots[i]; - alloc_slots[i].data = 0; - } - else - { - - alloc_slots[i - decay].data = 0; - } - } - } - alloc_slot_index -= decay; - LuosHAL_SetIrqState(true); -} - /****************************************************************************** * @brief compute remaing space on msg_buffer. * @param None @@ -180,12 +136,14 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) LUOS_ASSERT(((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)data_ptr < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); LuosHAL_SetIrqState(false); - uint8_t *oldest_msg = MsgAlloc_GetOldestMsg(); + uint8_t *oldest_msg = alloc_slots[oldest_alloc_slot].data; + uint8_t *data_ptr_snapshot = (uint8_t *)data_ptr; + LuosHAL_SetIrqState(true); if (oldest_msg != NULL) { LUOS_ASSERT(((uintptr_t)oldest_msg >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); // There is some tasks - if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr) + if ((uintptr_t)oldest_msg > (uintptr_t)data_ptr_snapshot) { // The oldest task is between `data_ptr` and the end of the buffer // msg_buffer @@ -197,8 +155,7 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // | | // data_ptr oldest_msg // - stack_free_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr; - LuosHAL_SetIrqState(true); + stack_free_space = (uintptr_t)oldest_msg - (uintptr_t)data_ptr_snapshot; } else { @@ -214,45 +171,17 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) // | | // oldest_msg data_ptr // - stack_free_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr); - LuosHAL_SetIrqState(true); + stack_free_space = ((uintptr_t)oldest_msg - (uintptr_t)&msg_buffer[0]) + ((uintptr_t)&msg_buffer[MSG_BUFFER_SIZE] - (uintptr_t)data_ptr_snapshot); } } else { // There is nothing allocated stack_free_space = MSG_BUFFER_SIZE; - LuosHAL_SetIrqState(true); } return stack_free_space; } -/****************************************************************************** - * @brief update the new oldest message if we need to - * @param removed_msg : the freshly oldest removed message of the stack - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline uint8_t *MsgAlloc_GetOldestMsg(void) -{ - LUOS_ASSERT(alloc_slot_index <= MAX_MSG_NB); - // Get the oldest message - if (alloc_slot_index == 0) - { - // There is no message allocated - return NULL; - } - for (int i = 0; i < alloc_slot_index; i++) - { - if (alloc_slots[i].data != NULL) - { - return alloc_slots[i].data; - } - } - // There is no message allocated - return NULL; -} - /******************************************************************************* * Functions --> msg buffering ******************************************************************************/ @@ -357,11 +286,16 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) _CRITICAL void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter) { - LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0) && (alloc_slot_index < MAX_MSG_NB)); + LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0) && (alloc_nb < MAX_MSG_NB)); // Reference a space into the alloc_slots - alloc_slots[alloc_slot_index].data = rx_data; - alloc_slots[alloc_slot_index].phy_filter = phy_filter; - alloc_slot_index++; + alloc_slots[available_alloc_slot].data = rx_data; + alloc_slots[available_alloc_slot].phy_filter = phy_filter; + alloc_nb++; + available_alloc_slot++; + if (available_alloc_slot >= MAX_MSG_NB) + { + available_alloc_slot = 0; + } } /****************************************************************************** @@ -375,7 +309,8 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) { LUOS_ASSERT(data != NULL); // Find the slot where the data is stored - for (int i = 0; i < alloc_slot_index; i++) + int i = oldest_alloc_slot; + while (i != available_alloc_slot) { if (alloc_slots[i].data == data) { @@ -389,9 +324,26 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) { // This message is not used anymore, free it alloc_slots[i].data = NULL; + alloc_nb--; + if (i == oldest_alloc_slot) + { + do + { + oldest_alloc_slot++; + if (oldest_alloc_slot >= MAX_MSG_NB) + { + oldest_alloc_slot = 0; + } + } while ((alloc_slots[oldest_alloc_slot].data == NULL) && (oldest_alloc_slot != available_alloc_slot)); + } } return; } + i++; + if (i >= MAX_MSG_NB) + { + i = 0; + } } // If you pass here, the message have been freed already. // You probably are in detection and the reset detection reseted the allocator before this free. @@ -404,8 +356,7 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) ******************************************************************************/ error_return_t MsgAlloc_IsEmpty(void) { - LUOS_ASSERT(alloc_slot_index <= MSG_BUFFER_SIZE); - if (alloc_slot_index == 0) + if (alloc_nb == 0) { return SUCCEED; } @@ -428,7 +379,7 @@ static inline error_return_t MsgAlloc_CheckMsgSpace(const void *from, const void && ((uintptr_t)from < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE]) && ((uintptr_t)to >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)to < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); - uint8_t *oldest_msg = MsgAlloc_GetOldestMsg(); + uint8_t *oldest_msg = alloc_slots[oldest_alloc_slot].data; if ((((uintptr_t)oldest_msg >= (uintptr_t)from) && ((uintptr_t)oldest_msg <= (uintptr_t)to))) { // FAILED CASES : diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index 00dfcc95e..cf59f4685 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -51,21 +51,6 @@ void unittest_luosIO_init() void unittest_luosIO_loop() { - NEW_TEST_CASE("Check that allocation treatment is done in loop"); - { - TRY - { - LuosIO_Init(); - alloc_slot_index = 3; - LuosIO_Loop(); - TEST_ASSERT_EQUAL(0, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } NEW_TEST_CASE("Check that phy treatment is done in loop"); { @@ -387,7 +372,6 @@ void unittest_luosIO_ConsumeMsg() msg_t msg; luosIO_reset_overlap_callback(); phy_ctx.io_job_nb = 3; - alloc_slot_index = 3; Node_SetState(DETECTION_OK); service_ctx.list[0].id = 1; service_ctx.list[1].id = 2; @@ -400,7 +384,6 @@ void unittest_luosIO_ConsumeMsg() // Check received message content TEST_ASSERT_EQUAL(SUCCEED, ret_val); TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); - TEST_ASSERT_EQUAL(0, alloc_slot_index); TEST_ASSERT_EQUAL(EXTERNAL_DETECTION, Node_GetState()); } CATCH diff --git a/test/tests_io/test_msg_alloc/main.c b/test/tests_io/test_msg_alloc/main.c index 596f2a320..e50b30156 100644 --- a/test/tests_io/test_msg_alloc/main.c +++ b/test/tests_io/test_msg_alloc/main.c @@ -1,215 +1,6 @@ #include "unit_test.h" #include "../src/msg_alloc.c" -void unittest_SlotPack(void) -{ - uint8_t data = 0; - // This funciton should reorganize the buffer to pack the messages - // Create a already organized buffer with a random data - - NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); - { - alloc_slot_index = MAX_MSG_NB + 1; - TRY - { - MsgAlloc_SlotPack(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check if an already organized buffer is not modified"); - { - TRY - { - alloc_slots[0].data = &data; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = &data; - alloc_slots[4].data = 0; - alloc_slot_index = 4; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check if an unorganized buffer is organized"); - { - TRY - { - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[7].data = 0; - alloc_slot_index = 8; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(0, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(3, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check how it's managing the buffer to it's limits"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = 0; - alloc_slots[1].data = &data; - alloc_slots[2].data = &data; - alloc_slots[3].data = 0; - alloc_slots[4].data = 0; - alloc_slots[5].data = 0; - alloc_slots[6].data = &data; - alloc_slots[MAX_MSG_NB - 1].data = &data; - alloc_slot_index = MAX_MSG_NB; - MsgAlloc_SlotPack(); - TEST_ASSERT_EQUAL(&data, alloc_slots[0].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[1].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[2].data); - TEST_ASSERT_EQUAL(&data, alloc_slots[3].data); - TEST_ASSERT_EQUAL(0, alloc_slots[4].data); - TEST_ASSERT_EQUAL(0, alloc_slots[5].data); - TEST_ASSERT_EQUAL(0, alloc_slots[6].data); - TEST_ASSERT_EQUAL(0, alloc_slots[7].data); - TEST_ASSERT_EQUAL(0, alloc_slots[MAX_MSG_NB - 1].data); - TEST_ASSERT_EQUAL(4, alloc_slot_index); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - -void unittest_GetOldestMsg(void) -{ - NEW_TEST_CASE("Check if we assert when allocating more than the buffer size"); - { - alloc_slot_index = MAX_MSG_NB + 1; - TRY - { - MsgAlloc_GetOldestMsg(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check the behavior if we dont have any message"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - TEST_ASSERT_EQUAL(0, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the first slot"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slot_index = 1; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in another place"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[3].data = (uint8_t *)0x1; - alloc_slot_index = 4; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x1; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Check the behavior if we have a message in the last slot and the first one"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)0x1; - alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)0x2; - alloc_slot_index = MAX_MSG_NB; - TEST_ASSERT_EQUAL((uint8_t *)0x1, MsgAlloc_GetOldestMsg()); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - void unittest_BufferAvailableSpaceComputation(void) { // This computation is based on the computed oldest message and the data ptr @@ -251,8 +42,10 @@ void unittest_BufferAvailableSpaceComputation(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - data_ptr = (uint8_t *)&msg_buffer[0]; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; + data_ptr = (uint8_t *)&msg_buffer[0]; TEST_ASSERT_EQUAL(MSG_BUFFER_SIZE, MsgAlloc_BufferAvailableSpaceComputation()); } CATCH @@ -266,9 +59,11 @@ void unittest_BufferAvailableSpaceComputation(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = (uint8_t *)&msg_buffer[0]; TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); } CATCH @@ -282,9 +77,11 @@ void unittest_BufferAvailableSpaceComputation(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; TEST_ASSERT_EQUAL(20, MsgAlloc_BufferAvailableSpaceComputation()); } CATCH @@ -298,9 +95,11 @@ void unittest_BufferAvailableSpaceComputation(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; TEST_ASSERT_EQUAL(10, MsgAlloc_BufferAvailableSpaceComputation()); } CATCH @@ -402,7 +201,9 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); } CATCH @@ -416,8 +217,10 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); } CATCH @@ -431,8 +234,13 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); } CATCH @@ -446,8 +254,10 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); } CATCH @@ -461,8 +271,10 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); } CATCH @@ -476,8 +288,10 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); } CATCH @@ -536,8 +350,10 @@ void unittest_MsgAlloc_Loop() { // Buffer occupation from 0 -> 100% NEW_STEP("Check buffer is full in all cases"); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) { data_ptr = &msg_buffer[i]; @@ -593,8 +409,10 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; - data_ptr = &msg_buffer[0]; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; + data_ptr = &msg_buffer[0]; TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -608,9 +426,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[10]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[10]; TEST_ASSERT_EQUAL(&msg_buffer[10], MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -624,10 +444,12 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 2; - data_ptr = &msg_buffer[20]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 2; + oldest_alloc_slot = 0; + available_alloc_slot = 2; + data_ptr = &msg_buffer[20]; TEST_ASSERT_EQUAL(&msg_buffer[20], MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -641,9 +463,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; TEST_ASSERT_EQUAL(&msg_buffer[0], MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -657,9 +481,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[5]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[5]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -673,9 +499,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -689,15 +517,19 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -711,9 +543,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[1]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[1]; TEST_ASSERT_EQUAL(&msg_buffer[2], MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -728,9 +562,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = 0; - alloc_slot_index = 0; - data_ptr = &msg_buffer[0]; + alloc_slots[0].data = 0; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[0]; for (i = 0; i < 600; i++) { volatile uint8_t *data; @@ -760,9 +596,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[0]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[0]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -773,9 +611,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[2]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[2]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -786,9 +626,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -799,9 +641,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[0]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[0]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(11, 0x01)); } CATCH @@ -812,9 +656,11 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; - data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; TEST_ASSERT_EQUAL(0, MsgAlloc_Alloc(10, 0x01)); } CATCH @@ -849,7 +695,9 @@ void unittest_MsgAlloc_Reference(void) END_TRY; TRY { - alloc_slot_index = MAX_MSG_NB; + alloc_nb = MAX_MSG_NB; + oldest_alloc_slot = 0; + available_alloc_slot = MAX_MSG_NB; MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); } TEST_ASSERT_TRUE(IS_ASSERT()); @@ -859,10 +707,12 @@ void unittest_MsgAlloc_Reference(void) { TRY { - alloc_slot_index = 0; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); TEST_ASSERT_EQUAL(&msg_buffer[0], alloc_slots[0].data); - TEST_ASSERT_EQUAL(1, alloc_slot_index); + TEST_ASSERT_EQUAL(1, alloc_nb); } CATCH { @@ -873,24 +723,14 @@ void unittest_MsgAlloc_Reference(void) void unittest_MsgAlloc_IsEmpty(void) { - NEW_TEST_CASE("Check if we assert when we have more slot than we can handle"); - { - TRY - { - memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = MSG_BUFFER_SIZE + 1; - MsgAlloc_IsEmpty(); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - NEW_TEST_CASE("Check if we return succed when we have no message"); { TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); } CATCH @@ -904,8 +744,10 @@ void unittest_MsgAlloc_IsEmpty(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_slot_index = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); } CATCH @@ -934,7 +776,9 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x01; - alloc_slot_index = 1; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); } TEST_ASSERT_TRUE(IS_ASSERT()); @@ -946,8 +790,13 @@ void unittest_MsgAlloc_Free(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_slot_index = 0; + alloc_nb = 0; + oldest_alloc_slot = 0; + available_alloc_slot = 0; MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_nb); + TEST_ASSERT_EQUAL(0, oldest_alloc_slot); + TEST_ASSERT_EQUAL(0, available_alloc_slot); } CATCH { @@ -963,11 +812,14 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x01; - alloc_slot_index = 1; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL(0, alloc_slots[0].data); TEST_ASSERT_EQUAL(0, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); + TEST_ASSERT_EQUAL(1, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); } CATCH { @@ -983,15 +835,103 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x03; - alloc_slot_index = 1; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); TEST_ASSERT_EQUAL(0x02, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); + TEST_ASSERT_EQUAL(1, alloc_nb); + TEST_ASSERT_EQUAL(0, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL(0, alloc_slots[0].data); TEST_ASSERT_EQUAL(0x00, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_slot_index); + TEST_ASSERT_EQUAL(0, alloc_nb); + TEST_ASSERT_EQUAL(1, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + NEW_TEST_CASE("Try to free a message that is not the oldest one."); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[0].phy_filter = 0x01; + alloc_slots[1].data = (uint8_t *)&msg_buffer[1]; + alloc_slots[1].phy_filter = 0x01; + alloc_nb = 2; + oldest_alloc_slot = 0; + available_alloc_slot = 2; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); + TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); + TEST_ASSERT_EQUAL(1, alloc_nb); + TEST_ASSERT_EQUAL(0, oldest_alloc_slot); + TEST_ASSERT_EQUAL(2, available_alloc_slot); + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_slots[0].data); + TEST_ASSERT_EQUAL(0, alloc_nb); + TEST_ASSERT_EQUAL(2, oldest_alloc_slot); + TEST_ASSERT_EQUAL(2, available_alloc_slot); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Try to free a message that is not the oldest one with a buffer loop."); + { + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[MAX_MSG_NB - 1].phy_filter = 0x01; + alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; + alloc_slots[0].phy_filter = 0x01; + alloc_nb = 2; + oldest_alloc_slot = MAX_MSG_NB - 1; + available_alloc_slot = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); + TEST_ASSERT_EQUAL(1, alloc_nb); + TEST_ASSERT_EQUAL(MAX_MSG_NB - 1, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(0, alloc_nb); + TEST_ASSERT_EQUAL(1, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + + TRY + { + memset(alloc_slots, 0, sizeof(alloc_slots)); + alloc_slots[MAX_MSG_NB - 1].data = (uint8_t *)&msg_buffer[0]; + alloc_slots[MAX_MSG_NB - 1].phy_filter = 0x01; + alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; + alloc_slots[0].phy_filter = 0x01; + alloc_nb = 2; + oldest_alloc_slot = MAX_MSG_NB - 1; + available_alloc_slot = 1; + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); + TEST_ASSERT_EQUAL(1, alloc_nb); + TEST_ASSERT_EQUAL(0, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); + MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); + TEST_ASSERT_EQUAL(0, alloc_nb); + TEST_ASSERT_EQUAL(1, oldest_alloc_slot); + TEST_ASSERT_EQUAL(1, available_alloc_slot); } CATCH { @@ -1007,8 +947,6 @@ int main(int argc, char **argv) // Static functions - UNIT_TEST_RUN(unittest_SlotPack); - UNIT_TEST_RUN(unittest_GetOldestMsg); UNIT_TEST_RUN(unittest_BufferAvailableSpaceComputation); UNIT_TEST_RUN(unittest_DoWeHaveSpaceUntilBufferEnd); UNIT_TEST_RUN(unittest_CheckMsgSpace); diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 1aab3e2b1..7eb7bc92e 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -246,8 +246,10 @@ void unittest_phy_alloc() memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); // Put a fake message in allocation - alloc_slot_index = 1; - alloc_slots[0].data = (uint8_t *)&msg_buffer[7]; + alloc_nb = 1; + oldest_alloc_slot = 0; + available_alloc_slot = 1; + alloc_slots[0].data = (uint8_t *)&msg_buffer[7]; TRY { phy_test_reset(); @@ -1299,7 +1301,7 @@ void unittest_phy_GetNextJob() luos_phy->job_nb = 1; luos_phy->oldest_job_index = 0; luos_phy->available_job_index = 1; - luos_phy->job[0].msg_pt = &msg_buffer[0]; + luos_phy->job[0].data_pt = (const uint8_t *)&msg_buffer[0]; job = Phy_GetNextJob(luos_phy, job); TEST_ASSERT_EQUAL(&luos_phy->job[0], job); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); @@ -1314,9 +1316,9 @@ void unittest_phy_GetNextJob() luos_phy->job_nb = 3; luos_phy->oldest_job_index = 0; luos_phy->available_job_index = 3; - luos_phy->job[0].msg_pt = &msg_buffer[0]; - luos_phy->job[1].msg_pt = &msg_buffer[1]; - luos_phy->job[2].msg_pt = &msg_buffer[2]; + luos_phy->job[0].data_pt = (const uint8_t *)&msg_buffer[0]; + luos_phy->job[1].data_pt = (const uint8_t *)&msg_buffer[1]; + luos_phy->job[2].data_pt = (const uint8_t *)&msg_buffer[2]; job = Phy_GetNextJob(luos_phy, job); TEST_ASSERT_EQUAL(&luos_phy->job[1], job); TEST_ASSERT_EQUAL(3, luos_phy->job_nb); From 89ba9a0bc52d02f5e1ef1dd5f0710bc53b0ab1a8 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 16 Jun 2023 10:46:54 +0200 Subject: [PATCH 090/198] Secure detection start occuring durring a transmission --- engine/IO/src/luos_io.c | 9 +++++++++ network/robus/src/robus.c | 2 ++ network/robus/src/transmission.c | 8 +++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index b47b93ce3..1134d0c96 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -259,6 +259,15 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) Phy_Reset(); // Wait 2ms to be sure all previous messages are received and treated by other nodes uint32_t start_tick = LuosHAL_GetSystick(); + while (LuosHAL_GetSystick() - start_tick < 2) + ; + // Resend the message just to be sure that no other messages were revceived during the reset. + Luos_SendMsg(service, &msg); + // Wait until message is actually transmitted + while (Phy_TxAllComplete() != SUCCEED) + ; + // Wait 2ms to be sure all previous messages are received and treated by other nodes + start_tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - start_tick < 2) ; try_nbr++; diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index f811cdd37..ce8ddf1ae 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -113,6 +113,8 @@ void Robus_SaveNodeID(uint16_t nodeid) void Robus_ResetNodeID(void) { PortMng_Init(); + Recep_Reset(); + Transmit_Init(); } /****************************************************************************** diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 6c6d2d35d..4e9e5f137 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -74,6 +74,8 @@ void Transmit_Init(void) ctx.tx.collision = false; // Init Tx status ctx.tx.status = TX_DISABLE; + // Init the transmission retry counter + nbrRetry = 0; } /****************************************************************************** * @brief Transmit an ACK @@ -194,12 +196,16 @@ _CRITICAL void Transmit_Process() } // Transmit data - if (Phy_GetJobNbr(robus_phy) != 0) + if (Phy_GetJob(robus_phy) == job) { LUOS_ASSERT((job->size + jobEncaps->size) >= 9); // We still have something to send, no reset occured RobusHAL_ComTransmit(tx_data, (job->size + jobEncaps->size)); } + else + { + nbrRetry = 0; + } } } } From db157789fc10358863845193bb61ee425f55bf46 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 16 Jun 2023 10:48:58 +0200 Subject: [PATCH 091/198] Secure job and alloc slot management from dataraces and reduce IRQ off time --- engine/IO/src/luos_io.c | 2 ++ engine/IO/src/luos_phy.c | 35 +++++++++------------ engine/IO/src/msg_alloc.c | 26 ++++++++-------- test/tests_io/test_msg_alloc/main.c | 48 ----------------------------- test/tests_io/test_phy/main.c | 1 - 5 files changed, 30 insertions(+), 82 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 1134d0c96..ec15c1f28 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -163,6 +163,7 @@ error_return_t LuosIO_Send(service_t *service, msg_t *msg) luos_phy->received_data = sizeof(header_t); luos_phy->rx_keep = true; // Tell phy that we want to keep this message Phy_ComputeHeader(luos_phy); + LUOS_ASSERT(luos_phy->rx_keep == true); // The header computation give us how many byte we need to have. // Just update the received data to the full message size. luos_phy->received_data = luos_phy->rx_size; @@ -271,6 +272,7 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) while (LuosHAL_GetSystick() - start_tick < 2) ; try_nbr++; + } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); // Reinit our node id Node_Get()->node_id = 0; diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index c98f6c5d0..757e08276 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -254,15 +254,17 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) // Now we can create a phy_job to dispatch the tx_job later LUOS_ASSERT(phy_ctx.io_job_nb < MAX_MSG_NB); LuosHAL_SetIrqState(false); - phy_ctx.io_job[phy_ctx.io_job_nb].timestamp = phy_ptr->rx_timestamp; - phy_ctx.io_job[phy_ctx.io_job_nb].alloc_msg = (msg_t *)phy_ptr->rx_data; - phy_ctx.io_job[phy_ctx.io_job_nb].phy_filter = phy_ptr->rx_phy_filter; - phy_ctx.io_job[phy_ctx.io_job_nb].size = phy_ptr->rx_size; - phy_ctx.io_job_nb++; + uint16_t my_job = phy_ctx.io_job_nb++; + LuosHAL_SetIrqState(true); + // Now copy the data in the job + phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; + phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; + phy_ctx.io_job[my_job].phy_filter = phy_ptr->rx_phy_filter; + phy_ctx.io_job[my_job].size = phy_ptr->rx_size; + // Then reset the phy to receive the next message phy_ptr->rx_data = phy_ptr->rx_buffer_base; phy_ptr->received_data = 0; - LuosHAL_SetIrqState(true); } } @@ -324,18 +326,17 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now allocate it rx_data = MsgAlloc_Alloc(phy_ptr->rx_size, (uint8_t)phy_ptr->rx_phy_filter); phy_ptr->rx_data = rx_data; + LuosHAL_SetIrqState(true); // Check if this message is a luos transmission and if allocation succeed if ((phy_ptr == &phy_ctx.phy[0]) && (rx_data == NULL)) { // We don't successfully allocated the message we are trying to send. // return and the transmitter will be able to wait to get more space... - LuosHAL_SetIrqState(true); phy_ptr->rx_keep = false; return; } LUOS_ASSERT(rx_data != NULL); // Assert if the allocation failed. We don't allow to loose a message comming from outside. // Job is done - LuosHAL_SetIrqState(true); copy_from = (void *)phy_ptr->rx_buffer_base; // Now we can copy the data already received @@ -346,15 +347,8 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) } else { - LuosHAL_SetIrqState(false); - if (phy_ptr->rx_alloc_job) - { - // Job is done - phy_ptr->rx_alloc_job = false; - LuosHAL_SetIrqState(true); - return; - } - LuosHAL_SetIrqState(true); + // We don't want to keep it so we don't allocate it. + phy_ptr->rx_alloc_job = false; } } @@ -512,16 +506,17 @@ static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) LUOS_ASSERT((phy_job != NULL) && (phy_ptr != NULL)); LUOS_ASSERT(phy_ptr->job_nb < MAX_MSG_NB); // Add the job to the queue - phy_job_t *returned_job = &phy_ptr->job[phy_ptr->available_job_index]; LuosHAL_SetIrqState(false); - phy_ptr->job[phy_ptr->available_job_index++] = *phy_job; + phy_job_t *returned_job = &phy_ptr->job[phy_ptr->available_job_index++]; if (phy_ptr->available_job_index >= MAX_MSG_NB) { phy_ptr->available_job_index = 0; } LUOS_ASSERT(phy_ptr->available_job_index != phy_ptr->oldest_job_index); - phy_ptr->job_nb++; LuosHAL_SetIrqState(true); + phy_ptr->job_nb++; + // Copy the actual job data to the allocated job + *returned_job = *phy_job; return returned_job; } diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 57f19e589..13bed5337 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -67,7 +67,6 @@ volatile uint8_t msg_buffer[MSG_BUFFER_SIZE]; /*!< Memory space used to save and volatile uint8_t *data_ptr; /*!< Pointer to the next data able to be written into msgbuffer. */ alloc_slot_t alloc_slots[MAX_MSG_NB]; /*!< Slots used to save the index of the first byte of a message. */ -volatile uint8_t alloc_nb; // Number of referenced allocations. volatile uint16_t oldest_alloc_slot; // Index of the oldest allocation. volatile uint16_t available_alloc_slot; // Index of the next available allocation slot. @@ -98,7 +97,6 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) //******** Init global vars pointers ********** LuosHAL_SetIrqState(false); data_ptr = (uint8_t *)&msg_buffer[0]; - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; memset((void *)alloc_slots, 0, sizeof(alloc_slots)); @@ -139,6 +137,7 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) uint8_t *oldest_msg = alloc_slots[oldest_alloc_slot].data; uint8_t *data_ptr_snapshot = (uint8_t *)data_ptr; LuosHAL_SetIrqState(true); + if (oldest_msg != NULL) { LUOS_ASSERT(((uintptr_t)oldest_msg >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)oldest_msg < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); @@ -221,6 +220,7 @@ _CRITICAL static inline error_return_t MsgAlloc_DoWeHaveSpaceUntilBufferEnd(cons ******************************************************************************/ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) { + // This function is always called with IRQ disabled. LUOS_ASSERT((data_size > 0) && (phy_filter != 0) && (data_size <= MSG_BUFFER_SIZE)); @@ -229,11 +229,8 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) if ((uintptr_t)data_ptr % 2 == 1) { data_ptr++; - if ((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE - -sizeof(header_t)]) - { - data_ptr = &msg_buffer[0]; - } } + // Check if we have space for the message if (MsgAlloc_DoWeHaveSpaceUntilBufferEnd((void *)(data_ptr + data_size)) == FAILED) { @@ -286,16 +283,18 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) _CRITICAL void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter) { - LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0) && (alloc_nb < MAX_MSG_NB)); + LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0)); // Reference a space into the alloc_slots - alloc_slots[available_alloc_slot].data = rx_data; - alloc_slots[available_alloc_slot].phy_filter = phy_filter; - alloc_nb++; - available_alloc_slot++; + LuosHAL_SetIrqState(false); + uint16_t my_slot = available_alloc_slot++; if (available_alloc_slot >= MAX_MSG_NB) { available_alloc_slot = 0; } + LUOS_ASSERT(available_alloc_slot != oldest_alloc_slot); + LuosHAL_SetIrqState(true); + alloc_slots[my_slot].data = rx_data; + alloc_slots[my_slot].phy_filter = phy_filter; } /****************************************************************************** @@ -318,13 +317,13 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) // Remove the phy_id from the phy_filter // Assert if this phy have already been freed LUOS_ASSERT(alloc_slots[i].phy_filter & (0x01 << phy_id)); + LuosHAL_SetIrqState(false); alloc_slots[i].phy_filter &= ~(0x01 << phy_id); // Check if the phy_filter is empty if (alloc_slots[i].phy_filter == 0) { // This message is not used anymore, free it alloc_slots[i].data = NULL; - alloc_nb--; if (i == oldest_alloc_slot) { do @@ -337,6 +336,7 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) } while ((alloc_slots[oldest_alloc_slot].data == NULL) && (oldest_alloc_slot != available_alloc_slot)); } } + LuosHAL_SetIrqState(true); return; } i++; @@ -356,7 +356,7 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) ******************************************************************************/ error_return_t MsgAlloc_IsEmpty(void) { - if (alloc_nb == 0) + if (oldest_alloc_slot == available_alloc_slot) { return SUCCEED; } diff --git a/test/tests_io/test_msg_alloc/main.c b/test/tests_io/test_msg_alloc/main.c index e50b30156..91abc1be7 100644 --- a/test/tests_io/test_msg_alloc/main.c +++ b/test/tests_io/test_msg_alloc/main.c @@ -42,7 +42,6 @@ void unittest_BufferAvailableSpaceComputation(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; data_ptr = (uint8_t *)&msg_buffer[0]; @@ -60,7 +59,6 @@ void unittest_BufferAvailableSpaceComputation(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = (uint8_t *)&msg_buffer[0]; @@ -78,7 +76,6 @@ void unittest_BufferAvailableSpaceComputation(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; @@ -96,7 +93,6 @@ void unittest_BufferAvailableSpaceComputation(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; @@ -201,7 +197,6 @@ void unittest_CheckMsgSpace(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); @@ -218,7 +213,6 @@ void unittest_CheckMsgSpace(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[9])); @@ -235,10 +229,8 @@ void unittest_CheckMsgSpace(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[11], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); @@ -255,7 +247,6 @@ void unittest_CheckMsgSpace(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); @@ -272,7 +263,6 @@ void unittest_CheckMsgSpace(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[0], (uint8_t *)&msg_buffer[10])); @@ -289,7 +279,6 @@ void unittest_CheckMsgSpace(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_CheckMsgSpace((uint8_t *)&msg_buffer[10], (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 1])); @@ -351,7 +340,6 @@ void unittest_MsgAlloc_Loop() // Buffer occupation from 0 -> 100% NEW_STEP("Check buffer is full in all cases"); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; for (uint16_t i = 1; i < MSG_BUFFER_SIZE; i++) @@ -409,7 +397,6 @@ void unittest_MsgAlloc_Alloc() TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; data_ptr = &msg_buffer[0]; @@ -427,7 +414,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[10]; @@ -446,7 +432,6 @@ void unittest_MsgAlloc_Alloc() memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[1].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 2; oldest_alloc_slot = 0; available_alloc_slot = 2; data_ptr = &msg_buffer[20]; @@ -464,7 +449,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; @@ -482,7 +466,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[5]; @@ -500,7 +483,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 5]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 7]; @@ -518,7 +500,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; @@ -526,7 +507,6 @@ void unittest_MsgAlloc_Alloc() memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 5]; @@ -544,7 +524,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[1]; @@ -563,7 +542,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = 0; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[0]; @@ -597,7 +575,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[0]; @@ -612,7 +589,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[2]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[2]; @@ -627,7 +603,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 2 - (MSG_BUFFER_SIZE % 2)]; @@ -642,7 +617,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[10]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[0]; @@ -657,7 +631,6 @@ void unittest_MsgAlloc_Alloc() { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; data_ptr = &msg_buffer[MSG_BUFFER_SIZE - 8]; @@ -695,7 +668,6 @@ void unittest_MsgAlloc_Reference(void) END_TRY; TRY { - alloc_nb = MAX_MSG_NB; oldest_alloc_slot = 0; available_alloc_slot = MAX_MSG_NB; MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); @@ -707,12 +679,10 @@ void unittest_MsgAlloc_Reference(void) { TRY { - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; MsgAlloc_Reference((uint8_t *)&msg_buffer[0], 1); TEST_ASSERT_EQUAL(&msg_buffer[0], alloc_slots[0].data); - TEST_ASSERT_EQUAL(1, alloc_nb); } CATCH { @@ -728,7 +698,6 @@ void unittest_MsgAlloc_IsEmpty(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; TEST_ASSERT_EQUAL(SUCCEED, MsgAlloc_IsEmpty()); @@ -745,7 +714,6 @@ void unittest_MsgAlloc_IsEmpty(void) { memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; TEST_ASSERT_EQUAL(FAILED, MsgAlloc_IsEmpty()); @@ -776,7 +744,6 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x01; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); @@ -790,11 +757,9 @@ void unittest_MsgAlloc_Free(void) TRY { memset(alloc_slots, 0, sizeof(alloc_slots)); - alloc_nb = 0; oldest_alloc_slot = 0; available_alloc_slot = 0; MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL(0, alloc_nb); TEST_ASSERT_EQUAL(0, oldest_alloc_slot); TEST_ASSERT_EQUAL(0, available_alloc_slot); } @@ -812,7 +777,6 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x01; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); @@ -835,19 +799,16 @@ void unittest_MsgAlloc_Free(void) memset(alloc_slots, 0, sizeof(alloc_slots)); alloc_slots[0].data = (uint8_t *)&msg_buffer[0]; alloc_slots[0].phy_filter = 0x03; - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); TEST_ASSERT_EQUAL(0x02, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(1, alloc_nb); TEST_ASSERT_EQUAL(0, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); MsgAlloc_Free(1, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL(0, alloc_slots[0].data); TEST_ASSERT_EQUAL(0x00, alloc_slots[0].phy_filter); - TEST_ASSERT_EQUAL(0, alloc_nb); TEST_ASSERT_EQUAL(1, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); } @@ -866,17 +827,14 @@ void unittest_MsgAlloc_Free(void) alloc_slots[0].phy_filter = 0x01; alloc_slots[1].data = (uint8_t *)&msg_buffer[1]; alloc_slots[1].phy_filter = 0x01; - alloc_nb = 2; oldest_alloc_slot = 0; available_alloc_slot = 2; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); TEST_ASSERT_EQUAL((uint8_t *)&msg_buffer[0], alloc_slots[0].data); - TEST_ASSERT_EQUAL(1, alloc_nb); TEST_ASSERT_EQUAL(0, oldest_alloc_slot); TEST_ASSERT_EQUAL(2, available_alloc_slot); MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); TEST_ASSERT_EQUAL(0, alloc_slots[0].data); - TEST_ASSERT_EQUAL(0, alloc_nb); TEST_ASSERT_EQUAL(2, oldest_alloc_slot); TEST_ASSERT_EQUAL(2, available_alloc_slot); } @@ -896,15 +854,12 @@ void unittest_MsgAlloc_Free(void) alloc_slots[MAX_MSG_NB - 1].phy_filter = 0x01; alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; alloc_slots[0].phy_filter = 0x01; - alloc_nb = 2; oldest_alloc_slot = MAX_MSG_NB - 1; available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); - TEST_ASSERT_EQUAL(1, alloc_nb); TEST_ASSERT_EQUAL(MAX_MSG_NB - 1, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL(0, alloc_nb); TEST_ASSERT_EQUAL(1, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); } @@ -921,15 +876,12 @@ void unittest_MsgAlloc_Free(void) alloc_slots[MAX_MSG_NB - 1].phy_filter = 0x01; alloc_slots[0].data = (uint8_t *)&msg_buffer[1]; alloc_slots[0].phy_filter = 0x01; - alloc_nb = 2; oldest_alloc_slot = MAX_MSG_NB - 1; available_alloc_slot = 1; MsgAlloc_Free(0, (uint8_t *)&msg_buffer[0]); - TEST_ASSERT_EQUAL(1, alloc_nb); TEST_ASSERT_EQUAL(0, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); MsgAlloc_Free(0, (uint8_t *)&msg_buffer[1]); - TEST_ASSERT_EQUAL(0, alloc_nb); TEST_ASSERT_EQUAL(1, oldest_alloc_slot); TEST_ASSERT_EQUAL(1, available_alloc_slot); } diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 7eb7bc92e..bc2098a0d 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -246,7 +246,6 @@ void unittest_phy_alloc() memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); // Put a fake message in allocation - alloc_nb = 1; oldest_alloc_slot = 0; available_alloc_slot = 1; alloc_slots[0].data = (uint8_t *)&msg_buffer[7]; From db962742c52c24aa55fab7bf0d79d6eccacf3033 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 16 Jun 2023 19:51:29 +0200 Subject: [PATCH 092/198] bootloader cleanup --- engine/IO/src/luos_io.c | 5 +- engine/bootloader/bootloader_core.c | 221 ++++++++++++++-------------- engine/bootloader/bootloader_core.h | 1 - test/tests_io/test_luos_io/main.c | 2 +- 4 files changed, 113 insertions(+), 116 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index ec15c1f28..b975a774d 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -514,9 +514,8 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; //**************************************** bootloader section **************************************** case BOOTLOADER_CMD: - // send data to the bootloader - LuosBootloader_MsgHandler(input); - return SUCCEED; + // TODO add here the bootloader command used in application avoiding to include bootloader files. + return FAILED; break; default: diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/bootloader_core.c index 0a90dc5a7..d0d4c13ac 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/bootloader_core.c @@ -24,7 +24,6 @@ /******************************************************************************* * Variables ******************************************************************************/ -static bootloader_cmd_t bootloader_cmd; #ifdef BOOTLOADER // variables use to save binary data in flash @@ -38,7 +37,6 @@ uint16_t residual_space = (uint16_t)BUFFER_SIZE; uint32_t nb_bytes = 0; uint8_t crc = 0; bool load_flag = false; -uint16_t source_id = 0; // used to save source_id, ie gate_id uint32_t tickstart = 0; #ifndef BOOTLOADER_UPDATER @@ -57,8 +55,9 @@ static inline uint8_t LuosBootloader_IsEnoughSpace(uint32_t); static inline void LuosBootloader_EraseMemory(void); static inline void LuosBootloader_ProcessData(void); static inline void LuosBootloader_SaveLastData(void); -static void LuosBootloader_SendResponse(bootloader_cmd_t); -static void LuosBootloader_SendCrc(bootloader_cmd_t, uint8_t); +static void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, bootloader_cmd_t response); +static void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, bootloader_cmd_t, uint8_t); +static void LuosBootloader_MsgHandler(service_t *service, const msg_t *input); #endif /****************************************************************************** @@ -91,9 +90,9 @@ void LuosBootloader_Init(void) { revision_t version = {.major = 2, .minor = 0, .build = 0}; #ifdef BOOTLOADER_UPDATER - Luos_CreateService(0, VOID_TYPE, "boot_updater", version); + Luos_CreateService(LuosBootloader_MsgHandler, VOID_TYPE, "boot_updater", version); #else - Luos_CreateService(0, VOID_TYPE, "boot_service", version); + Luos_CreateService(LuosBootloader_MsgHandler, VOID_TYPE, "boot_service", version); #endif // set ID node saved in flash @@ -315,7 +314,7 @@ uint8_t compute_crc(void) * @param data : The crc value * @return None ******************************************************************************/ -void LuosBootloader_SendCrc(bootloader_cmd_t response, uint8_t data) +void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, bootloader_cmd_t response, uint8_t data) { msg_t ready_msg; ready_msg.header.cmd = BOOTLOADER_RESP; @@ -328,7 +327,7 @@ void LuosBootloader_SendCrc(bootloader_cmd_t response, uint8_t data) uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) ; - Luos_SendMsg(0, &ready_msg); + Luos_SendMsg(service, &ready_msg); } /****************************************************************************** @@ -336,7 +335,7 @@ void LuosBootloader_SendCrc(bootloader_cmd_t response, uint8_t data) * @param response : The type of crc message * @return None ******************************************************************************/ -void LuosBootloader_SendResponse(bootloader_cmd_t response) +void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, bootloader_cmd_t response) { msg_t ready_msg; ready_msg.header.cmd = BOOTLOADER_RESP; @@ -348,7 +347,7 @@ void LuosBootloader_SendResponse(bootloader_cmd_t response) uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) ; - Luos_SendMsg(0, &ready_msg); + Luos_SendMsg(service, &ready_msg); } /****************************************************************************** @@ -363,115 +362,115 @@ void LuosBootloader_Loop(void) /****************************************************************************** * @brief Message handler called from luos library + * @param service : Pointer to the service which received the message * @param input : Pointer to message received from luos network * @return None ******************************************************************************/ -void LuosBootloader_MsgHandler(const msg_t *input) +void LuosBootloader_MsgHandler(service_t *service, const msg_t *input) { - bootloader_cmd = input->data[0]; - - switch (bootloader_cmd) + if (input->header.cmd == BOOTLOADER_CMD) { + switch (input->data[0]) + { #ifdef WITH_BOOTLOADER - case BOOTLOADER_START: - // We're in the app, - // set bootloader mode, save node ID and reboot - LuosBootloader_JumpToBootloader(); - break; + case BOOTLOADER_START: + // We're in the app, + // set bootloader mode, save node ID and reboot + LuosBootloader_JumpToBootloader(); + break; #endif #ifdef BOOTLOADER - // we're in the bootloader, - // process cmd and data - case BOOTLOADER_READY: - source_id = input->header.source; - bootloader_data_size = input->header.size - 2 * sizeof(char); - Luos_Subscribe(0, (uint16_t)input->data[1]); - memcpy(bootloader_data, &(input->data[2]), bootloader_data_size); - - LuosHAL_SetMode((uint8_t)BOOT_MODE); - - // save binary length - memcpy(&nb_bytes, &bootloader_data[0], sizeof(uint32_t)); - // check free space in flash - if (LuosBootloader_IsEnoughSpace(nb_bytes) == SUCCEED) - { - // send READY response - LuosBootloader_SendResponse(BOOTLOADER_READY_RESP); - } - else - { - // send ERROR response - LuosBootloader_SendResponse(BOOTLOADER_ERROR_SIZE); - } - break; - - case BOOTLOADER_ERASE: - // erase flash memory - LuosBootloader_EraseMemory(); - // reset load flag - load_flag = false; - // send ERASE response - LuosBootloader_SendResponse(BOOTLOADER_ERASE_RESP); - break; - - case BOOTLOADER_BIN_CHUNK: - source_id = input->header.source; - bootloader_data_size = input->header.size - sizeof(char); - memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); - - // handle binary data - LuosBootloader_ProcessData(); - // send ack to the Host - LuosBootloader_SendResponse(BOOTLOADER_BIN_CHUNK_RESP); - break; - - case BOOTLOADER_BIN_END: - source_id = input->header.source; - bootloader_data_size = input->header.size - sizeof(char); - memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); - - // save the current page in flash memory - LuosBootloader_SaveLastData(); - // send ack to the Host - LuosBootloader_SendResponse(BOOTLOADER_BIN_END_RESP); - break; - - case BOOTLOADER_CRC_TEST: - crc = compute_crc(); - // send ack to the Host - LuosBootloader_SendCrc(BOOTLOADER_CRC_RESP, crc); - break; - - case BOOTLOADER_APP_SAVED: - // set load flag - load_flag = true; - Luos_Unsubscribe(0, input->header.target); - break; - - case BOOTLOADER_STOP: - // wait for the command to be send to all nodes - tickstart = LuosHAL_GetSystick(); - while ((LuosHAL_GetSystick() - tickstart) < 1000) - ; - // save bootloader mode in flash - if (load_flag || (LuosBootloader_GetMode() == APP_RELOAD_MODE)) - { - // boot the application programmed in dedicated flash partition - LuosBootloader_DeInit(); - LuosBootloader_JumpToApp(); - } - else - { - // reboot the node - LuosHAL_Reboot(); - } - break; + // we're in the bootloader, + // process cmd and data + case BOOTLOADER_READY: + bootloader_data_size = input->header.size - 2 * sizeof(char); + Luos_Subscribe(service, (uint16_t)input->data[1]); + memcpy(bootloader_data, &(input->data[2]), bootloader_data_size); // why? + + LuosHAL_SetMode((uint8_t)BOOT_MODE); + + // save binary length + memcpy(&nb_bytes, &bootloader_data[0], sizeof(uint32_t)); + // check free space in flash + if (LuosBootloader_IsEnoughSpace(nb_bytes) == SUCCEED) + { + // send READY response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_READY_RESP); + } + else + { + // send ERROR response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERROR_SIZE); + } + break; + + case BOOTLOADER_ERASE: + // erase flash memory + LuosBootloader_EraseMemory(); + // reset load flag + load_flag = false; + // send ERASE response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERASE_RESP); + break; + + case BOOTLOADER_BIN_CHUNK: + bootloader_data_size = input->header.size - sizeof(char); + memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); + + // handle binary data + LuosBootloader_ProcessData(); + + // send ack to the Host + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_CHUNK_RESP); + break; + + case BOOTLOADER_BIN_END: + bootloader_data_size = input->header.size - sizeof(char); + memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); + + // save the current page in flash memory + LuosBootloader_SaveLastData(); + // send ack to the Host + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_END_RESP); + break; + + case BOOTLOADER_CRC_TEST: + crc = compute_crc(); + // send ack to the Host + LuosBootloader_SendCrc(service, input->header.source, BOOTLOADER_CRC_RESP, crc); + break; + + case BOOTLOADER_APP_SAVED: + // set load flag + load_flag = true; + Luos_Unsubscribe(service, input->header.target); + break; + + case BOOTLOADER_STOP: + // wait for the command to be send to all nodes + tickstart = LuosHAL_GetSystick(); + while ((LuosHAL_GetSystick() - tickstart) < 1000) + ; + // save bootloader mode in flash + if (load_flag || (LuosBootloader_GetMode() == APP_RELOAD_MODE)) + { + // boot the application programmed in dedicated flash partition + LuosBootloader_DeInit(); + LuosBootloader_JumpToApp(); + } + else + { + // reboot the node + LuosHAL_Reboot(); + } + break; #endif - case BOOTLOADER_RESET: - LuosHAL_SetMode((uint8_t)BOOT_MODE); - LuosHAL_Reboot(); - break; - default: - break; + case BOOTLOADER_RESET: + LuosHAL_SetMode((uint8_t)BOOT_MODE); + LuosHAL_Reboot(); + break; + default: + break; + } } } diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/bootloader_core.h index 2f2d7f949..5cb68e47c 100644 --- a/engine/bootloader/bootloader_core.h +++ b/engine/bootloader/bootloader_core.h @@ -64,7 +64,6 @@ void LuosBootloader_Loop(void); /****************************************************************************** * @brief function used by Luos to send message to the bootloader ******************************************************************************/ -void LuosBootloader_MsgHandler(const msg_t *input); #ifndef BOOTLOADER void LuosBootloader_JumpToBootloader(void); #endif diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index cf59f4685..114566a53 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -785,7 +785,7 @@ void unittest_luosIO_ConsumeMsg() error_return_t ret_val = LuosIO_ConsumeMsg(&msg); // Check received message content - TEST_ASSERT_EQUAL(SUCCEED, ret_val); + TEST_ASSERT_EQUAL(FAILED, ret_val); } CATCH { From ae735549345640934d9648ab52900862076cf10b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 20 Jun 2023 19:44:53 +0200 Subject: [PATCH 093/198] Separate Robus and Update detection allowing up to 254 phy with 254 port each. --- engine/IO/inc/_luos_phy.h | 5 +- engine/IO/inc/luos_io.h | 3 +- engine/IO/inc/luos_phy.h | 57 +---- engine/IO/inc/struct_phy.h | 59 +++++ engine/IO/src/filter.c | 4 +- engine/IO/src/luos_io.c | 237 +++++++++--------- engine/IO/src/luos_phy.c | 183 +++++++++++++- engine/OD/od_control.h | 1 + engine/OD/od_pid.h | 1 + engine/core/inc/luos.h | 4 +- engine/core/inc/node.h | 9 +- engine/core/inc/routing_table.h | 4 +- engine/core/inc/struct_luos.h | 4 +- engine/core/src/node.c | 23 ++ engine/core/src/routing_table.c | 19 +- engine/engine_config.h | 16 +- .../apps/alarm_controller/alarm_controller.h | 1 + .../biometric-security/biometric_security.h | 3 +- .../apps/start_controller/start_controller.h | 1 + .../Arduino/bldc_simple_foc/node_config.h | 1 + .../Arduino/bldc_simple_foc/src/SimpleFOC.cpp | 2 + .../Arduino/button/lib/button/button.h | 1 + .../projects/Arduino/button/node_config.h | 1 + .../projects/Arduino/button/src/Button.cpp | 2 + .../fingerprint/lib/Fingerprint/fingerprint.h | 3 +- .../lib/Fingerprint/fingerprint_drv.h | 3 +- .../Arduino/fingerprint/node_config.h | 1 + .../Arduino/fingerprint/src/Fingerprint.cpp | 2 + .../Arduino/gate_serialcom/node_config.h | 1 + .../gate_serialcom/src/Gate_SerialCom.cpp | 2 + .../Arduino/inspector_serialcom/node_config.h | 1 + .../src/Inspector_SerialCom.cpp | 2 + examples/projects/Arduino/lcd/lib/Lcd/lcd.h | 1 + examples/projects/Arduino/lcd/node_config.h | 1 + examples/projects/Arduino/lcd/src/Lcd.cpp | 2 + examples/projects/Arduino/led/lib/led/led.h | 1 + examples/projects/Arduino/led/node_config.h | 1 + examples/projects/Arduino/led/src/led.cpp | 2 + .../servo_motor/lib/Servo_motor/servo_drv.h | 3 +- .../Arduino/servo_motor/node_config.h | 1 + .../Arduino/servo_motor/src/Servo_motor.cpp | 2 + .../Arduino/stepper_simple_foc/node_config.h | 1 + .../stepper_simple_foc/src/SimpleFOC.cpp | 2 + .../projects/ESP32/button/lib/button/button.h | 1 + examples/projects/ESP32/button/node_config.h | 1 + examples/projects/ESP32/button/src/main.c | 2 + .../ESP32/button_arduino/lib/button/button.h | 1 + .../ESP32/button_arduino/node_config.h | 1 + .../ESP32/button_arduino/src/main.cpp | 2 + .../ESP32/gate_serialcom/node_config.h | 1 + .../projects/ESP32/gate_serialcom/src/main.c | 2 + .../gate_serialcom_arduino/node_config.h | 1 + .../ESP32/gate_serialcom_arduino/src/main.cpp | 2 + .../projects/ESP32/gate_wscom/node_config.h | 1 + examples/projects/ESP32/gate_wscom/src/main.c | 2 + .../ESP32/gate_wscom_arduino/node_config.h | 1 + .../ESP32/gate_wscom_arduino/src/main.cpp | 2 + examples/projects/ESP32/led/lib/led/led.h | 1 + examples/projects/ESP32/led/node_config.h | 1 + examples/projects/ESP32/led/src/main.c | 4 +- .../barometer/lib/barometer/BMP280.h | 3 +- .../NUCLEO-F072RB/barometer/node_config.h | 1 + .../NUCLEO-F072RB/barometer/src/main.c | 2 + .../NUCLEO-F072RB/bootloader/node_config.h | 1 + .../NUCLEO-F072RB/bootloader/src/main.c | 4 + .../NUCLEO-F072RB/button/node_config.h | 1 + .../projects/NUCLEO-F072RB/button/src/main.c | 2 + .../dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + .../NUCLEO-F072RB/dc_motor/node_config.h | 1 + .../NUCLEO-F072RB/dc_motor/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-F072RB/gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../NUCLEO-F072RB/potentiometer/node_config.h | 1 + .../NUCLEO-F072RB/potentiometer/src/main.c | 2 + .../NUCLEO-F401RE/bootloader/node_config.h | 1 + .../NUCLEO-F401RE/bootloader/src/main.c | 3 + .../NUCLEO-F401RE/button/lib/Button/button.h | 1 + .../NUCLEO-F401RE/button/node_config.h | 1 + .../projects/NUCLEO-F401RE/button/src/main.c | 2 + .../dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + .../NUCLEO-F401RE/dc_motor/node_config.h | 1 + .../NUCLEO-F401RE/dc_motor/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-F401RE/gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../projects/NUCLEO-F401RE/led/lib/Led/led.h | 1 + .../led/lib/alias_save/alias_save.c | 3 +- .../projects/NUCLEO-F401RE/led/node_config.h | 1 + .../projects/NUCLEO-F401RE/led/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../NUCLEO-F401RE/potentiometer/node_config.h | 1 + .../NUCLEO-F401RE/potentiometer/src/main.c | 2 + .../NUCLEO-F410RB/bootloader/node_config.h | 1 + .../NUCLEO-F410RB/bootloader/src/main.c | 3 + .../NUCLEO-F410RB/button/lib/Button/button.h | 1 + .../NUCLEO-F410RB/button/node_config.h | 1 + .../projects/NUCLEO-F410RB/button/src/main.c | 2 + .../dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + .../NUCLEO-F410RB/dc_motor/node_config.h | 1 + .../NUCLEO-F410RB/dc_motor/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-F410RB/gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../projects/NUCLEO-F410RB/led/lib/Led/led.h | 1 + .../projects/NUCLEO-F410RB/led/node_config.h | 1 + .../projects/NUCLEO-F410RB/led/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../NUCLEO-F410RB/potentiometer/node_config.h | 1 + .../NUCLEO-F410RB/potentiometer/src/main.c | 2 + .../NUCLEO-G431KB/bootloader/node_config.h | 1 + .../NUCLEO-G431KB/bootloader/src/main.c | 4 + .../NUCLEO-G431KB/button/lib/Button/button.h | 1 + .../NUCLEO-G431KB/button/node_config.h | 1 + .../projects/NUCLEO-G431KB/button/src/main.c | 2 + .../dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + .../NUCLEO-G431KB/dc_motor/node_config.h | 1 + .../NUCLEO-G431KB/dc_motor/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-G431KB/gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../NUCLEO-G431KB/potentiometer/node_config.h | 1 + .../NUCLEO-G431KB/potentiometer/src/main.c | 2 + .../NUCLEO-G474RE/bootloader/node_config.h | 1 + .../NUCLEO-G474RE/bootloader/src/main.c | 4 + .../NUCLEO-G474RE/button/lib/Button/button.h | 1 + .../NUCLEO-G474RE/button/node_config.h | 1 + .../projects/NUCLEO-G474RE/button/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-G474RE/gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../NUCLEO-L073RZ/bootloader/node_config.h | 1 + .../NUCLEO-L073RZ/bootloader/src/main.c | 4 + .../NUCLEO-L073RZ/button/node_config.h | 1 + .../projects/NUCLEO-L073RZ/button/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-L073RZ/gate_serialcom/src/main.c | 2 + .../NUCLEO-L432KC/bootloader/node_config.h | 1 + .../NUCLEO-L432KC/bootloader/src/main.c | 4 + .../NUCLEO-L432KC/button/lib/Button/button.h | 1 + .../NUCLEO-L432KC/button/node_config.h | 1 + .../projects/NUCLEO-L432KC/button/src/main.c | 2 + .../dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + .../NUCLEO-L432KC/dc_motor/node_config.h | 1 + .../NUCLEO-L432KC/dc_motor/src/main.c | 2 + .../fingerprint/lib/Fingerprint/fingerprint.h | 3 +- .../NUCLEO-L432KC/fingerprint/node_config.h | 1 + .../NUCLEO-L432KC/fingerprint/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../NUCLEO-L432KC/gate_serialcom/src/main.c | 2 + .../gpio/lib/Gpio_dev/gpio_dev.h | 1 + .../projects/NUCLEO-L432KC/gpio/node_config.h | 1 + .../projects/NUCLEO-L432KC/gpio/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h | 1 + .../projects/NUCLEO-L432KC/lcd/node_config.h | 1 + .../projects/NUCLEO-L432KC/lcd/src/main.c | 2 + .../projects/NUCLEO-L432KC/led/lib/Led/led.h | 1 + .../projects/NUCLEO-L432KC/led/node_config.h | 1 + .../projects/NUCLEO-L432KC/led/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../NUCLEO-L432KC/potentiometer/node_config.h | 1 + .../NUCLEO-L432KC/potentiometer/src/main.c | 2 + .../NUCLEO-L432KC/servo/lib/Servo/servo_drv.h | 1 + .../NUCLEO-L432KC/servo/node_config.h | 1 + .../projects/NUCLEO-L432KC/servo/src/main.c | 2 + .../Bootloader/firmware/src/main.c | 3 + .../SAMD21XPLAINED/button/lib/button/button.h | 1 + .../SAMD21XPLAINED/button/node_config.h | 1 + .../projects/SAMD21XPLAINED/button/src/main.c | 4 +- .../bootloader/node_config.h | 1 + .../STM32F4-discovery/bootloader/src/main.c | 4 + .../button/lib/Button/button.h | 1 + .../STM32F4-discovery/button/node_config.h | 1 + .../STM32F4-discovery/button/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../gate_serialcom/src/main.c | 2 + .../inspector_serialcom/node_config.h | 1 + .../inspector_serialcom/src/main.c | 2 + .../bootloader/node_config.h | 1 + .../STM32L4S5_discovery/bootloader/src/main.c | 4 + .../button/lib/Button/button.h | 1 + .../STM32L4S5_discovery/button/node_config.h | 1 + .../STM32L4S5_discovery/button/src/main.c | 2 + .../gate_serialcom/node_config.h | 1 + .../gate_serialcom/src/main.c | 2 + .../lib/Led_Fader/led_fader.h | 1 + .../lib/Led_Fader/ledfader_drv.h | 3 +- .../bike_alarm/alarm_controller/node_config.h | 1 + .../l0/bike_alarm/alarm_controller/src/main.c | 2 + .../bike_alarm/start_controller/node_config.h | 1 + .../l0/bike_alarm/start_controller/src/main.c | 2 + examples/projects/l0/bootloader/node_config.h | 1 + examples/projects/l0/bootloader/src/main.c | 4 + examples/projects/l0/button/node_config.h | 1 + examples/projects/l0/button/src/main.c | 2 + .../projects/l0/button_freertos/lib/Led/led.h | 1 + .../l0/button_freertos/lib/Led/led_drv.h | 3 +- .../projects/l0/button_freertos/node_config.h | 1 + .../l0/button_freertos/src/freertos.c | 2 + .../l0/controller_motor/node_config.h | 1 + .../projects/l0/controller_motor/src/main.c | 2 + .../l0/dc_motor/lib/DC_motor/dc_motor_drv.h | 1 + examples/projects/l0/dc_motor/node_config.h | 1 + examples/projects/l0/dc_motor/src/main.c | 2 + .../lib/Detection_Button/detection_button.h | 1 + .../l0/demo/detection_button/node_config.h | 1 + .../l0/demo/detection_button/src/main.c | 2 + .../ledstrip_position/lib/Distance/distance.h | 1 + .../lib/Distance/vl53l0x_drv.h | 1 + .../lib/LedStrip_Position/ledstrip_position.h | 1 + .../l0/demo/ledstrip_position/node_config.h | 1 + .../l0/demo/ledstrip_position/src/main.c | 2 + .../lib/motor_copy/motor_copy.h | 1 + .../l0/demo/motor_copy_app/node_config.h | 1 + .../l0/demo/motor_copy_app/src/main.c | 2 + .../motor_demo_app/lib/run_motor/run_motor.h | 1 + .../l0/demo/motor_demo_app/node_config.h | 1 + .../l0/demo/motor_demo_app/src/main.c | 2 + examples/projects/l0/demo/product_config.h | 3 +- .../l0/distance/lib/Distance/distance.h | 1 + .../l0/distance/lib/Distance/vl53l0x_drv.h | 1 + examples/projects/l0/distance/node_config.h | 1 + examples/projects/l0/distance/src/main.c | 2 + examples/projects/l0/dxl/lib/Dxl/dxl.h | 1 + examples/projects/l0/dxl/node_config.h | 1 + examples/projects/l0/dxl/src/main.c | 2 + .../fingerprint/lib/Fingerprint/fingerprint.h | 3 +- .../projects/l0/fingerprint/node_config.h | 1 + examples/projects/l0/fingerprint/src/main.c | 2 + .../projects/l0/gate_serialcom/node_config.h | 1 + .../projects/l0/gate_serialcom/src/main.c | 2 + examples/projects/l0/gpio/node_config.h | 1 + examples/projects/l0/gpio/src/main.c | 2 + examples/projects/l0/imu/lib/Imu/imu.h | 1 + .../l0/imu/lib/Imu/mpu_configuration.c | 1 + .../l0/imu/lib/Imu/mpu_configuration.h | 1 + examples/projects/l0/imu/node_config.h | 1 + examples/projects/l0/imu/src/main.c | 2 + .../l0/inspector_serialcom/node_config.h | 1 + .../l0/inspector_serialcom/src/main.c | 2 + examples/projects/l0/lcd/lib/Lcd/lcd.h | 1 + examples/projects/l0/lcd/node_config.h | 1 + examples/projects/l0/lcd/src/main.c | 2 + examples/projects/l0/led/lib/Led/led.h | 1 + examples/projects/l0/led/lib/Led/led_drv.h | 3 +- examples/projects/l0/led/node_config.h | 1 + examples/projects/l0/led/src/main.c | 2 + .../l0/led_fader/lib/Led_Fader/led_fader.h | 1 + .../l0/led_fader/lib/Led_Fader/ledfader_drv.h | 3 +- examples/projects/l0/led_fader/node_config.h | 1 + examples/projects/l0/led_fader/src/main.c | 2 + .../l0/led_strip/lib/Led_strip/led_strip.h | 1 + .../led_strip/lib/Led_strip/led_strip_drv.h | 3 +- examples/projects/l0/led_strip/node_config.h | 1 + examples/projects/l0/led_strip/src/main.c | 2 + .../lib/Light_sensor/light_sensor.h | 1 + .../lib/Light_sensor/light_sensor_drv.h | 3 +- .../projects/l0/light_sensor/node_config.h | 1 + examples/projects/l0/light_sensor/src/main.c | 2 + .../projects/l0/load/lib/Load/HX711/HX711.h | 1 + examples/projects/l0/load/lib/Load/load.h | 1 + examples/projects/l0/load/node_config.h | 1 + examples/projects/l0/load/src/main.c | 2 + .../lib/Potentiometer/potentiometer.h | 1 + .../lib/Potentiometer/potentiometer_drv.h | 3 +- .../projects/l0/potentiometer/node_config.h | 1 + examples/projects/l0/potentiometer/src/main.c | 2 + .../projects/l0/power_switch/node_config.h | 1 + examples/projects/l0/power_switch/src/main.c | 2 + .../projects/l0/servo/lib/Servo/servo_drv.h | 1 + examples/projects/l0/servo/node_config.h | 1 + examples/projects/l0/servo/src/main.c | 2 + examples/projects/l0/stepper/node_config.h | 1 + examples/projects/l0/stepper/src/main.c | 2 + examples/projects/native/button/node_config.h | 1 + examples/projects/native/button/src/main.c | 4 +- .../projects/native/gate_wscom/node_config.h | 1 + .../projects/native/gate_wscom/src/main.c | 4 +- examples/projects/native/led/lib/Led/led.h | 1 + examples/projects/native/led/node_config.h | 1 + examples/projects/native/led/src/main.c | 4 +- .../native/ping_pong/lib/PingPong/graph.c | 3 +- .../native/ping_pong/lib/PingPong/scoring.h | 1 + .../projects/native/ping_pong/node_config.h | 1 + examples/projects/native/ping_pong/src/main.c | 4 +- network/robus/HAL/NATIVE/robus_hal.c | 1 + network/robus/inc/_robus.h | 18 ++ network/robus/inc/context.h | 2 +- network/robus/inc/port_manager.h | 6 +- network/robus/inc/reception.h | 3 +- network/robus/inc/robus.h | 7 - network/robus/inc/transmission.h | 3 +- network/robus/robus_config.h | 4 + network/robus/selftest/selftest.c | 1 + network/robus/selftest/selftest.h | 1 + network/robus/src/port_manager.c | 87 +++---- network/robus/src/reception.c | 28 --- network/robus/src/robus.c | 37 +-- test/_resources/Scenarios/default_scenario.c | 2 + test/_resources/Unity/unit_test.h | 1 + test/tests_core/test_routing_table/main.c | 14 +- test/tests_io/test_luos_io/main.c | 206 +++++++++++---- test/tests_io/test_phy/main.c | 13 +- tool_services/gate/TinyJSON/convert.c | 39 +-- tool_services/gate/data_manager.h | 2 +- tool_services/inspector/inspector.h | 2 - tool_services/pipe/pipe.c | 4 +- tool_services/pipe/pipe.h | 2 - 322 files changed, 1135 insertions(+), 437 deletions(-) create mode 100644 network/robus/inc/_robus.h diff --git a/engine/IO/inc/_luos_phy.h b/engine/IO/inc/_luos_phy.h index ec83bbb14..1ae38eb31 100644 --- a/engine/IO/inc/_luos_phy.h +++ b/engine/IO/inc/_luos_phy.h @@ -15,7 +15,10 @@ void Phy_Init(void); void Phy_Reset(void); +void Phy_ResetAll(void); +bool Phy_Busy(void); void Phy_Loop(void); -luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb); +luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); +error_return_t Phy_FindNextNode(void); // Use it to find the next node as a master. #endif /* _PRIVATE_LUOS_PHY_H_ */ diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index 36b24dd0e..ac2da676c 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -25,7 +25,7 @@ // generic functions void LuosIO_Init(void); void LuosIO_Loop(void); -uint16_t LuosIO_TopologyDetection(service_t *service); +uint16_t LuosIO_TopologyDetection(service_t *service, connection_t *connection_table); error_return_t LuosIO_Send(service_t *service, msg_t *msg); // Job management @@ -36,5 +36,6 @@ error_return_t LuosIO_TxAllComplete(void); // Specific phy treatment error_return_t Phy_TxAllComplete(void); +port_t *Phy_GetTopologysource(void); #endif /* _LUOSIO_H_ */ diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index aca89ffcd..20d722d57 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -17,54 +17,17 @@ /******************************************************************************* * Definitions ******************************************************************************/ - -/****************************************************************************** - * @struct phy_target_t - * @brief Transmit message direction - ******************************************************************************/ -typedef uint8_t phy_target_t; - -/****************************************************************************** - * @struct luos_phy_t - * @brief the data structure allowing the phy to interract with LuosIO - ******************************************************************************/ -typedef struct luos_phy_t -{ - // *************** RX information *************** - volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. - uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. - union - { - volatile uint8_t *rx_data; // Pointer to write received bytes. - volatile msg_t *rx_msg; // Pointer to the message where we will write received bytes. - }; - volatile uint16_t received_data; // Number of bytes already received. - volatile uint16_t rx_size; // Size of data to receive. - struct - { - volatile uint8_t rx_alloc_job : 1; // If true, Luosio_Loop funciton will need to filter already received data, if filter is ok, set rx_keep, alloc needed space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. - volatile uint8_t rx_keep : 1; // True if we want to keep the received data. - volatile uint8_t rx_ack : 1; // True if we need to generate an acknoledgement for this message. - }; - - // RX Private data - phy_target_t rx_phy_filter; // The phy concerned by this message. - - // *************** TX informations *************** - // Jobs are used to send messages. during the message send phy may save a job pointer so we cann't move any job in the job list. - // When a job is created we have to guarantee that the job will stay. So we have to manage it as a circular buffer. - phy_job_t job[MAX_MSG_NB]; // List of phy jobs to send. - uint8_t job_nb; // Number of jobs to send. - uint16_t oldest_job_index; // Index of the oldest job. - uint16_t available_job_index; // Index of the next available job. - - void (*phy_cb)(struct luos_phy_t *phy_ptr, phy_job_t *job); // Callback -} luos_phy_t; - -typedef void (*PHY_CB)(luos_phy_t *phy_ptr, phy_job_t *job); +typedef void (*JOB_CB)(luos_phy_t *phy_ptr, phy_job_t *job); +typedef error_return_t (*RUN_TOPO)(luos_phy_t *phy_ptr, uint8_t *portId); +typedef void (*RESET_PHY)(luos_phy_t *phy_ptr); // Phy creation -luos_phy_t *Phy_Create(PHY_CB phy_cb); // Use it to reference your phy to Luos. +luos_phy_t *Phy_Create(JOB_CB phy_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. + +// Topology management +void Phy_FindNextNodeJob(void); // Use it to find the next node that need to be detected accross phys. +void Phy_Topologysource(luos_phy_t *phy_ptr, uint8_t port_id); // The phy will call this function when a new node is detected on a specific port. +void Phy_TopologyDone(luos_phy_t *phy_ptr); // The phy will call this function when all its port detection are done. // Rx management void Phy_ComputeHeader(luos_phy_t *phy_ptr); // After receiving the first 7 bytes (the header) call this function to compute how you should manage the incoming message. @@ -79,6 +42,6 @@ void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job); // If some mess phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. -uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr); // Use it to get the number of job you currently have to send on your phy_ptr.job list. +volatile uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr); // Use it to get the number of job you currently have to send on your phy_ptr.job list. #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h index e14b7753c..bb4663198 100644 --- a/engine/IO/inc/struct_phy.h +++ b/engine/IO/inc/struct_phy.h @@ -33,4 +33,63 @@ typedef struct void *phy_data; // Phy developpers can use this pointer to store any data they need. } phy_job_t; +/****************************************************************************** + * @struct phy_target_t + * @brief Transmit message direction + ******************************************************************************/ +typedef uint8_t phy_target_t; + +/****************************************************************************** + * @struct luos_phy_t + * @brief the data structure allowing the phy to interract with LuosIO + ******************************************************************************/ +typedef struct luos_phy_t +{ + // *************** RX information *************** + volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. + uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. + union + { + volatile uint8_t *rx_data; // Pointer to write received bytes. + volatile msg_t *rx_msg; // Pointer to the message where we will write received bytes. + }; + volatile uint16_t received_data; // Number of bytes already received. + volatile uint16_t rx_size; // Size of data to receive. + struct + { + volatile uint8_t rx_alloc_job : 1; // If true, Luosio_Loop funciton will need to filter already received data, if filter is ok, set rx_keep, alloc needed space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. + volatile uint8_t rx_keep : 1; // True if we want to keep the received data. + volatile uint8_t rx_ack : 1; // True if we need to generate an acknoledgement for this message. + }; + + // RX Private data + phy_target_t rx_phy_filter; // The phy concerned by this message. + + // *************** TX informations *************** + // Jobs are used to send messages. during the message send phy may save a job pointer so we cann't move any job in the job list. + // When a job is created we have to guarantee that the job will stay. So we have to manage it as a circular buffer. + phy_job_t job[MAX_MSG_NB]; // List of phy jobs to send. + volatile uint8_t job_nb; // Number of jobs to send. + uint16_t oldest_job_index; // Index of the oldest job. + uint16_t available_job_index; // Index of the next available job. + + void (*job_cb)(struct luos_phy_t *phy_ptr, phy_job_t *job); // Callback + error_return_t (*run_topo)(struct luos_phy_t *phy_ptr, uint8_t *portId); // try to find another node on branches, return success if a node is found and the id of the port were we detect this node. + void (*reset_phy)(struct luos_phy_t *phy_ptr); // Reset the phy transmission reception and topology. + +} luos_phy_t; + +typedef struct __attribute__((__packed__)) +{ + uint16_t node_id; + uint8_t phy_id; + uint8_t port_id; +} port_t; + +typedef struct __attribute__((__packed__)) +{ + port_t parent; + port_t child; +} connection_t; + #endif /* _STRUCT_PHY_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index ebfeb537b..5b633e847 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -213,7 +213,9 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) break; case NODEIDACK: case NODEID: - if (header->target == Node_Get()->node_id) + // If the target is our node and our node ave a node_id or if we don't have a node_id and we are waiting for one. + if (((header->target == Node_Get()->node_id) && (header->target != 0)) + || ((header->target == 0) && (Node_WaitId() == true))) { // This concerns Luos phy only return 0x01; diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index b975a774d..70d0384f4 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -14,38 +14,27 @@ #include "luos_hal.h" #include "luos_engine.h" #include "bootloader_core.h" +#include "robus.h" #include "_luos_phy.h" #include "stats.h" -#include "robus.h" - /******************************************************************************* * Definitions ******************************************************************************/ - -typedef struct __attribute__((__packed__)) -{ - union - { - struct __attribute__((__packed__)) - { - uint16_t prev_nodeid; - uint16_t nodeid; - }; - uint8_t unmap[sizeof(uint16_t) * 2]; - }; -} node_bootstrap_t; - static error_return_t LuosIO_StartTopologyDetection(service_t *service); -static error_return_t LuosIO_DetectNextNodes(service_t *service, bool wait_for_answer); -static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); +static error_return_t LuosIO_DetectNextNodes(service_t *service); static error_return_t LuosIO_ConsumeMsg(const msg_t *input); static void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); +// Phy_callbacks +static void LuosIO_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); +error_return_t LuosIO_RunTopo(luos_phy_t *phy_ptr, uint8_t *portId); + /******************************************************************************* * Variables ******************************************************************************/ -volatile uint16_t last_node = 0; +volatile uint16_t last_node = 0; +connection_t *connection_table_ptr = NULL; luos_phy_t *luos_phy; service_filter_t service_filter[MAX_MSG_NB]; // Service filter table. Each of these filter will be linked with jobs. uint8_t service_filter_index = 0; // Index of the next service filter to use. @@ -56,6 +45,23 @@ bool Flag_DetectServices = false; * Functions ******************************************************************************/ +error_return_t LuosIO_RunTopo(luos_phy_t *phy_ptr, uint8_t *portId) +{ + // This function should not be called because Luos can't run a topology. + LUOS_ASSERT(0); + return FAILED; +} + +void LuosIO_Reset(luos_phy_t *phy_ptr) +{ + MsgAlloc_Init(NULL); + Node_Init(); + Node_SetState(EXTERNAL_DETECTION); + Service_ClearId(); + // Reset the data reception context + Luos_ReceiveData(NULL, NULL, NULL); +} + /****************************************************************************** * @brief Init the interface file. * @param None @@ -75,10 +81,7 @@ void LuosIO_Init(void) Phy_Init(); // Get the Luos phy struct, Luos always use the first phy - luos_phy = Phy_Get(0, LuosIO_MsgHandler); - - // Init Robus - Robus_Init(); + luos_phy = Phy_Get(0, LuosIO_MsgHandler, LuosIO_RunTopo, LuosIO_Reset); } /****************************************************************************** @@ -91,7 +94,6 @@ void LuosIO_Loop(void) // Execute message allocation tasks MsgAlloc_Loop(); Phy_Loop(); - Robus_Loop(); if (Flag_DetectServices == true) { LUOS_ASSERT(detection_service != NULL); @@ -185,14 +187,16 @@ error_return_t LuosIO_Send(service_t *service, msg_t *msg) * @param service pointer to the detecting service * @return The number of detected node. ******************************************************************************/ -uint16_t LuosIO_TopologyDetection(service_t *service) +uint16_t LuosIO_TopologyDetection(service_t *service, connection_t *connection_table) { - uint8_t redetect_nb = 0; - bool detect_enabled = true; + uint8_t redetect_nb = 0; + bool detect_enabled = true; + connection_table_ptr = connection_table; // If a detection is in progress, don't do an another detection and return 0 if (Node_GetState() >= LOCAL_DETECTION) { + connection_table_ptr = NULL; return 0; } while (detect_enabled) @@ -204,6 +208,7 @@ uint16_t LuosIO_TopologyDetection(service_t *service) // Make sure that the detection is not interrupted if (Node_GetState() == EXTERNAL_DETECTION) { + connection_table_ptr = NULL; return 0; } // Setup local node @@ -211,8 +216,11 @@ uint16_t LuosIO_TopologyDetection(service_t *service) last_node = 1; // Setup sending service id service->id = 1; + // Consider this node as ready + // Clear the nodeID waiting flag + Node_WaitId(); - if (LuosIO_DetectNextNodes(service, true) == FAILED) + if (LuosIO_DetectNextNodes(service) == FAILED) { // check the number of retry we made LUOS_ASSERT((redetect_nb <= 4)); @@ -221,6 +229,7 @@ uint16_t LuosIO_TopologyDetection(service_t *service) detect_enabled = true; } } + connection_table_ptr = NULL; return last_node; } @@ -250,14 +259,8 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) // Wait until message is actually transmitted while (Phy_TxAllComplete() != SUCCEED) ; - // Reinit services id - Service_ClearId(); - // Reinit msg alloc - MsgAlloc_Init(NULL); - // Reinit service filter - Filter_IdInit(); - // Reinit Phy - Phy_Reset(); + // Reinit Phy (this will call LuosIO_Reset) + Phy_ResetAll(); // Wait 2ms to be sure all previous messages are received and treated by other nodes uint32_t start_tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - start_tick < 2) @@ -276,8 +279,6 @@ static error_return_t LuosIO_StartTopologyDetection(service_t *service) } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); // Reinit our node id Node_Get()->node_id = 0; - // Clear any saved node id on physical layer ports - Robus_ResetNodeID(); if (try_nbr < 5) { Node_SetState(LOCAL_DETECTION); @@ -295,7 +296,6 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) { LUOS_ASSERT(input != NULL); msg_t output_msg; - node_bootstrap_t node_bootstrap; time_luos_t time; service_t *service = Service_GetConcerned(&input->header); dead_target_t *dead_target = (dead_target_t *)input->data; @@ -305,66 +305,84 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) switch (input->header.cmd) { //**************************************** detection section **************************************** - case WRITE_NODE_ID: - // Depending on the size of the received data we have to do different things - switch (input->header.size) + // Only the master node should receive this message + case CONNECTION_DATA: + LUOS_ASSERT(connection_table_ptr != NULL); + if (input->header.size == sizeof(port_t)) { - case 0: - // Someone asking us a new node id (we are the detecting service) - // Increase the number of node_nb and send it back - last_node++; - output_msg.header.cmd = WRITE_NODE_ID; - output_msg.header.size = sizeof(uint16_t); - output_msg.header.target = input->header.source; - output_msg.header.target_mode = NODEIDACK; - memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); - Luos_SendMsg(service, &output_msg); - break; - case 2: - // This is a node id for the next node. - // This is a reply to our request to generate the next node id. - // This node_id is the one after the currently poked branch. - // Extract the node id from the received data - memcpy((void *)&node_bootstrap.nodeid, (void *)&input->data[0], sizeof(uint16_t)); - // We need to save this node ID as a connection to a port - Robus_SaveNodeID(node_bootstrap.nodeid); - // Now we can send it to the next node - node_bootstrap.prev_nodeid = Node_Get()->node_id; - output_msg.header.cmd = WRITE_NODE_ID; - output_msg.header.size = sizeof(node_bootstrap_t); - output_msg.header.target = 0; - output_msg.header.target_mode = NODEIDACK; - memcpy((void *)&output_msg.data[0], (void *)&node_bootstrap.unmap[0], sizeof(node_bootstrap_t)); - Luos_SendMsg(service, &output_msg); - break; - case sizeof(node_bootstrap_t): - if (Node_Get()->node_id != 0) - { - Node_Get()->node_id = 0; - // Reinit service id - Service_ClearId(); - // Reinit msg alloc - MsgAlloc_Init(NULL); - // Reinit service filter - Filter_IdInit(); - // Reinit Phy - Phy_Reset(); - } - // This is a node bootstrap information. - memcpy((void *)&node_bootstrap.unmap[0], (void *)&input->data[0], sizeof(node_bootstrap_t)); - Node_Get()->node_id = node_bootstrap.nodeid; - Robus_SaveNodeID(node_bootstrap.prev_nodeid); - // Continue the topology detection on our other ports. - LuosIO_DetectNextNodes(service, false); - break; - default: - LUOS_ASSERT(0); - break; + // This is a partial connection information (only the output part) + // Save it we will receive the input part later + memcpy(&connection_table_ptr[last_node++].parent, input->data, sizeof(port_t)); + // Now send the new generated node_id + output_msg.header.cmd = NODE_ID; + output_msg.header.size = sizeof(uint16_t); + output_msg.header.target = 0; // We target the node_id 0 becanse the node receiving this message don't have a node_id yet. This node need to be the only one to receive it. + output_msg.header.target_mode = NODEIDACK; + memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); + Luos_SendMsg(service, &output_msg); + } + else + { + // We receive this because a node port have a static mapping of it's connectivity, so we have to save it and consider it as detected nodes. + // Check that we receive a full connection information + LUOS_ASSERT(input->header.size % sizeof(connection_t) == 0); + memcpy(&connection_table_ptr[last_node], input->data, input->header.size); + last_node += input->header.size / sizeof(connection_t); + // Check that node id are continuous + LUOS_ASSERT(connection_table_ptr[last_node - 1].child.node_id == last_node); } // This message have been consumed return SUCCEED; break; + // Only the master node should receive this message + case PORT_DATA: + LUOS_ASSERT(connection_table_ptr != NULL); + // This is the last part (input port) of a connection_ data + // Check that we receive a full port information + LUOS_ASSERT(input->header.size == sizeof(port_t) + && (connection_table_ptr[last_node - 1].parent.node_id != 0xFFFF)); + memcpy(&connection_table_ptr[last_node - 1].child, input->data, sizeof(port_t)); + // This message have been consumed + return SUCCEED; + break; + + case NODE_ID: + LUOS_ASSERT(input->header.size == sizeof(uint16_t)); + // This is our new node id. + if (Node_Get()->node_id != 0) + { + // We didn't received the start detection message + // Reinit our node id + Node_Get()->node_id = 0; + // A phy have already been detected, so we can't reset everything + // Just reset LuosIO and Phy jobs. + LuosIO_Reset(luos_phy); + // Reinit Phy + Phy_Reset(); + } + // Save our new node id + // We have to do it this way because Node_Get()->node_id is a bitfield and input->data is not well aligned. + uint16_t node_id; + memcpy(&node_id, input->data, sizeof(uint16_t)); + Node_Get()->node_id = node_id; + // Now we need to send back the input part of the connection data. + port_t *input_port = Phy_GetTopologysource(); + input_port->node_id = Node_Get()->node_id; + + output_msg.header.target_mode = NODEIDACK; + output_msg.header.target = 1; + output_msg.header.cmd = PORT_DATA; + output_msg.header.size = sizeof(port_t); + memcpy(output_msg.data, input_port, sizeof(port_t)); + Luos_SendMsg(service, &output_msg); + // This message can't be send directly to avoid dispatch re-entrance issue. + // To be able to send this message then run the detection of the other nodes we need to make it later on the LuosIO_Loop, so we put a flag for it. + Phy_FindNextNodeJob(); + // This message have been consumed + return SUCCEED; + break; + case LOCAL_RTB: // Depending on the size of this message we have to make different operations // If size is 0 someone ask to get local_route table back @@ -391,7 +409,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; case RTB: - // We are receiving a rouiting table + // We are receiving a routing table // Check routing table overflow LUOS_ASSERT(((uintptr_t)route_tab + input->header.size) <= ((uintptr_t)RoutingTB_Get() + (sizeof(routing_table_t) * MAX_RTB_ENTRY))); if (Luos_ReceiveData(service, input, (void *)route_tab) > 0) @@ -404,14 +422,8 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; case START_DETECTION: - Phy_Reset(); - MsgAlloc_Init(NULL); - Node_Init(); - Node_SetState(EXTERNAL_DETECTION); - Service_ClearId(); - // Reset the data reception context - Luos_ReceiveData(NULL, NULL, NULL); - Robus_ResetNodeID(); + // Reset All phy + Phy_ResetAll(); // This message have been consumed return SUCCEED; break; @@ -553,31 +565,18 @@ static inline void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *r * @param service pointer to the detecting service * @return None. ******************************************************************************/ -static error_return_t LuosIO_DetectNextNodes(service_t *service, bool wait_for_answer) +static error_return_t LuosIO_DetectNextNodes(service_t *service) { - // Lets try to poke other nodes - while (Robus_FindNeighbour() == SUCCEED) + // Lets try to find other nodes + while (Phy_FindNextNode() == SUCCEED) { - // There is someone here - // Ask an ID to the detector service. - msg_t msg; - msg.header.config = BASE_PROTOCOL; - msg.header.target_mode = NODEIDACK; - msg.header.target = 1; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = 0; - Luos_SendMsg(service, &msg); - if (wait_for_answer == false) - { - return SUCCEED; - } // Wait the end of transmission while (Phy_TxAllComplete() == FAILED) ; // When Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. // We just have to wait the end of the treatment of the entire branch uint32_t start_tick = LuosHAL_GetSystick(); - while (Robus_Busy()) + while (Phy_Busy()) { LuosIO_Loop(); if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 757e08276..68394ab36 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -73,6 +73,12 @@ typedef struct luos_phy_t phy[PHY_NB]; // phy[0] is the local phy, phy[1] is the remote phy. uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. + // ******************** Topology management ******************** + port_t topology_source; // The source port. Where we receive the topological detection signal from. + uint32_t topology_done; // We put bits to 1 when a phy ended the topology detection. + bool topology_running; // We put bits to 1 when a phy is running the topology detection. + bool find_next_node_job; + // ******************** job management ******************** // io_jobs are stores from the newest to the oldest. // This will add time in IRQ when we will pull a job but allow to keep pointers constant. @@ -110,7 +116,7 @@ void Phy_Init(void) } /****************************************************************************** - * @brief Reset the phy + * @brief Reset the phy context * @param None * @return None ******************************************************************************/ @@ -128,6 +134,35 @@ void Phy_Reset(void) phy_ctx.phy[i].oldest_job_index = 0; phy_ctx.phy[i].available_job_index = 0; } + memset((void *)&phy_ctx.topology_source, 0xFFFF, sizeof(phy_ctx.topology_source)); + phy_ctx.topology_done = 0; + phy_ctx.topology_running = false; + phy_ctx.find_next_node_job = false; +} + +/****************************************************************************** + * @brief Reset the phy context and all the phy instances + * @param None + * @return None + ******************************************************************************/ +void Phy_ResetAll(void) +{ + Phy_Reset(); + // Now call the reset fuction of each phy + for (uint8_t i = 0; i < phy_ctx.phy_nb; i++) + { + phy_ctx.phy[i].reset_phy(&phy_ctx.phy[i]); + } +} + +/****************************************************************************** + * @brief Check if a phy is actually detecting nodes on one of its port + * @param None + * @return None + ******************************************************************************/ +bool Phy_Busy(void) +{ + return phy_ctx.topology_running; } /****************************************************************************** @@ -146,6 +181,15 @@ void Phy_Loop(void) Phy_ManageFailedJob(); // Manage complete message received dispatching Phy_Dispatch(); + // Check if we need to find the next node + if (phy_ctx.find_next_node_job == true) + { + phy_ctx.find_next_node_job = false; + // Wait for the node to send all its messages. + while (Phy_TxAllComplete() == FAILED) + ; + Phy_FindNextNode(); + } // Compute phy job statistics /* uint8_t stat = (uint8_t)((job nbr * 100) / (MAX_MSG_NB)); @@ -160,23 +204,142 @@ void Phy_Loop(void) * @param phy_cb callback to call when we want to transmit a message * @return None ******************************************************************************/ -luos_phy_t *Phy_Create(PHY_CB phy_cb) +luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) +{ + return Phy_Get(phy_ctx.phy_nb++, job_cb, run_topo, reset_phy); +} + +/****************************************************************************** + * @brief save a flag allowing to run a new discovering outside of IRQ (because this function is very long and can't be run in IRQ) + * @return None + ******************************************************************************/ +_CRITICAL void Phy_FindNextNodeJob(void) +{ + phy_ctx.find_next_node_job = true; +} +/****************************************************************************** + * @brief Try to find the next node connected a phy port + * @return SUCCESS if a node is found, FAILED if not + ******************************************************************************/ +error_return_t Phy_FindNextNode(void) +{ + // Loop through all the phys except Luos and check if they need to be detected + // We have to make the source phy the last one to check because it is the one that will send back the token when all its ports will be detected. + // So we need to finish detections of all other phys before checking the source phy. + for (uint8_t i = 1; i < phy_ctx.phy_nb; i++) + { + if ((!(phy_ctx.topology_done & (1 << i))) && (phy_ctx.topology_source.phy_id != i)) + { + // This phy still have port to detect + uint8_t port_id; + // Check if a node is connected + phy_ctx.topology_running = true; + if (phy_ctx.phy[i].run_topo(&phy_ctx.phy[i], &port_id) == SUCCEED) + { + port_t output_port; + output_port.node_id = Node_Get()->node_id; + output_port.port_id = port_id; + output_port.phy_id = i; + + // We find a new node on this specific output_port + // Send the output_port information to master as a partial CONNECTION_DATA and ask it to generate and send a new node_id. + msg_t msg; + msg.header.target_mode = NODEIDACK; + msg.header.target = 1; + msg.header.cmd = CONNECTION_DATA; + msg.header.size = sizeof(port_t); + memcpy(msg.data, &output_port, sizeof(port_t)); + Luos_SendMsg(0, &msg); + return SUCCEED; + } + phy_ctx.topology_running = false; + } + } + // We checked all the phys except the source one. + // Check if the source phy still have port to detect + if (phy_ctx.topology_done != (1 << phy_ctx.phy_nb) - 2) + { + // We still have a phy to detect. This must be the source phy. + // Check that only the source phy and the luos phy are not detected. + LUOS_ASSERT((phy_ctx.topology_done | (1 << phy_ctx.topology_source.phy_id)) == ((1 << phy_ctx.phy_nb) - 2)); + uint8_t port_id; + // Check if a node is connected + phy_ctx.topology_running = true; + if (phy_ctx.phy[phy_ctx.topology_source.phy_id].run_topo(&phy_ctx.phy[phy_ctx.topology_source.phy_id], &port_id) == SUCCEED) + { + port_t output_port; + output_port.node_id = Node_Get()->node_id; + output_port.port_id = port_id; + output_port.phy_id = phy_ctx.topology_source.phy_id; + + // We find a new node on this specific output_port + // Send the output_port information to master as a partial CONNECTION_DATA and ask it to generate and send a new node_id. + msg_t msg; + msg.header.target_mode = NODEIDACK; + msg.header.target = 1; + msg.header.cmd = CONNECTION_DATA; + msg.header.size = sizeof(port_t); + memcpy(msg.data, &output_port, sizeof(port_t)); + Luos_SendMsg(0, &msg); + return SUCCEED; + } + phy_ctx.topology_running = false; + } + // This is the end of detection for our node. + return FAILED; +} + +/****************************************************************************** + * @brief A phy port have been detected + * @param phy_ptr pointer on the phy which have been detected + * @param port_id id of the port detected in the phy + * @return None + ******************************************************************************/ +void Phy_Topologysource(luos_phy_t *phy_ptr, uint8_t port_id) +{ + LUOS_ASSERT((phy_ptr != NULL) + && (port_id < 0xFF)); + // This port is the source of a topology request. it become the input port. + // We have to save it in the node context. + phy_ctx.topology_source.phy_id = Phy_GetPhyId(phy_ptr); + phy_ctx.topology_source.port_id = port_id; + phy_ctx.topology_source.node_id = 0xFFFF; + // We don't have the node id yet, we will fill it out when we will receive it from the master. + // Put a flag to indicate that we are waiting for a node id. + Node_WillGetId(); +} + +void Phy_TopologyDone(luos_phy_t *phy_ptr) +{ + LUOS_ASSERT(phy_ptr != NULL); + phy_ctx.topology_done = (1 << Phy_GetPhyId(phy_ptr)); + phy_ctx.topology_running = false; +} + +/****************************************************************************** + * @brief A phy port have been detected + * @return pointer on the input port + ******************************************************************************/ +port_t *Phy_GetTopologysource(void) { - return Phy_Get(phy_ctx.phy_nb++, phy_cb); + return &phy_ctx.topology_source; } /****************************************************************************** - * @brief return the local physical layer + * @brief return the local physical layer (only used by LuosIO, this function is private) * @param id of the phy we want * @param phy_cb callback to call when we want to transmit a message * @return None ******************************************************************************/ -luos_phy_t *Phy_Get(uint8_t id, PHY_CB phy_cb) +luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) { LUOS_ASSERT((id <= PHY_NB) - && (phy_cb != NULL)); - // Set the callback - phy_ctx.phy[id].phy_cb = phy_cb; + && (job_cb != NULL) + && (run_topo != NULL)); + // Set the callbacks + phy_ctx.phy[id].job_cb = job_cb; + phy_ctx.phy[id].run_topo = run_topo; + phy_ctx.phy[id].reset_phy = reset_phy; // Return the phy pointer return &phy_ctx.phy[id]; } @@ -400,7 +563,7 @@ static void Phy_Dispatch(void) // Write the job in the phy queue and get back the pointer to it phy_job_t *job_ptr = Phy_AddJob(&phy_ctx.phy[y], &phy_job); // Notify this phy that a job is available and give it the concerned job on his queue - phy_ctx.phy[y].phy_cb(&phy_ctx.phy[y], job_ptr); + phy_ctx.phy[y].job_cb(&phy_ctx.phy[y], job_ptr); } } LuosHAL_SetIrqState(false); @@ -637,7 +800,7 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) * @param phy_ptr Phy to get the number of job from * @return Number of job ******************************************************************************/ -_CRITICAL inline uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr) +_CRITICAL inline volatile uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr) { LUOS_ASSERT(phy_ptr != NULL); return phy_ptr->job_nb; diff --git a/engine/OD/od_control.h b/engine/OD/od_control.h index af74ad13d..b998eca51 100644 --- a/engine/OD/od_control.h +++ b/engine/OD/od_control.h @@ -8,6 +8,7 @@ #define OD_OD_CONTROL_H_ #include "luos_engine.h" +#include "robus.h" #include /******************************************************************************* diff --git a/engine/OD/od_pid.h b/engine/OD/od_pid.h index dff3709b4..9b747e419 100644 --- a/engine/OD/od_pid.h +++ b/engine/OD/od_pid.h @@ -8,6 +8,7 @@ #define OD_OD_PID_H_ #include "luos_engine.h" +#include "robus.h" #include /******************************************************************************* diff --git a/engine/core/inc/luos.h b/engine/core/inc/luos.h index 427043d01..9091d69dd 100644 --- a/engine/core/inc/luos.h +++ b/engine/core/inc/luos.h @@ -4,5 +4,5 @@ * @author Luos ******************************************************************************/ -#error 'luos.h' inclusion is deprecated since luos_engine@2.3.1, replace it by '#include "luos_engine.h"', see: www.github.com/Luos-io/luos_engine/commit/d3cc1618956907fc5a657ef07535ad9d5caa4f57 for more information. -#include "luos_engine.h" \ No newline at end of file +#error 'luos.h' inclusion is deprecated since luos_engine@2.3.1, replace it by '#include "luos_engine.h" +#include "luos_engine.h" diff --git a/engine/core/inc/node.h b/engine/core/inc/node.h index 34ccb0708..0433354b7 100644 --- a/engine/core/inc/node.h +++ b/engine/core/inc/node.h @@ -9,6 +9,7 @@ #include #include "engine_config.h" +#include "struct_phy.h" /******************************************************************************* * Definitions @@ -35,11 +36,11 @@ typedef struct __attribute__((__packed__)) { uint16_t node_id : 12; /*!< Node id */ uint16_t certified : 4; /*!< True if the node have a certificate */ - uint8_t node_info; }; - uint16_t port_table[NBR_PORT]; /*!< Phisical port connections */ + uint8_t node_info; + connection_t connection; }; - uint8_t unmap[NBR_PORT + 3]; /*!< Uncmaped form. */ + uint8_t unmap[sizeof(connection_t) + 3]; /*!< Uncmaped form. */ }; } node_t; @@ -49,6 +50,8 @@ typedef struct __attribute__((__packed__)) void Node_Init(void); void Node_Loop(void); node_t *Node_Get(void); +void Node_WillGetId(void); +bool Node_WaitId(void); node_state_t Node_GetState(void); void Node_SetState(node_state_t); diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index 9ddf32e52..a50dfb946 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -49,9 +49,9 @@ typedef struct __attribute__((__packed__)) uint16_t certified : 4; // True if the node have a certificate uint8_t node_info; // node info can contain info such as the saving of routing table }; - uint16_t port_table[(MAX_ALIAS_SIZE + 2 + 2 + sizeof(uint8_t) - 2) / 2]; // Node link table + connection_t connection; // Node connection source }; - uint8_t unmap_data[MAX_ALIAS_SIZE + 2 + 2 + sizeof(uint8_t)]; + uint8_t unmap_data[MAX_ALIAS_SIZE + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint8_t)]; }; } routing_table_t; diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 696ac92ec..daaa155f7 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -29,7 +29,9 @@ typedef enum typedef enum { // Luos specific registers - WRITE_NODE_ID, // Get and save a new given node ID. + NODE_ID, // Get and save a new given node ID. + CONNECTION_DATA, // Message containing connection_t information or part of it (output port_t). + PORT_DATA, // Message containing port_t information. This is used to complete the input part of a partial CONNECTION_DATA. START_DETECTION, // Start a detection END_DETECTION, // Detect the end of a detection LOCAL_RTB, // Ask(size == 0), generate(size == 2) a local routing_table. diff --git a/engine/core/src/node.c b/engine/core/src/node.c index fe8f2cee0..b452dd5aa 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -16,6 +16,7 @@ typedef struct node_t info; node_state_t state; bool timeout_run; + bool wait_id; // A flag to indicate that wr are about to reeive a node_id uint32_t timeout; } node_ctx_t; @@ -38,6 +39,27 @@ node_t *Node_Get(void) return (node_t *)&node_ctx.info; } +/****************************************************************************** + * @brief indicate to the node that it is waiting for a node ID + * @return None + ******************************************************************************/ +void Node_WillGetId(void) +{ + node_ctx.wait_id = true; +} + +/****************************************************************************** + * @brief check if node is actually expecting an ID to come + * @param None + * @return bool + ******************************************************************************/ +bool Node_WaitId(void) +{ + bool return_value = node_ctx.wait_id; + node_ctx.wait_id = false; + return return_value; +} + /****************************************************************************** * @brief get network_state value * @param None @@ -65,6 +87,7 @@ void Node_Init(void) node_ctx.node_info |= 1 << 0; #endif Node_SetState(NO_DETECTION); + node_ctx.wait_id = false; } /****************************************************************************** diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index b417ba5a9..89d3104f3 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -32,7 +32,7 @@ static uint16_t RoutingTB_BigestNodeID(void); uint16_t RoutingTB_GetServiceIndex(uint16_t id); bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg); -static void RoutingTB_Generate(service_t *service, uint16_t nb_node); +static void RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table); static void RoutingTB_Share(service_t *service, uint16_t nb_node); static void RoutingTB_SendEndDetection(service_t *service); @@ -236,7 +236,7 @@ bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg) * @param nb_node : Node number on network * @return None ******************************************************************************/ -static void RoutingTB_Generate(service_t *service, uint16_t nb_node) +static void RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table) { LUOS_ASSERT(service); // Asks for introduction for every found node (even the one detecting). @@ -255,6 +255,8 @@ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) intro_msg.header.size = 2; last_service_id = RoutingTB_BigestID() + 1; memcpy(intro_msg.data, &last_service_id, sizeof(uint16_t)); + // save the current last routing table entry allowing us to easily write the connection informations later + uint16_t rtb_next_node_index = RoutingTB_GetLastEntry(); // Ask to introduce and wait for a reply if (!RoutingTB_WaitRoutingTable(service, &intro_msg)) { @@ -262,7 +264,11 @@ static void RoutingTB_Generate(service_t *service, uint16_t nb_node) nb_node = last_node_id; break; } - last_node_id = RoutingTB_BigestNodeID(); + // The node answer don't include connection because the node don't know it yet + // add this information to the routing table + LUOS_ASSERT(routing_table[rtb_next_node_index].mode == NODE); + routing_table[rtb_next_node_index].connection = connection_table[last_node_id]; + last_node_id = RoutingTB_BigestNodeID(); } // Check Alias duplication. uint16_t nb_service = RoutingTB_BigestID(); @@ -362,14 +368,17 @@ void RoutingTB_SendEndDetection(service_t *service) void RoutingTB_DetectServices(service_t *service) { LUOS_ASSERT(service); + // Create a connetion list to store all the connection describing the topology + connection_t connection_table[MAX_NODE_NUMBER]; + memset(connection_table, 0xFFFFFFFF, sizeof(connection_table)); // Starts the topology detection. - uint16_t nb_node = LuosIO_TopologyDetection(service); + uint16_t nb_node = LuosIO_TopologyDetection(service, connection_table); // Clear data reception state Luos_ReceiveData(NULL, NULL, NULL); // Clear the routing table. RoutingTB_Erase(); // Generate the routing_table - RoutingTB_Generate(service, nb_node); + RoutingTB_Generate(service, nb_node, connection_table); // We have a complete routing table now share it with others. RoutingTB_Share(service, nb_node); // Send a message to indicate the end of the detection diff --git a/engine/engine_config.h b/engine/engine_config.h index 23e346126..6be6fa98f 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -10,22 +10,26 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command -#define ROBUS_PROTOCOL_NB 13 // Number of Robus protocol command -#define ALIAS_SIZE 15 // Number of max char for service alias +#define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command +#define ROBUS_PROTOCOL_NB 13 // Number of Robus protocol command +#define ALIAS_SIZE 15 // Number of max char for service alias +#define MAX_ALIAS_SIZE 16 #define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection #define BOOT_TIMEOUT 1000 #define DEFAULTID 0x00 #define PROTOCOL_REVISION 0 #define BROADCAST_VAL 0x0FFF -#define MAX_ALIAS_SIZE 16 #define MAX_DATA_MSG_SIZE 128 #ifndef MAX_SERVICE_NUMBER #define MAX_SERVICE_NUMBER 5 #endif +#ifndef MAX_NODE_NUMBER + #define MAX_NODE_NUMBER 20 +#endif + #ifndef MAX_RTB_ENTRY #define MAX_RTB_ENTRY 40 #endif @@ -46,10 +50,6 @@ #define MAX_MSG_NB 2 * MAX_SERVICE_NUMBER #endif -#ifndef NBR_PORT - #define NBR_PORT 2 -#endif - #ifndef LAST_TOPIC #define LAST_TOPIC 20 #endif diff --git a/examples/apps/alarm_controller/alarm_controller.h b/examples/apps/alarm_controller/alarm_controller.h index d5be9ae2c..e9a7b934f 100644 --- a/examples/apps/alarm_controller/alarm_controller.h +++ b/examples/apps/alarm_controller/alarm_controller.h @@ -8,6 +8,7 @@ #define ALARM_CONTROLLER_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/apps/biometric-security/biometric_security.h b/examples/apps/biometric-security/biometric_security.h index bd2c974e8..811c318cf 100644 --- a/examples/apps/biometric-security/biometric_security.h +++ b/examples/apps/biometric-security/biometric_security.h @@ -11,6 +11,7 @@ #define BIOMETRIC_SECURITY_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -26,4 +27,4 @@ void BiometricSecurity_Init(void); void BiometricSecurity_Loop(void); -#endif /* BIOMETRIC_SECURITY_H */ \ No newline at end of file +#endif /* BIOMETRIC_SECURITY_H */ diff --git a/examples/apps/start_controller/start_controller.h b/examples/apps/start_controller/start_controller.h index c237cbbb0..c8397fba6 100644 --- a/examples/apps/start_controller/start_controller.h +++ b/examples/apps/start_controller/start_controller.h @@ -8,6 +8,7 @@ #define START_CONTROLLER_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/bldc_simple_foc/node_config.h b/examples/projects/Arduino/bldc_simple_foc/node_config.h index f31eedab6..6e43f2e33 100644 --- a/examples/projects/Arduino/bldc_simple_foc/node_config.h +++ b/examples/projects/Arduino/bldc_simple_foc/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp index eb520f68d..924a9033f 100644 --- a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp @@ -7,6 +7,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #ifdef __cplusplus } @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Motor_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/button/lib/button/button.h b/examples/projects/Arduino/button/lib/button/button.h index 19367b3fb..64d92f652 100644 --- a/examples/projects/Arduino/button/lib/button/button.h +++ b/examples/projects/Arduino/button/lib/button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/Arduino/button/node_config.h b/examples/projects/Arduino/button/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/Arduino/button/node_config.h +++ b/examples/projects/Arduino/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/button/src/Button.cpp b/examples/projects/Arduino/button/src/Button.cpp index c0edf7df3..93080432c 100644 --- a/examples/projects/Arduino/button/src/Button.cpp +++ b/examples/projects/Arduino/button/src/Button.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "button.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Button_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h index 57175717b..ded9ac68f 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,6 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -26,4 +27,4 @@ void Fingerprint_Init(void); void Fingerprint_Loop(void); -#endif /* FINGERPRINT_H_ */ \ No newline at end of file +#endif /* FINGERPRINT_H_ */ diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h index 091e5ee29..be8182923 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h @@ -11,6 +11,7 @@ #define FINGERPRINT_DRV_H_ #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -43,4 +44,4 @@ uint8_t FingerprintDrv_Enroll(void); uint8_t FingerprintDrv_CheckAuth(void); uint8_t FingerprintDrv_DeleteAll(void); -#endif /* FINGERPRINT_DRV_H_ */ \ No newline at end of file +#endif /* FINGERPRINT_DRV_H_ */ diff --git a/examples/projects/Arduino/fingerprint/node_config.h b/examples/projects/Arduino/fingerprint/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/Arduino/fingerprint/node_config.h +++ b/examples/projects/Arduino/fingerprint/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp b/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp index 3ee2ed449..cbadecb74 100644 --- a/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp +++ b/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "fingerprint.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Fingerprint_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/gate_serialcom/node_config.h b/examples/projects/Arduino/gate_serialcom/node_config.h index 0dc7b8a08..b2fd0f8f2 100644 --- a/examples/projects/Arduino/gate_serialcom/node_config.h +++ b/examples/projects/Arduino/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp b/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp index ebee0868e..c97fb2e9c 100644 --- a/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp +++ b/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp @@ -9,6 +9,7 @@ extern "C" #include #include #include "luos_engine.h" +#include "robus.h" #ifdef __cplusplus } @@ -18,6 +19,7 @@ void setup() { Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); } diff --git a/examples/projects/Arduino/inspector_serialcom/node_config.h b/examples/projects/Arduino/inspector_serialcom/node_config.h index f4cca9037..8f21d5357 100644 --- a/examples/projects/Arduino/inspector_serialcom/node_config.h +++ b/examples/projects/Arduino/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp b/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp index 826ab373b..46592bb80 100644 --- a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp +++ b/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp @@ -9,6 +9,7 @@ extern "C" #include #include #include "luos_engine.h" +#include "robus.h" #ifdef __cplusplus } @@ -18,6 +19,7 @@ void setup() { Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); } diff --git a/examples/projects/Arduino/lcd/lib/Lcd/lcd.h b/examples/projects/Arduino/lcd/lib/Lcd/lcd.h index 96a6f8518..9b5d05d67 100644 --- a/examples/projects/Arduino/lcd/lib/Lcd/lcd.h +++ b/examples/projects/Arduino/lcd/lib/Lcd/lcd.h @@ -10,6 +10,7 @@ #define LCD_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/lcd/node_config.h b/examples/projects/Arduino/lcd/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/Arduino/lcd/node_config.h +++ b/examples/projects/Arduino/lcd/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/lcd/src/Lcd.cpp b/examples/projects/Arduino/lcd/src/Lcd.cpp index 1c4ebf303..83ad115f1 100644 --- a/examples/projects/Arduino/lcd/src/Lcd.cpp +++ b/examples/projects/Arduino/lcd/src/Lcd.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "lcd.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Lcd_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/led/lib/led/led.h b/examples/projects/Arduino/led/lib/led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/Arduino/led/lib/led/led.h +++ b/examples/projects/Arduino/led/lib/led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/led/node_config.h b/examples/projects/Arduino/led/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/Arduino/led/node_config.h +++ b/examples/projects/Arduino/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/led/src/led.cpp b/examples/projects/Arduino/led/src/led.cpp index eefb8a77a..a879f45c8 100644 --- a/examples/projects/Arduino/led/src/led.cpp +++ b/examples/projects/Arduino/led/src/led.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "led.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Led_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h index 01f5b9162..dbf92462b 100644 --- a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h +++ b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h @@ -10,6 +10,7 @@ #define SERVO_DRV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -48,4 +49,4 @@ void ServoDrv_Init(void); uint8_t ServoDrv_SetPosition(angular_position_t angle); uint8_t ServoDrv_Parameter(servo_parameters_t param); -#endif /* SERVO_DRV_H*/ \ No newline at end of file +#endif /* SERVO_DRV_H*/ diff --git a/examples/projects/Arduino/servo_motor/node_config.h b/examples/projects/Arduino/servo_motor/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/Arduino/servo_motor/node_config.h +++ b/examples/projects/Arduino/servo_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp b/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp index 63c52bfdc..a85e4691b 100644 --- a/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp +++ b/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "servo_motor.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Servo_Init(); } /****************************************************************************** diff --git a/examples/projects/Arduino/stepper_simple_foc/node_config.h b/examples/projects/Arduino/stepper_simple_foc/node_config.h index d7c1c11f6..3bbad9405 100644 --- a/examples/projects/Arduino/stepper_simple_foc/node_config.h +++ b/examples/projects/Arduino/stepper_simple_foc/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp index 7b99ffea7..54e5b557f 100644 --- a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp @@ -9,6 +9,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #ifdef __cplusplus } @@ -22,6 +23,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Motor_Init(); } /****************************************************************************** diff --git a/examples/projects/ESP32/button/lib/button/button.h b/examples/projects/ESP32/button/lib/button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/ESP32/button/lib/button/button.h +++ b/examples/projects/ESP32/button/lib/button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/button/node_config.h b/examples/projects/ESP32/button/node_config.h index c5fd72009..c943cc773 100644 --- a/examples/projects/ESP32/button/node_config.h +++ b/examples/projects/ESP32/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/button/src/main.c b/examples/projects/ESP32/button/src/main.c index 184197668..43d1137f4 100644 --- a/examples/projects/ESP32/button/src/main.c +++ b/examples/projects/ESP32/button/src/main.c @@ -7,11 +7,13 @@ CONDITIONS OF ANY KIND, either express or implied. */ #include "luos_engine.h" +#include "robus.h" #include "button.h" void app_main(void) { Luos_Init(); + Robus_Init(); Button_Init(); while (1) diff --git a/examples/projects/ESP32/button_arduino/lib/button/button.h b/examples/projects/ESP32/button_arduino/lib/button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/ESP32/button_arduino/lib/button/button.h +++ b/examples/projects/ESP32/button_arduino/lib/button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/button_arduino/node_config.h b/examples/projects/ESP32/button_arduino/node_config.h index c5fd72009..c943cc773 100644 --- a/examples/projects/ESP32/button_arduino/node_config.h +++ b/examples/projects/ESP32/button_arduino/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/button_arduino/src/main.cpp b/examples/projects/ESP32/button_arduino/src/main.cpp index 2eb132a35..c4c0bc049 100644 --- a/examples/projects/ESP32/button_arduino/src/main.cpp +++ b/examples/projects/ESP32/button_arduino/src/main.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "button.h" #ifdef __cplusplus @@ -20,6 +21,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Button_Init(); } /****************************************************************************** diff --git a/examples/projects/ESP32/gate_serialcom/node_config.h b/examples/projects/ESP32/gate_serialcom/node_config.h index d83aab5fd..dd56027d0 100644 --- a/examples/projects/ESP32/gate_serialcom/node_config.h +++ b/examples/projects/ESP32/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/gate_serialcom/src/main.c b/examples/projects/ESP32/gate_serialcom/src/main.c index b26a7357a..283f95390 100644 --- a/examples/projects/ESP32/gate_serialcom/src/main.c +++ b/examples/projects/ESP32/gate_serialcom/src/main.c @@ -1,11 +1,13 @@ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" void app_main(void) { Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); diff --git a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h index f6f07673e..c0fb39334 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp b/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp index 27a7bd528..8b6383ed5 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp +++ b/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" @@ -21,6 +22,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); } diff --git a/examples/projects/ESP32/gate_wscom/node_config.h b/examples/projects/ESP32/gate_wscom/node_config.h index 95402b6cb..438723a60 100644 --- a/examples/projects/ESP32/gate_wscom/node_config.h +++ b/examples/projects/ESP32/gate_wscom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/gate_wscom/src/main.c b/examples/projects/ESP32/gate_wscom/src/main.c index b26a7357a..283f95390 100644 --- a/examples/projects/ESP32/gate_wscom/src/main.c +++ b/examples/projects/ESP32/gate_wscom/src/main.c @@ -1,11 +1,13 @@ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" void app_main(void) { Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); diff --git a/examples/projects/ESP32/gate_wscom_arduino/node_config.h b/examples/projects/ESP32/gate_wscom_arduino/node_config.h index 6697457db..c86f144f4 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_wscom_arduino/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp b/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp index 27a7bd528..8b6383ed5 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp +++ b/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp @@ -6,6 +6,7 @@ extern "C" #endif #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" @@ -21,6 +22,7 @@ extern "C" void setup() { Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); } diff --git a/examples/projects/ESP32/led/lib/led/led.h b/examples/projects/ESP32/led/lib/led/led.h index 392ff0240..a0cf02055 100644 --- a/examples/projects/ESP32/led/lib/led/led.h +++ b/examples/projects/ESP32/led/lib/led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/led/node_config.h b/examples/projects/ESP32/led/node_config.h index c5fd72009..c943cc773 100644 --- a/examples/projects/ESP32/led/node_config.h +++ b/examples/projects/ESP32/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/ESP32/led/src/main.c b/examples/projects/ESP32/led/src/main.c index 94c1ea1f0..3ab197bf1 100644 --- a/examples/projects/ESP32/led/src/main.c +++ b/examples/projects/ESP32/led/src/main.c @@ -1,9 +1,11 @@ #include "luos_engine.h" +#include "robus.h" #include "led.h" void app_main(void) { Luos_Init(); + Robus_Init(); Led_Init(); while (1) @@ -11,4 +13,4 @@ void app_main(void) Luos_Loop(); Led_Loop(); } -} \ No newline at end of file +} diff --git a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h index 355ba4d79..7cfb417c6 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h +++ b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h @@ -2,8 +2,9 @@ #define __BMP280_H__ #include "SPI_Driver.h" #include "luos_engine.h" +#include "robus.h" void BMP280_Init(); void BMP280_Loop(); -#endif \ No newline at end of file +#endif diff --git a/examples/projects/NUCLEO-F072RB/barometer/node_config.h b/examples/projects/NUCLEO-F072RB/barometer/node_config.h index 69903b5fa..2fc863673 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/barometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/NUCLEO-F072RB/barometer/src/main.c b/examples/projects/NUCLEO-F072RB/barometer/src/main.c index 70573f599..ce9534c64 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/src/main.c +++ b/examples/projects/NUCLEO-F072RB/barometer/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "BMP280.h" void SystemClock_Config(void); @@ -34,6 +35,7 @@ int main(void) SystemClock_Config(); MX_GPIO_Init(); Luos_Init(); + Robus_Init(); BMP280_Init(); while (1) diff --git a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h index 0e1ee0e81..0d73ae7aa 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c index cf416baf3..99af476e5 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c @@ -24,6 +24,8 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -87,6 +89,8 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { LUOS_RUN() diff --git a/examples/projects/NUCLEO-F072RB/button/node_config.h b/examples/projects/NUCLEO-F072RB/button/node_config.h index a08135f1d..a191b492d 100644 --- a/examples/projects/NUCLEO-F072RB/button/node_config.h +++ b/examples/projects/NUCLEO-F072RB/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F072RB/button/src/main.c b/examples/projects/NUCLEO-F072RB/button/src/main.c index 4bf18e77e..a6fa48094 100644 --- a/examples/projects/NUCLEO-F072RB/button/src/main.c +++ b/examples/projects/NUCLEO-F072RB/button/src/main.c @@ -25,6 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h index a09e2341d..c101e7f81 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h index cd69b45fc..e005456e0 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c b/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c index ffdc94856..4691dadc3 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h index ff1cdd1d4..f6e95bcd2 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c index f0f70a922..81f960717 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h index ec408797e..9d0e413fa 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c index af528d067..cb5939a8f 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "inspector.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5e6a360ff..bfdaf2ef3 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -31,4 +32,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c b/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c index 9abd7096a..d1f007892 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c @@ -25,6 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h index c3c3ffdf5..230da0845 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c index fcbed0142..9c2200e74 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -90,6 +91,8 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) // launch bootloader app while (1) { diff --git a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/button/node_config.h b/examples/projects/NUCLEO-F401RE/button/node_config.h index 6dfb410fd..2f61b7924 100644 --- a/examples/projects/NUCLEO-F401RE/button/node_config.h +++ b/examples/projects/NUCLEO-F401RE/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/button/src/main.c b/examples/projects/NUCLEO-F401RE/button/src/main.c index 75d9ae0ff..2194bbf36 100644 --- a/examples/projects/NUCLEO-F401RE/button/src/main.c +++ b/examples/projects/NUCLEO-F401RE/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h index f080352d4..e089b1f1f 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h index f4ffa6f0e..997e5d960 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c b/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c index 013e73e34..ae85a7966 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h index fa7b67c4d..30971136d 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c index 027a6ffc6..12e1fc2c7 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h index 3fde59dc9..c155b6677 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c index ad57d8212..cdb7b5d41 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c index c67048e4a..994c1e7a4 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c +++ b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c @@ -7,6 +7,7 @@ #include "main.h" #include "alias_save.h" #include "luos_engine.h" +#include "robus.h" #include "string.h" /******************************************************************************* @@ -87,4 +88,4 @@ static void Alias_FlashPageErase(void) HAL_FLASH_Unlock(); HAL_FLASHEx_Erase(&s_eraseinit, §or_error); HAL_FLASH_Lock(); -} \ No newline at end of file +} diff --git a/examples/projects/NUCLEO-F401RE/led/node_config.h b/examples/projects/NUCLEO-F401RE/led/node_config.h index 6dfb410fd..2f61b7924 100644 --- a/examples/projects/NUCLEO-F401RE/led/node_config.h +++ b/examples/projects/NUCLEO-F401RE/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/led/src/main.c b/examples/projects/NUCLEO-F401RE/led/src/main.c index b7d8c3d98..9d3d7daac 100644 --- a/examples/projects/NUCLEO-F401RE/led/src/main.c +++ b/examples/projects/NUCLEO-F401RE/led/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Led_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5940e8520..5d41c5a65 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -33,4 +34,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h index 85f50fc13..b8b47bc7f 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c b/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c index 2931e1c09..85d52815f 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c @@ -25,6 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h index f2c1ff38d..d764c20cf 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c index 435e02e8e..5f6bfccc3 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -90,6 +91,8 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) // launch bootloader app while (1) { diff --git a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/button/node_config.h b/examples/projects/NUCLEO-F410RB/button/node_config.h index d90ae6816..9d5ee10ae 100644 --- a/examples/projects/NUCLEO-F410RB/button/node_config.h +++ b/examples/projects/NUCLEO-F410RB/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/button/src/main.c b/examples/projects/NUCLEO-F410RB/button/src/main.c index 10d0083a7..5d2e9fff9 100644 --- a/examples/projects/NUCLEO-F410RB/button/src/main.c +++ b/examples/projects/NUCLEO-F410RB/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h index f080352d4..e089b1f1f 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h index f4ffa6f0e..997e5d960 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c b/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c index 013e73e34..ae85a7966 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h index 127363770..70a84c3d8 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c index 8abeece16..c60886695 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h index 52406e55e..560662e5b 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c index cd34f4f44..d6bdde600 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F410RB/led/node_config.h b/examples/projects/NUCLEO-F410RB/led/node_config.h index e5f5c7d09..00cc3c093 100644 --- a/examples/projects/NUCLEO-F410RB/led/node_config.h +++ b/examples/projects/NUCLEO-F410RB/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/led/src/main.c b/examples/projects/NUCLEO-F410RB/led/src/main.c index 019371828..b1320fa24 100644 --- a/examples/projects/NUCLEO-F410RB/led/src/main.c +++ b/examples/projects/NUCLEO-F410RB/led/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Led_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5940e8520..5d41c5a65 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -33,4 +34,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h index 85f50fc13..b8b47bc7f 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c b/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c index 2931e1c09..85d52815f 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c @@ -25,6 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h index 114000d6a..28fbda3ff 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c index 45f74ba98..2d6b44374 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ @@ -89,6 +90,9 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { /* USER CODE END WHILE */ diff --git a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/button/node_config.h b/examples/projects/NUCLEO-G431KB/button/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-G431KB/button/node_config.h +++ b/examples/projects/NUCLEO-G431KB/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/button/src/main.c b/examples/projects/NUCLEO-G431KB/button/src/main.c index cffc3f6e7..e4911eaef 100644 --- a/examples/projects/NUCLEO-G431KB/button/src/main.c +++ b/examples/projects/NUCLEO-G431KB/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h index c3f9d0fac..8a103f2b1 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h index 301d275a9..1900fb99e 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c b/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c index 653f6f387..2492edb17 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h index 4d7f5e207..83173ee64 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c index fec2c5056..be3929a79 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h index 26e0de2ad..50c7c3240 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c index 851e01674..6395f48b5 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h index 47a003ec5..a92f6ce7e 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -33,4 +34,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h index 301d275a9..1900fb99e 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c b/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c index fe74c39ea..1c713fa5a 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c @@ -25,6 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h index 114000d6a..28fbda3ff 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c index 3164486bf..068a8584c 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -89,6 +90,9 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { /* USER CODE END WHILE */ diff --git a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G474RE/button/node_config.h b/examples/projects/NUCLEO-G474RE/button/node_config.h index ef25ed2ee..0603cb86e 100644 --- a/examples/projects/NUCLEO-G474RE/button/node_config.h +++ b/examples/projects/NUCLEO-G474RE/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G474RE/button/src/main.c b/examples/projects/NUCLEO-G474RE/button/src/main.c index 1b67f1f18..7b4875771 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/main.c +++ b/examples/projects/NUCLEO-G474RE/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ LUOS_ADD_PACKAGE(Button) + LUOS_ADD_PACKAGE(Robus) /* USER CODE END 2 */ /* Infinite loop */ diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h index 4d7f5e207..83173ee64 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c b/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c index 608131123..0c61c6ed3 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h index 26e0de2ad..50c7c3240 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c index c1ade5033..443355d49 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index 159752726..0e7056282 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -39,6 +39,7 @@ * :---------------------|------------------------------------------------------ * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c index 51821d4e8..5854b5813 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c @@ -22,6 +22,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -89,6 +90,9 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { LUOS_RUN() diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index b8c8a0bc4..2c230b3e1 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -39,6 +39,7 @@ * :---------------------|------------------------------------------------------ * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L073RZ/button/src/main.c b/examples/projects/NUCLEO-L073RZ/button/src/main.c index fffdc840a..4da9c3f10 100644 --- a/examples/projects/NUCLEO-L073RZ/button/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/button/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -81,6 +82,7 @@ int main(void) /* USER CODE BEGIN SysInit */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END SysInit */ diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h index cc23fa12b..96b0111e3 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c b/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c index 753a6bf3d..df86c8475 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -82,6 +83,7 @@ int main(void) /* USER CODE BEGIN SysInit */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END SysInit */ diff --git a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h index 36f2f9fe9..bbf53e225 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c index ebeb62c5a..0c2c71353 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -85,6 +86,9 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { LUOS_RUN() diff --git a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/button/node_config.h b/examples/projects/NUCLEO-L432KC/button/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/button/node_config.h +++ b/examples/projects/NUCLEO-L432KC/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/button/src/main.c b/examples/projects/NUCLEO-L432KC/button/src/main.c index 59951d8f6..5a6a34f20 100644 --- a/examples/projects/NUCLEO-L432KC/button/src/main.c +++ b/examples/projects/NUCLEO-L432KC/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h index 7cab2dda4..f7bf4d2f1 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c b/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c index bda5fe95b..b05842cb5 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h index d74f65ec1..855d00010 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,6 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -26,4 +27,4 @@ void Fingerprint_Init(void); void Fingerprint_Loop(void); -#endif /* FINGERPRINT_H_ */ \ No newline at end of file +#endif /* FINGERPRINT_H_ */ diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c b/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c index 3bc31d23d..82e521743 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c +++ b/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "fingerprint.h" /* USER CODE END Includes */ @@ -85,6 +86,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Fingerprint_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h index 4d7f5e207..83173ee64 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c b/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c index 053fa74b8..ba64b4c2d 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h index 8c9bf4915..a6db26b14 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h +++ b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h @@ -8,6 +8,7 @@ #define GPIO_DEV_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/gpio/node_config.h b/examples/projects/NUCLEO-L432KC/gpio/node_config.h index 0fec68848..22f3dad59 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gpio/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/gpio/src/main.c b/examples/projects/NUCLEO-L432KC/gpio/src/main.c index 764089734..5f392593e 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/src/main.c +++ b/examples/projects/NUCLEO-L432KC/gpio/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gpio_dev.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); GpioDev_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h index 26e0de2ad..50c7c3240 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c index a7807b1cc..9059dc0d7 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h index 39cba35ea..741816125 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h +++ b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h @@ -11,6 +11,7 @@ #define LCD_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-L432KC/lcd/node_config.h b/examples/projects/NUCLEO-L432KC/lcd/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/node_config.h +++ b/examples/projects/NUCLEO-L432KC/lcd/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/lcd/src/main.c b/examples/projects/NUCLEO-L432KC/lcd/src/main.c index ecf5f1444..4c3bc32eb 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/src/main.c +++ b/examples/projects/NUCLEO-L432KC/lcd/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "lcd.h" /* USER CODE END Includes */ @@ -86,6 +87,7 @@ int main(void) /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Lcd_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-L432KC/led/node_config.h b/examples/projects/NUCLEO-L432KC/led/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/led/node_config.h +++ b/examples/projects/NUCLEO-L432KC/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/led/src/main.c b/examples/projects/NUCLEO-L432KC/led/src/main.c index 4ffb40ac0..0ee3e3c4b 100644 --- a/examples/projects/NUCLEO-L432KC/led/src/main.c +++ b/examples/projects/NUCLEO-L432KC/led/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Led_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h index 951f0f958..cd754f270 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -33,4 +34,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c b/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c index 1573e9a94..19658cbab 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h index d9d11c2bc..34fc74db7 100644 --- a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h +++ b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h @@ -11,6 +11,7 @@ #define SERVO_DRV_H #include "luos_engine.h" +#include "robus.h" #include "luos_hal.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/servo/node_config.h b/examples/projects/NUCLEO-L432KC/servo/node_config.h index 4963397df..53251109f 100644 --- a/examples/projects/NUCLEO-L432KC/servo/node_config.h +++ b/examples/projects/NUCLEO-L432KC/servo/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/NUCLEO-L432KC/servo/src/main.c b/examples/projects/NUCLEO-L432KC/servo/src/main.c index b990c691f..ff111dfa8 100644 --- a/examples/projects/NUCLEO-L432KC/servo/src/main.c +++ b/examples/projects/NUCLEO-L432KC/servo/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "servo.h" /* USER CODE END Includes */ @@ -85,6 +86,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Servo_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c index 4828a1d47..9e44fbfa6 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c @@ -28,6 +28,7 @@ #include "definitions.h" // SYS function prototypes #include "luos_engine.h" +#include "robus.h" // ***************************************************************************** // ***************************************************************************** @@ -40,6 +41,8 @@ int main(void) /* Initialize all modules */ SYS_Initialize(NULL); + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) // launch bootloader app while (1) { diff --git a/examples/projects/SAMD21XPLAINED/button/lib/button/button.h b/examples/projects/SAMD21XPLAINED/button/lib/button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/SAMD21XPLAINED/button/lib/button/button.h +++ b/examples/projects/SAMD21XPLAINED/button/lib/button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/SAMD21XPLAINED/button/node_config.h b/examples/projects/SAMD21XPLAINED/button/node_config.h index 8f7265358..056ce9509 100644 --- a/examples/projects/SAMD21XPLAINED/button/node_config.h +++ b/examples/projects/SAMD21XPLAINED/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/SAMD21XPLAINED/button/src/main.c b/examples/projects/SAMD21XPLAINED/button/src/main.c index cb91f0293..db62a9707 100644 --- a/examples/projects/SAMD21XPLAINED/button/src/main.c +++ b/examples/projects/SAMD21XPLAINED/button/src/main.c @@ -9,6 +9,7 @@ #include "device.h" #include "luos_engine.h" +#include "robus.h" #include "button.h" void SetSystemClock_48Mhz(void); @@ -19,6 +20,7 @@ int main() SetSystemClock_48Mhz(); Luos_Init(); + Robus_Init(); Button_Init(); while (1) @@ -116,4 +118,4 @@ void SetSystemClock_48Mhz(void) /* Wait for the write to complete */ while (GCLK->STATUS.bit.SYNCBUSY) ; -} \ No newline at end of file +} diff --git a/examples/projects/STM32F4-discovery/bootloader/node_config.h b/examples/projects/STM32F4-discovery/bootloader/node_config.h index c37fdf8be..f6a8050cf 100644 --- a/examples/projects/STM32F4-discovery/bootloader/node_config.h +++ b/examples/projects/STM32F4-discovery/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32F4-discovery/bootloader/src/main.c b/examples/projects/STM32F4-discovery/bootloader/src/main.c index 0ef89e5bc..746ba4fd0 100644 --- a/examples/projects/STM32F4-discovery/bootloader/src/main.c +++ b/examples/projects/STM32F4-discovery/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -88,6 +89,9 @@ int main(void) /* Infinite loop */ /* USER CODE BEGIN WHILE */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { /* USER CODE END WHILE */ diff --git a/examples/projects/STM32F4-discovery/button/lib/Button/button.h b/examples/projects/STM32F4-discovery/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/STM32F4-discovery/button/lib/Button/button.h +++ b/examples/projects/STM32F4-discovery/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/STM32F4-discovery/button/node_config.h b/examples/projects/STM32F4-discovery/button/node_config.h index 985459256..20edd3990 100644 --- a/examples/projects/STM32F4-discovery/button/node_config.h +++ b/examples/projects/STM32F4-discovery/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32F4-discovery/button/src/main.c b/examples/projects/STM32F4-discovery/button/src/main.c index c53e28d12..7f047b829 100644 --- a/examples/projects/STM32F4-discovery/button/src/main.c +++ b/examples/projects/STM32F4-discovery/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h index 1baa7a66b..b33ba6c90 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c b/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c index e1fc8cb9e..7234e75f4 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c +++ b/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h index cafc07dc3..d4ccaa925 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c index 509fda99f..fa99fcefb 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); diff --git a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h index 155578137..2d7560a79 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h +++ b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c index 20fa055f3..ab2cccd9c 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c +++ b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -86,6 +87,9 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ + + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { LUOS_RUN() diff --git a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h index 29464d5e3..510616eca 100644 --- a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h +++ b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h @@ -8,6 +8,7 @@ #define BUTTON_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/STM32L4S5_discovery/button/node_config.h b/examples/projects/STM32L4S5_discovery/button/node_config.h index a42afcefd..aa20ab42f 100644 --- a/examples/projects/STM32L4S5_discovery/button/node_config.h +++ b/examples/projects/STM32L4S5_discovery/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32L4S5_discovery/button/src/main.c b/examples/projects/STM32L4S5_discovery/button/src/main.c index 1205598eb..e3c397281 100644 --- a/examples/projects/STM32L4S5_discovery/button/src/main.c +++ b/examples/projects/STM32L4S5_discovery/button/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h index 200c21575..bc9e029c7 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c b/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c index acc88952e..a5c2b7bc0 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h index e6dd7780f..e458e3b98 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h @@ -8,6 +8,7 @@ #define LED_FADER_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h index d36dbdfb1..d60f8b180 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h @@ -8,6 +8,7 @@ #define LEDFADER_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" @@ -47,4 +48,4 @@ void LedFaderDrv_Init(); void LedFaderDrv_Write(color_t *rgb); -#endif /* LEDFADER_DRV_H */ \ No newline at end of file +#endif /* LEDFADER_DRV_H */ diff --git a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h index a363f0023..596ffe4c5 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/bike_alarm/alarm_controller/src/main.c b/examples/projects/l0/bike_alarm/alarm_controller/src/main.c index 754a29031..3797937a1 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/src/main.c +++ b/examples/projects/l0/bike_alarm/alarm_controller/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led_fader.h" #include "alarm_controller.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); LedFader_Init(); AlarmController_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/bike_alarm/start_controller/node_config.h b/examples/projects/l0/bike_alarm/start_controller/node_config.h index 4f0e60e9d..d0bdfb1bb 100644 --- a/examples/projects/l0/bike_alarm/start_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/start_controller/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/bike_alarm/start_controller/src/main.c b/examples/projects/l0/bike_alarm/start_controller/src/main.c index 41b16d190..36f1b51df 100644 --- a/examples/projects/l0/bike_alarm/start_controller/src/main.c +++ b/examples/projects/l0/bike_alarm/start_controller/src/main.c @@ -27,6 +27,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -93,6 +94,7 @@ int main(void) MX_USART1_UART_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); StartController_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/bootloader/node_config.h b/examples/projects/l0/bootloader/node_config.h index 4eb86040c..5c42741a9 100644 --- a/examples/projects/l0/bootloader/node_config.h +++ b/examples/projects/l0/bootloader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/bootloader/src/main.c b/examples/projects/l0/bootloader/src/main.c index 342a658a9..a987a8b4d 100644 --- a/examples/projects/l0/bootloader/src/main.c +++ b/examples/projects/l0/bootloader/src/main.c @@ -24,6 +24,8 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -86,6 +88,8 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ + LUOS_ADD_PACKAGE(LuosBootloader) + LUOS_ADD_PACKAGE(Robus) while (1) { LUOS_RUN() diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index a08135f1d..a191b492d 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/button/src/main.c b/examples/projects/l0/button/src/main.c index f74a2f726..5f25fe81a 100644 --- a/examples/projects/l0/button/src/main.c +++ b/examples/projects/l0/button/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/button_freertos/lib/Led/led.h b/examples/projects/l0/button_freertos/lib/Led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/l0/button_freertos/lib/Led/led.h +++ b/examples/projects/l0/button_freertos/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/button_freertos/lib/Led/led_drv.h b/examples/projects/l0/button_freertos/lib/Led/led_drv.h index 1223a84d9..52740a857 100644 --- a/examples/projects/l0/button_freertos/lib/Led/led_drv.h +++ b/examples/projects/l0/button_freertos/lib/Led/led_drv.h @@ -8,6 +8,7 @@ #define LED_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" @@ -28,4 +29,4 @@ void LedDrv_Init(); void LedDrv_Write(uint8_t value); -#endif /* LED_DRV_H */ \ No newline at end of file +#endif /* LED_DRV_H */ diff --git a/examples/projects/l0/button_freertos/node_config.h b/examples/projects/l0/button_freertos/node_config.h index e0f2d81da..2862baca5 100644 --- a/examples/projects/l0/button_freertos/node_config.h +++ b/examples/projects/l0/button_freertos/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/button_freertos/src/freertos.c b/examples/projects/l0/button_freertos/src/freertos.c index 7e9f603fd..93c27d049 100644 --- a/examples/projects/l0/button_freertos/src/freertos.c +++ b/examples/projects/l0/button_freertos/src/freertos.c @@ -3,6 +3,7 @@ #include "cmsis_os.h" #include "luos_engine.h" +#include "robus.h" #include "button.h" #include "led.h" @@ -35,6 +36,7 @@ void Firmware_Init(void) { // Initialization of LuosTask Luos_Init(); + Robus_Init(); Button_Init(); Led_Init(); diff --git a/examples/projects/l0/controller_motor/node_config.h b/examples/projects/l0/controller_motor/node_config.h index a7fa0ecc3..bd2f26522 100644 --- a/examples/projects/l0/controller_motor/node_config.h +++ b/examples/projects/l0/controller_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/controller_motor/src/main.c b/examples/projects/l0/controller_motor/src/main.c index 2a2b992ab..b1269c31a 100644 --- a/examples/projects/l0/controller_motor/src/main.c +++ b/examples/projects/l0/controller_motor/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "controller_motor.h" /* USER CODE END Includes */ @@ -86,6 +87,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); ControllerMotor_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h index a09e2341d..c101e7f81 100644 --- a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,6 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/dc_motor/node_config.h b/examples/projects/l0/dc_motor/node_config.h index cd69b45fc..e005456e0 100644 --- a/examples/projects/l0/dc_motor/node_config.h +++ b/examples/projects/l0/dc_motor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/dc_motor/src/main.c b/examples/projects/l0/dc_motor/src/main.c index 4e069b361..d5540c373 100644 --- a/examples/projects/l0/dc_motor/src/main.c +++ b/examples/projects/l0/dc_motor/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dc_motor.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorDC_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h index 813595aad..7be366d3b 100644 --- a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h +++ b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h @@ -8,6 +8,7 @@ #define START_CONTROLLER_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/detection_button/node_config.h b/examples/projects/l0/demo/detection_button/node_config.h index 951da282c..2822eb9c3 100644 --- a/examples/projects/l0/demo/detection_button/node_config.h +++ b/examples/projects/l0/demo/detection_button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/demo/detection_button/src/main.c b/examples/projects/l0/demo/detection_button/src/main.c index 62915aaa4..fb9ae0b45 100644 --- a/examples/projects/l0/demo/detection_button/src/main.c +++ b/examples/projects/l0/demo/detection_button/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "button.h" #include "detection_button.h" /* USER CODE END Includes */ @@ -93,6 +94,7 @@ int main(void) MX_USART1_UART_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Button_Init(); DetectionButton_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h index a7b5182f5..bf5d4eff1 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h @@ -8,6 +8,7 @@ #define DISTANCE_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h b/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h index a9a3044bf..d5ee34a83 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h @@ -10,6 +10,7 @@ #include "stdbool.h" #include "stm32f0xx_hal.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h index e59128e87..a3d0adb41 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h @@ -8,6 +8,7 @@ #define LedStripPosition #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/ledstrip_position/node_config.h b/examples/projects/l0/demo/ledstrip_position/node_config.h index 575c9d858..ac78e0ec8 100644 --- a/examples/projects/l0/demo/ledstrip_position/node_config.h +++ b/examples/projects/l0/demo/ledstrip_position/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/demo/ledstrip_position/src/main.c b/examples/projects/l0/demo/ledstrip_position/src/main.c index a503be881..6edae715d 100644 --- a/examples/projects/l0/demo/ledstrip_position/src/main.c +++ b/examples/projects/l0/demo/ledstrip_position/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "distance.h" #include "ledstrip_position.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Distance_Init(); LedStripPosition_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h index ca4d5d977..497978932 100644 --- a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h +++ b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h @@ -8,6 +8,7 @@ #define MOTOR_COPY_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/motor_copy_app/node_config.h b/examples/projects/l0/demo/motor_copy_app/node_config.h index 054413a1a..df7ef7d8c 100644 --- a/examples/projects/l0/demo/motor_copy_app/node_config.h +++ b/examples/projects/l0/demo/motor_copy_app/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/demo/motor_copy_app/src/main.c b/examples/projects/l0/demo/motor_copy_app/src/main.c index fdbce11ac..7064e79fb 100644 --- a/examples/projects/l0/demo/motor_copy_app/src/main.c +++ b/examples/projects/l0/demo/motor_copy_app/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "motor_copy.h" /* USER CODE END Includes */ @@ -86,6 +87,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); MotorCopy_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h index 3848ef44f..485a5f3ff 100644 --- a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h +++ b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h @@ -8,6 +8,7 @@ #define RUN_MOTOR_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/motor_demo_app/node_config.h b/examples/projects/l0/demo/motor_demo_app/node_config.h index 054413a1a..df7ef7d8c 100644 --- a/examples/projects/l0/demo/motor_demo_app/node_config.h +++ b/examples/projects/l0/demo/motor_demo_app/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/demo/motor_demo_app/src/main.c b/examples/projects/l0/demo/motor_demo_app/src/main.c index b6c2efd8c..1a8656f77 100644 --- a/examples/projects/l0/demo/motor_demo_app/src/main.c +++ b/examples/projects/l0/demo/motor_demo_app/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "run_motor.h" /* USER CODE END Includes */ @@ -86,6 +87,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); RunMotor_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/demo/product_config.h b/examples/projects/l0/demo/product_config.h index 42c1013f8..e284a9071 100644 --- a/examples/projects/l0/demo/product_config.h +++ b/examples/projects/l0/demo/product_config.h @@ -7,6 +7,7 @@ #ifndef PRODUCT_CONFIG_H #define PRODUCT_CONFIG_H #include "luos_engine.h" +#include "robus.h" enum { @@ -38,4 +39,4 @@ typedef struct ledstrip_position_OperationMode_t parameter; // Default value is DISTANCE_DISPLAY } ledstrip_position_Parameter_t; -#endif // PRODUCT_CONFIG_H \ No newline at end of file +#endif // PRODUCT_CONFIG_H diff --git a/examples/projects/l0/distance/lib/Distance/distance.h b/examples/projects/l0/distance/lib/Distance/distance.h index a7b5182f5..bf5d4eff1 100644 --- a/examples/projects/l0/distance/lib/Distance/distance.h +++ b/examples/projects/l0/distance/lib/Distance/distance.h @@ -8,6 +8,7 @@ #define DISTANCE_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h b/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h index a9a3044bf..d5ee34a83 100644 --- a/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h +++ b/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h @@ -10,6 +10,7 @@ #include "stdbool.h" #include "stm32f0xx_hal.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/distance/node_config.h b/examples/projects/l0/distance/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/distance/node_config.h +++ b/examples/projects/l0/distance/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/distance/src/main.c b/examples/projects/l0/distance/src/main.c index a5bb637de..3c67f8f62 100644 --- a/examples/projects/l0/distance/src/main.c +++ b/examples/projects/l0/distance/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "distance.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Distance_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.h b/examples/projects/l0/dxl/lib/Dxl/dxl.h index 899bb0a80..39bc01bab 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.h +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.h @@ -8,6 +8,7 @@ #define DXL_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/dxl/node_config.h b/examples/projects/l0/dxl/node_config.h index 8390fac1a..e7c266871 100644 --- a/examples/projects/l0/dxl/node_config.h +++ b/examples/projects/l0/dxl/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/dxl/src/main.c b/examples/projects/l0/dxl/src/main.c index 560352279..1e52558ae 100644 --- a/examples/projects/l0/dxl/src/main.c +++ b/examples/projects/l0/dxl/src/main.c @@ -28,6 +28,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "dxl.h" /* USER CODE END Includes */ @@ -97,6 +98,7 @@ int main(void) MX_RTC_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Dxl_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h index 702848c19..0a4b0bf37 100644 --- a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,6 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions @@ -26,4 +27,4 @@ void Fingerprint_Init(void); void Fingerprint_Loop(void); -#endif /* FINGERPRINT_H_ */ \ No newline at end of file +#endif /* FINGERPRINT_H_ */ diff --git a/examples/projects/l0/fingerprint/node_config.h b/examples/projects/l0/fingerprint/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/fingerprint/node_config.h +++ b/examples/projects/l0/fingerprint/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/fingerprint/src/main.c b/examples/projects/l0/fingerprint/src/main.c index 743fa94f2..8d5e0d2d2 100644 --- a/examples/projects/l0/fingerprint/src/main.c +++ b/examples/projects/l0/fingerprint/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "fingerprint.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Fingerprint_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index 012118c0f..ab8acc44f 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/gate_serialcom/src/main.c b/examples/projects/l0/gate_serialcom/src/main.c index f515c71df..931c947e6 100644 --- a/examples/projects/l0/gate_serialcom/src/main.c +++ b/examples/projects/l0/gate_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Gate_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/gpio/node_config.h b/examples/projects/l0/gpio/node_config.h index e9b4768e3..c4c0396e1 100644 --- a/examples/projects/l0/gpio/node_config.h +++ b/examples/projects/l0/gpio/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/gpio/src/main.c b/examples/projects/l0/gpio/src/main.c index af6cc030d..d82c4a012 100644 --- a/examples/projects/l0/gpio/src/main.c +++ b/examples/projects/l0/gpio/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "gpio_dev.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); GpioDev_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/imu/lib/Imu/imu.h b/examples/projects/l0/imu/lib/Imu/imu.h index b35e2252d..bf7873ebd 100644 --- a/examples/projects/l0/imu/lib/Imu/imu.h +++ b/examples/projects/l0/imu/lib/Imu/imu.h @@ -8,6 +8,7 @@ #define IMU_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/imu/lib/Imu/mpu_configuration.c b/examples/projects/l0/imu/lib/Imu/mpu_configuration.c index 481a7a25a..60b66ea65 100644 --- a/examples/projects/l0/imu/lib/Imu/mpu_configuration.c +++ b/examples/projects/l0/imu/lib/Imu/mpu_configuration.c @@ -1,5 +1,6 @@ #include #include "luos_engine.h" +#include "robus.h" #include "invensense.h" #include "invensense_adv.h" #include "mpu.h" diff --git a/examples/projects/l0/imu/lib/Imu/mpu_configuration.h b/examples/projects/l0/imu/lib/Imu/mpu_configuration.h index a8d0e1202..3cb025958 100644 --- a/examples/projects/l0/imu/lib/Imu/mpu_configuration.h +++ b/examples/projects/l0/imu/lib/Imu/mpu_configuration.h @@ -2,6 +2,7 @@ #define __MPU_SETUP_H__ #include "luos_engine.h" +#include "robus.h" #include #include #include diff --git a/examples/projects/l0/imu/node_config.h b/examples/projects/l0/imu/node_config.h index 562862b4b..c042ad0c3 100644 --- a/examples/projects/l0/imu/node_config.h +++ b/examples/projects/l0/imu/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/imu/src/main.c b/examples/projects/l0/imu/src/main.c index 217dd3d0c..f607c2824 100644 --- a/examples/projects/l0/imu/src/main.c +++ b/examples/projects/l0/imu/src/main.c @@ -47,6 +47,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "imu.h" /* USER CODE END Includes */ @@ -114,6 +115,7 @@ int main(void) MX_I2C2_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Imu_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/inspector_serialcom/node_config.h b/examples/projects/l0/inspector_serialcom/node_config.h index ec408797e..9d0e413fa 100644 --- a/examples/projects/l0/inspector_serialcom/node_config.h +++ b/examples/projects/l0/inspector_serialcom/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/inspector_serialcom/src/main.c b/examples/projects/l0/inspector_serialcom/src/main.c index d964cedea..79d7838de 100644 --- a/examples/projects/l0/inspector_serialcom/src/main.c +++ b/examples/projects/l0/inspector_serialcom/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "inspector.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Inspector_Init(); Pipe_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/lcd/lib/Lcd/lcd.h b/examples/projects/l0/lcd/lib/Lcd/lcd.h index bb8361213..c371e7648 100644 --- a/examples/projects/l0/lcd/lib/Lcd/lcd.h +++ b/examples/projects/l0/lcd/lib/Lcd/lcd.h @@ -11,6 +11,7 @@ #define LCD_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/lcd/node_config.h b/examples/projects/l0/lcd/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/lcd/node_config.h +++ b/examples/projects/l0/lcd/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/lcd/src/main.c b/examples/projects/l0/lcd/src/main.c index 99a217196..32cda4486 100644 --- a/examples/projects/l0/lcd/src/main.c +++ b/examples/projects/l0/lcd/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "lcd.h" /* USER CODE END Includes */ @@ -88,6 +89,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Lcd_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/led/lib/Led/led.h b/examples/projects/l0/led/lib/Led/led.h index 64026325c..4a8a99bf4 100644 --- a/examples/projects/l0/led/lib/Led/led.h +++ b/examples/projects/l0/led/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led/lib/Led/led_drv.h b/examples/projects/l0/led/lib/Led/led_drv.h index 3b23ed9df..845ab495e 100644 --- a/examples/projects/l0/led/lib/Led/led_drv.h +++ b/examples/projects/l0/led/lib/Led/led_drv.h @@ -8,6 +8,7 @@ #define LED_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" @@ -47,4 +48,4 @@ void LedDrv_Init(); void LedDrv_Write(color_t *rgb); -#endif /* LED_DRV_H */ \ No newline at end of file +#endif /* LED_DRV_H */ diff --git a/examples/projects/l0/led/node_config.h b/examples/projects/l0/led/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/led/node_config.h +++ b/examples/projects/l0/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/led/src/main.c b/examples/projects/l0/led/src/main.c index 36b570f42..ef26a1e4e 100644 --- a/examples/projects/l0/led/src/main.c +++ b/examples/projects/l0/led/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Led_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h index e6dd7780f..e458e3b98 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h +++ b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h @@ -8,6 +8,7 @@ #define LED_FADER_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h b/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h index d36dbdfb1..d60f8b180 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h +++ b/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h @@ -8,6 +8,7 @@ #define LEDFADER_DRV_H #include "luos_engine.h" +#include "robus.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" @@ -47,4 +48,4 @@ void LedFaderDrv_Init(); void LedFaderDrv_Write(color_t *rgb); -#endif /* LEDFADER_DRV_H */ \ No newline at end of file +#endif /* LEDFADER_DRV_H */ diff --git a/examples/projects/l0/led_fader/node_config.h b/examples/projects/l0/led_fader/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/led_fader/node_config.h +++ b/examples/projects/l0/led_fader/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/led_fader/src/main.c b/examples/projects/l0/led_fader/src/main.c index 9395ba3f8..6a9bcbeef 100644 --- a/examples/projects/l0/led_fader/src/main.c +++ b/examples/projects/l0/led_fader/src/main.c @@ -23,6 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led_fader.h" /* USER CODE END Includes */ @@ -87,6 +88,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); LedFader_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h index 7210152a5..b86ed3feb 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h +++ b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h @@ -8,6 +8,7 @@ #define LED_STRIP_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h b/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h index 4a4e893f5..9459e047d 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h +++ b/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "tim.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -19,4 +20,4 @@ * Function ******************************************************************************/ void LedStripDrv_Init(void); -void LedStripDrv_Write(color_t *matrix); \ No newline at end of file +void LedStripDrv_Write(color_t *matrix); diff --git a/examples/projects/l0/led_strip/node_config.h b/examples/projects/l0/led_strip/node_config.h index 941b64d64..06230d3e5 100644 --- a/examples/projects/l0/led_strip/node_config.h +++ b/examples/projects/l0/led_strip/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/led_strip/src/main.c b/examples/projects/l0/led_strip/src/main.c index 7f8249894..c5c41f174 100644 --- a/examples/projects/l0/led_strip/src/main.c +++ b/examples/projects/l0/led_strip/src/main.c @@ -28,6 +28,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "led_strip.h" /* USER CODE END Includes */ @@ -96,6 +97,7 @@ int main(void) MX_TIM2_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); LedStrip_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h index 889b0b020..d68dba091 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h @@ -8,6 +8,7 @@ #define LIGHT_SENSOR_H #include "luos_engine.h" +#include "robus.h" #include "light_sensor_drv.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h index 096058c9b..6fb513491 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h @@ -15,6 +15,7 @@ #include "analog.h" #include "main.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -43,4 +44,4 @@ void LightSensorDrv_Init(void); illuminance_t LightSensorDrv_Read(void); -#endif /* LIGHT_SENSOR_DRV */ \ No newline at end of file +#endif /* LIGHT_SENSOR_DRV */ diff --git a/examples/projects/l0/light_sensor/node_config.h b/examples/projects/l0/light_sensor/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/light_sensor/node_config.h +++ b/examples/projects/l0/light_sensor/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/light_sensor/src/main.c b/examples/projects/l0/light_sensor/src/main.c index e5baed065..787b3e0c2 100644 --- a/examples/projects/l0/light_sensor/src/main.c +++ b/examples/projects/l0/light_sensor/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "light_sensor.h" /* USER CODE END Includes */ @@ -92,6 +93,7 @@ int main(void) MX_USART1_UART_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); LightSensor_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/load/lib/Load/HX711/HX711.h b/examples/projects/l0/load/lib/Load/HX711/HX711.h index 9b8649629..023e3917b 100644 --- a/examples/projects/l0/load/lib/Load/HX711/HX711.h +++ b/examples/projects/l0/load/lib/Load/HX711/HX711.h @@ -10,6 +10,7 @@ #include "stm32f0xx_hal.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/load/lib/Load/load.h b/examples/projects/l0/load/lib/Load/load.h index 5d96531c6..385f896e0 100644 --- a/examples/projects/l0/load/lib/Load/load.h +++ b/examples/projects/l0/load/lib/Load/load.h @@ -8,6 +8,7 @@ #define LOAD_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/load/node_config.h b/examples/projects/l0/load/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/load/node_config.h +++ b/examples/projects/l0/load/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/load/src/main.c b/examples/projects/l0/load/src/main.c index b7e297baf..72acd0320 100644 --- a/examples/projects/l0/load/src/main.c +++ b/examples/projects/l0/load/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "load.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Load_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h index 8cf5566d8..65a31b04d 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,6 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" +#include "robus.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5e6a360ff..bfdaf2ef3 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,6 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ @@ -31,4 +32,4 @@ ******************************************************************************/ void PotentiometerDrv_Init(void); -angular_position_t PotentiometerDrv_Read(void); \ No newline at end of file +angular_position_t PotentiometerDrv_Read(void); diff --git a/examples/projects/l0/potentiometer/node_config.h b/examples/projects/l0/potentiometer/node_config.h index bd2dd44be..0e964aac5 100644 --- a/examples/projects/l0/potentiometer/node_config.h +++ b/examples/projects/l0/potentiometer/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/potentiometer/src/main.c b/examples/projects/l0/potentiometer/src/main.c index 4ba3e3695..1fbbb6476 100644 --- a/examples/projects/l0/potentiometer/src/main.c +++ b/examples/projects/l0/potentiometer/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "potentiometer.h" /* USER CODE END Includes */ @@ -92,6 +93,7 @@ int main(void) MX_USART1_UART_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Potentiometer_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/power_switch/node_config.h b/examples/projects/l0/power_switch/node_config.h index a08135f1d..a191b492d 100644 --- a/examples/projects/l0/power_switch/node_config.h +++ b/examples/projects/l0/power_switch/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/power_switch/src/main.c b/examples/projects/l0/power_switch/src/main.c index 22bdfa2cf..06ed428ca 100644 --- a/examples/projects/l0/power_switch/src/main.c +++ b/examples/projects/l0/power_switch/src/main.c @@ -26,6 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "power_switch.h" /* USER CODE END Includes */ @@ -90,6 +91,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); PowerSwitch_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/servo/lib/Servo/servo_drv.h b/examples/projects/l0/servo/lib/Servo/servo_drv.h index 7f12e8bec..afd8b0924 100644 --- a/examples/projects/l0/servo/lib/Servo/servo_drv.h +++ b/examples/projects/l0/servo/lib/Servo/servo_drv.h @@ -9,6 +9,7 @@ #include "stm32f0xx_hal.h" #include "luos_engine.h" +#include "robus.h" #include "luos_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/servo/node_config.h b/examples/projects/l0/servo/node_config.h index 540c3c059..7a554101a 100644 --- a/examples/projects/l0/servo/node_config.h +++ b/examples/projects/l0/servo/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/servo/src/main.c b/examples/projects/l0/servo/src/main.c index 36abd03c8..2386861fb 100644 --- a/examples/projects/l0/servo/src/main.c +++ b/examples/projects/l0/servo/src/main.c @@ -24,6 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "servo.h" /* USER CODE END Includes */ @@ -89,6 +90,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Servo_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/l0/stepper/node_config.h b/examples/projects/l0/stepper/node_config.h index a08135f1d..a191b492d 100644 --- a/examples/projects/l0/stepper/node_config.h +++ b/examples/projects/l0/stepper/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * MAX_RTB_ENTRY | 40 | Max entries in the routing table diff --git a/examples/projects/l0/stepper/src/main.c b/examples/projects/l0/stepper/src/main.c index 30963d41f..598bfc8c6 100644 --- a/examples/projects/l0/stepper/src/main.c +++ b/examples/projects/l0/stepper/src/main.c @@ -27,6 +27,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" +#include "robus.h" #include "stepper.h" /* USER CODE END Includes */ @@ -94,6 +95,7 @@ int main(void) MX_TIM3_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); + Robus_Init(); Stepper_Init(); /* USER CODE END 2 */ diff --git a/examples/projects/native/button/node_config.h b/examples/projects/native/button/node_config.h index 00a4f1ea4..bf418c0b4 100644 --- a/examples/projects/native/button/node_config.h +++ b/examples/projects/native/button/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/native/button/src/main.c b/examples/projects/native/button/src/main.c index f2e414f5a..790d3f117 100644 --- a/examples/projects/native/button/src/main.c +++ b/examples/projects/native/button/src/main.c @@ -1,13 +1,15 @@ #include "luos_engine.h" +#include "robus.h" #include "button.h" int main(void) { Luos_Init(); + Robus_Init(); Button_Init(); while (1) { Luos_Loop(); Button_Loop(); } -} \ No newline at end of file +} diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index 749bd8af9..cc9e21a84 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -40,6 +40,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/native/gate_wscom/src/main.c b/examples/projects/native/gate_wscom/src/main.c index 41f4894f1..d95e277eb 100644 --- a/examples/projects/native/gate_wscom/src/main.c +++ b/examples/projects/native/gate_wscom/src/main.c @@ -1,4 +1,5 @@ #include "luos_engine.h" +#include "robus.h" #include "pipe.h" #include "gate.h" #include @@ -16,6 +17,7 @@ void *Gate_Pipe_LoopThread(void *vargp) int main(void) { Luos_Init(); + Robus_Init(); Pipe_Init(); Gate_Init(); // Create a thread to convert messages into Json and steam them using Websocket @@ -25,4 +27,4 @@ int main(void) { Luos_Loop(); } -} \ No newline at end of file +} diff --git a/examples/projects/native/led/lib/Led/led.h b/examples/projects/native/led/lib/Led/led.h index 5efb98688..604a8829a 100644 --- a/examples/projects/native/led/lib/Led/led.h +++ b/examples/projects/native/led/lib/Led/led.h @@ -8,6 +8,7 @@ #define LED_H #include "luos_engine.h" +#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/native/led/node_config.h b/examples/projects/native/led/node_config.h index 00a4f1ea4..bf418c0b4 100644 --- a/examples/projects/native/led/node_config.h +++ b/examples/projects/native/led/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/native/led/src/main.c b/examples/projects/native/led/src/main.c index f9e6ad715..f76bdba6b 100644 --- a/examples/projects/native/led/src/main.c +++ b/examples/projects/native/led/src/main.c @@ -1,13 +1,15 @@ #include "luos_engine.h" +#include "robus.h" #include "led.h" int main(void) { Luos_Init(); + Robus_Init(); Led_Init(); while (1) { Luos_Loop(); Led_Loop(); } -} \ No newline at end of file +} diff --git a/examples/projects/native/ping_pong/lib/PingPong/graph.c b/examples/projects/native/ping_pong/lib/PingPong/graph.c index dd57553dc..a48cf9d40 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/graph.c +++ b/examples/projects/native/ping_pong/lib/PingPong/graph.c @@ -6,6 +6,7 @@ #include #include #include "luos_engine.h" +#include "robus.h" #include "game_anim.h" #include "scoring.h" @@ -194,4 +195,4 @@ void score_view(void) printf("\n\tSomeone just lost...\n"); need_update = false; } -} \ No newline at end of file +} diff --git a/examples/projects/native/ping_pong/lib/PingPong/scoring.h b/examples/projects/native/ping_pong/lib/PingPong/scoring.h index 4470feca0..fce4edd61 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/scoring.h +++ b/examples/projects/native/ping_pong/lib/PingPong/scoring.h @@ -8,6 +8,7 @@ #define SCORING_H #include "luos_engine.h" +#include "robus.h" #define SCORE_TOPIC 1 #define SCORE_CMD LUOS_LAST_STD_CMD + 1 diff --git a/examples/projects/native/ping_pong/node_config.h b/examples/projects/native/ping_pong/node_config.h index 889fba9c6..f1cdf8ff6 100644 --- a/examples/projects/native/ping_pong/node_config.h +++ b/examples/projects/native/ping_pong/node_config.h @@ -38,6 +38,7 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 diff --git a/examples/projects/native/ping_pong/src/main.c b/examples/projects/native/ping_pong/src/main.c index 3a6470fb0..17b351006 100644 --- a/examples/projects/native/ping_pong/src/main.c +++ b/examples/projects/native/ping_pong/src/main.c @@ -1,4 +1,5 @@ #include "luos_engine.h" +#include "robus.h" #include "ping_pong.h" #include @@ -14,6 +15,7 @@ void *PingPong_LoopThread(void *vargp) int main(void) { Luos_Init(); + Robus_Init(); PingPong_Init(); pthread_t thread_id; pthread_create(&thread_id, NULL, PingPong_LoopThread, NULL); @@ -21,4 +23,4 @@ int main(void) { Luos_Loop(); } -} \ No newline at end of file +} diff --git a/network/robus/HAL/NATIVE/robus_hal.c b/network/robus/HAL/NATIVE/robus_hal.c index af4c1d014..c0a1f5bb1 100644 --- a/network/robus/HAL/NATIVE/robus_hal.c +++ b/network/robus/HAL/NATIVE/robus_hal.c @@ -20,6 +20,7 @@ #include #include #include "luos_engine.h" +#include "robus.h" #include "luos_hal.h" /******************************************************************************* diff --git a/network/robus/inc/_robus.h b/network/robus/inc/_robus.h new file mode 100644 index 000000000..3ecbd4761 --- /dev/null +++ b/network/robus/inc/_robus.h @@ -0,0 +1,18 @@ +/****************************************************************************** + * @file robus + * @brief User functionalities of the robus communication protocol + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef __ROBUS_H_ +#define __ROBUS_H_ + +#include +#include "luos_phy.h" + +/******************************************************************************* + * Function + ******************************************************************************/ +luos_phy_t *Robus_GetPhy(void); + +#endif /* __ROBUS_H_ */ diff --git a/network/robus/inc/context.h b/network/robus/inc/context.h index b4c65ac40..4e79144fe 100644 --- a/network/robus/inc/context.h +++ b/network/robus/inc/context.h @@ -7,7 +7,7 @@ #ifndef _CONTEXT_H_ #define _CONTEXT_H_ -#include +#include <_robus.h> #include "robus_config.h" #include "port_manager.h" #include "reception.h" diff --git a/network/robus/inc/port_manager.h b/network/robus/inc/port_manager.h index bf7bcc644..6b8b0c3d7 100644 --- a/network/robus/inc/port_manager.h +++ b/network/robus/inc/port_manager.h @@ -7,7 +7,7 @@ #ifndef _PORTMANAGER_H_ #define _PORTMANAGER_H_ -#include +#include <_robus.h> /******************************************************************************* * Definitions @@ -27,10 +27,8 @@ typedef struct ******************************************************************************/ void PortMng_Init(void); void PortMng_PtpHandler(uint8_t PortNbr); -uint8_t PortMng_PokePort(uint8_t PortNbr); -error_return_t PortMng_PokeNextPort(void); +error_return_t PortMng_PokeNextPort(uint8_t *portId); uint8_t PortMng_PortPokedStatus(void); -void PortMng_SaveNodeID(uint16_t nodeid); bool PortMng_Busy(void); #endif /* _PORTMANAGER_H_ */ diff --git a/network/robus/inc/reception.h b/network/robus/inc/reception.h index 5cc499685..25ccf749d 100644 --- a/network/robus/inc/reception.h +++ b/network/robus/inc/reception.h @@ -7,8 +7,7 @@ #ifndef _RECEPTION_H_ #define _RECEPTION_H_ -#include -#include "luos_phy.h" +#include "_robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/network/robus/inc/robus.h b/network/robus/inc/robus.h index 2b4e2850e..21a696573 100644 --- a/network/robus/inc/robus.h +++ b/network/robus/inc/robus.h @@ -7,7 +7,6 @@ #ifndef _ROBUS_H_ #define _ROBUS_H_ -#include #include "luos_phy.h" /******************************************************************************* @@ -16,10 +15,4 @@ void Robus_Init(void); void Robus_Loop(void); -void Robus_SaveNodeID(uint16_t nodeid); -void Robus_ResetNodeID(void); -bool Robus_Busy(void); -error_return_t Robus_FindNeighbour(void); -luos_phy_t *Robus_GetPhy(void); - #endif /* _ROBUS_H_ */ diff --git a/network/robus/inc/transmission.h b/network/robus/inc/transmission.h index df1cd3f3b..d910a4453 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus/inc/transmission.h @@ -7,8 +7,7 @@ #ifndef _TRANSMISSION_H_ #define _TRANSMISSION_H_ -#include -#include "luos_phy.h" +#include "_robus.h" #include "robus_config.h" /******************************************************************************* * Definitions diff --git a/network/robus/robus_config.h b/network/robus/robus_config.h index b0a81f9be..b4e0a1003 100644 --- a/network/robus/robus_config.h +++ b/network/robus/robus_config.h @@ -21,6 +21,10 @@ #define NBR_RETRY 10 #endif +#ifndef NBR_PORT + #define NBR_PORT 2 +#endif + #define CRC_SIZE 2 #endif /* _ROBUS_CONFIG_H_ */ diff --git a/network/robus/selftest/selftest.c b/network/robus/selftest/selftest.c index 7cac5f195..0667c0991 100644 --- a/network/robus/selftest/selftest.c +++ b/network/robus/selftest/selftest.c @@ -45,6 +45,7 @@ void selftest_SetRxFlag(void) void selftest_init(void) { Luos_Init(); + Robus_Init(); revision_t revision = {.major = 1, .minor = 0, .build = 0}; Luos_CreateService(NULL, VOID_TYPE, "Selftest", revision); diff --git a/network/robus/selftest/selftest.h b/network/robus/selftest/selftest.h index ca82f1cd6..ad50af925 100644 --- a/network/robus/selftest/selftest.h +++ b/network/robus/selftest/selftest.h @@ -8,6 +8,7 @@ #define SELFTEST_H #include "luos_engine.h" +#include "robus.h" void selftest_SetRxFlag(void); void selftest_run(void (*ok_callback)(void), void (*ko_callback)(void)); diff --git a/network/robus/src/port_manager.c b/network/robus/src/port_manager.c index 23d72b1e5..347e2f6a6 100644 --- a/network/robus/src/port_manager.c +++ b/network/robus/src/port_manager.c @@ -39,7 +39,6 @@ #include "context.h" #include "robus_hal.h" #include "luos_hal.h" -#include "node.h" /******************************************************************************* * Definitions @@ -47,16 +46,19 @@ typedef enum { POKE, - RELEASE + RELEASE, + PUSHING } PortState_t; /******************************************************************************* * Variables ******************************************************************************/ PortState_t Port_ExpectedState = POKE; +uint32_t port_detected = 0; /******************************************************************************* * Function ******************************************************************************/ _CRITICAL static void PortMng_Reset(void); +uint8_t PortMng_PokePort(uint8_t PortNbr); /****************************************************************************** * @brief init the portManager state machine * @param None @@ -65,11 +67,6 @@ _CRITICAL static void PortMng_Reset(void); _CRITICAL void PortMng_Init(void) { PortMng_Reset(); - // Reinit port table - for (uint8_t port = 0; port < NBR_PORT; port++) - { - Node_Get()->port_table[port] = 0; - } } /****************************************************************************** * @brief PTP interrupt handler @@ -84,20 +81,28 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) Port_ExpectedState = POKE; ctx.port.keepLine = false; // Check if every line have been poked and poke it if not - for (uint8_t port = 0; port < NBR_PORT; port++) + if (port_detected == (1 << NBR_PORT) - 1) { - if (Node_Get()->port_table[port] == 0) - { - return; - } + // All ports have been detected + // We can consider our phy as done. Notify it to the phy manager + Phy_TopologyDone(Robus_GetPhy()); + // Reset the port state + PortMng_Reset(); } - PortMng_Reset(); + // Ask Luos_phy to find another node + Phy_FindNextNodeJob(); } else if (Port_ExpectedState == POKE) { - // we receive a poke, pull the line to notify your presence + // We just received a poke + // Pull the line to notify your presence RobusHAL_PushPTP(PortNbr); + // Save this port as detected + port_detected |= 1 << PortNbr; ctx.port.activ = PortNbr; + // This port become the topology source of this node + // Notify luos_phy about it + Phy_Topologysource(Robus_GetPhy(), PortNbr); } } /****************************************************************************** @@ -107,6 +112,9 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) ******************************************************************************/ uint8_t PortMng_PokePort(uint8_t PortNbr) { + Port_ExpectedState = PUSHING; + // We can consider this port as detected + port_detected |= 1 << PortNbr; // Push the ptp line RobusHAL_PushPTP(PortNbr); // Wait a little just to be sure everyone can read it @@ -117,12 +125,10 @@ uint8_t PortMng_PokePort(uint8_t PortNbr) RobusHAL_SetPTPDefaultState(PortNbr); while (LuosHAL_GetSystick() - start_tick < 3) ; - // Save port as empty by default - Node_Get()->port_table[PortNbr] = 0xFFFF; // Read the line state if (RobusHAL_GetPTPState(PortNbr)) { - // Someone reply, reverse the detection to wake up on line release + // Someone reply, reverse the detection to wake up on release condition RobusHAL_SetPTPReverseState(PortNbr); Port_ExpectedState = RELEASE; // Port poked by node @@ -130,35 +136,36 @@ uint8_t PortMng_PokePort(uint8_t PortNbr) ctx.port.keepLine = true; return 1; } + Port_ExpectedState = POKE; // Nobodies reply to our poke return 0; } + /****************************************************************************** * @brief being poked so poke next node to * @param None * @return true if a port have been poke else false ******************************************************************************/ -error_return_t PortMng_PokeNextPort(void) +error_return_t PortMng_PokeNextPort(uint8_t *portId) { - if ((ctx.port.activ != NBR_PORT) || (Node_Get()->node_id == 1)) + for (uint8_t port = 0; port < NBR_PORT; port++) { - for (uint8_t port = 0; port < NBR_PORT; port++) + if (!(port_detected & (1 << port))) { - if (Node_Get()->port_table[port] == 0) + // This port have not been poked + if (PortMng_PokePort(port)) { - // this port have not been poked - if (PortMng_PokePort(port)) - { - return SUCCEED; - } - else - { - // nobody is here - Node_Get()->port_table[port] = 0xFFFF; - } + // Poke succeed, we have a node here, return the port id + *portId = port; + return SUCCEED; } + // Poke failed, consider this port as detected and continue + port_detected |= 1 << port; } } + // We check all port and no one reply, we can consider our phy detection as done. + // Notify it to the phy manager + Phy_TopologyDone(Robus_GetPhy()); PortMng_Reset(); return FAILED; } @@ -178,23 +185,7 @@ _CRITICAL void PortMng_Reset(void) { RobusHAL_SetPTPDefaultState(port); } -} - -/****************************************************************************** - * @brief save node id on the port table - * @param node id - * @return None - ******************************************************************************/ -void PortMng_SaveNodeID(uint16_t nodeid) -{ - Node_Get()->port_table[ctx.port.activ] = nodeid; - if (nodeid == 0xFFFF) - { - // This means no that we failed to reach the next node - // Consider this port unconnected - ctx.port.activ = NBR_PORT; - ctx.port.keepLine = false; - } + port_detected = 0; } bool PortMng_Busy(void) diff --git a/network/robus/src/reception.c b/network/robus/src/reception.c index d5b24e27a..aaf89f0e3 100644 --- a/network/robus/src/reception.c +++ b/network/robus/src/reception.c @@ -68,7 +68,6 @@ uint16_t crc_val = 0; // CRC value /******************************************************************************* * Function ******************************************************************************/ -static inline bool Recep_RobusShouldDrop(header_t *header); /****************************************************************************** * @brief Reception init. * @param None @@ -131,12 +130,6 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) ctx.rx.callback = Recep_GetData; if (ctx.rx.status.rx_framing_error == false) { - if (Recep_RobusShouldDrop((header_t *)data_rx) == true) - { - ctx.rx.callback = Recep_Drop; - return; - } - // We complete the header reception, we need to compute all the needed values. // Compute message header size, keep, ... the result will be available in phy_robus->rx_size, ... Phy_ComputeHeader(phy_robus); @@ -320,24 +313,3 @@ _CRITICAL void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data) ctx.tx.status = TX_NOK; } } -/****************************************************************************** - * @brief Define if we should drop this message before Luos get it - * @param header of message - * @return true or false - * warning : this function can be redefined only for mock testing purpose - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL static inline bool Recep_RobusShouldDrop(header_t *header) -{ - // During detection we receive node ID messages, we need to keep them only if PTP allow us to keep them. - // Find if we should remove this message. - if (header->target_mode == NODEIDACK) - { - if ((header->target == 0) && ((ctx.port.activ == NBR_PORT) || (PortMng_Busy() == true))) - { - // If a no port is activ or we are waiting for a release of a PTP we drop node ID 1 message - return true; - } - } - return false; -} diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index ce8ddf1ae..d2ea97e96 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -16,7 +16,10 @@ /******************************************************************************* * Definitions ******************************************************************************/ -static void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job); +// Phy callback definitions +static void Robus_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job); +static error_return_t Robus_RunTopology(luos_phy_t *phy_ptr, uint8_t *portId); +static void Robus_Reset(luos_phy_t *phy_ptr); /******************************************************************************* * Variables @@ -47,7 +50,7 @@ void Robus_Init(void) Transmit_Init(); // Instantiate the phy struct - phy_robus = Phy_Create(Robus_MsgHandler); + phy_robus = Phy_Create(Robus_JobHandler, Robus_RunTopology, Robus_Reset); LUOS_ASSERT(phy_robus); // Init reception @@ -70,7 +73,7 @@ void Robus_Loop(void) * @param job * @return None ******************************************************************************/ -void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) +void Robus_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job) { static uint8_t encaps_index = 0; // Luos ask Robus to send a message @@ -95,46 +98,26 @@ void Robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) Transmit_Process(); } -/****************************************************************************** - * @brief Save a node id in the port table - * @param nodeid to save - * @return None. - ******************************************************************************/ -void Robus_SaveNodeID(uint16_t nodeid) -{ - PortMng_SaveNodeID(nodeid); -} - /****************************************************************************** * @brief Reset the node id of the port table - * @param None + * @param phy_ptr not used * @return None. ******************************************************************************/ -void Robus_ResetNodeID(void) +void Robus_Reset(luos_phy_t *phy_ptr) { PortMng_Init(); Recep_Reset(); Transmit_Init(); } -/****************************************************************************** - * @brief Is Robus busy - * @param None - * @return nodeid. - ******************************************************************************/ -bool Robus_Busy(void) -{ - return PortMng_Busy(); -} - /****************************************************************************** * @brief Find the next neighbour on this phy * @param None * @return error_return_t ******************************************************************************/ -error_return_t Robus_FindNeighbour(void) +error_return_t Robus_RunTopology(luos_phy_t *phy_ptr, uint8_t *portId) { - return PortMng_PokeNextPort(); + return PortMng_PokeNextPort(portId); } /****************************************************************************** diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index 54cf5eba6..6eb0b3d44 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -32,6 +32,7 @@ void Init_Context(void) Luos_ServicesClear(); RoutingTB_Erase(); // Delete RTB Luos_Init(); + Robus_Init(); if (IS_ASSERT()) { printf("[FATAL] Can't reset scenario context\n"); @@ -41,6 +42,7 @@ void Init_Context(void) RESET_ASSERT(); Luos_Init(); + Robus_Init(); // Create services revision_t revision = {.major = 1, .minor = 0, .build = 0}; diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index 6375e4149..19fec4537 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -8,6 +8,7 @@ #include "luos_hal.h" #include "robus_hal.h" #include "luos_engine.h" +#include "robus.h" #include "luos_utils.h" #include diff --git a/test/tests_core/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c index 82e816615..d53dce182 100644 --- a/test/tests_core/test_routing_table/main.c +++ b/test/tests_core/test_routing_table/main.c @@ -255,19 +255,19 @@ void unittest_RoutingTB_ConvertNodeToRoutingTable(void) routing_table_t entry; node_t node; - node.certified = false; - node.node_id = 10; - node.node_info = 20; - node.port_table[0] = 30; - node.port_table[1] = 40; + node.certified = false; + node.node_id = 10; + node.node_info = 20; + node.connection.parent.node_id = 30; + node.connection.child.node_id = 40; RoutingTB_ConvertNodeToRoutingTable(&entry, &node); TEST_ASSERT_EQUAL(NODE, entry.mode); TEST_ASSERT_EQUAL(false, entry.certified); TEST_ASSERT_EQUAL(10, entry.node_id); TEST_ASSERT_EQUAL(20, entry.node_info); - TEST_ASSERT_EQUAL(30, entry.port_table[0]); - TEST_ASSERT_EQUAL(40, entry.port_table[1]); + TEST_ASSERT_EQUAL(30, entry.connection.parent.node_id); + TEST_ASSERT_EQUAL(40, entry.connection.child.node_id); } CATCH { diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index 114566a53..2071aee2e 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -18,12 +18,21 @@ static void phy_robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) Robus_handled_job = job; } +error_return_t topo_cb(luos_phy_t *phy_ptr, uint8_t *portId) +{ + return SUCCEED; +} + +void reset_cb(luos_phy_t *phy_ptr) +{ +} + static void luosIO_reset_overlap_callback(void) { LuosIO_Init(); // Overlap the normal callbacks - luos_phy = Phy_Get(0, phy_luos_MsgHandler); - Phy_Get(1, phy_robus_MsgHandler); + luos_phy = Phy_Get(0, phy_luos_MsgHandler, topo_cb, reset_cb); + Phy_Get(1, phy_robus_MsgHandler, topo_cb, reset_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); } @@ -151,6 +160,8 @@ void unittest_luosIO_TransmitLocalRoutingTable() void unittest_luosIO_ConsumeMsg() { + connection_t con_table[5]; + NEW_TEST_CASE("Check assert condition for ConsumeMsg"); { TRY @@ -160,34 +171,96 @@ void unittest_luosIO_ConsumeMsg() } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; + + TRY + { + LuosIO_Init(); + msg_t msg; + msg.header.cmd = CONNECTION_DATA; + connection_table_ptr = NULL; + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + LuosIO_Init(); + msg_t msg; + msg.header.cmd = PORT_DATA; + connection_table_ptr = NULL; + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + LuosIO_Init(); + msg_t msg; + msg.header.cmd = PORT_DATA; + msg.header.size = 0; + connection_table_ptr = con_table; + con_table[0].parent.node_id = 1; + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + LuosIO_Init(); + msg_t msg; + msg.header.cmd = PORT_DATA; + msg.header.size = sizeof(port_t); + connection_table_ptr = con_table; + con_table[last_node - 1].parent.node_id = 0xFFFF; + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + LuosIO_Init(); + msg_t msg; + msg.header.cmd = PORT_DATA; + msg.header.size = sizeof(connection_t) + 1; + connection_table_ptr = con_table; + con_table[last_node].parent.node_id = 20; + LuosIO_ConsumeMsg(&msg); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; } - NEW_TEST_CASE("Check WRITE_NODE_ID size 0 treatment (node id generation)"); + NEW_TEST_CASE("Check CONNECTION_DATA size of a port_ treatment (topology retriving)"); { TRY { luosIO_reset_overlap_callback(); - Luos_handled_job = NULL; last_node = 1; Node_Get()->node_id = 1; msg_t msg; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = 0; - msg.header.source = 1; + msg.header.cmd = CONNECTION_DATA; + msg.header.size = sizeof(port_t); + port_t port; + port.node_id = 1; + port.phy_id = 2; + port.port_id = 3; + memcpy(msg.data, &port, sizeof(port_t)); + memset(connection_table_ptr, 0xFF, sizeof(connection_t) * 2); LuosIO_ConsumeMsg(&msg); - TEST_ASSERT_EQUAL(2, last_node); - // Check received message content - TEST_ASSERT_NOT_EQUAL(NULL, Luos_handled_job); - TEST_ASSERT_EQUAL(WRITE_NODE_ID, Luos_handled_job->msg_pt->header.cmd); - TEST_ASSERT_EQUAL(sizeof(uint16_t), Luos_handled_job->msg_pt->header.size); - TEST_ASSERT_EQUAL(msg.header.source, Luos_handled_job->msg_pt->header.target); - TEST_ASSERT_EQUAL(NODEIDACK, Luos_handled_job->msg_pt->header.target_mode); - TEST_ASSERT_EQUAL(1, service_ctx.list[0].id); - uint16_t id; - memcpy((void *)&id, (void *)Luos_handled_job->msg_pt->data, sizeof(uint16_t)); - TEST_ASSERT_EQUAL(2, id); + + TEST_ASSERT_EQUAL(1, connection_table_ptr[1].parent.node_id); + TEST_ASSERT_EQUAL(2, connection_table_ptr[1].parent.phy_id); + TEST_ASSERT_EQUAL(3, connection_table_ptr[1].parent.port_id); + + TEST_ASSERT_EQUAL(0xFFFF, connection_table_ptr[0].parent.node_id); + TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.phy_id); + TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.port_id); } CATCH { @@ -196,34 +269,47 @@ void unittest_luosIO_ConsumeMsg() END_TRY; } - NEW_TEST_CASE("Check WRITE_NODE_ID size 2 treatment (node id received from the detector)"); + NEW_TEST_CASE("Check CONNECTION_DATA size of a connection_t treatment (topology retriving)"); { TRY { luosIO_reset_overlap_callback(); - Luos_handled_job = NULL; - Robus_handled_job = NULL; + last_node = 1; Node_Get()->node_id = 1; msg_t msg; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = 2; - msg.header.source = 1; - uint16_t id = 2; - memcpy((void *)msg.data, (void *)&id, sizeof(uint16_t)); + msg.header.cmd = CONNECTION_DATA; + msg.header.size = 2 * sizeof(connection_t); + connection_t con[2]; + con[0].parent.node_id = 2; + con[0].parent.phy_id = 1; + con[0].parent.port_id = 3; + con[0].child.node_id = 4; + con[0].child.phy_id = 5; + con[0].child.port_id = 6; + con[1].parent.node_id = 7; + con[1].parent.phy_id = 8; + con[1].parent.port_id = 9; + con[1].child.node_id = 3; + con[1].child.phy_id = 11; + con[1].child.port_id = 12; + + memcpy(msg.data, con, 2 * sizeof(connection_t)); + memset(connection_table_ptr, 0xFF, sizeof(connection_t) * 2); LuosIO_ConsumeMsg(&msg); + TEST_ASSERT_EQUAL(3, last_node); - // Check received message content - TEST_ASSERT_EQUAL(NULL, Luos_handled_job); - TEST_ASSERT_NOT_EQUAL(NULL, Robus_handled_job); - TEST_ASSERT_EQUAL(WRITE_NODE_ID, Robus_handled_job->msg_pt->header.cmd); - TEST_ASSERT_EQUAL(sizeof(node_bootstrap_t), Robus_handled_job->msg_pt->header.size); - TEST_ASSERT_EQUAL(0, Robus_handled_job->msg_pt->header.target); - TEST_ASSERT_EQUAL(NODEIDACK, Robus_handled_job->msg_pt->header.target_mode); - node_bootstrap_t node_bootstrap; - memcpy((void *)&node_bootstrap, (void *)Robus_handled_job->msg_pt->data, sizeof(node_bootstrap_t)); - TEST_ASSERT_EQUAL(2, node_bootstrap.nodeid); - TEST_ASSERT_EQUAL(1, node_bootstrap.prev_nodeid); + TEST_ASSERT_EQUAL(2, connection_table_ptr[1].parent.node_id); + TEST_ASSERT_EQUAL(1, connection_table_ptr[1].parent.phy_id); + TEST_ASSERT_EQUAL(3, connection_table_ptr[1].parent.port_id); + + TEST_ASSERT_EQUAL(3, connection_table_ptr[2].child.node_id); + TEST_ASSERT_EQUAL(11, connection_table_ptr[2].child.phy_id); + TEST_ASSERT_EQUAL(12, connection_table_ptr[2].child.port_id); + + TEST_ASSERT_EQUAL(0xFFFF, connection_table_ptr[0].parent.node_id); + TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.phy_id); + TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.port_id); } CATCH { @@ -232,7 +318,7 @@ void unittest_luosIO_ConsumeMsg() END_TRY; } - NEW_TEST_CASE("Check WRITE_NODE_ID sizeof node_bootstrap_t treatment (nodereceiving it's id and the previous one)"); + NEW_TEST_CASE("Check NODE_ID reception"); { TRY { @@ -241,18 +327,14 @@ void unittest_luosIO_ConsumeMsg() Robus_handled_job = NULL; Node_Get()->node_id = 0; msg_t msg; - msg.header.cmd = WRITE_NODE_ID; - msg.header.size = sizeof(node_bootstrap_t); + msg.header.cmd = NODE_ID; + msg.header.size = 2; msg.header.source = 1; - - node_bootstrap_t node_bootstrap; - node_bootstrap.nodeid = 2; - node_bootstrap.prev_nodeid = 1; - memcpy((void *)msg.data, (void *)&node_bootstrap, sizeof(node_bootstrap_t)); + uint16_t node_id = 2; + memcpy(msg.data, &node_id, sizeof(uint16_t)); error_return_t ret_val = LuosIO_ConsumeMsg(&msg); - // Check received message content TEST_ASSERT_EQUAL(SUCCEED, ret_val); TEST_ASSERT_EQUAL(NULL, Luos_handled_job); TEST_ASSERT_EQUAL(NULL, Robus_handled_job); @@ -265,6 +347,37 @@ void unittest_luosIO_ConsumeMsg() END_TRY; } + NEW_TEST_CASE("Check PORT_DATA treatment (topology retriving)"); + { + TRY + { + luosIO_reset_overlap_callback(); + Luos_handled_job = NULL; + last_node = 2; + connection_table_ptr[1].parent.node_id = 2; + Node_Get()->node_id = 1; + msg_t msg; + msg.header.cmd = PORT_DATA; + msg.header.size = sizeof(port_t); + port_t port; + port.node_id = 1; + port.phy_id = 2; + port.port_id = 3; + memcpy(msg.data, &port, sizeof(port_t)); + + LuosIO_ConsumeMsg(&msg); + + TEST_ASSERT_EQUAL(1, connection_table_ptr[1].child.node_id); + TEST_ASSERT_EQUAL(2, connection_table_ptr[1].child.phy_id); + TEST_ASSERT_EQUAL(3, connection_table_ptr[1].child.port_id); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + NEW_TEST_CASE("Check LOCAL_RTB assert condition"); { TRY @@ -384,7 +497,6 @@ void unittest_luosIO_ConsumeMsg() // Check received message content TEST_ASSERT_EQUAL(SUCCEED, ret_val); TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); - TEST_ASSERT_EQUAL(EXTERNAL_DETECTION, Node_GetState()); } CATCH { diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index bc2098a0d..dc42cddac 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -36,13 +36,22 @@ static void phy_robus_MsgHandler(luos_phy_t *phy_ptr, phy_job_t *job) } } +error_return_t topo_cb(luos_phy_t *phy_ptr, uint8_t *portId) +{ + return SUCCEED; +} + +void reset_cb(luos_phy_t *phy_ptr) +{ +} + static void phy_test_reset(void) { Phy_Init(); - luos_phy = Phy_Get(0, phy_luos_MsgHandler); + luos_phy = Phy_Get(0, phy_luos_MsgHandler, reset_cb, topo_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); TEST_ASSERT_EQUAL(1, phy_ctx.phy_nb); - robus_phy = Phy_Create(phy_robus_MsgHandler); + robus_phy = Phy_Create(phy_robus_MsgHandler, reset_cb, topo_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[1], robus_phy); TEST_ASSERT_EQUAL(2, phy_ctx.phy_nb); } diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index df0b7a557..07bd8a6ce 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -947,34 +947,15 @@ void Convert_RoutingTableData(service_t *service) { sprintf(json_ptr, "{\"node_id\":%d", routing_table[i].node_id); json_ptr += strlen(json_ptr); - if (routing_table[i].certified) - { - sprintf(json_ptr, ",\"certified\":true"); - json_ptr += strlen(json_ptr); - } - else - { - sprintf(json_ptr, ",\"certified\":false"); - json_ptr += strlen(json_ptr); - } - sprintf(json_ptr, ",\"port_table\":["); - json_ptr += strlen(json_ptr); - // Port loop - for (int port = 0; port < 4; port++) - { - if (routing_table[i].port_table[port]) - { - sprintf(json_ptr, "%d,", routing_table[i].port_table[port]); - json_ptr += strlen(json_ptr); - } - else - { - // remove the last "," char - *(--json_ptr) = '\0'; - break; - } - } - sprintf(json_ptr, "],\"services\":["); + + sprintf(json_ptr, ",\"con\":{\"child\":[%d,%d,%d],\"parent\":[%d,%d,%d]},\"services\":[", + routing_table[i].connection.child.node_id, + routing_table[i].connection.child.phy_id, + routing_table[i].connection.child.port_id, + routing_table[i].connection.parent.node_id, + routing_table[i].connection.parent.phy_id, + routing_table[i].connection.parent.port_id); + json_ptr += strlen(json_ptr); i++; // Services loop @@ -1004,6 +985,8 @@ void Convert_RoutingTableData(service_t *service) *(--json_ptr) = '\0'; // End the Json message sprintf(json_ptr, "]}\n"); + // Run loop before to flush residual msg on the pipe + Luos_Loop(); // reset all the msg in pipe link PipeLink_Reset(service); // call Luos loop to generap a Luos Task with this msg diff --git a/tool_services/gate/data_manager.h b/tool_services/gate/data_manager.h index c94219496..f0c62a3c7 100644 --- a/tool_services/gate/data_manager.h +++ b/tool_services/gate/data_manager.h @@ -41,4 +41,4 @@ void DataManager_Run(service_t *service); // This function manage only commande incoming from pipe void DataManager_RunPipeOnly(service_t *service); -#endif /* DATA_MNGR_H */ \ No newline at end of file +#endif /* DATA_MNGR_H */ diff --git a/tool_services/inspector/inspector.h b/tool_services/inspector/inspector.h index ea33a9e67..11ee3ca60 100644 --- a/tool_services/inspector/inspector.h +++ b/tool_services/inspector/inspector.h @@ -6,8 +6,6 @@ #ifndef INSPECTOR_H #define INSPECTOR_H -#include "luos_engine.h" - /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/tool_services/pipe/pipe.c b/tool_services/pipe/pipe.c index 10febe874..12aeeec30 100644 --- a/tool_services/pipe/pipe.c +++ b/tool_services/pipe/pipe.c @@ -4,10 +4,11 @@ * @author Luos * @version 0.1.0 ******************************************************************************/ +#include +#include "luos_engine.h" #include "pipe.h" #include "_pipe.h" #include "pipe_com.h" -#include /******************************************************************************* * Definitions @@ -101,6 +102,7 @@ static void Pipe_MsgHandler(service_t *service, const msg_t *msg) { tx_StreamChannel.data_ptr = tx_StreamChannel.ring_buffer; tx_StreamChannel.sample_ptr = tx_StreamChannel.data_ptr; + rx_StreamChannel.data_ptr = rx_StreamChannel.ring_buffer; rx_StreamChannel.sample_ptr = rx_StreamChannel.data_ptr; PipeCom_Init(); diff --git a/tool_services/pipe/pipe.h b/tool_services/pipe/pipe.h index 90c07fd4e..e600661af 100644 --- a/tool_services/pipe/pipe.h +++ b/tool_services/pipe/pipe.h @@ -7,8 +7,6 @@ #ifndef PIPE_H #define PIPE_H -#include "luos_engine.h" - /******************************************************************************* * Function ******************************************************************************/ From 713ff72de89512f243c98ea19b19cda6a6ba3ac6 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 26 Jun 2023 13:08:04 +0200 Subject: [PATCH 094/198] Simplify bootloader to make it a standard service and be less intricate in Luos --- engine/IO/src/luos_io.c | 19 +- engine/bootloader/bootloader_core.c | 301 ++++++++---------- engine/bootloader/bootloader_core.h | 41 --- engine/core/inc/luos_utils.h | 3 +- engine/core/inc/struct_luos.h | 25 +- engine/core/src/luos_engine.c | 9 - engine/core/src/luos_utils.c | 22 +- .../NUCLEO-F401RE/bootloader/src/main.c | 1 + .../NUCLEO-F410RB/bootloader/src/main.c | 1 + .../NUCLEO-G431KB/bootloader/src/main.c | 2 +- .../NUCLEO-G474RE/bootloader/src/main.c | 1 + .../NUCLEO-L073RZ/bootloader/src/main.c | 1 + .../NUCLEO-L432KC/bootloader/src/main.c | 1 + .../Bootloader/firmware/src/main.c | 1 + .../STM32F4-discovery/bootloader/src/main.c | 1 + .../STM32L4S5_discovery/bootloader/src/main.c | 1 + test/tests_io/test_luos_io/main.c | 2 +- tool_services/gate/TinyJSON/bootloader_ex.c | 222 ++++++------- tool_services/gate/data_manager.c | 2 +- 19 files changed, 298 insertions(+), 358 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 70d0384f4..0a08aee8a 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -13,7 +13,6 @@ #include "luos_utils.h" #include "luos_hal.h" #include "luos_engine.h" -#include "bootloader_core.h" #include "robus.h" #include "_luos_phy.h" #include "stats.h" @@ -524,12 +523,22 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) service->auto_refresh.last_update = LuosHAL_GetSystick(); return SUCCEED; break; - //**************************************** bootloader section **************************************** - case BOOTLOADER_CMD: - // TODO add here the bootloader command used in application avoiding to include bootloader files. - return FAILED; + //**************************************** bootloader section **************************************** + + case BOOTLOADER_RESET: + LuosHAL_SetMode((uint8_t)BOOT_MODE); + LuosHAL_Reboot(); + return SUCCEED; break; +#ifdef WITH_BOOTLOADER + case BOOTLOADER_START: + // We're in the app, + // set bootloader mode, save node ID and reboot + Luos_JumpToBootloader(); + return SUCCEED; + break; +#endif default: return FAILED; break; diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/bootloader_core.c index d0d4c13ac..d61819236 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/bootloader_core.c @@ -1,6 +1,6 @@ /****************************************************************************** - * @file Bootloader - * @brief Bootloader functionnalities for luos framework + * @file luos_bootloader + * @brief This file contains a service acting as a bootloader for Luos * @author Luos * @version 0.0.0 ******************************************************************************/ @@ -19,25 +19,14 @@ #ifdef BOOTLOADER #define MAX_FRAME_SIZE (MAX_DATA_MSG_SIZE - 1) #define BUFFER_SIZE 0x800 // 2kB buffer to store received data -#endif /******************************************************************************* * Variables ******************************************************************************/ - -#ifdef BOOTLOADER -// variables use to save binary data in flash -static uint8_t bootloader_data[MAX_FRAME_SIZE]; -static uint16_t bootloader_data_size = 0; - +// Variables used to manage current data to write and page location uint32_t flash_addr = APP_START_ADDRESS; uint8_t data_buff[(uint16_t)BUFFER_SIZE]; -uint16_t data_index = 0; -uint16_t residual_space = (uint16_t)BUFFER_SIZE; -uint32_t nb_bytes = 0; -uint8_t crc = 0; -bool load_flag = false; -uint32_t tickstart = 0; +uint32_t nb_bytes = 0; #ifndef BOOTLOADER_UPDATER // Create a variable of the size of mode flash value allowing to init the shared flash section @@ -51,36 +40,14 @@ static uint8_t LuosBootloader_GetMode(void); static void LuosBootloader_DeInit(void); static void LuosBootloader_JumpToApp(void); static void LuosBootloader_SetNodeID(void); -static inline uint8_t LuosBootloader_IsEnoughSpace(uint32_t); -static inline void LuosBootloader_EraseMemory(void); -static inline void LuosBootloader_ProcessData(void); -static inline void LuosBootloader_SaveLastData(void); -static void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, bootloader_cmd_t response); -static void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, bootloader_cmd_t, uint8_t); +static uint8_t LuosBootloader_IsEnoughSpace(uint32_t); +static void LuosBootloader_EraseMemory(void); +static void LuosBootloader_ProcessData(uint8_t *data, uint32_t data_size); +static void LuosBootloader_SaveLastData(void); +static void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, uint16_t response_cmd); +static void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, uint16_t response_cmd, uint8_t data); static void LuosBootloader_MsgHandler(service_t *service, const msg_t *input); -#endif -/****************************************************************************** - * @brief Save node id in flash - * @param None - * @return None - ******************************************************************************/ -void LuosBootloader_JumpToBootloader(void) -{ - // Set bootlaoder mode - LuosHAL_SetMode((uint8_t)APP_RELOAD_MODE); - - // Save node id in flash - node_t *node = Node_Get(); - uint16_t node_id = node->node_id; - - LuosHAL_SaveNodeID(node_id); - - // Reset the MCU - LuosHAL_Reboot(); -} - -#ifdef BOOTLOADER /****************************************************************************** * @brief Create a service to signal a bootloader node * @param None @@ -164,7 +131,7 @@ void LuosBootloader_SetNodeID(void) * @param binary_size : The size of the binary to flash * @return None ******************************************************************************/ -uint8_t LuosBootloader_IsEnoughSpace(uint32_t binary_size) +inline uint8_t LuosBootloader_IsEnoughSpace(uint32_t binary_size) { #ifdef BOOTLOADER_UPDATER uint32_t free_space = BOOT_START_ADDRESS - APP_START_ADDRESS - 1; @@ -186,7 +153,7 @@ uint8_t LuosBootloader_IsEnoughSpace(uint32_t binary_size) * @param None * @return None ******************************************************************************/ -void LuosBootloader_EraseMemory(void) +inline void LuosBootloader_EraseMemory(void) { LuosHAL_EraseMemory(APP_START_ADDRESS, nb_bytes); } @@ -196,36 +163,38 @@ void LuosBootloader_EraseMemory(void) * @param None * @return None ******************************************************************************/ -void LuosBootloader_ProcessData(void) +inline void LuosBootloader_ProcessData(uint8_t *data, uint32_t data_size) { - if (residual_space >= bootloader_data_size) + static uint16_t data_index = 0; + static uint16_t residual_space = (uint16_t)BUFFER_SIZE; + if (residual_space >= data_size) { - // there is enough space in the current page - // fill the current page with data - memcpy(&data_buff[data_index], bootloader_data, bootloader_data_size); + // There is enough space in the current page to save the complete data + // Fill the current page with data + memcpy(&data_buff[data_index], data, data_size); - // update data_index and residual_space - data_index += bootloader_data_size; - residual_space -= bootloader_data_size; + // Update data_index and residual_space for the next chunk of data + data_index += data_size; + residual_space -= data_size; } else { - // complete the current page buffer - memcpy(&data_buff[data_index], bootloader_data, residual_space); + // Complete the current page buffer + memcpy(&data_buff[data_index], data, residual_space); - // save the completed page in flash memory + // Save the completed page in flash LuosHAL_ProgramFlash(flash_addr, (uint16_t)BUFFER_SIZE, data_buff); - // prepare next page buffer + // Prepare the next page buffer flash_addr += BUFFER_SIZE; data_index = 0; memset(data_buff, 0xFF, (uint16_t)BUFFER_SIZE); - // copy the remaining data in the new page buffer - memcpy(&data_buff[data_index], &bootloader_data[residual_space], bootloader_data_size - residual_space); + // Copy the remaining data in the new page buffer + memcpy(&data_buff[data_index], &data[residual_space], data_size - residual_space); - // update data_index and residual_space - data_index = bootloader_data_size - residual_space; + // Update data_index and residual_space + data_index = data_size - residual_space; residual_space = (uint16_t)BUFFER_SIZE - data_index; } } @@ -235,7 +204,7 @@ void LuosBootloader_ProcessData(void) * @param None * @return None ******************************************************************************/ -void LuosBootloader_SaveLastData(void) +inline void LuosBootloader_SaveLastData(void) { LuosHAL_ProgramFlash(flash_addr, (uint16_t)BUFFER_SIZE, data_buff); } @@ -314,15 +283,14 @@ uint8_t compute_crc(void) * @param data : The crc value * @return None ******************************************************************************/ -void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, bootloader_cmd_t response, uint8_t data) +void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, uint16_t response_cmd, uint8_t data) { msg_t ready_msg; - ready_msg.header.cmd = BOOTLOADER_RESP; + ready_msg.header.cmd = response_cmd; ready_msg.header.target_mode = SERVICEIDACK; ready_msg.header.target = source_id; - ready_msg.header.size = 2 * sizeof(uint8_t); - ready_msg.data[0] = response; - ready_msg.data[1] = data; + ready_msg.header.size = sizeof(uint8_t); + ready_msg.data[0] = data; node_t *node = Node_Get(); uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) @@ -335,14 +303,13 @@ void LuosBootloader_SendCrc(service_t *service, uint16_t source_id, bootloader_c * @param response : The type of crc message * @return None ******************************************************************************/ -void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, bootloader_cmd_t response) +void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, uint16_t response_cmd) { msg_t ready_msg; - ready_msg.header.cmd = BOOTLOADER_RESP; + ready_msg.header.cmd = response_cmd; ready_msg.header.target_mode = SERVICEIDACK; ready_msg.header.target = source_id; - ready_msg.header.size = sizeof(uint8_t); - ready_msg.data[0] = response; + ready_msg.header.size = 0; node_t *node = Node_Get(); uint32_t tick = LuosHAL_GetSystick(); while (LuosHAL_GetSystick() - tick < node->node_id) @@ -358,7 +325,6 @@ void LuosBootloader_SendResponse(service_t *service, uint16_t source_id, bootloa void LuosBootloader_Loop(void) { } -#endif /****************************************************************************** * @brief Message handler called from luos library @@ -368,109 +334,96 @@ void LuosBootloader_Loop(void) ******************************************************************************/ void LuosBootloader_MsgHandler(service_t *service, const msg_t *input) { - if (input->header.cmd == BOOTLOADER_CMD) + static uint8_t crc = 0; + static bool load_flag = false; + uint8_t bootloader_data[MAX_FRAME_SIZE]; + uint32_t tickstart; + + switch (input->header.cmd) { - switch (input->data[0]) - { -#ifdef WITH_BOOTLOADER - case BOOTLOADER_START: - // We're in the app, - // set bootloader mode, save node ID and reboot - LuosBootloader_JumpToBootloader(); - break; -#endif -#ifdef BOOTLOADER - // we're in the bootloader, - // process cmd and data - case BOOTLOADER_READY: - bootloader_data_size = input->header.size - 2 * sizeof(char); - Luos_Subscribe(service, (uint16_t)input->data[1]); - memcpy(bootloader_data, &(input->data[2]), bootloader_data_size); // why? - - LuosHAL_SetMode((uint8_t)BOOT_MODE); - - // save binary length - memcpy(&nb_bytes, &bootloader_data[0], sizeof(uint32_t)); - // check free space in flash - if (LuosBootloader_IsEnoughSpace(nb_bytes) == SUCCEED) - { - // send READY response - LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_READY_RESP); - } - else - { - // send ERROR response - LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERROR_SIZE); - } - break; - - case BOOTLOADER_ERASE: - // erase flash memory - LuosBootloader_EraseMemory(); - // reset load flag - load_flag = false; - // send ERASE response - LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERASE_RESP); - break; - - case BOOTLOADER_BIN_CHUNK: - bootloader_data_size = input->header.size - sizeof(char); - memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); - - // handle binary data - LuosBootloader_ProcessData(); - - // send ack to the Host - LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_CHUNK_RESP); - break; - - case BOOTLOADER_BIN_END: - bootloader_data_size = input->header.size - sizeof(char); - memcpy(bootloader_data, &(input->data[1]), bootloader_data_size); - - // save the current page in flash memory - LuosBootloader_SaveLastData(); - // send ack to the Host - LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_END_RESP); - break; - - case BOOTLOADER_CRC_TEST: - crc = compute_crc(); - // send ack to the Host - LuosBootloader_SendCrc(service, input->header.source, BOOTLOADER_CRC_RESP, crc); - break; - - case BOOTLOADER_APP_SAVED: - // set load flag - load_flag = true; - Luos_Unsubscribe(service, input->header.target); - break; - - case BOOTLOADER_STOP: - // wait for the command to be send to all nodes - tickstart = LuosHAL_GetSystick(); - while ((LuosHAL_GetSystick() - tickstart) < 1000) - ; - // save bootloader mode in flash - if (load_flag || (LuosBootloader_GetMode() == APP_RELOAD_MODE)) - { - // boot the application programmed in dedicated flash partition - LuosBootloader_DeInit(); - LuosBootloader_JumpToApp(); - } - else - { - // reboot the node - LuosHAL_Reboot(); - } - break; -#endif - case BOOTLOADER_RESET: - LuosHAL_SetMode((uint8_t)BOOT_MODE); + // we're in the bootloader, + // process cmd and data + case BOOTLOADER_READY: + // Subscribe to the flash topic + Luos_Subscribe(service, (uint16_t)input->data[0]); + // Reset the bootloader in boot mode + LuosHAL_SetMode((uint8_t)BOOT_MODE); + // Save binary length + memcpy(&nb_bytes, &input->data[1], sizeof(uint32_t)); + + // Check the free space in flash + if (LuosBootloader_IsEnoughSpace(nb_bytes) == SUCCEED) + { + // Send READY response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_READY); + } + else + { + // Send ERROR response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERROR_SIZE); + } + break; + + case BOOTLOADER_ERASE: + // Erase flash memory + LuosBootloader_EraseMemory(); + // Reset load flag indicating that there is no apps anymore + load_flag = false; + // Send ERASE response + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_ERASE); + break; + + case BOOTLOADER_BIN_CHUNK: + memcpy(bootloader_data, input->data, input->header.size); + + // Handle binary data + LuosBootloader_ProcessData(bootloader_data, input->header.size); + + // Send ack to the Host + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_CHUNK); + break; + + case BOOTLOADER_BIN_END: + // The binary download is complete + // Save the current page in flash memory even if it's not complete + LuosBootloader_SaveLastData(); + + // Send ack to the Host + LuosBootloader_SendResponse(service, input->header.source, BOOTLOADER_BIN_END); + break; + + case BOOTLOADER_CRC: + crc = compute_crc(); + // Send an ack to the Host + LuosBootloader_SendCrc(service, input->header.source, BOOTLOADER_CRC, crc); + break; + + case BOOTLOADER_APP_SAVED: + // set load flag indicating that there is an app in flash + load_flag = true; + Luos_Unsubscribe(service, input->header.target); + break; + + case BOOTLOADER_STOP: + // wait for the command to be send to all nodes + tickstart = LuosHAL_GetSystick(); + while ((LuosHAL_GetSystick() - tickstart) < 1000) + ; + // save bootloader mode in flash depending if we actually have an app in flash and need to reload it + if (load_flag || (LuosBootloader_GetMode() == APP_RELOAD_MODE)) + { + // boot the application programmed in dedicated flash partition + LuosBootloader_DeInit(); + LuosBootloader_JumpToApp(); + } + else + { + // reboot the node LuosHAL_Reboot(); - break; - default: - break; - } + } + break; + default: + break; } } +#endif diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/bootloader_core.h index 5cb68e47c..94ce51579 100644 --- a/engine/bootloader/bootloader_core.h +++ b/engine/bootloader/bootloader_core.h @@ -9,44 +9,6 @@ #include "struct_luos.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef enum -{ - BOOT_MODE, - JUMP_TO_APP_MODE, - APP_RELOAD_MODE, -} bootloader_mode_t; - -#define BOOTLOADER_RCV_COMMAND 0x01 -#define BOOTLOADER_SND_COMMAND 0x10 -#define BOOTLOADER_ERROR_COMMAND 0x20 -typedef enum -{ - BOOTLOADER_IDLE, - BOOTLOADER_START = BOOTLOADER_RCV_COMMAND, - BOOTLOADER_STOP, - BOOTLOADER_READY, - BOOTLOADER_ERASE, - BOOTLOADER_BIN_CHUNK, - BOOTLOADER_BIN_END, - BOOTLOADER_CRC_TEST, - BOOTLOADER_APP_SAVED, - BOOTLOADER_RESET, - BOOTLOADER_READY_RESP = BOOTLOADER_SND_COMMAND, - BOOTLOADER_BIN_HEADER_RESP, - BOOTLOADER_ERASE_RESP, - BOOTLOADER_BIN_CHUNK_RESP, - BOOTLOADER_BIN_END_RESP, - BOOTLOADER_CRC_RESP, - BOOTLOADER_ERROR_SIZE = BOOTLOADER_ERROR_COMMAND, -} bootloader_cmd_t; - -/******************************************************************************* - * Variables - ******************************************************************************/ - /******************************************************************************* * Function ******************************************************************************/ @@ -64,8 +26,5 @@ void LuosBootloader_Loop(void); /****************************************************************************** * @brief function used by Luos to send message to the bootloader ******************************************************************************/ -#ifndef BOOTLOADER -void LuosBootloader_JumpToBootloader(void); -#endif #endif /* BOOTLOADER_H */ diff --git a/engine/core/inc/luos_utils.h b/engine/core/inc/luos_utils.h index 8d83aa377..aab906f2e 100644 --- a/engine/core/inc/luos_utils.h +++ b/engine/core/inc/luos_utils.h @@ -43,5 +43,6 @@ typedef struct __attribute__((__packed__)) void Luos_assert(char *file, uint32_t line); void node_assert(char *file, uint32_t line); +void Luos_JumpToBootloader(void); -#endif /* LUOS_UTILS_H */ \ No newline at end of file +#endif /* LUOS_UTILS_H */ diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index daaa155f7..76a17eb98 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -47,14 +47,33 @@ typedef enum LUOS_REVISION, // service sends its luos revision LUOS_STATISTICS, // service sends its luos revision - // bootloader command and response - BOOTLOADER_CMD, - BOOTLOADER_RESP, + // Bootloader specific command + BOOTLOADER_START, + BOOTLOADER_STOP, + BOOTLOADER_RESET, + BOOTLOADER_READY, + BOOTLOADER_ERASE, + BOOTLOADER_BIN_CHUNK, + BOOTLOADER_BIN_END, + BOOTLOADER_CRC, + BOOTLOADER_APP_SAVED, + BOOTLOADER_ERROR_SIZE, // compatibility area // LUOS_LAST_RESERVED_CMD = 42 } reserved_luos_cmd_t; +/****************************************************************************** + * This enum list all bootloader states + * please refer to the documentation + ******************************************************************************/ +typedef enum +{ + BOOT_MODE, + JUMP_TO_APP_MODE, + APP_RELOAD_MODE, +} bootloader_mode_t; + /****************************************************************************** * @enum target_mode_t * @brief This enum list all target mode. diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 00faf4fc4..be1345251 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -7,7 +7,6 @@ #include #include "luos_engine.h" #include "luos_hal.h" -#include "bootloader_core.h" #include "_timestamp.h" #include "filter.h" #include "service.h" @@ -489,22 +488,14 @@ void Luos_Run(void) if (!node_run) { Luos_Init(); -#ifdef BOOTLOADER - LuosBootloader_Init(); -#else Luos_PackageInit(); -#endif // go to run state after initialization node_run = true; } else { Luos_Loop(); -#ifdef BOOTLOADER - LuosBootloader_Loop(); -#else Luos_PackageLoop(); -#endif } } diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 5496fdcb2..44bf0ea6c 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -12,9 +12,6 @@ #include "luos_hal.h" #include "msg_alloc.h" #include "filter.h" -#ifdef WITH_BOOTLOADER - #include "bootloader_core.h" -#endif /******************************************************************************* * Function @@ -31,6 +28,23 @@ __attribute__((weak)) void node_assert(char *file, uint32_t line) return; } +/****************************************************************************** + * @brief Jump to bootloader by restarting the MCU + * @param None + * @return None + ******************************************************************************/ +void Luos_JumpToBootloader(void) +{ + // Set bootlaoder mode + LuosHAL_SetMode((uint8_t)APP_RELOAD_MODE); + + // Save the current node id in flash to be ready to be reloaded + LuosHAL_SaveNodeID(Node_Get()->node_id); + + // Reset the MCU + LuosHAL_Reboot(); +} + #ifndef UNIT_TEST /****************************************************************************** * @brief Luos assertion management @@ -65,7 +79,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) // Restart this node in bootloader mode instead of don't do anything // We will come back on this app after a reboot. // Set bootloader mode, save node ID and reboot - LuosBootloader_JumpToBootloader(); + Luos_JumpToBootloader(); #endif LuosHAL_SetIrqState(false); while (1) diff --git a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c index 9c2200e74..bf538f5a0 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c index 5f6bfccc3..c488d03b7 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c index 2d6b44374..be1f6e168 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" - +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c index 068a8584c..22b7244f6 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c index 5854b5813..737508aee 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c @@ -23,6 +23,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c index 0c2c71353..f33430472 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c index 9e44fbfa6..f91e2bbb4 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c @@ -29,6 +29,7 @@ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" // ***************************************************************************** // ***************************************************************************** diff --git a/examples/projects/STM32F4-discovery/bootloader/src/main.c b/examples/projects/STM32F4-discovery/bootloader/src/main.c index 746ba4fd0..f94e33851 100644 --- a/examples/projects/STM32F4-discovery/bootloader/src/main.c +++ b/examples/projects/STM32F4-discovery/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c index ab2cccd9c..a34a4ecfd 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c +++ b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c @@ -24,6 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" +#include "bootloader_core.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index 2071aee2e..15664a515 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -889,7 +889,7 @@ void unittest_luosIO_ConsumeMsg() { msg_t msg; luosIO_reset_overlap_callback(); - msg.header.cmd = BOOTLOADER_CMD; + msg.header.cmd = BOOTLOADER_START; msg.header.target_mode = BROADCAST; msg.header.source = 1; msg.header.size = 0; diff --git a/tool_services/gate/TinyJSON/bootloader_ex.c b/tool_services/gate/TinyJSON/bootloader_ex.c index 9a09cbb9e..30f80360c 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.c +++ b/tool_services/gate/TinyJSON/bootloader_ex.c @@ -41,32 +41,32 @@ uint16_t Bootloader_StartData(char *data) ******************************************************************************/ uint16_t Bootloader_LuosToJson(msg_t *msg, char *data) { - uint8_t response_cmd = msg->data[0]; - uint16_t node_id = RoutingTB_NodeIDFromID(msg->header.source); + uint16_t response_cmd = msg->header.cmd; + uint16_t node_id = RoutingTB_NodeIDFromID(msg->header.source); switch (response_cmd) { - case BOOTLOADER_READY_RESP: - sprintf(data, "{\"response\":%d,\"node\":%d},", BOOTLOADER_READY_RESP, node_id); + case BOOTLOADER_READY: + sprintf(data, "{\"response\":\"ready\",\"node\":%d},", node_id); break; - case BOOTLOADER_ERASE_RESP: - sprintf(data, "{\"response\":%d,\"node\":%d},", BOOTLOADER_ERASE_RESP, node_id); + case BOOTLOADER_ERASE: + sprintf(data, "{\"response\":\"erase\",\"node\":%d},", node_id); break; - case BOOTLOADER_BIN_CHUNK_RESP: - sprintf(data, "{\"response\":%d,\"node\":%d},", BOOTLOADER_BIN_CHUNK_RESP, node_id); + case BOOTLOADER_BIN_CHUNK: + sprintf(data, "{\"response\":\"bin_chunk\",\"node\":%d},", node_id); break; - case BOOTLOADER_BIN_END_RESP: - sprintf(data, "{\"response\":%d,\"node\":%d},", BOOTLOADER_BIN_END_RESP, node_id); + case BOOTLOADER_BIN_END: + sprintf(data, "{\"response\":\"bin_end\",\"node\":%d},", node_id); break; - case BOOTLOADER_CRC_RESP: - sprintf(data, "{\"response\":%d,\"crc_value\":%d,\"node\":%d},", BOOTLOADER_CRC_RESP, msg->data[1], node_id); + case BOOTLOADER_CRC: + sprintf(data, "{\"response\":\"crc\",\"crc_value\":%d,\"node\":%d},", msg->data[0], node_id); break; case BOOTLOADER_ERROR_SIZE: - sprintf(data, "{\"response\":%d,\"node\":%d},", BOOTLOADER_ERROR_SIZE, node_id); + sprintf(data, "{\"response\":\"error_size\",\"node\":%d},", node_id); break; default: @@ -96,130 +96,116 @@ void Bootloader_JsonToLuos(service_t *service, char *bin_data, json_t const *boo { if (json_getType(json_getProperty(bootloader_json, "command")) == JSON_OBJ) { - // get "command" json object + // Get "command" json object json_t const *command_item = json_getProperty(bootloader_json, "command"); - // parse all relevant values in json object - uint16_t type = (uint16_t)json_getReal(json_getProperty(command_item, "type")); + // Parse all relevant values in json object + const char *type = json_getPropertyValue(command_item, "type"); uint8_t topic_target = (uint8_t)json_getReal(json_getProperty(command_item, "topic")); uint16_t node_id = (uint16_t)json_getReal(json_getProperty(command_item, "node")); - // create a message to send to nodes + // Create a message to send to nodes msg_t boot_msg; - + boot_msg.header.size = 0; if (node_id == 0) { boot_msg.header.target = (uint16_t)topic_target; // topic - boot_msg.header.cmd = BOOTLOADER_CMD; // bootloader cmd boot_msg.header.target_mode = TOPIC; // msg send to the node } else { - boot_msg.header.target = node_id; // node_id to send the message - boot_msg.header.cmd = BOOTLOADER_CMD; // bootloader cmd - boot_msg.header.target_mode = NODEIDACK; // msg send to the node + boot_msg.header.target = node_id; // node_id to send the message + boot_msg.header.target_mode = NODEIDACK; // msg send to the node } uint32_t binary_size = 0; json_t *item = NULL; - switch (type) + if (strcmp(type, "start") == 0) { - case BOOTLOADER_START: - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_START; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_STOP: - // send stop command to bootloader app - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_STOP; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_READY: - // find binary size in json header - binary_size = (uint32_t)json_getReal(json_getProperty(command_item, "size")); - - // send ready command to bootloader app - boot_msg.header.size = 2 * sizeof(char) + sizeof(uint32_t); - boot_msg.data[0] = BOOTLOADER_READY; - boot_msg.data[1] = topic_target; - memcpy(&(boot_msg.data[2]), &binary_size, sizeof(uint32_t)); - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_ERASE: - // send erase command to bootloader app - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_ERASE; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_BIN_CHUNK: - // find binary size in json header - item = (json_t *)json_getProperty(command_item, "size"); - if (json_getType(item) == JSON_ARRAY) - { - binary_size = (uint32_t)json_getInteger(json_getChild(item)); - } - else - { - binary_size = (uint32_t)json_getReal(item); - } - - // send bin chunk command to bootloader app - boot_msg.data[0] = BOOTLOADER_BIN_CHUNK; - int i = 0; - // find the first \r of the current buf - for (i = 0; i < GATE_BUFF_SIZE; i++) - { - if (bin_data[i] == '\n') - { - i++; - break; - } - } - if (i < GATE_BUFF_SIZE - 1) + boot_msg.header.cmd = BOOTLOADER_START; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "stop") == 0) + { + // Send stop command to bootloader app + boot_msg.header.cmd = BOOTLOADER_STOP; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "ready") == 0) + { + // Find binary size in json header + binary_size = (uint32_t)json_getReal(json_getProperty(command_item, "size")); + + // Send ready command to bootloader app + boot_msg.header.size = sizeof(char) + sizeof(uint32_t); + boot_msg.header.cmd = BOOTLOADER_READY; + boot_msg.data[0] = topic_target; + memcpy(&(boot_msg.data[1]), &binary_size, sizeof(uint32_t)); + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "erase") == 0) + { + // Send erase command to bootloader app + boot_msg.header.cmd = BOOTLOADER_ERASE; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "bin_chunk") == 0) + { + // Find binary size in json header + item = (json_t *)json_getProperty(command_item, "size"); + if (json_getType(item) == JSON_ARRAY) + { + binary_size = (uint32_t)json_getInteger(json_getChild(item)); + } + else + { + binary_size = (uint32_t)json_getReal(item); + } + + // Send bin chunk command to bootloader app + boot_msg.header.cmd = BOOTLOADER_BIN_CHUNK; + int i = 0; + // Find the first \r of the current buf + for (i = 0; i < GATE_BUFF_SIZE; i++) + { + if (bin_data[i] == '\n') { - boot_msg.header.size = binary_size + sizeof(char); - memcpy(&(boot_msg.data[1]), &bin_data[i], binary_size); - Luos_SendMsg(service, &boot_msg); + i++; + break; } - break; - - case BOOTLOADER_BIN_END: - // send bin end command to bootloader app - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_BIN_END; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_CRC_TEST: - // send crc test command to bootloader app - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_CRC_TEST; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_APP_SAVED: - // send app saved command to bootloader app - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_APP_SAVED; - Luos_SendMsg(service, &boot_msg); - break; - - case BOOTLOADER_RESET: - // send rescue command to nodes - boot_msg.header.target = BROADCAST_VAL; - boot_msg.header.target_mode = BROADCAST; - boot_msg.header.cmd = BOOTLOADER_CMD; // bootloader cmd - boot_msg.header.size = sizeof(char); - boot_msg.data[0] = BOOTLOADER_RESET; + } + if (i < GATE_BUFF_SIZE - 1) + { + boot_msg.header.size = binary_size; + memcpy(boot_msg.data, &bin_data[i], binary_size); Luos_SendMsg(service, &boot_msg); - break; - - default: - break; + } + } + else if (strcmp(type, "bin_end") == 0) + { + // Send bin end command to bootloader app + boot_msg.header.cmd = BOOTLOADER_BIN_END; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "crc") == 0) + { + // Send crc test command to bootloader app + boot_msg.header.cmd = BOOTLOADER_CRC; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "app_saved") == 0) + { + // send app saved command to bootloader app + boot_msg.header.cmd = BOOTLOADER_APP_SAVED; + Luos_SendMsg(service, &boot_msg); + } + else if (strcmp(type, "reset") == 0) + { + // send rescue command to nodes + boot_msg.header.target = BROADCAST_VAL; + boot_msg.header.target_mode = BROADCAST; + boot_msg.header.cmd = BOOTLOADER_RESET; // bootloader cmd + boot_msg.header.size = 0; + Luos_SendMsg(service, &boot_msg); } } -} \ No newline at end of file +} diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index b25220a33..670578a9e 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -150,7 +150,7 @@ void DataManager_Format(service_t *service) continue; } // check if a node send a bootloader message - if (data_msg.header.cmd == BOOTLOADER_RESP) + if (data_msg.header.cmd >= BOOTLOADER_START && data_msg.header.cmd <= BOOTLOADER_ERROR_SIZE) { do { From dbf29d954e89c3744cecfc4951aebac129dff840 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 26 Jun 2023 17:11:14 +0200 Subject: [PATCH 095/198] Rename `bootloader_core` into `luos_bootloader` --- engine/bootloader/{bootloader_core.c => luos_bootloader.c} | 2 +- engine/bootloader/{bootloader_core.h => luos_bootloader.h} | 0 examples/projects/NUCLEO-F072RB/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-F401RE/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-F410RB/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-G431KB/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-G474RE/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-L073RZ/bootloader/src/main.c | 2 +- examples/projects/NUCLEO-L432KC/bootloader/src/main.c | 2 +- examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c | 2 +- examples/projects/STM32F4-discovery/bootloader/src/main.c | 2 +- examples/projects/STM32L4S5_discovery/bootloader/src/main.c | 2 +- examples/projects/l0/bootloader/src/main.c | 2 +- tool_services/gate/TinyJSON/bootloader_ex.c | 2 +- 14 files changed, 13 insertions(+), 13 deletions(-) rename engine/bootloader/{bootloader_core.c => luos_bootloader.c} (99%) rename engine/bootloader/{bootloader_core.h => luos_bootloader.h} (100%) diff --git a/engine/bootloader/bootloader_core.c b/engine/bootloader/luos_bootloader.c similarity index 99% rename from engine/bootloader/bootloader_core.c rename to engine/bootloader/luos_bootloader.c index d61819236..73dc4c69a 100644 --- a/engine/bootloader/bootloader_core.c +++ b/engine/bootloader/luos_bootloader.c @@ -8,7 +8,7 @@ #include #include -#include "bootloader_core.h" +#include "luos_bootloader.h" #include "luos_hal.h" #include "luos_engine.h" #include "routing_table.h" diff --git a/engine/bootloader/bootloader_core.h b/engine/bootloader/luos_bootloader.h similarity index 100% rename from engine/bootloader/bootloader_core.h rename to engine/bootloader/luos_bootloader.h diff --git a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c index 99af476e5..e28b42e18 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c @@ -25,7 +25,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c index bf538f5a0..372e76128 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c index c488d03b7..1749fecb5 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c index be1f6e168..c3d7bcba1 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c index 22b7244f6..715c3bf7b 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c index 737508aee..7eaa0d61a 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c @@ -23,7 +23,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c index f33430472..4c6f10682 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c index f91e2bbb4..b92775db2 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c @@ -29,7 +29,7 @@ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" // ***************************************************************************** // ***************************************************************************** diff --git a/examples/projects/STM32F4-discovery/bootloader/src/main.c b/examples/projects/STM32F4-discovery/bootloader/src/main.c index f94e33851..0d7e560f4 100644 --- a/examples/projects/STM32F4-discovery/bootloader/src/main.c +++ b/examples/projects/STM32F4-discovery/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c index a34a4ecfd..b44fbf951 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c +++ b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c @@ -24,7 +24,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/examples/projects/l0/bootloader/src/main.c b/examples/projects/l0/bootloader/src/main.c index a987a8b4d..fde761701 100644 --- a/examples/projects/l0/bootloader/src/main.c +++ b/examples/projects/l0/bootloader/src/main.c @@ -25,7 +25,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "robus.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/tool_services/gate/TinyJSON/bootloader_ex.c b/tool_services/gate/TinyJSON/bootloader_ex.c index 30f80360c..ce7b462e4 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.c +++ b/tool_services/gate/TinyJSON/bootloader_ex.c @@ -7,7 +7,7 @@ #include #include #include "bootloader_ex.h" -#include "bootloader_core.h" +#include "luos_bootloader.h" #include "gate_config.h" #include "pipe_link.h" #include "routing_table.h" From baaa76a07f2c0c2ad11e0fa09ccab23154d697a5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Jul 2023 14:45:31 +0200 Subject: [PATCH 096/198] Fix some typo --- engine/IO/inc/luos_phy.h | 1 - engine/IO/src/filter.c | 10 +++++----- engine/IO/src/luos_io.c | 3 +-- engine/IO/src/luos_phy.c | 18 ++++-------------- engine/OD/od_control.h | 1 - engine/OD/od_pid.h | 1 - engine/engine_config.h | 1 - network/robus/src/robus.c | 2 +- test/tests_io/test_phy/main.c | 31 ------------------------------- 9 files changed, 11 insertions(+), 57 deletions(-) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 20d722d57..2044cbfd3 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -42,6 +42,5 @@ void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job); // If some mess phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. -volatile uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr); // Use it to get the number of job you currently have to send on your phy_ptr.job list. #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 5b633e847..50bafcbee 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -203,17 +203,17 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) if (Filter_Type(header->target)) { - // This concerns Luos phy and Robus + // This concerns Luos phy and external phy return 0x01 | (0x01 << 1); } break; case BROADCAST: - // This concerns Luos phy and Robus + // This concerns Luos phy and external phy return 0x01 | (0x01 << 1); break; case NODEIDACK: case NODEID: - // If the target is our node and our node ave a node_id or if we don't have a node_id and we are waiting for one. + // If the target is our node and our node have a node_id or if we don't have a node_id and we are waiting for one. if (((header->target == Node_Get()->node_id) && (header->target != 0)) || ((header->target == 0) && (Node_WaitId() == true))) { @@ -224,7 +224,7 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) case TOPIC: if (Filter_Topic(header->target)) { - // This concerns Luos phy and Robus + // This concerns Luos phy and external phy return 0x01 | (0x01 << 1); } break; @@ -234,6 +234,6 @@ _CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) return 0x00; break; } - // This concerns Robus only by default + // This concerns external phy only by default return 0x01 << 1; } diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 0a08aee8a..bfba20652 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -13,7 +13,6 @@ #include "luos_utils.h" #include "luos_hal.h" #include "luos_engine.h" -#include "robus.h" #include "_luos_phy.h" #include "stats.h" @@ -582,7 +581,7 @@ static error_return_t LuosIO_DetectNextNodes(service_t *service) // Wait the end of transmission while (Phy_TxAllComplete() == FAILED) ; - // When Robus loop will receive the reply it will store and manage the new node_id and send it to the next node. + // When phy loop will receive the reply it will store and manage the new node_id and send it to the next node. // We just have to wait the end of the treatment of the entire branch uint32_t start_tick = LuosHAL_GetSystick(); while (Phy_Busy()) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 68394ab36..6d6043a95 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -79,7 +79,7 @@ typedef struct bool topology_running; // We put bits to 1 when a phy is running the topology detection. bool find_next_node_job; - // ******************** job management ******************** + // ******************** Job management ******************** // io_jobs are stores from the newest to the oldest. // This will add time in IRQ when we will pull a job but allow to keep pointers constant. IO_job_t io_job[MAX_MSG_NB]; // Table of all the io_jobs to dispatch. @@ -173,7 +173,7 @@ bool Phy_Busy(void) void Phy_Loop(void) { // Manage received data allocation - // This is only needed for Robus for now. + // This is only needed for external phy for now. if (phy_ctx.phy[1].rx_alloc_job) { Phy_alloc(&phy_ctx.phy[1]); @@ -795,17 +795,6 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) } } -/****************************************************************************** - * @brief Get the number of job in the phy queue - * @param phy_ptr Phy to get the number of job from - * @return Number of job - ******************************************************************************/ -_CRITICAL inline volatile uint16_t Phy_GetJobNbr(luos_phy_t *phy_ptr) -{ - LUOS_ASSERT(phy_ptr != NULL); - return phy_ptr->job_nb; -} - /****************************************************************************** * @brief define is there is something waiting to be sent or not * @return Succeed if nothing is waiting to be sent @@ -815,7 +804,8 @@ error_return_t Phy_TxAllComplete(void) // We don't check the first phy because it is Luos for (int i = 1; i < phy_ctx.phy_nb; i++) { - if (Phy_GetJobNbr(&phy_ctx.phy[i]) != 0) + LUOS_ASSERT(&phy_ctx.phy[i] != NULL); + if (phy_ctx.phy[i].job_nb != 0) { return FAILED; } diff --git a/engine/OD/od_control.h b/engine/OD/od_control.h index b998eca51..af74ad13d 100644 --- a/engine/OD/od_control.h +++ b/engine/OD/od_control.h @@ -8,7 +8,6 @@ #define OD_OD_CONTROL_H_ #include "luos_engine.h" -#include "robus.h" #include /******************************************************************************* diff --git a/engine/OD/od_pid.h b/engine/OD/od_pid.h index 9b747e419..dff3709b4 100644 --- a/engine/OD/od_pid.h +++ b/engine/OD/od_pid.h @@ -8,7 +8,6 @@ #define OD_OD_PID_H_ #include "luos_engine.h" -#include "robus.h" #include /******************************************************************************* diff --git a/engine/engine_config.h b/engine/engine_config.h index 6be6fa98f..2c0b791cb 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -11,7 +11,6 @@ * Definitions ******************************************************************************/ #define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command -#define ROBUS_PROTOCOL_NB 13 // Number of Robus protocol command #define ALIAS_SIZE 15 // Number of max char for service alias #define MAX_ALIAS_SIZE 16 #define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index d2ea97e96..c897a99dc 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -99,7 +99,7 @@ void Robus_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job) } /****************************************************************************** - * @brief Reset the node id of the port table + * @brief Reset Robus * @param phy_ptr not used * @return None. ******************************************************************************/ diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index dc42cddac..ed1ce02dc 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -1545,36 +1545,6 @@ void unittest_add_and_remove_jobs(void) } } -void unittest_phy_GetJobNbr() -{ - NEW_TEST_CASE("Check GetJobNbr assertion conditions"); - { - TRY - { - uint16_t value = Phy_GetJobNbr(NULL); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Check GetPhyId normal conditions"); - { - TRY - { - for (int i = 0; i < MAX_MSG_NB; i++) - { - luos_phy->job_nb = i; - uint16_t value = Phy_GetJobNbr(luos_phy); - TEST_ASSERT_EQUAL(i, value); - } - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - void unittest_phy_TxAllComplete() { NEW_TEST_CASE("Check TxAllComplete normal conditions"); @@ -1645,7 +1615,6 @@ int main(int argc, char **argv) UNIT_TEST_RUN(unittest_phy_GetPhyId); UNIT_TEST_RUN(unittest_phy_RmJob); UNIT_TEST_RUN(unittest_add_and_remove_jobs); - UNIT_TEST_RUN(unittest_phy_GetJobNbr); UNIT_TEST_RUN(unittest_phy_TxAllComplete); UNITY_END(); From 5f7044a02fa63396e3b0078a01817013bc3355a9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Jul 2023 14:55:54 +0200 Subject: [PATCH 097/198] Change IRQ management allowing phy to reference specific IRQ management functions. Luos being a phy, it also reference LuosHAL_SetIrqState functions. ESPHAL can also reference a hardware specific function allowing to deal with hardware specificities. --- engine/HAL/ATSAMD21/luos_hal.c | 2 +- engine/HAL/ATSAMD21/luos_hal.h | 2 +- engine/HAL/ATSAMD21_ARDUINO/luos_hal.c | 4 +- engine/HAL/ATSAMD21_ARDUINO/luos_hal.h | 2 +- engine/HAL/ATSAMD21_MBED/luos_hal.c | 4 +- engine/HAL/ATSAMD21_MBED/luos_hal.h | 2 +- engine/HAL/ESP32/luos_hal.c | 6 +- engine/HAL/ESP32/luos_hal.h | 2 +- engine/HAL/NATIVE/luos_hal.c | 2 +- engine/HAL/NATIVE/luos_hal.h | 2 +- engine/HAL/STM32F0/luos_hal.c | 2 +- engine/HAL/STM32F0/luos_hal.h | 2 +- engine/HAL/STM32F4/luos_hal.c | 2 +- engine/HAL/STM32F4/luos_hal.h | 2 +- engine/HAL/STM32G4/luos_hal.c | 2 +- engine/HAL/STM32G4/luos_hal.h | 2 +- engine/HAL/STM32L0/luos_hal.c | 2 +- engine/HAL/STM32L0/luos_hal.h | 2 +- engine/HAL/STM32L4/luos_hal.c | 2 +- engine/HAL/STM32L4/luos_hal.h | 2 +- engine/HAL/STUB/luos_hal.c | 2 +- engine/HAL/STUB/luos_hal.h | 2 +- engine/HAL/template/luos_hal.c | 2 +- engine/HAL/template/luos_hal.h | 2 +- engine/IO/inc/luos_phy.h | 5 ++ engine/IO/src/luos_io.c | 2 + engine/IO/src/luos_phy.c | 78 +++++++++++++++---- engine/IO/src/msg_alloc.c | 18 ++--- engine/core/inc/luos_engine.h | 1 + engine/core/src/luos_engine.c | 11 +++ engine/core/src/luos_utils.c | 5 +- .../servo_motor/profile_servo_motor.c | 13 ++-- .../lib/Controller_motor/controller_motor.c | 9 +-- network/robus/HAL/ESP32/robus_hal.c | 6 +- network/robus/HAL/ESP32/robus_hal.h | 2 +- network/robus/src/robus.c | 4 +- network/robus/src/transmission.c | 4 +- 37 files changed, 141 insertions(+), 73 deletions(-) diff --git a/engine/HAL/ATSAMD21/luos_hal.c b/engine/HAL/ATSAMD21/luos_hal.c index 361fc5e02..911c69100 100644 --- a/engine/HAL/ATSAMD21/luos_hal.c +++ b/engine/HAL/ATSAMD21/luos_hal.c @@ -53,7 +53,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/ATSAMD21/luos_hal.h b/engine/HAL/ATSAMD21/luos_hal.h index b2d4351ef..8f52c55e2 100644 --- a/engine/HAL/ATSAMD21/luos_hal.h +++ b/engine/HAL/ATSAMD21/luos_hal.h @@ -39,7 +39,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c index 0fe4792e6..025d4dcd5 100644 --- a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c +++ b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c @@ -53,7 +53,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { @@ -208,4 +208,4 @@ void LuosHAL_JumpToApp(uint32_t app_addr) uint8_t LuosHAL_GetMode(void) { } -#endif \ No newline at end of file +#endif diff --git a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h index 9d20ec67a..633f3ca82 100644 --- a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h +++ b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h @@ -39,7 +39,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/ATSAMD21_MBED/luos_hal.c b/engine/HAL/ATSAMD21_MBED/luos_hal.c index c294fdaf1..a4848cd05 100644 --- a/engine/HAL/ATSAMD21_MBED/luos_hal.c +++ b/engine/HAL/ATSAMD21_MBED/luos_hal.c @@ -50,7 +50,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { @@ -273,4 +273,4 @@ void LuosHAL_JumpToApp(uint32_t app_addr) uint8_t LuosHAL_GetMode(void) { } -#endif \ No newline at end of file +#endif diff --git a/engine/HAL/ATSAMD21_MBED/luos_hal.h b/engine/HAL/ATSAMD21_MBED/luos_hal.h index 7a5af2028..1339001c5 100644 --- a/engine/HAL/ATSAMD21_MBED/luos_hal.h +++ b/engine/HAL/ATSAMD21_MBED/luos_hal.h @@ -40,7 +40,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); diff --git a/engine/HAL/ESP32/luos_hal.c b/engine/HAL/ESP32/luos_hal.c index a16ef61d5..6cbf903b5 100644 --- a/engine/HAL/ESP32/luos_hal.c +++ b/engine/HAL/ESP32/luos_hal.c @@ -6,7 +6,6 @@ * @version 0.0.0 ******************************************************************************/ #include "luos_hal.h" -#include "robus_hal.h" #include #include @@ -63,9 +62,10 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { - RobusHAL_SetIrqState(Enable); + // We don't do anything here because we don't have any IRQ to disable on ESP + // Network will disable appropriate IRQ. } /****************************************************************************** * @brief Luos HAL general systick tick at 1ms initialize diff --git a/engine/HAL/ESP32/luos_hal.h b/engine/HAL/ESP32/luos_hal.h index 248fa3a5c..4879fa6d5 100644 --- a/engine/HAL/ESP32/luos_hal.h +++ b/engine/HAL/ESP32/luos_hal.h @@ -39,7 +39,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); diff --git a/engine/HAL/NATIVE/luos_hal.c b/engine/HAL/NATIVE/luos_hal.c index b0b1b22a5..d4e4f3815 100644 --- a/engine/HAL/NATIVE/luos_hal.c +++ b/engine/HAL/NATIVE/luos_hal.c @@ -49,7 +49,7 @@ void LuosHAL_Init(void) * @param None * @return None ******************************************************************************/ -void LuosHAL_SetIrqState(uint8_t Enable) +void LuosHAL_SetIrqState(bool Enable) { } diff --git a/engine/HAL/NATIVE/luos_hal.h b/engine/HAL/NATIVE/luos_hal.h index e6529c5f5..7b9197938 100644 --- a/engine/HAL/NATIVE/luos_hal.h +++ b/engine/HAL/NATIVE/luos_hal.h @@ -31,7 +31,7 @@ * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); diff --git a/engine/HAL/STM32F0/luos_hal.c b/engine/HAL/STM32F0/luos_hal.c index 38a5f4bdd..e17e14c16 100644 --- a/engine/HAL/STM32F0/luos_hal.c +++ b/engine/HAL/STM32F0/luos_hal.c @@ -53,7 +53,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/STM32F0/luos_hal.h b/engine/HAL/STM32F0/luos_hal.h index 71eddf65e..ed025b244 100644 --- a/engine/HAL/STM32F0/luos_hal.h +++ b/engine/HAL/STM32F0/luos_hal.h @@ -38,7 +38,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/STM32F4/luos_hal.c b/engine/HAL/STM32F4/luos_hal.c index 41ce61169..b9663aa79 100644 --- a/engine/HAL/STM32F4/luos_hal.c +++ b/engine/HAL/STM32F4/luos_hal.c @@ -54,7 +54,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/STM32F4/luos_hal.h b/engine/HAL/STM32F4/luos_hal.h index 4f0d99f0c..7620be074 100644 --- a/engine/HAL/STM32F4/luos_hal.h +++ b/engine/HAL/STM32F4/luos_hal.h @@ -37,7 +37,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/STM32G4/luos_hal.c b/engine/HAL/STM32G4/luos_hal.c index 866a3483c..aee4a330b 100644 --- a/engine/HAL/STM32G4/luos_hal.c +++ b/engine/HAL/STM32G4/luos_hal.c @@ -51,7 +51,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/STM32G4/luos_hal.h b/engine/HAL/STM32G4/luos_hal.h index e5299e624..c4ca99bbf 100644 --- a/engine/HAL/STM32G4/luos_hal.h +++ b/engine/HAL/STM32G4/luos_hal.h @@ -41,7 +41,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/STM32L0/luos_hal.c b/engine/HAL/STM32L0/luos_hal.c index d655faf69..bf3de181d 100644 --- a/engine/HAL/STM32L0/luos_hal.c +++ b/engine/HAL/STM32L0/luos_hal.c @@ -53,7 +53,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -void LuosHAL_SetIrqState(uint8_t Enable) +void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/STM32L0/luos_hal.h b/engine/HAL/STM32L0/luos_hal.h index 71eddf65e..ed025b244 100644 --- a/engine/HAL/STM32L0/luos_hal.h +++ b/engine/HAL/STM32L0/luos_hal.h @@ -38,7 +38,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/STM32L4/luos_hal.c b/engine/HAL/STM32L4/luos_hal.c index e7af5b7ab..64bf46e69 100644 --- a/engine/HAL/STM32L4/luos_hal.c +++ b/engine/HAL/STM32L4/luos_hal.c @@ -51,7 +51,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -_CRITICAL void LuosHAL_SetIrqState(uint8_t Enable) +_CRITICAL void LuosHAL_SetIrqState(bool Enable) { if (Enable == true) { diff --git a/engine/HAL/STM32L4/luos_hal.h b/engine/HAL/STM32L4/luos_hal.h index ebed1cc3f..dd5a269c0 100644 --- a/engine/HAL/STM32L4/luos_hal.h +++ b/engine/HAL/STM32L4/luos_hal.h @@ -41,7 +41,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // bootloader functions diff --git a/engine/HAL/STUB/luos_hal.c b/engine/HAL/STUB/luos_hal.c index 9c2de270d..8c78960da 100644 --- a/engine/HAL/STUB/luos_hal.c +++ b/engine/HAL/STUB/luos_hal.c @@ -45,7 +45,7 @@ void LuosHAL_Init(void) * @param None * @return None ******************************************************************************/ -void LuosHAL_SetIrqState(uint8_t Enable) +void LuosHAL_SetIrqState(bool Enable) { } diff --git a/engine/HAL/STUB/luos_hal.h b/engine/HAL/STUB/luos_hal.h index 39cc24abf..3a4d225a0 100644 --- a/engine/HAL/STUB/luos_hal.h +++ b/engine/HAL/STUB/luos_hal.h @@ -27,7 +27,7 @@ * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); void LuosHAL_FlashReadLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data); diff --git a/engine/HAL/template/luos_hal.c b/engine/HAL/template/luos_hal.c index ce5a83cd4..f9958fa73 100644 --- a/engine/HAL/template/luos_hal.c +++ b/engine/HAL/template/luos_hal.c @@ -54,7 +54,7 @@ void LuosHAL_Init(void) * @param Enable : Set to "True" to enable IRQ, "False" otherwise * @return None ******************************************************************************/ -void LuosHAL_SetIrqState(uint8_t Enable) +void LuosHAL_SetIrqState(bool Enable) { /************************************************************************* * This function turn on and off all the IRQ in the MCU allowing atomic diff --git a/engine/HAL/template/luos_hal.h b/engine/HAL/template/luos_hal.h index 80ceb03a4..3fddd712e 100644 --- a/engine/HAL/template/luos_hal.h +++ b/engine/HAL/template/luos_hal.h @@ -37,7 +37,7 @@ typedef struct ll_timestamp * Function ******************************************************************************/ void LuosHAL_Init(void); -void LuosHAL_SetIrqState(uint8_t Enable); +void LuosHAL_SetIrqState(bool Enable); uint32_t LuosHAL_GetSystick(void); // timestamp functions diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 2044cbfd3..7d817e966 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -20,6 +20,11 @@ typedef void (*JOB_CB)(luos_phy_t *phy_ptr, phy_job_t *job); typedef error_return_t (*RUN_TOPO)(luos_phy_t *phy_ptr, uint8_t *portId); typedef void (*RESET_PHY)(luos_phy_t *phy_ptr); +typedef void (*IRQ_STATE)(bool state); + +// Irq management +void Phy_SetIrqStateFunciton(IRQ_STATE irq_state); // Use it to reference your phy specific Irq state management to Luos. +void Phy_SetIrqState(bool state); // Use it to globally enable/disable all the phy irq. // Phy creation luos_phy_t *Phy_Create(JOB_CB phy_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index bfba20652..775ae7d28 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -80,6 +80,8 @@ void LuosIO_Init(void) // Get the Luos phy struct, Luos always use the first phy luos_phy = Phy_Get(0, LuosIO_MsgHandler, LuosIO_RunTopo, LuosIO_Reset); + // Set the irq management function + Phy_SetIrqStateFunciton(LuosHAL_SetIrqState); } /****************************************************************************** diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 6d6043a95..328949487 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -70,8 +70,9 @@ typedef struct __attribute__((__packed__)) typedef struct { // ******************** Phy management ******************** - luos_phy_t phy[PHY_NB]; // phy[0] is the local phy, phy[1] is the remote phy. - uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. + luos_phy_t phy[PHY_NB]; // phy[0] is the local phy, phy[1] is the remote phy. + uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. + IRQ_STATE phy_irq_states[PHY_NB]; // Store the irq state functions of phys aving one. // ******************** Topology management ******************** port_t topology_source; // The source port. Where we receive the topological detection signal from. @@ -113,6 +114,7 @@ void Phy_Init(void) { Phy_Reset(); phy_ctx.phy_nb = 1; + memset(phy_ctx.phy_irq_states, 0, sizeof(phy_ctx.phy_irq_states)); } /****************************************************************************** @@ -209,6 +211,50 @@ luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) return Phy_Get(phy_ctx.phy_nb++, job_cb, run_topo, reset_phy); } +/****************************************************************************** + * @brief Reference a specific irq state function to a physical layer + * @param irq_state function pointer to the IRQ state function + * @return None + ******************************************************************************/ +void Phy_SetIrqStateFunciton(IRQ_STATE irq_state) +{ + int i = 0; + while (phy_ctx.phy_irq_states[i] != NULL) + { + i++; + if (i >= PHY_NB) + { + // We exceed the number of phy + LUOS_ASSERT(0); + return; + } + } + // Save the function pointer + phy_ctx.phy_irq_states[i] = irq_state; +} + +/****************************************************************************** + * @brief Run all the phy irq state function referenced + * @param state state of the IRQ + * @return None + ******************************************************************************/ +void Phy_SetIrqState(bool state) +{ + // Loop int the phy_irq_states and call each function referenced + int i = 0; + while (phy_ctx.phy_irq_states[i] != NULL) + { + phy_ctx.phy_irq_states[i](state); + i++; + if (i >= PHY_NB) + { + // We exceed the number of phy + LUOS_ASSERT(0); + return; + } + } +} + /****************************************************************************** * @brief save a flag allowing to run a new discovering outside of IRQ (because this function is very long and can't be run in IRQ) * @return None @@ -416,9 +462,9 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) // Now we can create a phy_job to dispatch the tx_job later LUOS_ASSERT(phy_ctx.io_job_nb < MAX_MSG_NB); - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); uint16_t my_job = phy_ctx.io_job_nb++; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); // Now copy the data in the job phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; @@ -462,11 +508,11 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) void *rx_data; void *copy_from; - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); // Check if this phy really need to alloc if (phy_ptr->rx_alloc_job == false) { - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); return; } // Check if we receive enougth data to be able to allocate the complete message @@ -474,14 +520,14 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) && (phy_ptr->received_data <= MAX_DATA_MSG_SIZE + sizeof(header_t)) // Check if their is a mistake on the buffer allocation. In this case, the phy.rx_data was not properly set to rx_buffer_base before the data reception. && (phy_ptr->rx_data == phy_ptr->rx_buffer_base)); - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); // Now we can check if we need to store the received data if (phy_ptr->rx_keep) { // We need to store the received data. // Update the informations allowing reception to continue and directly copy the data into the allocated buffer - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); if (phy_ptr->rx_alloc_job) { uint16_t phy_stored_data_size = phy_ptr->received_data; @@ -489,7 +535,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now allocate it rx_data = MsgAlloc_Alloc(phy_ptr->rx_size, (uint8_t)phy_ptr->rx_phy_filter); phy_ptr->rx_data = rx_data; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); // Check if this message is a luos transmission and if allocation succeed if ((phy_ptr == &phy_ctx.phy[0]) && (rx_data == NULL)) { @@ -506,7 +552,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) memcpy(rx_data, copy_from, phy_stored_data_size); return; } - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); } else { @@ -529,10 +575,10 @@ static void Phy_Dispatch(void) return; } // Interpreat received messages and create tasks for it. - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); while (i < phy_ctx.io_job_nb) { - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); // Get the oldest job IO_job_t *job = &phy_ctx.io_job[i]; i++; @@ -566,10 +612,10 @@ static void Phy_Dispatch(void) phy_ctx.phy[y].job_cb(&phy_ctx.phy[y], job_ptr); } } - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); } phy_ctx.io_job_nb = 0; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); running = false; } @@ -669,14 +715,14 @@ static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) LUOS_ASSERT((phy_job != NULL) && (phy_ptr != NULL)); LUOS_ASSERT(phy_ptr->job_nb < MAX_MSG_NB); // Add the job to the queue - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); phy_job_t *returned_job = &phy_ptr->job[phy_ptr->available_job_index++]; if (phy_ptr->available_job_index >= MAX_MSG_NB) { phy_ptr->available_job_index = 0; } LUOS_ASSERT(phy_ptr->available_job_index != phy_ptr->oldest_job_index); - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); phy_ptr->job_nb++; // Copy the actual job data to the allocated job *returned_job = *phy_job; diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 13bed5337..60e1cbf33 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -45,7 +45,7 @@ #include #include #include "msg_alloc.h" -#include "luos_hal.h" +#include "luos_phy.h" #include "luos_utils.h" /******************************************************************************* @@ -95,12 +95,12 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void); void MsgAlloc_Init(memory_stats_t *memory_stats) { //******** Init global vars pointers ********** - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); data_ptr = (uint8_t *)&msg_buffer[0]; oldest_alloc_slot = 0; available_alloc_slot = 0; memset((void *)alloc_slots, 0, sizeof(alloc_slots)); - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); if (memory_stats != NULL) { mem_stat = memory_stats; @@ -133,10 +133,10 @@ static inline uint32_t MsgAlloc_BufferAvailableSpaceComputation(void) uint32_t stack_free_space = 0; LUOS_ASSERT(((uintptr_t)data_ptr >= (uintptr_t)&msg_buffer[0]) && ((uintptr_t)data_ptr < (uintptr_t)&msg_buffer[MSG_BUFFER_SIZE])); - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); uint8_t *oldest_msg = alloc_slots[oldest_alloc_slot].data; uint8_t *data_ptr_snapshot = (uint8_t *)data_ptr; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); if (oldest_msg != NULL) { @@ -285,14 +285,14 @@ _CRITICAL void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter) { LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0)); // Reference a space into the alloc_slots - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); uint16_t my_slot = available_alloc_slot++; if (available_alloc_slot >= MAX_MSG_NB) { available_alloc_slot = 0; } LUOS_ASSERT(available_alloc_slot != oldest_alloc_slot); - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); alloc_slots[my_slot].data = rx_data; alloc_slots[my_slot].phy_filter = phy_filter; } @@ -317,7 +317,7 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) // Remove the phy_id from the phy_filter // Assert if this phy have already been freed LUOS_ASSERT(alloc_slots[i].phy_filter & (0x01 << phy_id)); - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); alloc_slots[i].phy_filter &= ~(0x01 << phy_id); // Check if the phy_filter is empty if (alloc_slots[i].phy_filter == 0) @@ -336,7 +336,7 @@ _CRITICAL void MsgAlloc_Free(uint8_t phy_id, const uint8_t *data) } while ((alloc_slots[oldest_alloc_slot].data == NULL) && (oldest_alloc_slot != available_alloc_slot)); } } - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); return; } i++; diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 707cc218e..43f9f3390 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -30,6 +30,7 @@ void Luos_Init(void); void Luos_Loop(void); void Luos_ResetStatistic(void); const revision_t *Luos_GetVersion(void); +void Luos_SetIrqState(bool state); // ***************** Node management ***************** uint32_t Luos_GetSystick(void); diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index be1345251..4e67499f3 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -12,6 +12,7 @@ #include "service.h" #include "struct_engine.h" #include "luos_io.h" +#include "luos_phy.h" #include "stats.h" /******************************************************************************* @@ -123,6 +124,16 @@ const revision_t *Luos_GetVersion(void) return &luos_version; } +/****************************************************************************** + * @brief enable or disable IRQ + * @param state : true to enable, false to disable + * @return None + ******************************************************************************/ +void Luos_SetIrqState(bool state) +{ + Phy_SetIrqState(state); +} + /****************************************************************************** * @brief Send msg through network * @param Service : Who send diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 44bf0ea6c..6be1d9b30 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -12,6 +12,7 @@ #include "luos_hal.h" #include "msg_alloc.h" #include "filter.h" +#include "luos_phy.h" /******************************************************************************* * Function @@ -57,7 +58,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) { // prepare a message as a node. // To do that we have to reset the service ID and clear PTP states to unlock others. - PortMng_Init(); + Luos_Init(); // completely reinit the allocator MsgAlloc_Init(NULL); Filter_IdInit(); // Mask filter for service ID @@ -81,7 +82,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) // Set bootloader mode, save node ID and reboot Luos_JumpToBootloader(); #endif - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); while (1) { } diff --git a/engine/profiles/servo_motor/profile_servo_motor.c b/engine/profiles/servo_motor/profile_servo_motor.c index efa2bab5e..66bf67468 100644 --- a/engine/profiles/servo_motor/profile_servo_motor.c +++ b/engine/profiles/servo_motor/profile_servo_motor.c @@ -5,7 +5,6 @@ * @version 0.0.0 ******************************************************************************/ #include "profile_servo_motor.h" -#include "luos_hal.h" /****************************************************************************** * @brief Initialization function @@ -53,9 +52,9 @@ void ProfileServo_Handler(service_t *service, const msg_t *msg) } else { - LuosHAL_SetIrqState(false); + Luos_SetIrqState(false); AngularOD_PositionToMsg((angular_position_t *)&servo_motor_profile->angular_position, &pub_msg); - LuosHAL_SetIrqState(true); + Luos_SetIrqState(true); Luos_SendMsg(service, &pub_msg); } } @@ -111,10 +110,10 @@ void ProfileServo_Handler(service_t *service, const msg_t *msg) case REINIT: { // set state to 0 - LuosHAL_SetIrqState(false); + Luos_SetIrqState(false); servo_motor_profile->angular_position = AngularOD_PositionFrom_deg(0.0); servo_motor_profile->target_angular_position = AngularOD_PositionFrom_deg(0.0); - LuosHAL_SetIrqState(true); + Luos_SetIrqState(true); } break; case DIMENSION: @@ -131,9 +130,9 @@ void ProfileServo_Handler(service_t *service, const msg_t *msg) if (msg->header.size == sizeof(angular_position_t)) { // set the motor target angular position - LuosHAL_SetIrqState(false); + Luos_SetIrqState(false); AngularOD_PositionFromMsg((angular_position_t *)&servo_motor_profile->target_angular_position, msg); - LuosHAL_SetIrqState(true); + Luos_SetIrqState(true); } else { diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c index c5238bf54..8c72b362c 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/controller_motor.c @@ -8,7 +8,6 @@ #include "ll_motor.h" #include "profile_servo_motor.h" -#include "luos_hal.h" #include "stdbool.h" #include "math.h" #include @@ -259,11 +258,11 @@ static void ControllerMotor_MsgHandler(service_t *service, const msg_t *msg) ll_motor_enable(servo_motor.mode.mode_compliant == 0); if (servo_motor.mode.mode_compliant == 0) { - LuosHAL_SetIrqState(false); + Luos_SetIrqState(false); last_position = servo_motor.angular_position; errAngleSum = 0.0; lastErrAngle = 0.0; - LuosHAL_SetIrqState(true); + Luos_SetIrqState(true); } return; } @@ -281,9 +280,9 @@ static void ControllerMotor_MsgHandler(service_t *service, const msg_t *msg) if ((servo_motor.mode.mode_angular_position | servo_motor.mode.mode_angular_position) && (msg->header.size == sizeof(angular_position_t))) { // set the motor target angular position - LuosHAL_SetIrqState(false); + Luos_SetIrqState(false); last_position = servo_motor.angular_position; - LuosHAL_SetIrqState(true); + Luos_SetIrqState(true); } return; } diff --git a/network/robus/HAL/ESP32/robus_hal.c b/network/robus/HAL/ESP32/robus_hal.c index 4a590f902..13f000502 100644 --- a/network/robus/HAL/ESP32/robus_hal.c +++ b/network/robus/HAL/ESP32/robus_hal.c @@ -104,6 +104,9 @@ void RobusHAL_Init(void) // Com Initialization RobusHAL_ComInit(DEFAULTBAUDRATE); + + // Reference the IRQ manafement function of Robus + Phy_SetIrqStateFunciton(RobusHAL_SetIrqState); } /****************************************************************************** @@ -119,7 +122,7 @@ void RobusHAL_Loop(void) * @param None * @return None ******************************************************************************/ -_CRITICAL void RobusHAL_SetIrqState(uint8_t Enable) +_CRITICAL void RobusHAL_SetIrqState(bool Enable) { static volatile uint8_t irq_mutex = true; @@ -621,6 +624,7 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus/HAL/ESP32/robus_hal.h b/network/robus/HAL/ESP32/robus_hal.h index 33e440abf..3c4fa7c4d 100644 --- a/network/robus/HAL/ESP32/robus_hal.h +++ b/network/robus/HAL/ESP32/robus_hal.h @@ -30,5 +30,5 @@ void RobusHAL_SetPTPReverseState(uint8_t PTPNbr); void RobusHAL_PushPTP(uint8_t PTPNbr); uint8_t RobusHAL_GetPTPState(uint8_t PTPNbr); void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc); -void RobusHAL_SetIrqState(uint8_t Enable); +void RobusHAL_SetIrqState(bool Enable); #endif /* _RobusHAL_H_ */ diff --git a/network/robus/src/robus.c b/network/robus/src/robus.c index c897a99dc..576ab8b9b 100644 --- a/network/robus/src/robus.c +++ b/network/robus/src/robus.c @@ -83,9 +83,9 @@ void Robus_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job) encaps[encaps_index].size = CRC_SIZE; // Save the precomputed encapsulation in the job - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); job->phy_data = (void *)&encaps[encaps_index]; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); // Get the next encapsulation index for the next job encaps_index++; diff --git a/network/robus/src/transmission.c b/network/robus/src/transmission.c index 4e9e5f137..66b773fe6 100644 --- a/network/robus/src/transmission.c +++ b/network/robus/src/transmission.c @@ -168,9 +168,9 @@ _CRITICAL void Transmit_Process() ctx.tx.lock = true; RobusHAL_SetRxDetecPin(false); // Switch reception in collision detection mode - LuosHAL_SetIrqState(false); + Phy_SetIrqState(false); ctx.rx.callback = Recep_GetCollision; - LuosHAL_SetIrqState(true); + Phy_SetIrqState(true); ctx.tx.data = tx_data; if (!nbrRetry) From 5973869639ee5f143b956e296a5aea4f20a2372e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Jul 2023 17:40:14 +0200 Subject: [PATCH 098/198] Make Robus an independant package --- .github/workflows/pio_release.yml | 27 ++++++++- engine/HAL/ATSAMD21/luos_hal.h | 3 +- engine/HAL/ATSAMD21_ARDUINO/luos_hal.h | 3 +- engine/HAL/ATSAMD21_MBED/luos_hal.h | 3 +- engine/HAL/ESP32/luos_hal.h | 3 +- engine/HAL/NATIVE/luos_hal.h | 3 +- engine/HAL/STM32F0/luos_hal.h | 3 +- engine/HAL/STM32F4/luos_hal.c | 4 +- engine/HAL/STM32F4/luos_hal.h | 3 +- engine/HAL/STM32G4/luos_hal.h | 3 +- engine/HAL/STM32L0/luos_hal.h | 3 +- engine/HAL/STM32L4/luos_hal.h | 3 +- engine/HAL/STUB/luos_hal.h | 3 +- engine/HAL/template/luos_hal.h | 3 +- engine/core/src/luos_utils.c | 1 - .../apps/alarm_controller/alarm_controller.h | 2 +- .../biometric-security/biometric_security.h | 2 +- .../apps/start_controller/start_controller.h | 2 +- .../Arduino/bldc_simple_foc/platformio.ini | 5 +- .../Arduino/bldc_simple_foc/src/SimpleFOC.cpp | 2 +- .../Arduino/button/lib/button/button.h | 1 - .../projects/Arduino/button/platformio.ini | 5 +- .../projects/Arduino/button/src/Button.cpp | 2 +- .../fingerprint/lib/Fingerprint/fingerprint.h | 2 +- .../lib/Fingerprint/fingerprint_drv.h | 2 +- .../Arduino/fingerprint/platformio.ini | 5 +- .../Arduino/fingerprint/src/Fingerprint.cpp | 2 +- .../Arduino/gate_serialcom/platformio.ini | 2 + .../gate_serialcom/src/Gate_SerialCom.cpp | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../src/Inspector_SerialCom.cpp | 2 +- examples/projects/Arduino/lcd/lib/Lcd/lcd.h | 2 +- examples/projects/Arduino/lcd/platformio.ini | 5 +- examples/projects/Arduino/lcd/src/Lcd.cpp | 2 +- examples/projects/Arduino/led/lib/led/led.h | 2 +- examples/projects/Arduino/led/platformio.ini | 5 +- examples/projects/Arduino/led/src/led.cpp | 2 +- .../servo_motor/lib/Servo_motor/servo_drv.h | 2 +- .../Arduino/servo_motor/platformio.ini | 5 +- .../Arduino/servo_motor/src/Servo_motor.cpp | 2 +- .../Arduino/stepper_simple_foc/platformio.ini | 5 +- .../stepper_simple_foc/src/SimpleFOC.cpp | 2 +- .../projects/ESP32/button/lib/button/button.h | 2 +- examples/projects/ESP32/button/platformio.ini | 5 +- examples/projects/ESP32/button/src/main.c | 2 +- .../ESP32/button_arduino/lib/button/button.h | 2 +- .../ESP32/button_arduino/platformio.ini | 5 +- .../ESP32/button_arduino/src/main.cpp | 2 +- .../ESP32/gate_serialcom/platformio.ini | 2 + .../projects/ESP32/gate_serialcom/src/main.c | 2 +- .../gate_serialcom_arduino/platformio.ini | 2 + .../ESP32/gate_serialcom_arduino/src/main.cpp | 2 +- .../projects/ESP32/gate_wscom/platformio.ini | 2 + examples/projects/ESP32/gate_wscom/src/main.c | 2 +- .../ESP32/gate_wscom_arduino/platformio.ini | 2 + .../ESP32/gate_wscom_arduino/src/main.cpp | 2 +- examples/projects/ESP32/led/lib/led/led.h | 2 +- examples/projects/ESP32/led/platformio.ini | 5 +- examples/projects/ESP32/led/src/main.c | 2 +- .../barometer/lib/barometer/BMP280.h | 2 +- .../NUCLEO-F072RB/barometer/platformio.ini | 2 + .../NUCLEO-F072RB/barometer/src/main.c | 2 +- .../NUCLEO-F072RB/bootloader/platformio.ini | 5 +- .../NUCLEO-F072RB/bootloader/src/main.c | 2 +- .../NUCLEO-F072RB/button/platformio.ini | 5 +- .../projects/NUCLEO-F072RB/button/src/main.c | 2 +- .../dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- .../NUCLEO-F072RB/dc_motor/platformio.ini | 5 +- .../NUCLEO-F072RB/dc_motor/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-F072RB/gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../potentiometer/platformio.ini | 5 +- .../NUCLEO-F072RB/potentiometer/src/main.c | 2 +- .../NUCLEO-F401RE/bootloader/platformio.ini | 5 +- .../NUCLEO-F401RE/bootloader/src/main.c | 2 +- .../NUCLEO-F401RE/button/lib/Button/button.h | 2 +- .../NUCLEO-F401RE/button/platformio.ini | 5 +- .../projects/NUCLEO-F401RE/button/src/main.c | 2 +- .../dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- .../NUCLEO-F401RE/dc_motor/platformio.ini | 5 +- .../NUCLEO-F401RE/dc_motor/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-F401RE/gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../projects/NUCLEO-F401RE/led/lib/Led/led.h | 2 +- .../led/lib/alias_save/alias_save.c | 4 +- .../led/lib/alias_save/alias_save.h | 4 +- .../projects/NUCLEO-F401RE/led/platformio.ini | 5 +- .../projects/NUCLEO-F401RE/led/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../potentiometer/platformio.ini | 5 +- .../NUCLEO-F401RE/potentiometer/src/main.c | 2 +- .../NUCLEO-F410RB/bootloader/platformio.ini | 5 +- .../NUCLEO-F410RB/bootloader/src/main.c | 2 +- .../NUCLEO-F410RB/button/lib/Button/button.h | 2 +- .../NUCLEO-F410RB/button/platformio.ini | 5 +- .../projects/NUCLEO-F410RB/button/src/main.c | 2 +- .../dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- .../NUCLEO-F410RB/dc_motor/platformio.ini | 5 +- .../NUCLEO-F410RB/dc_motor/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-F410RB/gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../projects/NUCLEO-F410RB/led/lib/Led/led.h | 2 +- .../projects/NUCLEO-F410RB/led/platformio.ini | 5 +- .../projects/NUCLEO-F410RB/led/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../potentiometer/platformio.ini | 5 +- .../NUCLEO-F410RB/potentiometer/src/main.c | 2 +- .../NUCLEO-G431KB/bootloader/platformio.ini | 5 +- .../NUCLEO-G431KB/bootloader/src/main.c | 2 +- .../NUCLEO-G431KB/button/lib/Button/button.h | 1 - .../NUCLEO-G431KB/button/platformio.ini | 5 +- .../projects/NUCLEO-G431KB/button/src/main.c | 2 +- .../dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- .../NUCLEO-G431KB/dc_motor/platformio.ini | 5 +- .../NUCLEO-G431KB/dc_motor/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-G431KB/gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../potentiometer/platformio.ini | 5 +- .../NUCLEO-G431KB/potentiometer/src/main.c | 2 +- .../NUCLEO-G474RE/bootloader/platformio.ini | 5 +- .../NUCLEO-G474RE/bootloader/src/main.c | 2 +- .../NUCLEO-G474RE/button/lib/Button/button.h | 2 +- .../NUCLEO-G474RE/button/platformio.ini | 7 ++- .../projects/NUCLEO-G474RE/button/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-G474RE/gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../NUCLEO-L073RZ/bootloader/platformio.ini | 5 +- .../NUCLEO-L073RZ/bootloader/src/main.c | 2 +- .../NUCLEO-L073RZ/button/platformio.ini | 5 +- .../projects/NUCLEO-L073RZ/button/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-L073RZ/gate_serialcom/src/main.c | 2 +- .../NUCLEO-L432KC/bootloader/platformio.ini | 6 +- .../NUCLEO-L432KC/bootloader/src/main.c | 2 +- .../NUCLEO-L432KC/button/lib/Button/button.h | 2 +- .../NUCLEO-L432KC/button/platformio.ini | 5 +- .../projects/NUCLEO-L432KC/button/src/main.c | 2 +- .../dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- .../NUCLEO-L432KC/dc_motor/platformio.ini | 5 +- .../NUCLEO-L432KC/dc_motor/src/main.c | 2 +- .../fingerprint/lib/Fingerprint/fingerprint.h | 2 +- .../NUCLEO-L432KC/fingerprint/platformio.ini | 5 +- .../NUCLEO-L432KC/fingerprint/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../NUCLEO-L432KC/gate_serialcom/src/main.c | 2 +- .../gpio/lib/Gpio_dev/gpio_dev.h | 2 +- .../NUCLEO-L432KC/gpio/platformio.ini | 5 +- .../projects/NUCLEO-L432KC/gpio/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 2 + .../inspector_serialcom/src/main.c | 2 +- .../projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h | 2 +- .../projects/NUCLEO-L432KC/lcd/platformio.ini | 5 +- .../projects/NUCLEO-L432KC/lcd/src/main.c | 2 +- .../projects/NUCLEO-L432KC/led/lib/Led/led.h | 2 +- .../projects/NUCLEO-L432KC/led/platformio.ini | 5 +- .../projects/NUCLEO-L432KC/led/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../potentiometer/platformio.ini | 5 +- .../NUCLEO-L432KC/potentiometer/src/main.c | 2 +- .../NUCLEO-L432KC/servo/lib/Servo/servo_drv.h | 2 +- .../NUCLEO-L432KC/servo/platformio.ini | 5 +- .../projects/NUCLEO-L432KC/servo/src/main.c | 2 +- .../Bootloader/firmware/src/main.c | 2 +- .../SAMD21XPLAINED/button/lib/button/button.h | 2 +- .../SAMD21XPLAINED/button/platformio.ini | 5 +- .../projects/SAMD21XPLAINED/button/src/main.c | 2 +- .../bootloader/platformio.ini | 6 +- .../STM32F4-discovery/bootloader/src/main.c | 2 +- .../button/lib/Button/button.h | 2 +- .../STM32F4-discovery/button/platformio.ini | 10 +++- .../STM32F4-discovery/button/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 4 ++ .../gate_serialcom/src/main.c | 2 +- .../inspector_serialcom/platformio.ini | 4 ++ .../inspector_serialcom/src/main.c | 2 +- .../bootloader/platformio.ini | 5 +- .../STM32L4S5_discovery/bootloader/src/main.c | 2 +- .../button/lib/Button/button.h | 2 +- .../STM32L4S5_discovery/button/platformio.ini | 5 +- .../STM32L4S5_discovery/button/src/main.c | 2 +- .../gate_serialcom/platformio.ini | 2 + .../gate_serialcom/src/main.c | 2 +- .../lib/Led_Fader/led_fader.h | 2 +- .../lib/Led_Fader/ledfader_drv.h | 2 +- .../alarm_controller/platformio.ini | 2 + .../l0/bike_alarm/alarm_controller/src/main.c | 2 +- .../start_controller/platformio.ini | 2 + .../l0/bike_alarm/start_controller/src/main.c | 2 +- .../projects/l0/bootloader/platformio.ini | 5 +- examples/projects/l0/bootloader/src/main.c | 2 +- examples/projects/l0/button/platformio.ini | 5 +- examples/projects/l0/button/src/main.c | 2 +- .../projects/l0/button_freertos/lib/Led/led.h | 2 +- .../l0/button_freertos/lib/Led/led_drv.h | 2 +- .../l0/button_freertos/platformio.ini | 6 +- .../l0/button_freertos/src/freertos.c | 2 +- .../l0/controller_motor/platformio.ini | 5 +- .../projects/l0/controller_motor/src/main.c | 2 +- .../l0/dc_motor/lib/DC_motor/dc_motor_drv.h | 2 +- examples/projects/l0/dc_motor/platformio.ini | 5 +- examples/projects/l0/dc_motor/src/main.c | 2 +- .../lib/Detection_Button/detection_button.h | 2 +- .../l0/demo/detection_button/platformio.ini | 2 + .../l0/demo/detection_button/src/main.c | 2 +- .../ledstrip_position/lib/Distance/distance.h | 2 +- .../lib/Distance/vl53l0x_drv.h | 2 +- .../lib/LedStrip_Position/ledstrip_position.h | 2 +- .../l0/demo/ledstrip_position/platformio.ini | 2 + .../l0/demo/ledstrip_position/src/main.c | 2 +- .../lib/motor_copy/motor_copy.h | 2 +- .../l0/demo/motor_copy_app/platformio.ini | 5 +- .../l0/demo/motor_copy_app/src/main.c | 2 +- .../motor_demo_app/lib/run_motor/run_motor.h | 2 +- .../l0/demo/motor_demo_app/platformio.ini | 5 +- .../l0/demo/motor_demo_app/src/main.c | 2 +- examples/projects/l0/demo/product_config.h | 2 +- .../l0/distance/lib/Distance/distance.h | 2 +- .../l0/distance/lib/Distance/vl53l0x_drv.h | 2 +- examples/projects/l0/distance/platformio.ini | 5 +- examples/projects/l0/distance/src/main.c | 2 +- examples/projects/l0/dxl/lib/Dxl/dxl.h | 2 +- examples/projects/l0/dxl/platformio.ini | 5 +- examples/projects/l0/dxl/src/main.c | 2 +- .../fingerprint/lib/Fingerprint/fingerprint.h | 2 +- .../projects/l0/fingerprint/platformio.ini | 5 +- examples/projects/l0/fingerprint/src/main.c | 2 +- .../projects/l0/gate_serialcom/platformio.ini | 2 + .../projects/l0/gate_serialcom/src/main.c | 2 +- examples/projects/l0/gpio/platformio.ini | 5 +- examples/projects/l0/gpio/src/main.c | 2 +- examples/projects/l0/imu/lib/Imu/imu.h | 2 +- .../l0/imu/lib/Imu/mpu_configuration.c | 2 +- .../l0/imu/lib/Imu/mpu_configuration.h | 2 +- examples/projects/l0/imu/platformio.ini | 5 +- examples/projects/l0/imu/src/main.c | 2 +- .../l0/inspector_serialcom/platformio.ini | 2 + .../l0/inspector_serialcom/src/main.c | 2 +- examples/projects/l0/lcd/lib/Lcd/lcd.h | 2 +- examples/projects/l0/lcd/platformio.ini | 5 +- examples/projects/l0/lcd/src/main.c | 2 +- examples/projects/l0/led/lib/Led/led.h | 2 +- examples/projects/l0/led/lib/Led/led_drv.h | 2 +- examples/projects/l0/led/platformio.ini | 5 +- examples/projects/l0/led/src/main.c | 2 +- .../l0/led_fader/lib/Led_Fader/led_fader.h | 2 +- .../l0/led_fader/lib/Led_Fader/ledfader_drv.h | 2 +- examples/projects/l0/led_fader/platformio.ini | 5 +- examples/projects/l0/led_fader/src/main.c | 2 +- .../l0/led_strip/lib/Led_strip/led_strip.h | 2 +- .../led_strip/lib/Led_strip/led_strip_drv.h | 2 +- examples/projects/l0/led_strip/platformio.ini | 5 +- examples/projects/l0/led_strip/src/main.c | 2 +- .../lib/Light_sensor/light_sensor.h | 2 +- .../lib/Light_sensor/light_sensor_drv.h | 2 +- .../projects/l0/light_sensor/platformio.ini | 5 +- examples/projects/l0/light_sensor/src/main.c | 2 +- .../projects/l0/load/lib/Load/HX711/HX711.h | 2 +- examples/projects/l0/load/lib/Load/load.h | 2 +- examples/projects/l0/load/platformio.ini | 5 +- examples/projects/l0/load/src/main.c | 2 +- .../lib/Potentiometer/potentiometer.h | 2 +- .../lib/Potentiometer/potentiometer_drv.h | 2 +- .../projects/l0/potentiometer/platformio.ini | 5 +- examples/projects/l0/potentiometer/src/main.c | 2 +- .../projects/l0/power_switch/platformio.ini | 5 +- examples/projects/l0/power_switch/src/main.c | 2 +- .../projects/l0/servo/lib/Servo/servo_drv.h | 2 +- examples/projects/l0/servo/platformio.ini | 5 +- examples/projects/l0/servo/src/main.c | 2 +- examples/projects/l0/stepper/platformio.ini | 5 +- examples/projects/l0/stepper/src/main.c | 2 +- .../projects/native/button/platformio.ini | 5 +- examples/projects/native/button/src/main.c | 2 +- .../projects/native/gate_wscom/platformio.ini | 2 + .../projects/native/gate_wscom/src/main.c | 2 +- examples/projects/native/led/lib/Led/led.h | 1 - examples/projects/native/led/platformio.ini | 5 +- examples/projects/native/led/src/main.c | 2 +- .../native/ping_pong/lib/PingPong/graph.c | 1 - .../ping_pong/lib/PingPong/library.json | 4 +- .../native/ping_pong/lib/PingPong/scoring.h | 1 - .../projects/native/ping_pong/platformio.ini | 5 +- examples/projects/native/ping_pong/src/main.c | 3 +- library.json | 14 ++--- .../HAL/ATSAMD21/robus_hal.c | 0 .../HAL/ATSAMD21/robus_hal.h | 0 .../HAL/ATSAMD21/robus_hal_config.h | 0 .../HAL/ATSAMD21/samd21.h | 0 .../HAL/ATSAMD21_ARDUINO/board_config.h | 0 .../HAL/ATSAMD21_ARDUINO/robus_hal.c | 0 .../HAL/ATSAMD21_ARDUINO/robus_hal.h | 0 .../HAL/ATSAMD21_ARDUINO/robus_hal_config.h | 0 .../HAL/ATSAMD21_MBED/robus_hal.c | 0 .../HAL/ATSAMD21_MBED/robus_hal.h | 0 .../HAL/ATSAMD21_MBED/robus_hal_config.h | 0 .../HAL/ATSAMD21_MBED/samd21.h | 0 .../HAL/ESP32/board_config.h | 0 .../HAL/ESP32/luos_engine/CMakeLists.txt | 0 .../HAL/ESP32/luos_engine/linker.lf | 0 .../HAL/ESP32/robus_hal.c | 0 .../HAL/ESP32/robus_hal.h | 0 .../HAL/ESP32/robus_hal_config.h | 0 .../HAL/NATIVE/hal_script.py | 0 .../HAL/NATIVE/robus_hal.c | 2 +- .../HAL/NATIVE/robus_hal.h | 0 .../HAL/NATIVE/robus_hal_config.h | 0 .../{robus => robus_network}/HAL/README.md | 0 .../HAL/STM32F0/robus_hal.c | 0 .../HAL/STM32F0/robus_hal.h | 0 .../HAL/STM32F0/robus_hal_config.h | 0 .../HAL/STM32F4/robus_hal.c | 0 .../HAL/STM32F4/robus_hal.h | 0 .../HAL/STM32F4/robus_hal_config.h | 0 .../HAL/STM32G4/robus_hal.c | 0 .../HAL/STM32G4/robus_hal.h | 0 .../HAL/STM32G4/robus_hal_config.h | 0 .../HAL/STM32L0/robus_hal.c | 0 .../HAL/STM32L0/robus_hal.h | 0 .../HAL/STM32L0/robus_hal_config.h | 0 .../HAL/STM32L4/robus_hal.c | 0 .../HAL/STM32L4/robus_hal.h | 0 .../HAL/STM32L4/robus_hal_config.h | 0 .../HAL/STUB/robus_hal.c | 0 .../HAL/STUB/robus_hal.h | 0 .../HAL/STUB/robus_hal_config.h | 0 .../HAL/template/robus_hal.c | 0 .../HAL/template/robus_hal.h | 0 .../HAL/template/robus_hal_config.h | 0 .../inc/_robus_network.h} | 0 .../{robus => robus_network}/inc/context.h | 2 +- .../inc/port_manager.h | 2 +- .../{robus => robus_network}/inc/reception.h | 2 +- .../inc/robus_network.h} | 0 .../inc/transmission.h | 2 +- network/robus_network/library.json | 23 ++++++++ .../{robus => robus_network}/robus_config.h | 0 .../robus_network/robus_select_hal_script.py | 58 +++++++++++++++++++ .../selftest/selftest.c | 0 .../selftest/selftest.h | 2 +- .../src/port_manager.c | 0 .../{robus => robus_network}/src/reception.c | 2 +- network/{robus => robus_network}/src/robus.c | 2 +- .../src/transmission.c | 0 platformio.ini | 7 ++- source_filter_script.py | 19 ++---- test/_resources/Unity/unit_test.h | 3 +- test/_resources/node_config.h | 3 +- 364 files changed, 699 insertions(+), 311 deletions(-) rename network/{robus => robus_network}/HAL/ATSAMD21/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/ATSAMD21/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21/samd21.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_ARDUINO/board_config.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_ARDUINO/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_ARDUINO/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_ARDUINO/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_MBED/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_MBED/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_MBED/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/ATSAMD21_MBED/samd21.h (100%) rename network/{robus => robus_network}/HAL/ESP32/board_config.h (100%) rename network/{robus => robus_network}/HAL/ESP32/luos_engine/CMakeLists.txt (100%) rename network/{robus => robus_network}/HAL/ESP32/luos_engine/linker.lf (100%) rename network/{robus => robus_network}/HAL/ESP32/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/ESP32/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/ESP32/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/NATIVE/hal_script.py (100%) rename network/{robus => robus_network}/HAL/NATIVE/robus_hal.c (99%) rename network/{robus => robus_network}/HAL/NATIVE/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/NATIVE/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/README.md (100%) rename network/{robus => robus_network}/HAL/STM32F0/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STM32F0/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STM32F0/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/STM32F4/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STM32F4/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STM32F4/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/STM32G4/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STM32G4/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STM32G4/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/STM32L0/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STM32L0/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STM32L0/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/STM32L4/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STM32L4/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STM32L4/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/STUB/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/STUB/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/STUB/robus_hal_config.h (100%) rename network/{robus => robus_network}/HAL/template/robus_hal.c (100%) rename network/{robus => robus_network}/HAL/template/robus_hal.h (100%) rename network/{robus => robus_network}/HAL/template/robus_hal_config.h (100%) rename network/{robus/inc/_robus.h => robus_network/inc/_robus_network.h} (100%) rename network/{robus => robus_network}/inc/context.h (97%) rename network/{robus => robus_network}/inc/port_manager.h (97%) rename network/{robus => robus_network}/inc/reception.h (98%) rename network/{robus/inc/robus.h => robus_network/inc/robus_network.h} (100%) rename network/{robus => robus_network}/inc/transmission.h (98%) create mode 100644 network/robus_network/library.json rename network/{robus => robus_network}/robus_config.h (100%) create mode 100644 network/robus_network/robus_select_hal_script.py rename network/{robus => robus_network}/selftest/selftest.c (100%) rename network/{robus => robus_network}/selftest/selftest.h (94%) rename network/{robus => robus_network}/src/port_manager.c (100%) rename network/{robus => robus_network}/src/reception.c (99%) rename network/{robus => robus_network}/src/robus.c (99%) rename network/{robus => robus_network}/src/transmission.c (100%) diff --git a/.github/workflows/pio_release.yml b/.github/workflows/pio_release.yml index 283beacc8..02b511303 100644 --- a/.github/workflows/pio_release.yml +++ b/.github/workflows/pio_release.yml @@ -203,4 +203,29 @@ jobs: pio package pack pio package publish --owner luos --non-interactive - cd ../.. \ No newline at end of file + cd ../.. + + deploy_robus: + needs: check_valid_tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install platformio + - name: publish robus network + env: + PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }} + run: | + # ***** Robus network publication ***** + cd network/robus_network + # We don't publish examples with this one. + + pio package pack + pio package publish --owner luos --non-interactive + cd ../.. diff --git a/engine/HAL/ATSAMD21/luos_hal.h b/engine/HAL/ATSAMD21/luos_hal.h index 8f52c55e2..5cc8c1498 100644 --- a/engine/HAL/ATSAMD21/luos_hal.h +++ b/engine/HAL/ATSAMD21/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h index 633f3ca82..d1a4da706 100644 --- a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h +++ b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/ATSAMD21_MBED/luos_hal.h b/engine/HAL/ATSAMD21_MBED/luos_hal.h index 1339001c5..27490509a 100644 --- a/engine/HAL/ATSAMD21_MBED/luos_hal.h +++ b/engine/HAL/ATSAMD21_MBED/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/ESP32/luos_hal.h b/engine/HAL/ESP32/luos_hal.h index 4879fa6d5..e46e2189d 100644 --- a/engine/HAL/ESP32/luos_hal.h +++ b/engine/HAL/ESP32/luos_hal.h @@ -10,7 +10,8 @@ #include #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/NATIVE/luos_hal.h b/engine/HAL/NATIVE/luos_hal.h index 7b9197938..048a0b86f 100644 --- a/engine/HAL/NATIVE/luos_hal.h +++ b/engine/HAL/NATIVE/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STM32F0/luos_hal.h b/engine/HAL/STM32F0/luos_hal.h index ed025b244..585376cfe 100644 --- a/engine/HAL/STM32F0/luos_hal.h +++ b/engine/HAL/STM32F0/luos_hal.h @@ -10,7 +10,8 @@ #include #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STM32F4/luos_hal.c b/engine/HAL/STM32F4/luos_hal.c index b9663aa79..05decfa0a 100644 --- a/engine/HAL/STM32F4/luos_hal.c +++ b/engine/HAL/STM32F4/luos_hal.c @@ -9,8 +9,6 @@ #include #include -#include "reception.h" -#include "context.h" // MCU dependencies this HAL is for family STM32F4 you can find // the HAL stm32cubeF4 on ST web site @@ -311,7 +309,7 @@ void LuosHAL_EraseMemory(uint32_t address, uint16_t size) /****************************************************************************** * @brief Programm flash memory - * @param address : Start address + * @param address : Start address * @param size :: Data size * @param data : Pointer to data * @return diff --git a/engine/HAL/STM32F4/luos_hal.h b/engine/HAL/STM32F4/luos_hal.h index 7620be074..834e312b6 100644 --- a/engine/HAL/STM32F4/luos_hal.h +++ b/engine/HAL/STM32F4/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STM32G4/luos_hal.h b/engine/HAL/STM32G4/luos_hal.h index c4ca99bbf..a15ffcd97 100644 --- a/engine/HAL/STM32G4/luos_hal.h +++ b/engine/HAL/STM32G4/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STM32L0/luos_hal.h b/engine/HAL/STM32L0/luos_hal.h index ed025b244..585376cfe 100644 --- a/engine/HAL/STM32L0/luos_hal.h +++ b/engine/HAL/STM32L0/luos_hal.h @@ -10,7 +10,8 @@ #include #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STM32L4/luos_hal.h b/engine/HAL/STM32L4/luos_hal.h index dd5a269c0..c5d384281 100644 --- a/engine/HAL/STM32L4/luos_hal.h +++ b/engine/HAL/STM32L4/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/STUB/luos_hal.h b/engine/HAL/STUB/luos_hal.h index 3a4d225a0..57ae667a3 100644 --- a/engine/HAL/STUB/luos_hal.h +++ b/engine/HAL/STUB/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/HAL/template/luos_hal.h b/engine/HAL/template/luos_hal.h index 3fddd712e..fdf3fa0c3 100644 --- a/engine/HAL/template/luos_hal.h +++ b/engine/HAL/template/luos_hal.h @@ -9,7 +9,8 @@ #define _LUOSHAL_H_ #include -#include +#include +#include "luos_hal_config.h" /******************************************************************************* * Definitions diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 6be1d9b30..31ffd4281 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -7,7 +7,6 @@ #include #include "luos_utils.h" #include "luos_engine.h" -#include "port_manager.h" #include "string.h" #include "luos_hal.h" #include "msg_alloc.h" diff --git a/examples/apps/alarm_controller/alarm_controller.h b/examples/apps/alarm_controller/alarm_controller.h index e9a7b934f..f174d4f3c 100644 --- a/examples/apps/alarm_controller/alarm_controller.h +++ b/examples/apps/alarm_controller/alarm_controller.h @@ -8,7 +8,7 @@ #define ALARM_CONTROLLER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/apps/biometric-security/biometric_security.h b/examples/apps/biometric-security/biometric_security.h index 811c318cf..5295232e4 100644 --- a/examples/apps/biometric-security/biometric_security.h +++ b/examples/apps/biometric-security/biometric_security.h @@ -11,7 +11,7 @@ #define BIOMETRIC_SECURITY_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/apps/start_controller/start_controller.h b/examples/apps/start_controller/start_controller.h index c8397fba6..6fe730e50 100644 --- a/examples/apps/start_controller/start_controller.h +++ b/examples/apps/start_controller/start_controller.h @@ -8,7 +8,7 @@ #define START_CONTROLLER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/bldc_simple_foc/platformio.ini b/examples/projects/Arduino/bldc_simple_foc/platformio.ini index de67301e1..baf4ea7be 100644 --- a/examples/projects/Arduino/bldc_simple_foc/platformio.ini +++ b/examples/projects/Arduino/bldc_simple_foc/platformio.ini @@ -15,12 +15,15 @@ framework = arduino platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git lib_archive = false build_unflags = -Os -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ build_flags = -O1 -include node_config.h -DLUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network SimpleFOC_Motor askuric/Simple FOC@^2.2.1 diff --git a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp index 924a9033f..5552a43e8 100644 --- a/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/bldc_simple_foc/src/SimpleFOC.cpp @@ -7,7 +7,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #ifdef __cplusplus } diff --git a/examples/projects/Arduino/button/lib/button/button.h b/examples/projects/Arduino/button/lib/button/button.h index 64d92f652..19367b3fb 100644 --- a/examples/projects/Arduino/button/lib/button/button.h +++ b/examples/projects/Arduino/button/lib/button/button.h @@ -8,7 +8,6 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/Arduino/button/platformio.ini b/examples/projects/Arduino/button/platformio.ini index 908bf67b0..1ce8c45dd 100644 --- a/examples/projects/Arduino/button/platformio.ini +++ b/examples/projects/Arduino/button/platformio.ini @@ -24,7 +24,9 @@ default_envs = zero [env] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam framework = arduino @@ -35,6 +37,7 @@ build_flags = -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Button diff --git a/examples/projects/Arduino/button/src/Button.cpp b/examples/projects/Arduino/button/src/Button.cpp index 93080432c..e6a55c41d 100644 --- a/examples/projects/Arduino/button/src/Button.cpp +++ b/examples/projects/Arduino/button/src/Button.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" #ifdef __cplusplus diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h index ded9ac68f..949b40047 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,7 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h index be8182923..f1236f7a3 100644 --- a/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h +++ b/examples/projects/Arduino/fingerprint/lib/Fingerprint/fingerprint_drv.h @@ -11,7 +11,7 @@ #define FINGERPRINT_DRV_H_ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/fingerprint/platformio.ini b/examples/projects/Arduino/fingerprint/platformio.ini index 781fdf74d..eb7286570 100644 --- a/examples/projects/Arduino/fingerprint/platformio.ini +++ b/examples/projects/Arduino/fingerprint/platformio.ini @@ -9,7 +9,9 @@ ; https://docs.platformio.org/page/projectconf.html [env:zero] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam board = mkrzero @@ -22,5 +24,6 @@ build_flags = -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Fingerprint adafruit/Adafruit Fingerprint Sensor Library diff --git a/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp b/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp index cbadecb74..925d5b3b5 100644 --- a/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp +++ b/examples/projects/Arduino/fingerprint/src/Fingerprint.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "fingerprint.h" #ifdef __cplusplus diff --git a/examples/projects/Arduino/gate_serialcom/platformio.ini b/examples/projects/Arduino/gate_serialcom/platformio.ini index 37f3e59b3..6d63ca1b0 100644 --- a/examples/projects/Arduino/gate_serialcom/platformio.ini +++ b/examples/projects/Arduino/gate_serialcom/platformio.ini @@ -26,6 +26,7 @@ default_envs = zero [env] lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../tool_services/ lib_ldf_mode =off platform = atmelsam @@ -40,6 +41,7 @@ build_flags = -D PIPEHAL=ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe diff --git a/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp b/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp index c97fb2e9c..c2984e608 100644 --- a/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp +++ b/examples/projects/Arduino/gate_serialcom/src/Gate_SerialCom.cpp @@ -9,7 +9,7 @@ extern "C" #include #include #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #ifdef __cplusplus } diff --git a/examples/projects/Arduino/inspector_serialcom/platformio.ini b/examples/projects/Arduino/inspector_serialcom/platformio.ini index df7796fda..faccca291 100644 --- a/examples/projects/Arduino/inspector_serialcom/platformio.ini +++ b/examples/projects/Arduino/inspector_serialcom/platformio.ini @@ -28,6 +28,7 @@ default_envs = zero [env] lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../../ lib_ldf_mode =off platform = atmelsam @@ -42,6 +43,7 @@ build_flags = -D PIPEHAL=ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe diff --git a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp b/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp index 46592bb80..05d9dea4b 100644 --- a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp +++ b/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp @@ -9,7 +9,7 @@ extern "C" #include #include #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #ifdef __cplusplus } diff --git a/examples/projects/Arduino/lcd/lib/Lcd/lcd.h b/examples/projects/Arduino/lcd/lib/Lcd/lcd.h index 9b5d05d67..f124ad84e 100644 --- a/examples/projects/Arduino/lcd/lib/Lcd/lcd.h +++ b/examples/projects/Arduino/lcd/lib/Lcd/lcd.h @@ -10,7 +10,7 @@ #define LCD_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/lcd/platformio.ini b/examples/projects/Arduino/lcd/platformio.ini index 7fc829f52..204acb1d3 100644 --- a/examples/projects/Arduino/lcd/platformio.ini +++ b/examples/projects/Arduino/lcd/platformio.ini @@ -9,7 +9,9 @@ ; https://docs.platformio.org/page/projectconf.html [env:zero] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam board = mkrzero @@ -22,5 +24,6 @@ build_flags = -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Lcd arduino-libraries/LiquidCrystal diff --git a/examples/projects/Arduino/lcd/src/Lcd.cpp b/examples/projects/Arduino/lcd/src/Lcd.cpp index 83ad115f1..abe3f9636 100644 --- a/examples/projects/Arduino/lcd/src/Lcd.cpp +++ b/examples/projects/Arduino/lcd/src/Lcd.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "lcd.h" #ifdef __cplusplus diff --git a/examples/projects/Arduino/led/lib/led/led.h b/examples/projects/Arduino/led/lib/led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/Arduino/led/lib/led/led.h +++ b/examples/projects/Arduino/led/lib/led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/led/platformio.ini b/examples/projects/Arduino/led/platformio.ini index 6d0df747a..86a753ab2 100644 --- a/examples/projects/Arduino/led/platformio.ini +++ b/examples/projects/Arduino/led/platformio.ini @@ -24,7 +24,9 @@ default_envs = zero [env] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam framework = arduino @@ -35,6 +37,7 @@ build_flags = -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network Led diff --git a/examples/projects/Arduino/led/src/led.cpp b/examples/projects/Arduino/led/src/led.cpp index a879f45c8..b005406a1 100644 --- a/examples/projects/Arduino/led/src/led.cpp +++ b/examples/projects/Arduino/led/src/led.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" #ifdef __cplusplus diff --git a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h index dbf92462b..9bd58947c 100644 --- a/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h +++ b/examples/projects/Arduino/servo_motor/lib/Servo_motor/servo_drv.h @@ -10,7 +10,7 @@ #define SERVO_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/servo_motor/platformio.ini b/examples/projects/Arduino/servo_motor/platformio.ini index 1cff8c025..7a8a02f76 100644 --- a/examples/projects/Arduino/servo_motor/platformio.ini +++ b/examples/projects/Arduino/servo_motor/platformio.ini @@ -24,7 +24,9 @@ default_envs = zero [env] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam framework = arduino @@ -35,6 +37,7 @@ build_flags = -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network arduino-libraries/Servo@^1.1.8 servo_motor diff --git a/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp b/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp index a85e4691b..e8be7fa1f 100644 --- a/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp +++ b/examples/projects/Arduino/servo_motor/src/Servo_motor.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "servo_motor.h" #ifdef __cplusplus diff --git a/examples/projects/Arduino/stepper_simple_foc/platformio.ini b/examples/projects/Arduino/stepper_simple_foc/platformio.ini index 552cc4a09..11dd13e37 100644 --- a/examples/projects/Arduino/stepper_simple_foc/platformio.ini +++ b/examples/projects/Arduino/stepper_simple_foc/platformio.ini @@ -15,12 +15,15 @@ framework = arduino platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git lib_archive = false build_unflags = -Os -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ build_flags = -O1 -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO lib_deps = luos_engine@^3.0.0 + robus_network SimpleFOC_Stepper askuric/Simple FOC@^2.2.1 diff --git a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp index 54e5b557f..da7fac285 100644 --- a/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp +++ b/examples/projects/Arduino/stepper_simple_foc/src/SimpleFOC.cpp @@ -9,7 +9,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #ifdef __cplusplus } diff --git a/examples/projects/ESP32/button/lib/button/button.h b/examples/projects/ESP32/button/lib/button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/ESP32/button/lib/button/button.h +++ b/examples/projects/ESP32/button/lib/button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/button/platformio.ini b/examples/projects/ESP32/button/platformio.ini index 7cb793ba9..95c4afe72 100644 --- a/examples/projects/ESP32/button/platformio.ini +++ b/examples/projects/ESP32/button/platformio.ini @@ -13,7 +13,9 @@ default_envs = esp32dev [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = espidf platform = espressif32@^5.3.0 build_unflags = -Os @@ -23,6 +25,7 @@ build_flags = -O1 lib_deps = luos_engine@^3.0.0 + robus_network button [env:esp32dev] diff --git a/examples/projects/ESP32/button/src/main.c b/examples/projects/ESP32/button/src/main.c index 43d1137f4..6bd58ae07 100644 --- a/examples/projects/ESP32/button/src/main.c +++ b/examples/projects/ESP32/button/src/main.c @@ -7,7 +7,7 @@ CONDITIONS OF ANY KIND, either express or implied. */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" void app_main(void) diff --git a/examples/projects/ESP32/button_arduino/lib/button/button.h b/examples/projects/ESP32/button_arduino/lib/button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/ESP32/button_arduino/lib/button/button.h +++ b/examples/projects/ESP32/button_arduino/lib/button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/button_arduino/platformio.ini b/examples/projects/ESP32/button_arduino/platformio.ini index 68640c929..2f6407f58 100644 --- a/examples/projects/ESP32/button_arduino/platformio.ini +++ b/examples/projects/ESP32/button_arduino/platformio.ini @@ -13,7 +13,9 @@ default_envs = esp32dev [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = espressif32@^5.3.0 framework = arduino, espidf build_unflags = -Os @@ -23,6 +25,7 @@ build_flags = -O1 lib_deps = luos_engine@^3.0.0 + robus_network button [env:esp32dev] diff --git a/examples/projects/ESP32/button_arduino/src/main.cpp b/examples/projects/ESP32/button_arduino/src/main.cpp index c4c0bc049..be1325fcc 100644 --- a/examples/projects/ESP32/button_arduino/src/main.cpp +++ b/examples/projects/ESP32/button_arduino/src/main.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" #ifdef __cplusplus diff --git a/examples/projects/ESP32/gate_serialcom/platformio.ini b/examples/projects/ESP32/gate_serialcom/platformio.ini index 8f63cc0dc..ac24a9816 100644 --- a/examples/projects/ESP32/gate_serialcom/platformio.ini +++ b/examples/projects/ESP32/gate_serialcom/platformio.ini @@ -15,6 +15,7 @@ default_envs = esp32dev lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../tool_services/ platform = espressif32@^5.3.0 framework = espidf @@ -28,6 +29,7 @@ build_flags = -O1 lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe diff --git a/examples/projects/ESP32/gate_serialcom/src/main.c b/examples/projects/ESP32/gate_serialcom/src/main.c index 283f95390..c2a21a948 100644 --- a/examples/projects/ESP32/gate_serialcom/src/main.c +++ b/examples/projects/ESP32/gate_serialcom/src/main.c @@ -1,6 +1,6 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" diff --git a/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini b/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini index 6e9f1a8b8..93dc5a7c1 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini +++ b/examples/projects/ESP32/gate_serialcom_arduino/platformio.ini @@ -15,6 +15,7 @@ default_envs = esp32dev lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../tool_services/ platform = espressif32@^5.3.0 framework = arduino, espidf @@ -28,6 +29,7 @@ build_flags = -O1 lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe diff --git a/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp b/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp index 8b6383ed5..ac21a5e91 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp +++ b/examples/projects/ESP32/gate_serialcom_arduino/src/main.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" diff --git a/examples/projects/ESP32/gate_wscom/platformio.ini b/examples/projects/ESP32/gate_wscom/platformio.ini index 381a07616..6dd7bf6eb 100644 --- a/examples/projects/ESP32/gate_wscom/platformio.ini +++ b/examples/projects/ESP32/gate_wscom/platformio.ini @@ -15,6 +15,7 @@ default_envs = esp32dev lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../tool_services/ platform = espressif32@^5.3.0 framework = espidf @@ -28,6 +29,7 @@ build_flags = -O1 lib_deps = luos_engine + robus_network Gate Pipe diff --git a/examples/projects/ESP32/gate_wscom/src/main.c b/examples/projects/ESP32/gate_wscom/src/main.c index 283f95390..c2a21a948 100644 --- a/examples/projects/ESP32/gate_wscom/src/main.c +++ b/examples/projects/ESP32/gate_wscom/src/main.c @@ -1,6 +1,6 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" diff --git a/examples/projects/ESP32/gate_wscom_arduino/platformio.ini b/examples/projects/ESP32/gate_wscom_arduino/platformio.ini index 4142fb168..be521e201 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/platformio.ini +++ b/examples/projects/ESP32/gate_wscom_arduino/platformio.ini @@ -15,6 +15,7 @@ default_envs = esp32dev lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ $PROJECT_DIR/../../../../tool_services/ platform = espressif32@^5.3.0 framework = arduino, espidf @@ -28,6 +29,7 @@ build_flags = -O1 lib_deps = luos_engine + robus_network Gate Pipe diff --git a/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp b/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp index 8b6383ed5..ac21a5e91 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp +++ b/examples/projects/ESP32/gate_wscom_arduino/src/main.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" diff --git a/examples/projects/ESP32/led/lib/led/led.h b/examples/projects/ESP32/led/lib/led/led.h index a0cf02055..d277b08b9 100644 --- a/examples/projects/ESP32/led/lib/led/led.h +++ b/examples/projects/ESP32/led/lib/led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/ESP32/led/platformio.ini b/examples/projects/ESP32/led/platformio.ini index 3dc151cd2..972985785 100644 --- a/examples/projects/ESP32/led/platformio.ini +++ b/examples/projects/ESP32/led/platformio.ini @@ -13,7 +13,9 @@ default_envs = esp32dev [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = espidf platform = espressif32@^5.3.0 build_unflags = -Os @@ -23,6 +25,7 @@ build_flags = -O1 lib_deps = luos_engine@^3.0.0 + robus_network led [env:esp32dev] diff --git a/examples/projects/ESP32/led/src/main.c b/examples/projects/ESP32/led/src/main.c index 3ab197bf1..033bb7c60 100644 --- a/examples/projects/ESP32/led/src/main.c +++ b/examples/projects/ESP32/led/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" void app_main(void) diff --git a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h index 7cfb417c6..9d3563ef3 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h +++ b/examples/projects/NUCLEO-F072RB/barometer/lib/barometer/BMP280.h @@ -2,7 +2,7 @@ #define __BMP280_H__ #include "SPI_Driver.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" void BMP280_Init(); void BMP280_Loop(); diff --git a/examples/projects/NUCLEO-F072RB/barometer/platformio.ini b/examples/projects/NUCLEO-F072RB/barometer/platformio.ini index 89766d243..38eb09b70 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/barometer/platformio.ini @@ -25,9 +25,11 @@ build_flags = -DLUOSHAL=STM32F0 lib_deps = luos_engine@^3.0.0 + robus_network barometer lib_extra_dirs = $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/barometer/src/main.c b/examples/projects/NUCLEO-F072RB/barometer/src/main.c index ce9534c64..ddb8f70d1 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/src/main.c +++ b/examples/projects/NUCLEO-F072RB/barometer/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "BMP280.h" void SystemClock_Config(void); diff --git a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini index 97f0ff483..a4aaf4315 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = nucleo_f072rb [env] platform = ststm32 board = nucleo_f072rb -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:nucleo_f072rb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c index e28b42e18..24e3a531c 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F072RB/bootloader/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F072RB/button/platformio.ini b/examples/projects/NUCLEO-F072RB/button/platformio.ini index d3d17ca6e..935de08f2 100644 --- a/examples/projects/NUCLEO-F072RB/button/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/button/platformio.ini @@ -13,12 +13,15 @@ default_envs = nucleo_f072rb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/button/src/main.c b/examples/projects/NUCLEO-F072RB/button/src/main.c index a6fa48094..c504a1061 100644 --- a/examples/projects/NUCLEO-F072RB/button/src/main.c +++ b/examples/projects/NUCLEO-F072RB/button/src/main.c @@ -25,7 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h index c101e7f81..7b07fbcdf 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini b/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini index 9fa4ce4fb..a1d14e443 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/dc_motor/platformio.ini @@ -13,12 +13,15 @@ default_envs = nucleo_f072rb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c b/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c index 4691dadc3..9df6d67b3 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F072RB/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini index 6b4a847b4..75cc366a2 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/platformio.ini @@ -16,11 +16,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Pipe Gate debug_tool = stlink diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c index 81f960717..de628a1a6 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini index a9f2ccdc1..a41be0c2a 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini @@ -16,11 +16,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c index cb5939a8f..960d5fb1b 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "inspector.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h index bfdaf2ef3..d85c49424 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini b/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini index ce51dbf59..8dd3b9485 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/potentiometer/platformio.ini @@ -13,12 +13,15 @@ default_envs = nucleo_f072rb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f072rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c b/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c index d1f007892..ecf01b4cd 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F072RB/potentiometer/src/main.c @@ -25,7 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini index 47514092f..20b46fb7c 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = nucleo_f401re [env] platform = ststm32 board = nucleo_f401re -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:nucleo_f401re] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c index 372e76128..60d1881a8 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F401RE/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/button/platformio.ini b/examples/projects/NUCLEO-F401RE/button/platformio.ini index 3c207d496..a5858e7cc 100644 --- a/examples/projects/NUCLEO-F401RE/button/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/button/src/main.c b/examples/projects/NUCLEO-F401RE/button/src/main.c index 2194bbf36..bf478866e 100644 --- a/examples/projects/NUCLEO-F401RE/button/src/main.c +++ b/examples/projects/NUCLEO-F401RE/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h index e089b1f1f..c49674597 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini b/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini index 937296bfa..c3fc7fd55 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/dc_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c b/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c index ae85a7966..0b824be86 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F401RE/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini index a027f30fd..3004779cc 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c index 12e1fc2c7..e4dca0335 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini index 76b198b3c..650b9b073 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c index cdb7b5d41..76048bce7 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-F401RE/led/lib/Led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c index 994c1e7a4..2d5ac2943 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c +++ b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.c @@ -7,7 +7,7 @@ #include "main.h" #include "alias_save.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "string.h" /******************************************************************************* @@ -35,7 +35,7 @@ int Alias_read(int slot, char *alias) * @param size the size of the alias * @return none ******************************************************************************/ -void Alias_write(int slot, char *alias, size_t size) +void Alias_write(int slot, const uint8_t *alias, size_t size) { if (size > MAX_ALIAS_SIZE) { diff --git a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.h b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.h index e18aa2c06..694bcb14c 100644 --- a/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.h +++ b/examples/projects/NUCLEO-F401RE/led/lib/alias_save/alias_save.h @@ -7,6 +7,8 @@ #ifndef ALIAS_SAVE_H #define ALIAS_SAVE_H +#include + /******************************************************************************* * FLASH CONFIG ******************************************************************************/ @@ -24,6 +26,6 @@ * Function ******************************************************************************/ int Alias_read(int slot, char *alias); -void Alias_write(int slot, char *alias, size_t size); +void Alias_write(int slot, const uint8_t *alias, size_t size); #endif /* ALIAS_SAVE_H */ diff --git a/examples/projects/NUCLEO-F401RE/led/platformio.ini b/examples/projects/NUCLEO-F401RE/led/platformio.ini index 70a224174..e52e2e13d 100644 --- a/examples/projects/NUCLEO-F401RE/led/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/led/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F401RE/led/src/main.c b/examples/projects/NUCLEO-F401RE/led/src/main.c index 9d3d7daac..c5d9ee593 100644 --- a/examples/projects/NUCLEO-F401RE/led/src/main.c +++ b/examples/projects/NUCLEO-F401RE/led/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5d41c5a65..9b5f007ab 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini b/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini index df9c27d63..8b5d6260d 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/potentiometer/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c b/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c index 85d52815f..319d6bd8a 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F401RE/potentiometer/src/main.c @@ -25,7 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini index 7efc94d10..ca1bb4c50 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini @@ -14,9 +14,12 @@ default_envs = nucleo_f410rb platform = ststm32 board = nucleo_f410rb framework = stm32cube -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_deps = luos_engine@^3.0.0 + robus_network [env:nucleo_f410rb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c index 1749fecb5..268966241 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-F410RB/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-F410RB/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/button/platformio.ini b/examples/projects/NUCLEO-F410RB/button/platformio.ini index ab21b2b1c..6888aeb54 100644 --- a/examples/projects/NUCLEO-F410RB/button/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f410rb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F410RB/button/src/main.c b/examples/projects/NUCLEO-F410RB/button/src/main.c index 5d2e9fff9..51006c3a4 100644 --- a/examples/projects/NUCLEO-F410RB/button/src/main.c +++ b/examples/projects/NUCLEO-F410RB/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h index e089b1f1f..c49674597 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini b/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini index 937296bfa..c3fc7fd55 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/dc_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c b/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c index ae85a7966..0b824be86 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-F410RB/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini index 3c6e9e32d..3afd56fd3 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c index c60886695..8ec03f025 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini index af9a65d6c..895c19f58 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f410rb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c index d6bdde600..117d8e1d8 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-F410RB/led/lib/Led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-F410RB/led/platformio.ini b/examples/projects/NUCLEO-F410RB/led/platformio.ini index 56e116a0a..f9289d4e0 100644 --- a/examples/projects/NUCLEO-F410RB/led/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/led/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-F410RB/led/src/main.c b/examples/projects/NUCLEO-F410RB/led/src/main.c index b1320fa24..bf2475be6 100644 --- a/examples/projects/NUCLEO-F410RB/led/src/main.c +++ b/examples/projects/NUCLEO-F410RB/led/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h index 5d41c5a65..9b5f007ab 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini b/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini index df9c27d63..8b5d6260d 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/potentiometer/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_f401re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c b/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c index 85d52815f..319d6bd8a 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-F410RB/potentiometer/src/main.c @@ -25,7 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini index 621573734..9b500d707 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = nucleo_g431kb [env] platform = ststm32 board = nucleo_g431kb -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:nucleo_g431kb] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c index c3d7bcba1..884e4bb5e 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G431KB/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h index 510616eca..29464d5e3 100644 --- a/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-G431KB/button/lib/Button/button.h @@ -8,7 +8,6 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/button/platformio.ini b/examples/projects/NUCLEO-G431KB/button/platformio.ini index 1fb02c21e..5313a69a9 100644 --- a/examples/projects/NUCLEO-G431KB/button/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_g431kb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G431KB/button/src/main.c b/examples/projects/NUCLEO-G431KB/button/src/main.c index e4911eaef..11a4c21f7 100644 --- a/examples/projects/NUCLEO-G431KB/button/src/main.c +++ b/examples/projects/NUCLEO-G431KB/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h index 8a103f2b1..f4e4e205f 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini b/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini index 0dfe7e8f0..320c83a89 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/dc_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_g431kb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c b/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c index 2492edb17..8994a8291 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-G431KB/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini index 808e26baf..05a3243ba 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c b/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c index be3929a79..eb0a1b250 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini index 6db1297eb..fe5677cd5 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c index 6395f48b5..7f1079a30 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h index a92f6ce7e..5bacb60a6 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini b/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini index 26406429e..e0f4852e1 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/potentiometer/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_g431kb [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c b/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c index 1c713fa5a..bb9cbc3ba 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-G431KB/potentiometer/src/main.c @@ -25,7 +25,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini index 51d0f955a..dc1c83a12 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = nucleo_g474re [env] platform = ststm32 board = nucleo_g474re -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c index 715c3bf7b..5f2baeff3 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/src/main.c +++ b/examples/projects/NUCLEO-G474RE/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G474RE/button/platformio.ini b/examples/projects/NUCLEO-G474RE/button/platformio.ini index 246e734a1..b6d6dac6f 100644 --- a/examples/projects/NUCLEO-G474RE/button/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/button/platformio.ini @@ -13,12 +13,15 @@ default_envs = nucleo_g474re [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink @@ -45,4 +48,4 @@ build_flags = upload_protocol = custom upload_flags = -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE \ No newline at end of file +upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-G474RE/button/src/main.c b/examples/projects/NUCLEO-G474RE/button/src/main.c index 7b4875771..a4a3f3b8b 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/main.c +++ b/examples/projects/NUCLEO-G474RE/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini index f755a2de4..704eda036 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c b/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c index 0c61c6ed3..fde95516b 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini index df83df4c6..f543507c2 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_g474re framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe upload_protocol = stlink diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c index 443355d49..aed1ea40e 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini index bb890a482..9cf6fec6f 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = nucleo_l073rz [env] platform = ststm32 board = nucleo_l073rz -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:nucleo_l073rz] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c index 7eaa0d61a..b5a9142b2 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/bootloader/src/main.c @@ -22,7 +22,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L073RZ/button/platformio.ini b/examples/projects/NUCLEO-L073RZ/button/platformio.ini index ef6b5e13f..7825620d7 100644 --- a/examples/projects/NUCLEO-L073RZ/button/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/button/platformio.ini @@ -13,12 +13,15 @@ default_envs = nucleo_l073rz [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l073rz framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L073RZ/button/src/main.c b/examples/projects/NUCLEO-L073RZ/button/src/main.c index 4da9c3f10..9f4313f94 100644 --- a/examples/projects/NUCLEO-L073RZ/button/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/button/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini index aadcc8373..75de242d5 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/platformio.ini @@ -16,11 +16,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l073rz framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Pipe Gate debug_tool = stlink diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c b/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c index df86c8475..25c3887e6 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini index 9564fa0bb..1e90565a6 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini @@ -14,7 +14,9 @@ default_envs = nucleo_l432kc [env] platform = ststm32 board = nucleo_l432kc -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube [env:nucleo_l432kc] @@ -29,6 +31,7 @@ build_flags = -DBOOTLOADER lib_deps = luos_engine@^3.0.0 + robus_network debug_tool = stlink upload_protocol = stlink @@ -45,6 +48,7 @@ build_flags = -DBOOTLOADER_UPDATER lib_deps = luos_engine@^3.0.0 + robus_network upload_protocol = custom upload_flags = -t2 diff --git a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c index 4c6f10682..2b0c56eff 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/src/main.c +++ b/examples/projects/NUCLEO-L432KC/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/button/platformio.ini b/examples/projects/NUCLEO-L432KC/button/platformio.ini index b07142bb5..391e4a2f0 100644 --- a/examples/projects/NUCLEO-L432KC/button/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/button/src/main.c b/examples/projects/NUCLEO-L432KC/button/src/main.c index 5a6a34f20..8b8a35b29 100644 --- a/examples/projects/NUCLEO-L432KC/button/src/main.c +++ b/examples/projects/NUCLEO-L432KC/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h index f7bf4d2f1..2656c0a20 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini b/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini index a17e8232a..998d0e7d1 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/dc_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c b/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c index b05842cb5..42f4ce23f 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c +++ b/examples/projects/NUCLEO-L432KC/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h index 855d00010..73c3629f1 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,7 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini b/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini index 51be7125b..ff32808b1 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/fingerprint/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Fingerprint debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c b/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c index 82e521743..e6e3f59f0 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c +++ b/examples/projects/NUCLEO-L432KC/fingerprint/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "fingerprint.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini index 28ed9c0dc..23054fa03 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c b/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c index ba64b4c2d..2bc10acef 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h index a6db26b14..4170a1385 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h +++ b/examples/projects/NUCLEO-L432KC/gpio/lib/Gpio_dev/gpio_dev.h @@ -8,7 +8,7 @@ #define GPIO_DEV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/gpio/platformio.ini b/examples/projects/NUCLEO-L432KC/gpio/platformio.ini index 64e20c7fe..3c77cb9b8 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/gpio/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gpio_dev debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/gpio/src/main.c b/examples/projects/NUCLEO-L432KC/gpio/src/main.c index 5f392593e..b6029cd82 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/src/main.c +++ b/examples/projects/NUCLEO-L432KC/gpio/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gpio_dev.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini index 3e89293a8..88e341e7c 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c index 9059dc0d7..810ff43ed 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h index 741816125..d3cd88f21 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h +++ b/examples/projects/NUCLEO-L432KC/lcd/lib/Lcd/lcd.h @@ -11,7 +11,7 @@ #define LCD_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-L432KC/lcd/platformio.ini b/examples/projects/NUCLEO-L432KC/lcd/platformio.ini index 5f7e275b6..90a1eeae8 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/lcd/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Lcd debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/lcd/src/main.c b/examples/projects/NUCLEO-L432KC/lcd/src/main.c index 4c3bc32eb..75bd8a120 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/src/main.c +++ b/examples/projects/NUCLEO-L432KC/lcd/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "lcd.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h +++ b/examples/projects/NUCLEO-L432KC/led/lib/Led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/NUCLEO-L432KC/led/platformio.ini b/examples/projects/NUCLEO-L432KC/led/platformio.ini index 6acd49743..8615ff8b5 100644 --- a/examples/projects/NUCLEO-L432KC/led/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/led/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/led/src/main.c b/examples/projects/NUCLEO-L432KC/led/src/main.c index 0ee3e3c4b..d5a6060dd 100644 --- a/examples/projects/NUCLEO-L432KC/led/src/main.c +++ b/examples/projects/NUCLEO-L432KC/led/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h index cd754f270..69da0f299 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini b/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini index 876357195..20d755ee6 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/potentiometer/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c b/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c index 19658cbab..16903d283 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c +++ b/examples/projects/NUCLEO-L432KC/potentiometer/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h index 34fc74db7..4ef7dfd9e 100644 --- a/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h +++ b/examples/projects/NUCLEO-L432KC/servo/lib/Servo/servo_drv.h @@ -11,7 +11,7 @@ #define SERVO_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_hal.h" /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/servo/platformio.ini b/examples/projects/NUCLEO-L432KC/servo/platformio.ini index daf1b5cae..76e65f198 100644 --- a/examples/projects/NUCLEO-L432KC/servo/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/servo/platformio.ini @@ -12,12 +12,15 @@ default_envs = nucleo_l432kc [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Servo debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/servo/src/main.c b/examples/projects/NUCLEO-L432KC/servo/src/main.c index ff111dfa8..db8f5c7f9 100644 --- a/examples/projects/NUCLEO-L432KC/servo/src/main.c +++ b/examples/projects/NUCLEO-L432KC/servo/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "servo.h" /* USER CODE END Includes */ diff --git a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c index b92775db2..3b40f8b50 100644 --- a/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c +++ b/examples/projects/SAMD21XPLAINED/Bootloader/firmware/src/main.c @@ -28,7 +28,7 @@ #include "definitions.h" // SYS function prototypes #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" // ***************************************************************************** diff --git a/examples/projects/SAMD21XPLAINED/button/lib/button/button.h b/examples/projects/SAMD21XPLAINED/button/lib/button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/SAMD21XPLAINED/button/lib/button/button.h +++ b/examples/projects/SAMD21XPLAINED/button/lib/button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/SAMD21XPLAINED/button/platformio.ini b/examples/projects/SAMD21XPLAINED/button/platformio.ini index d3e27c72b..d34a27b14 100644 --- a/examples/projects/SAMD21XPLAINED/button/platformio.ini +++ b/examples/projects/SAMD21XPLAINED/button/platformio.ini @@ -9,7 +9,9 @@ ; https://docs.platformio.org/page/projectconf.html [env:samd21_xpro] -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_ldf_mode =off platform = atmelsam board = samd21_xpro @@ -23,4 +25,5 @@ build_flags = -D__SAMD21J18A__ lib_deps = luos_engine@^3.0.0 + robus_network Button diff --git a/examples/projects/SAMD21XPLAINED/button/src/main.c b/examples/projects/SAMD21XPLAINED/button/src/main.c index db62a9707..347491afa 100644 --- a/examples/projects/SAMD21XPLAINED/button/src/main.c +++ b/examples/projects/SAMD21XPLAINED/button/src/main.c @@ -9,7 +9,7 @@ #include "device.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" void SetSystemClock_48Mhz(void); diff --git a/examples/projects/STM32F4-discovery/bootloader/platformio.ini b/examples/projects/STM32F4-discovery/bootloader/platformio.ini index bc6f7dbb7..3d0645b0b 100644 --- a/examples/projects/STM32F4-discovery/bootloader/platformio.ini +++ b/examples/projects/STM32F4-discovery/bootloader/platformio.ini @@ -12,11 +12,15 @@ default_envs = STM32F4-discovery [env] platform = ststm32 -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ + $PROJECT_DIR/../../../../network/ board = disco_f407vg framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:STM32F4-discovery] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/STM32F4-discovery/bootloader/src/main.c b/examples/projects/STM32F4-discovery/bootloader/src/main.c index 0d7e560f4..165d82227 100644 --- a/examples/projects/STM32F4-discovery/bootloader/src/main.c +++ b/examples/projects/STM32F4-discovery/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32F4-discovery/button/lib/Button/button.h b/examples/projects/STM32F4-discovery/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/STM32F4-discovery/button/lib/Button/button.h +++ b/examples/projects/STM32F4-discovery/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/STM32F4-discovery/button/platformio.ini b/examples/projects/STM32F4-discovery/button/platformio.ini index 773dc370f..9811ddecc 100644 --- a/examples/projects/STM32F4-discovery/button/platformio.ini +++ b/examples/projects/STM32F4-discovery/button/platformio.ini @@ -12,7 +12,9 @@ default_envs = STM32F4-discovery [env:STM32F4-discovery] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = disco_f407vg framework = stm32cube @@ -25,13 +27,16 @@ build_flags = -DLUOSHAL=STM32F4 lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink [env:STM32F4_discovery_with_bootloader] lib_ldf_mode =off board_build.ldscript = linker/custom_app_script.ld -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = disco_f407vg framework = stm32cube @@ -45,6 +50,7 @@ build_flags = -DLUOSHAL=STM32F4 lib_deps = luos_engine@^3.0.0 + robus_network Button upload_protocol = custom upload_flags = diff --git a/examples/projects/STM32F4-discovery/button/src/main.c b/examples/projects/STM32F4-discovery/button/src/main.c index 7f047b829..6898c0877 100644 --- a/examples/projects/STM32F4-discovery/button/src/main.c +++ b/examples/projects/STM32F4-discovery/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini index 34925cbf4..e03829e81 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini +++ b/examples/projects/STM32F4-discovery/gate_serialcom/platformio.ini @@ -28,8 +28,10 @@ build_flags = lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink @@ -41,6 +43,7 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ board = disco_f407vg framework = stm32cube build_unflags = -Os @@ -56,6 +59,7 @@ build_flags = -DLUOSHAL=STM32F4 lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe upload_protocol = custom diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c b/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c index 7234e75f4..73a331ec9 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c +++ b/examples/projects/STM32F4-discovery/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini index 311d7613c..6f1a6a041 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini @@ -28,8 +28,10 @@ build_flags = lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe debug_tool = stlink @@ -40,6 +42,7 @@ board_build.ldscript = linker/custom_app_script.ld lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = disco_f407vg framework = stm32cube @@ -55,6 +58,7 @@ build_flags = -DLUOSHAL=STM32F4 lib_deps = luos_engine@^3.0.0 + robus_network Inspector Pipe upload_protocol = custom diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c index fa99fcefb..747208dd3 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "inspector.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini index 8014d75d4..6197201e9 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini @@ -13,10 +13,13 @@ default_envs = disco_l4s5i_iot01a [env] platform = ststm32 board = disco_l4s5i_iot01a -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network [env:disco_l4s5i_iot01a] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c index b44fbf951..fcd4f7f4b 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/src/main.c +++ b/examples/projects/STM32L4S5_discovery/bootloader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h index 510616eca..391034b43 100644 --- a/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h +++ b/examples/projects/STM32L4S5_discovery/button/lib/Button/button.h @@ -8,7 +8,7 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/STM32L4S5_discovery/button/platformio.ini b/examples/projects/STM32L4S5_discovery/button/platformio.ini index 83004b65f..57ed156bf 100644 --- a/examples/projects/STM32L4S5_discovery/button/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = disco_l4s5i_iot01a [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = disco_l4s5i_iot01a framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/STM32L4S5_discovery/button/src/main.c b/examples/projects/STM32L4S5_discovery/button/src/main.c index e3c397281..1c42ed63b 100644 --- a/examples/projects/STM32L4S5_discovery/button/src/main.c +++ b/examples/projects/STM32L4S5_discovery/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini b/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini index 3aa58bb3a..e14e3877e 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = disco_l4s5i_iot01a framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gate Pipe debug_tool = stlink diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c b/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c index a5c2b7bc0..a1389a501 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gate.h" #include "pipe.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h index e458e3b98..f7b91d2d0 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/led_fader.h @@ -8,7 +8,7 @@ #define LED_FADER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h index d60f8b180..b31fac54c 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/lib/Led_Fader/ledfader_drv.h @@ -8,7 +8,7 @@ #define LEDFADER_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" diff --git a/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini b/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini index 04b86b349..9fc6db28e 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini +++ b/examples/projects/l0/bike_alarm/alarm_controller/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../apps/ $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network alarm_controller Led_Fader debug_tool = stlink diff --git a/examples/projects/l0/bike_alarm/alarm_controller/src/main.c b/examples/projects/l0/bike_alarm/alarm_controller/src/main.c index 3797937a1..d4efd55a5 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/src/main.c +++ b/examples/projects/l0/bike_alarm/alarm_controller/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led_fader.h" #include "alarm_controller.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/bike_alarm/start_controller/platformio.ini b/examples/projects/l0/bike_alarm/start_controller/platformio.ini index d3d1ab48e..f3ceed612 100644 --- a/examples/projects/l0/bike_alarm/start_controller/platformio.ini +++ b/examples/projects/l0/bike_alarm/start_controller/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../apps/ $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button start_controller debug_tool = stlink diff --git a/examples/projects/l0/bike_alarm/start_controller/src/main.c b/examples/projects/l0/bike_alarm/start_controller/src/main.c index 36f1b51df..6fd21f948 100644 --- a/examples/projects/l0/bike_alarm/start_controller/src/main.c +++ b/examples/projects/l0/bike_alarm/start_controller/src/main.c @@ -27,7 +27,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/bootloader/platformio.ini b/examples/projects/l0/bootloader/platformio.ini index 1240d9adb..a17f313f8 100644 --- a/examples/projects/l0/bootloader/platformio.ini +++ b/examples/projects/l0/bootloader/platformio.ini @@ -15,9 +15,12 @@ default_envs = l0 platform = ststm32 board = l0 framework = stm32cube -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ lib_deps = luos_engine@^3.0.0 + robus_network [env:l0] board_build.ldscript = linker/custom_bootloader_script.ld diff --git a/examples/projects/l0/bootloader/src/main.c b/examples/projects/l0/bootloader/src/main.c index fde761701..7198af518 100644 --- a/examples/projects/l0/bootloader/src/main.c +++ b/examples/projects/l0/bootloader/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_bootloader.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/button/platformio.ini b/examples/projects/l0/button/platformio.ini index 77798e51c..17077b40a 100644 --- a/examples/projects/l0/button/platformio.ini +++ b/examples/projects/l0/button/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button debug_tool = stlink diff --git a/examples/projects/l0/button/src/main.c b/examples/projects/l0/button/src/main.c index 5f25fe81a..49cdb2ca3 100644 --- a/examples/projects/l0/button/src/main.c +++ b/examples/projects/l0/button/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/button_freertos/lib/Led/led.h b/examples/projects/l0/button_freertos/lib/Led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/l0/button_freertos/lib/Led/led.h +++ b/examples/projects/l0/button_freertos/lib/Led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/button_freertos/lib/Led/led_drv.h b/examples/projects/l0/button_freertos/lib/Led/led_drv.h index 52740a857..53254d44d 100644 --- a/examples/projects/l0/button_freertos/lib/Led/led_drv.h +++ b/examples/projects/l0/button_freertos/lib/Led/led_drv.h @@ -8,7 +8,7 @@ #define LED_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" diff --git a/examples/projects/l0/button_freertos/platformio.ini b/examples/projects/l0/button_freertos/platformio.ini index c07be097a..331829692 100644 --- a/examples/projects/l0/button_freertos/platformio.ini +++ b/examples/projects/l0/button_freertos/platformio.ini @@ -12,12 +12,16 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Button CMSIS_RTOS_V2 bojit/PlatformIO-FreeRTOS diff --git a/examples/projects/l0/button_freertos/src/freertos.c b/examples/projects/l0/button_freertos/src/freertos.c index 93c27d049..774ecc630 100644 --- a/examples/projects/l0/button_freertos/src/freertos.c +++ b/examples/projects/l0/button_freertos/src/freertos.c @@ -3,7 +3,7 @@ #include "cmsis_os.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" #include "led.h" diff --git a/examples/projects/l0/controller_motor/platformio.ini b/examples/projects/l0/controller_motor/platformio.ini index deeab9b3e..d6a5074f3 100644 --- a/examples/projects/l0/controller_motor/platformio.ini +++ b/examples/projects/l0/controller_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Controller_motor debug_tool = stlink diff --git a/examples/projects/l0/controller_motor/src/main.c b/examples/projects/l0/controller_motor/src/main.c index b1269c31a..bbe7522ca 100644 --- a/examples/projects/l0/controller_motor/src/main.c +++ b/examples/projects/l0/controller_motor/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "controller_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h index c101e7f81..7b07fbcdf 100644 --- a/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h +++ b/examples/projects/l0/dc_motor/lib/DC_motor/dc_motor_drv.h @@ -8,7 +8,7 @@ #define DC_MOTOR_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/dc_motor/platformio.ini b/examples/projects/l0/dc_motor/platformio.ini index 36fa0eebc..21727f870 100644 --- a/examples/projects/l0/dc_motor/platformio.ini +++ b/examples/projects/l0/dc_motor/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network DC_motor debug_tool = stlink diff --git a/examples/projects/l0/dc_motor/src/main.c b/examples/projects/l0/dc_motor/src/main.c index d5540c373..41c917fc1 100644 --- a/examples/projects/l0/dc_motor/src/main.c +++ b/examples/projects/l0/dc_motor/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dc_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h index 7be366d3b..0c67d9d5b 100644 --- a/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h +++ b/examples/projects/l0/demo/detection_button/lib/Detection_Button/detection_button.h @@ -8,7 +8,7 @@ #define START_CONTROLLER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/detection_button/platformio.ini b/examples/projects/l0/demo/detection_button/platformio.ini index db86e74c6..53888074a 100644 --- a/examples/projects/l0/demo/detection_button/platformio.ini +++ b/examples/projects/l0/demo/detection_button/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../apps/ $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network detection_button Button debug_tool = stlink diff --git a/examples/projects/l0/demo/detection_button/src/main.c b/examples/projects/l0/demo/detection_button/src/main.c index fb9ae0b45..2e0518d32 100644 --- a/examples/projects/l0/demo/detection_button/src/main.c +++ b/examples/projects/l0/demo/detection_button/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" #include "detection_button.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h index bf5d4eff1..061dca47d 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/Distance/distance.h @@ -8,7 +8,7 @@ #define DISTANCE_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h b/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h index d5ee34a83..1f0c68b37 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/Distance/vl53l0x_drv.h @@ -10,7 +10,7 @@ #include "stdbool.h" #include "stm32f0xx_hal.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h index a3d0adb41..82e59ceb6 100644 --- a/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h +++ b/examples/projects/l0/demo/ledstrip_position/lib/LedStrip_Position/ledstrip_position.h @@ -8,7 +8,7 @@ #define LedStripPosition #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/ledstrip_position/platformio.ini b/examples/projects/l0/demo/ledstrip_position/platformio.ini index 5b2b36243..1dc8768fb 100644 --- a/examples/projects/l0/demo/ledstrip_position/platformio.ini +++ b/examples/projects/l0/demo/ledstrip_position/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../apps/ $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network ledstrip_position distance debug_tool = stlink diff --git a/examples/projects/l0/demo/ledstrip_position/src/main.c b/examples/projects/l0/demo/ledstrip_position/src/main.c index 6edae715d..2441dd861 100644 --- a/examples/projects/l0/demo/ledstrip_position/src/main.c +++ b/examples/projects/l0/demo/ledstrip_position/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "distance.h" #include "ledstrip_position.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h index 497978932..5ccb60306 100644 --- a/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h +++ b/examples/projects/l0/demo/motor_copy_app/lib/motor_copy/motor_copy.h @@ -8,7 +8,7 @@ #define MOTOR_COPY_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/motor_copy_app/platformio.ini b/examples/projects/l0/demo/motor_copy_app/platformio.ini index 419cbdea5..84a5803a3 100644 --- a/examples/projects/l0/demo/motor_copy_app/platformio.ini +++ b/examples/projects/l0/demo/motor_copy_app/platformio.ini @@ -13,12 +13,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network motor_copy debug_tool = stlink diff --git a/examples/projects/l0/demo/motor_copy_app/src/main.c b/examples/projects/l0/demo/motor_copy_app/src/main.c index 7064e79fb..23d2d3b6d 100644 --- a/examples/projects/l0/demo/motor_copy_app/src/main.c +++ b/examples/projects/l0/demo/motor_copy_app/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "motor_copy.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h index 485a5f3ff..a0cbe1689 100644 --- a/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h +++ b/examples/projects/l0/demo/motor_demo_app/lib/run_motor/run_motor.h @@ -8,7 +8,7 @@ #define RUN_MOTOR_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/demo/motor_demo_app/platformio.ini b/examples/projects/l0/demo/motor_demo_app/platformio.ini index fe8738469..1fe314b90 100644 --- a/examples/projects/l0/demo/motor_demo_app/platformio.ini +++ b/examples/projects/l0/demo/motor_demo_app/platformio.ini @@ -13,12 +13,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../../ + $PROJECT_DIR/../../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network run_motor debug_tool = stlink diff --git a/examples/projects/l0/demo/motor_demo_app/src/main.c b/examples/projects/l0/demo/motor_demo_app/src/main.c index 1a8656f77..257a5a317 100644 --- a/examples/projects/l0/demo/motor_demo_app/src/main.c +++ b/examples/projects/l0/demo/motor_demo_app/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "run_motor.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/demo/product_config.h b/examples/projects/l0/demo/product_config.h index e284a9071..cc50d6aa4 100644 --- a/examples/projects/l0/demo/product_config.h +++ b/examples/projects/l0/demo/product_config.h @@ -7,7 +7,7 @@ #ifndef PRODUCT_CONFIG_H #define PRODUCT_CONFIG_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" enum { diff --git a/examples/projects/l0/distance/lib/Distance/distance.h b/examples/projects/l0/distance/lib/Distance/distance.h index bf5d4eff1..061dca47d 100644 --- a/examples/projects/l0/distance/lib/Distance/distance.h +++ b/examples/projects/l0/distance/lib/Distance/distance.h @@ -8,7 +8,7 @@ #define DISTANCE_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h b/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h index d5ee34a83..1f0c68b37 100644 --- a/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h +++ b/examples/projects/l0/distance/lib/Distance/vl53l0x_drv.h @@ -10,7 +10,7 @@ #include "stdbool.h" #include "stm32f0xx_hal.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/distance/platformio.ini b/examples/projects/l0/distance/platformio.ini index 24e83b80b..681a3bed1 100644 --- a/examples/projects/l0/distance/platformio.ini +++ b/examples/projects/l0/distance/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Distance debug_tool = stlink diff --git a/examples/projects/l0/distance/src/main.c b/examples/projects/l0/distance/src/main.c index 3c67f8f62..642dc2f18 100644 --- a/examples/projects/l0/distance/src/main.c +++ b/examples/projects/l0/distance/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "distance.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.h b/examples/projects/l0/dxl/lib/Dxl/dxl.h index 39bc01bab..3ff639527 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.h +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.h @@ -8,7 +8,7 @@ #define DXL_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/dxl/platformio.ini b/examples/projects/l0/dxl/platformio.ini index d0f1b6431..7ca224034 100644 --- a/examples/projects/l0/dxl/platformio.ini +++ b/examples/projects/l0/dxl/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Dxl debug_tool = stlink diff --git a/examples/projects/l0/dxl/src/main.c b/examples/projects/l0/dxl/src/main.c index 1e52558ae..6483d7567 100644 --- a/examples/projects/l0/dxl/src/main.c +++ b/examples/projects/l0/dxl/src/main.c @@ -28,7 +28,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "dxl.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h index 0a4b0bf37..89577a452 100644 --- a/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h +++ b/examples/projects/l0/fingerprint/lib/Fingerprint/fingerprint.h @@ -11,7 +11,7 @@ #define FINGERPRINT_H_ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/fingerprint/platformio.ini b/examples/projects/l0/fingerprint/platformio.ini index bfc2b5814..7cc1245b2 100644 --- a/examples/projects/l0/fingerprint/platformio.ini +++ b/examples/projects/l0/fingerprint/platformio.ini @@ -13,12 +13,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Fingerprint debug_tool = stlink diff --git a/examples/projects/l0/fingerprint/src/main.c b/examples/projects/l0/fingerprint/src/main.c index 8d5e0d2d2..9045e308f 100644 --- a/examples/projects/l0/fingerprint/src/main.c +++ b/examples/projects/l0/fingerprint/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "fingerprint.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/gate_serialcom/platformio.ini b/examples/projects/l0/gate_serialcom/platformio.ini index 848c22558..08675e8ff 100644 --- a/examples/projects/l0/gate_serialcom/platformio.ini +++ b/examples/projects/l0/gate_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Pipe Gate debug_tool = stlink diff --git a/examples/projects/l0/gate_serialcom/src/main.c b/examples/projects/l0/gate_serialcom/src/main.c index 931c947e6..02288f479 100644 --- a/examples/projects/l0/gate_serialcom/src/main.c +++ b/examples/projects/l0/gate_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/gpio/platformio.ini b/examples/projects/l0/gpio/platformio.ini index 796611b68..1f63f5dcf 100644 --- a/examples/projects/l0/gpio/platformio.ini +++ b/examples/projects/l0/gpio/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../network/ + $PROJECT_DIR/../../../../../ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Gpio_dev debug_tool = stlink diff --git a/examples/projects/l0/gpio/src/main.c b/examples/projects/l0/gpio/src/main.c index d82c4a012..67b1c8c72 100644 --- a/examples/projects/l0/gpio/src/main.c +++ b/examples/projects/l0/gpio/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "gpio_dev.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/imu/lib/Imu/imu.h b/examples/projects/l0/imu/lib/Imu/imu.h index bf7873ebd..4bec85306 100644 --- a/examples/projects/l0/imu/lib/Imu/imu.h +++ b/examples/projects/l0/imu/lib/Imu/imu.h @@ -8,7 +8,7 @@ #define IMU_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/imu/lib/Imu/mpu_configuration.c b/examples/projects/l0/imu/lib/Imu/mpu_configuration.c index 60b66ea65..e53f5fda6 100644 --- a/examples/projects/l0/imu/lib/Imu/mpu_configuration.c +++ b/examples/projects/l0/imu/lib/Imu/mpu_configuration.c @@ -1,6 +1,6 @@ #include #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "invensense.h" #include "invensense_adv.h" #include "mpu.h" diff --git a/examples/projects/l0/imu/lib/Imu/mpu_configuration.h b/examples/projects/l0/imu/lib/Imu/mpu_configuration.h index 3cb025958..10af26034 100644 --- a/examples/projects/l0/imu/lib/Imu/mpu_configuration.h +++ b/examples/projects/l0/imu/lib/Imu/mpu_configuration.h @@ -2,7 +2,7 @@ #define __MPU_SETUP_H__ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include #include #include diff --git a/examples/projects/l0/imu/platformio.ini b/examples/projects/l0/imu/platformio.ini index 294442d8d..37729645f 100644 --- a/examples/projects/l0/imu/platformio.ini +++ b/examples/projects/l0/imu/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Imu debug_tool = stlink diff --git a/examples/projects/l0/imu/src/main.c b/examples/projects/l0/imu/src/main.c index f607c2824..9272d969c 100644 --- a/examples/projects/l0/imu/src/main.c +++ b/examples/projects/l0/imu/src/main.c @@ -47,7 +47,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "imu.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/inspector_serialcom/platformio.ini b/examples/projects/l0/inspector_serialcom/platformio.ini index a7deab40d..776b3eb22 100644 --- a/examples/projects/l0/inspector_serialcom/platformio.ini +++ b/examples/projects/l0/inspector_serialcom/platformio.ini @@ -15,11 +15,13 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Pipe Inspector debug_tool = stlink diff --git a/examples/projects/l0/inspector_serialcom/src/main.c b/examples/projects/l0/inspector_serialcom/src/main.c index 79d7838de..5e840ac2a 100644 --- a/examples/projects/l0/inspector_serialcom/src/main.c +++ b/examples/projects/l0/inspector_serialcom/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "inspector.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/lcd/lib/Lcd/lcd.h b/examples/projects/l0/lcd/lib/Lcd/lcd.h index c371e7648..502449b5f 100644 --- a/examples/projects/l0/lcd/lib/Lcd/lcd.h +++ b/examples/projects/l0/lcd/lib/Lcd/lcd.h @@ -11,7 +11,7 @@ #define LCD_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/lcd/platformio.ini b/examples/projects/l0/lcd/platformio.ini index 4f3b2a79e..9efb7ad63 100644 --- a/examples/projects/l0/lcd/platformio.ini +++ b/examples/projects/l0/lcd/platformio.ini @@ -13,12 +13,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Lcd debug_tool = stlink diff --git a/examples/projects/l0/lcd/src/main.c b/examples/projects/l0/lcd/src/main.c index 32cda4486..c58db43d0 100644 --- a/examples/projects/l0/lcd/src/main.c +++ b/examples/projects/l0/lcd/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "lcd.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/led/lib/Led/led.h b/examples/projects/l0/led/lib/Led/led.h index 4a8a99bf4..e606ea77c 100644 --- a/examples/projects/l0/led/lib/Led/led.h +++ b/examples/projects/l0/led/lib/Led/led.h @@ -8,7 +8,7 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led/lib/Led/led_drv.h b/examples/projects/l0/led/lib/Led/led_drv.h index 845ab495e..a5970428e 100644 --- a/examples/projects/l0/led/lib/Led/led_drv.h +++ b/examples/projects/l0/led/lib/Led/led_drv.h @@ -8,7 +8,7 @@ #define LED_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" diff --git a/examples/projects/l0/led/platformio.ini b/examples/projects/l0/led/platformio.ini index 9910d533e..ffd0fa36f 100644 --- a/examples/projects/l0/led/platformio.ini +++ b/examples/projects/l0/led/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led debug_tool = stlink diff --git a/examples/projects/l0/led/src/main.c b/examples/projects/l0/led/src/main.c index ef26a1e4e..5b0514c57 100644 --- a/examples/projects/l0/led/src/main.c +++ b/examples/projects/l0/led/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h index e458e3b98..f7b91d2d0 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h +++ b/examples/projects/l0/led_fader/lib/Led_Fader/led_fader.h @@ -8,7 +8,7 @@ #define LED_FADER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h b/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h index d60f8b180..b31fac54c 100644 --- a/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h +++ b/examples/projects/l0/led_fader/lib/Led_Fader/ledfader_drv.h @@ -8,7 +8,7 @@ #define LEDFADER_DRV_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stm32f0xx_hal.h" #include "stm32f0xx_ll_exti.h" #include "stm32f0xx_ll_system.h" diff --git a/examples/projects/l0/led_fader/platformio.ini b/examples/projects/l0/led_fader/platformio.ini index 3a4930d6b..998653c89 100644 --- a/examples/projects/l0/led_fader/platformio.ini +++ b/examples/projects/l0/led_fader/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led_Fader debug_tool = stlink diff --git a/examples/projects/l0/led_fader/src/main.c b/examples/projects/l0/led_fader/src/main.c index 6a9bcbeef..099939a54 100644 --- a/examples/projects/l0/led_fader/src/main.c +++ b/examples/projects/l0/led_fader/src/main.c @@ -23,7 +23,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led_fader.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h index b86ed3feb..c0dfdb5ed 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h +++ b/examples/projects/l0/led_strip/lib/Led_strip/led_strip.h @@ -8,7 +8,7 @@ #define LED_STRIP_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h b/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h index 9459e047d..b30b55ad1 100644 --- a/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h +++ b/examples/projects/l0/led_strip/lib/Led_strip/led_strip_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "tim.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/led_strip/platformio.ini b/examples/projects/l0/led_strip/platformio.ini index 44cdd5196..717bb6508 100644 --- a/examples/projects/l0/led_strip/platformio.ini +++ b/examples/projects/l0/led_strip/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Led_strip debug_tool = stlink diff --git a/examples/projects/l0/led_strip/src/main.c b/examples/projects/l0/led_strip/src/main.c index c5c41f174..fe4711ca9 100644 --- a/examples/projects/l0/led_strip/src/main.c +++ b/examples/projects/l0/led_strip/src/main.c @@ -28,7 +28,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led_strip.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h index d68dba091..d89813f7a 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor.h @@ -8,7 +8,7 @@ #define LIGHT_SENSOR_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "light_sensor_drv.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h index 6fb513491..687a977e1 100644 --- a/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h +++ b/examples/projects/l0/light_sensor/lib/Light_sensor/light_sensor_drv.h @@ -15,7 +15,7 @@ #include "analog.h" #include "main.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/light_sensor/platformio.ini b/examples/projects/l0/light_sensor/platformio.ini index 13a47da13..21ec5a56b 100644 --- a/examples/projects/l0/light_sensor/platformio.ini +++ b/examples/projects/l0/light_sensor/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Light_sensor debug_tool = stlink diff --git a/examples/projects/l0/light_sensor/src/main.c b/examples/projects/l0/light_sensor/src/main.c index 787b3e0c2..6cd099915 100644 --- a/examples/projects/l0/light_sensor/src/main.c +++ b/examples/projects/l0/light_sensor/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "light_sensor.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/load/lib/Load/HX711/HX711.h b/examples/projects/l0/load/lib/Load/HX711/HX711.h index 023e3917b..d303e45d1 100644 --- a/examples/projects/l0/load/lib/Load/HX711/HX711.h +++ b/examples/projects/l0/load/lib/Load/HX711/HX711.h @@ -10,7 +10,7 @@ #include "stm32f0xx_hal.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/load/lib/Load/load.h b/examples/projects/l0/load/lib/Load/load.h index 385f896e0..53cc162e7 100644 --- a/examples/projects/l0/load/lib/Load/load.h +++ b/examples/projects/l0/load/lib/Load/load.h @@ -8,7 +8,7 @@ #define LOAD_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/load/platformio.ini b/examples/projects/l0/load/platformio.ini index 6244dff3e..d0d9f447f 100644 --- a/examples/projects/l0/load/platformio.ini +++ b/examples/projects/l0/load/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Load debug_tool = stlink diff --git a/examples/projects/l0/load/src/main.c b/examples/projects/l0/load/src/main.c index 72acd0320..43fda7571 100644 --- a/examples/projects/l0/load/src/main.c +++ b/examples/projects/l0/load/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "load.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h index 65a31b04d..f169709f5 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer.h @@ -2,7 +2,7 @@ #define POTENTIOMETER_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer_drv.h" /******************************************************************************* diff --git a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h index bfdaf2ef3..d85c49424 100644 --- a/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h +++ b/examples/projects/l0/potentiometer/lib/Potentiometer/potentiometer_drv.h @@ -7,7 +7,7 @@ #include "main.h" #include "analog.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/l0/potentiometer/platformio.ini b/examples/projects/l0/potentiometer/platformio.ini index 63583470a..8b0c9cb5a 100644 --- a/examples/projects/l0/potentiometer/platformio.ini +++ b/examples/projects/l0/potentiometer/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Potentiometer debug_tool = stlink diff --git a/examples/projects/l0/potentiometer/src/main.c b/examples/projects/l0/potentiometer/src/main.c index 1fbbb6476..6c9610970 100644 --- a/examples/projects/l0/potentiometer/src/main.c +++ b/examples/projects/l0/potentiometer/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "potentiometer.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/power_switch/platformio.ini b/examples/projects/l0/power_switch/platformio.ini index 011402c5a..8c36ed190 100644 --- a/examples/projects/l0/power_switch/platformio.ini +++ b/examples/projects/l0/power_switch/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Power_switch debug_tool = stlink diff --git a/examples/projects/l0/power_switch/src/main.c b/examples/projects/l0/power_switch/src/main.c index 06ed428ca..d7492570c 100644 --- a/examples/projects/l0/power_switch/src/main.c +++ b/examples/projects/l0/power_switch/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "power_switch.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/servo/lib/Servo/servo_drv.h b/examples/projects/l0/servo/lib/Servo/servo_drv.h index afd8b0924..f5100b5cb 100644 --- a/examples/projects/l0/servo/lib/Servo/servo_drv.h +++ b/examples/projects/l0/servo/lib/Servo/servo_drv.h @@ -9,7 +9,7 @@ #include "stm32f0xx_hal.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_hal.h" /******************************************************************************* * Definitions diff --git a/examples/projects/l0/servo/platformio.ini b/examples/projects/l0/servo/platformio.ini index facff1a76..6695e2b23 100644 --- a/examples/projects/l0/servo/platformio.ini +++ b/examples/projects/l0/servo/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Servo debug_tool = stlink diff --git a/examples/projects/l0/servo/src/main.c b/examples/projects/l0/servo/src/main.c index 2386861fb..8388a0217 100644 --- a/examples/projects/l0/servo/src/main.c +++ b/examples/projects/l0/servo/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "servo.h" /* USER CODE END Includes */ diff --git a/examples/projects/l0/stepper/platformio.ini b/examples/projects/l0/stepper/platformio.ini index cd3939b60..10c535e08 100644 --- a/examples/projects/l0/stepper/platformio.ini +++ b/examples/projects/l0/stepper/platformio.ini @@ -12,12 +12,15 @@ default_envs = l0 [env] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = ststm32 board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 + robus_network Stepper debug_tool = stlink diff --git a/examples/projects/l0/stepper/src/main.c b/examples/projects/l0/stepper/src/main.c index 598bfc8c6..32ffff370 100644 --- a/examples/projects/l0/stepper/src/main.c +++ b/examples/projects/l0/stepper/src/main.c @@ -27,7 +27,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "stepper.h" /* USER CODE END Includes */ diff --git a/examples/projects/native/button/platformio.ini b/examples/projects/native/button/platformio.ini index dbfef1b3d..122ef09b3 100644 --- a/examples/projects/native/button/platformio.ini +++ b/examples/projects/native/button/platformio.ini @@ -12,10 +12,13 @@ default_envs = native [env:native] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = native lib_deps = Button + robus_network build_unflags = -Os build_flags = -I inc diff --git a/examples/projects/native/button/src/main.c b/examples/projects/native/button/src/main.c index 790d3f117..93434b569 100644 --- a/examples/projects/native/button/src/main.c +++ b/examples/projects/native/button/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "button.h" int main(void) diff --git a/examples/projects/native/gate_wscom/platformio.ini b/examples/projects/native/gate_wscom/platformio.ini index 1faeb2286..cd2b02bcd 100644 --- a/examples/projects/native/gate_wscom/platformio.ini +++ b/examples/projects/native/gate_wscom/platformio.ini @@ -15,9 +15,11 @@ lib_ldf_mode =off lib_extra_dirs = $PROJECT_DIR/../../../../tool_services/ $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = native lib_deps = luos_engine@^3.0.0 + robus_network Pipe Gate build_unflags = -Os diff --git a/examples/projects/native/gate_wscom/src/main.c b/examples/projects/native/gate_wscom/src/main.c index d95e277eb..fe7365b54 100644 --- a/examples/projects/native/gate_wscom/src/main.c +++ b/examples/projects/native/gate_wscom/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "pipe.h" #include "gate.h" #include diff --git a/examples/projects/native/led/lib/Led/led.h b/examples/projects/native/led/lib/Led/led.h index 604a8829a..5efb98688 100644 --- a/examples/projects/native/led/lib/Led/led.h +++ b/examples/projects/native/led/lib/Led/led.h @@ -8,7 +8,6 @@ #define LED_H #include "luos_engine.h" -#include "robus.h" /******************************************************************************* * Definitions diff --git a/examples/projects/native/led/platformio.ini b/examples/projects/native/led/platformio.ini index be0929fde..fa191afac 100644 --- a/examples/projects/native/led/platformio.ini +++ b/examples/projects/native/led/platformio.ini @@ -12,10 +12,13 @@ default_envs = native [env:native] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = native lib_deps = Led + robus_network build_unflags = -Os build_flags = -I inc diff --git a/examples/projects/native/led/src/main.c b/examples/projects/native/led/src/main.c index f76bdba6b..ba4fb4c5f 100644 --- a/examples/projects/native/led/src/main.c +++ b/examples/projects/native/led/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "led.h" int main(void) diff --git a/examples/projects/native/ping_pong/lib/PingPong/graph.c b/examples/projects/native/ping_pong/lib/PingPong/graph.c index a48cf9d40..7a6ac5cd3 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/graph.c +++ b/examples/projects/native/ping_pong/lib/PingPong/graph.c @@ -6,7 +6,6 @@ #include #include #include "luos_engine.h" -#include "robus.h" #include "game_anim.h" #include "scoring.h" diff --git a/examples/projects/native/ping_pong/lib/PingPong/library.json b/examples/projects/native/ping_pong/lib/PingPong/library.json index b2a974863..dd9b1873b 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/library.json +++ b/examples/projects/native/ping_pong/lib/PingPong/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "dependencies": { - "luos_engine": "^3.0.0" + "luos_engine": "^3.0.0" }, "licence": "MIT" -} \ No newline at end of file +} diff --git a/examples/projects/native/ping_pong/lib/PingPong/scoring.h b/examples/projects/native/ping_pong/lib/PingPong/scoring.h index fce4edd61..4470feca0 100644 --- a/examples/projects/native/ping_pong/lib/PingPong/scoring.h +++ b/examples/projects/native/ping_pong/lib/PingPong/scoring.h @@ -8,7 +8,6 @@ #define SCORING_H #include "luos_engine.h" -#include "robus.h" #define SCORE_TOPIC 1 #define SCORE_CMD LUOS_LAST_STD_CMD + 1 diff --git a/examples/projects/native/ping_pong/platformio.ini b/examples/projects/native/ping_pong/platformio.ini index 78a6f2da0..d73c1127f 100644 --- a/examples/projects/native/ping_pong/platformio.ini +++ b/examples/projects/native/ping_pong/platformio.ini @@ -12,10 +12,13 @@ default_envs = native [env:native] lib_ldf_mode =off -lib_extra_dirs = $PROJECT_DIR/../../../../../ +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ platform = native lib_deps = PingPong + robus_network build_unflags = -Os build_flags = -I inc diff --git a/examples/projects/native/ping_pong/src/main.c b/examples/projects/native/ping_pong/src/main.c index 17b351006..a9ff780a7 100644 --- a/examples/projects/native/ping_pong/src/main.c +++ b/examples/projects/native/ping_pong/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "ping_pong.h" #include @@ -22,5 +22,6 @@ int main(void) while (1) { Luos_Loop(); + Robus_Loop(); } } diff --git a/library.json b/library.json index 3bacb32ea..2cb839ea0 100644 --- a/library.json +++ b/library.json @@ -1,7 +1,7 @@ { "name": "luos_engine", - "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,luos engine", - "description": "Luos engine turns your embedded system into services like microservices architecture does it in software.", + "keywords": "network,microservice,luos,operating system,os,embedded,communication,service,ST,luos engine", + "description": "Luos engine is the framework allowing to create software microservices architecture for hardware devices.", "version": "3.0.0", "authors": { "name": "Luos", @@ -13,9 +13,6 @@ "build": { "srcDir": "engine/core/src", "flags": [ - "-I network/robus", - "-I network/robus/inc", - "-I network/robus/selftest", "-I engine", "-I engine/OD", "-I engine/core/inc", @@ -36,20 +33,23 @@ "include": [ "examples/apps/*", "examples/projects/Arduino/*", + "examples/projects/ESP32/*", "examples/projects/l0/*", + "examples/projects/native/*", "examples/projects/NUCLEO-F072RB/*", "examples/projects/NUCLEO-F401RE/*", "examples/projects/NUCLEO-F410RB/*", "examples/projects/NUCLEO-G431KB/*", "examples/projects/NUCLEO-G474RE/*", + "examples/projects/NUCLEO-L073RZ/*", "examples/projects/NUCLEO-L432KC/*", "examples/projects/STM32F4-discovery/*", + "examples/projects/STM32L4S5-discovery/*", "examples/README.md", "engine/*", - "network/*", "source_filter_script.py", "LICENSE", "README.md" ] } -} \ No newline at end of file +} diff --git a/network/robus/HAL/ATSAMD21/robus_hal.c b/network/robus_network/HAL/ATSAMD21/robus_hal.c similarity index 100% rename from network/robus/HAL/ATSAMD21/robus_hal.c rename to network/robus_network/HAL/ATSAMD21/robus_hal.c diff --git a/network/robus/HAL/ATSAMD21/robus_hal.h b/network/robus_network/HAL/ATSAMD21/robus_hal.h similarity index 100% rename from network/robus/HAL/ATSAMD21/robus_hal.h rename to network/robus_network/HAL/ATSAMD21/robus_hal.h diff --git a/network/robus/HAL/ATSAMD21/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21/robus_hal_config.h similarity index 100% rename from network/robus/HAL/ATSAMD21/robus_hal_config.h rename to network/robus_network/HAL/ATSAMD21/robus_hal_config.h diff --git a/network/robus/HAL/ATSAMD21/samd21.h b/network/robus_network/HAL/ATSAMD21/samd21.h similarity index 100% rename from network/robus/HAL/ATSAMD21/samd21.h rename to network/robus_network/HAL/ATSAMD21/samd21.h diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/board_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h similarity index 100% rename from network/robus/HAL/ATSAMD21_ARDUINO/board_config.h rename to network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c similarity index 100% rename from network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.c rename to network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.h similarity index 100% rename from network/robus/HAL/ATSAMD21_ARDUINO/robus_hal.h rename to network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.h diff --git a/network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h similarity index 100% rename from network/robus/HAL/ATSAMD21_ARDUINO/robus_hal_config.h rename to network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h diff --git a/network/robus/HAL/ATSAMD21_MBED/robus_hal.c b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c similarity index 100% rename from network/robus/HAL/ATSAMD21_MBED/robus_hal.c rename to network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c diff --git a/network/robus/HAL/ATSAMD21_MBED/robus_hal.h b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.h similarity index 100% rename from network/robus/HAL/ATSAMD21_MBED/robus_hal.h rename to network/robus_network/HAL/ATSAMD21_MBED/robus_hal.h diff --git a/network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h similarity index 100% rename from network/robus/HAL/ATSAMD21_MBED/robus_hal_config.h rename to network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h diff --git a/network/robus/HAL/ATSAMD21_MBED/samd21.h b/network/robus_network/HAL/ATSAMD21_MBED/samd21.h similarity index 100% rename from network/robus/HAL/ATSAMD21_MBED/samd21.h rename to network/robus_network/HAL/ATSAMD21_MBED/samd21.h diff --git a/network/robus/HAL/ESP32/board_config.h b/network/robus_network/HAL/ESP32/board_config.h similarity index 100% rename from network/robus/HAL/ESP32/board_config.h rename to network/robus_network/HAL/ESP32/board_config.h diff --git a/network/robus/HAL/ESP32/luos_engine/CMakeLists.txt b/network/robus_network/HAL/ESP32/luos_engine/CMakeLists.txt similarity index 100% rename from network/robus/HAL/ESP32/luos_engine/CMakeLists.txt rename to network/robus_network/HAL/ESP32/luos_engine/CMakeLists.txt diff --git a/network/robus/HAL/ESP32/luos_engine/linker.lf b/network/robus_network/HAL/ESP32/luos_engine/linker.lf similarity index 100% rename from network/robus/HAL/ESP32/luos_engine/linker.lf rename to network/robus_network/HAL/ESP32/luos_engine/linker.lf diff --git a/network/robus/HAL/ESP32/robus_hal.c b/network/robus_network/HAL/ESP32/robus_hal.c similarity index 100% rename from network/robus/HAL/ESP32/robus_hal.c rename to network/robus_network/HAL/ESP32/robus_hal.c diff --git a/network/robus/HAL/ESP32/robus_hal.h b/network/robus_network/HAL/ESP32/robus_hal.h similarity index 100% rename from network/robus/HAL/ESP32/robus_hal.h rename to network/robus_network/HAL/ESP32/robus_hal.h diff --git a/network/robus/HAL/ESP32/robus_hal_config.h b/network/robus_network/HAL/ESP32/robus_hal_config.h similarity index 100% rename from network/robus/HAL/ESP32/robus_hal_config.h rename to network/robus_network/HAL/ESP32/robus_hal_config.h diff --git a/network/robus/HAL/NATIVE/hal_script.py b/network/robus_network/HAL/NATIVE/hal_script.py similarity index 100% rename from network/robus/HAL/NATIVE/hal_script.py rename to network/robus_network/HAL/NATIVE/hal_script.py diff --git a/network/robus/HAL/NATIVE/robus_hal.c b/network/robus_network/HAL/NATIVE/robus_hal.c similarity index 99% rename from network/robus/HAL/NATIVE/robus_hal.c rename to network/robus_network/HAL/NATIVE/robus_hal.c index c0a1f5bb1..dd1667409 100644 --- a/network/robus/HAL/NATIVE/robus_hal.c +++ b/network/robus_network/HAL/NATIVE/robus_hal.c @@ -20,7 +20,7 @@ #include #include #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_hal.h" /******************************************************************************* diff --git a/network/robus/HAL/NATIVE/robus_hal.h b/network/robus_network/HAL/NATIVE/robus_hal.h similarity index 100% rename from network/robus/HAL/NATIVE/robus_hal.h rename to network/robus_network/HAL/NATIVE/robus_hal.h diff --git a/network/robus/HAL/NATIVE/robus_hal_config.h b/network/robus_network/HAL/NATIVE/robus_hal_config.h similarity index 100% rename from network/robus/HAL/NATIVE/robus_hal_config.h rename to network/robus_network/HAL/NATIVE/robus_hal_config.h diff --git a/network/robus/HAL/README.md b/network/robus_network/HAL/README.md similarity index 100% rename from network/robus/HAL/README.md rename to network/robus_network/HAL/README.md diff --git a/network/robus/HAL/STM32F0/robus_hal.c b/network/robus_network/HAL/STM32F0/robus_hal.c similarity index 100% rename from network/robus/HAL/STM32F0/robus_hal.c rename to network/robus_network/HAL/STM32F0/robus_hal.c diff --git a/network/robus/HAL/STM32F0/robus_hal.h b/network/robus_network/HAL/STM32F0/robus_hal.h similarity index 100% rename from network/robus/HAL/STM32F0/robus_hal.h rename to network/robus_network/HAL/STM32F0/robus_hal.h diff --git a/network/robus/HAL/STM32F0/robus_hal_config.h b/network/robus_network/HAL/STM32F0/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STM32F0/robus_hal_config.h rename to network/robus_network/HAL/STM32F0/robus_hal_config.h diff --git a/network/robus/HAL/STM32F4/robus_hal.c b/network/robus_network/HAL/STM32F4/robus_hal.c similarity index 100% rename from network/robus/HAL/STM32F4/robus_hal.c rename to network/robus_network/HAL/STM32F4/robus_hal.c diff --git a/network/robus/HAL/STM32F4/robus_hal.h b/network/robus_network/HAL/STM32F4/robus_hal.h similarity index 100% rename from network/robus/HAL/STM32F4/robus_hal.h rename to network/robus_network/HAL/STM32F4/robus_hal.h diff --git a/network/robus/HAL/STM32F4/robus_hal_config.h b/network/robus_network/HAL/STM32F4/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STM32F4/robus_hal_config.h rename to network/robus_network/HAL/STM32F4/robus_hal_config.h diff --git a/network/robus/HAL/STM32G4/robus_hal.c b/network/robus_network/HAL/STM32G4/robus_hal.c similarity index 100% rename from network/robus/HAL/STM32G4/robus_hal.c rename to network/robus_network/HAL/STM32G4/robus_hal.c diff --git a/network/robus/HAL/STM32G4/robus_hal.h b/network/robus_network/HAL/STM32G4/robus_hal.h similarity index 100% rename from network/robus/HAL/STM32G4/robus_hal.h rename to network/robus_network/HAL/STM32G4/robus_hal.h diff --git a/network/robus/HAL/STM32G4/robus_hal_config.h b/network/robus_network/HAL/STM32G4/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STM32G4/robus_hal_config.h rename to network/robus_network/HAL/STM32G4/robus_hal_config.h diff --git a/network/robus/HAL/STM32L0/robus_hal.c b/network/robus_network/HAL/STM32L0/robus_hal.c similarity index 100% rename from network/robus/HAL/STM32L0/robus_hal.c rename to network/robus_network/HAL/STM32L0/robus_hal.c diff --git a/network/robus/HAL/STM32L0/robus_hal.h b/network/robus_network/HAL/STM32L0/robus_hal.h similarity index 100% rename from network/robus/HAL/STM32L0/robus_hal.h rename to network/robus_network/HAL/STM32L0/robus_hal.h diff --git a/network/robus/HAL/STM32L0/robus_hal_config.h b/network/robus_network/HAL/STM32L0/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STM32L0/robus_hal_config.h rename to network/robus_network/HAL/STM32L0/robus_hal_config.h diff --git a/network/robus/HAL/STM32L4/robus_hal.c b/network/robus_network/HAL/STM32L4/robus_hal.c similarity index 100% rename from network/robus/HAL/STM32L4/robus_hal.c rename to network/robus_network/HAL/STM32L4/robus_hal.c diff --git a/network/robus/HAL/STM32L4/robus_hal.h b/network/robus_network/HAL/STM32L4/robus_hal.h similarity index 100% rename from network/robus/HAL/STM32L4/robus_hal.h rename to network/robus_network/HAL/STM32L4/robus_hal.h diff --git a/network/robus/HAL/STM32L4/robus_hal_config.h b/network/robus_network/HAL/STM32L4/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STM32L4/robus_hal_config.h rename to network/robus_network/HAL/STM32L4/robus_hal_config.h diff --git a/network/robus/HAL/STUB/robus_hal.c b/network/robus_network/HAL/STUB/robus_hal.c similarity index 100% rename from network/robus/HAL/STUB/robus_hal.c rename to network/robus_network/HAL/STUB/robus_hal.c diff --git a/network/robus/HAL/STUB/robus_hal.h b/network/robus_network/HAL/STUB/robus_hal.h similarity index 100% rename from network/robus/HAL/STUB/robus_hal.h rename to network/robus_network/HAL/STUB/robus_hal.h diff --git a/network/robus/HAL/STUB/robus_hal_config.h b/network/robus_network/HAL/STUB/robus_hal_config.h similarity index 100% rename from network/robus/HAL/STUB/robus_hal_config.h rename to network/robus_network/HAL/STUB/robus_hal_config.h diff --git a/network/robus/HAL/template/robus_hal.c b/network/robus_network/HAL/template/robus_hal.c similarity index 100% rename from network/robus/HAL/template/robus_hal.c rename to network/robus_network/HAL/template/robus_hal.c diff --git a/network/robus/HAL/template/robus_hal.h b/network/robus_network/HAL/template/robus_hal.h similarity index 100% rename from network/robus/HAL/template/robus_hal.h rename to network/robus_network/HAL/template/robus_hal.h diff --git a/network/robus/HAL/template/robus_hal_config.h b/network/robus_network/HAL/template/robus_hal_config.h similarity index 100% rename from network/robus/HAL/template/robus_hal_config.h rename to network/robus_network/HAL/template/robus_hal_config.h diff --git a/network/robus/inc/_robus.h b/network/robus_network/inc/_robus_network.h similarity index 100% rename from network/robus/inc/_robus.h rename to network/robus_network/inc/_robus_network.h diff --git a/network/robus/inc/context.h b/network/robus_network/inc/context.h similarity index 97% rename from network/robus/inc/context.h rename to network/robus_network/inc/context.h index 4e79144fe..69eee25f3 100644 --- a/network/robus/inc/context.h +++ b/network/robus_network/inc/context.h @@ -7,7 +7,7 @@ #ifndef _CONTEXT_H_ #define _CONTEXT_H_ -#include <_robus.h> +#include <_robus_network.h> #include "robus_config.h" #include "port_manager.h" #include "reception.h" diff --git a/network/robus/inc/port_manager.h b/network/robus_network/inc/port_manager.h similarity index 97% rename from network/robus/inc/port_manager.h rename to network/robus_network/inc/port_manager.h index 6b8b0c3d7..a71ba3a73 100644 --- a/network/robus/inc/port_manager.h +++ b/network/robus_network/inc/port_manager.h @@ -7,7 +7,7 @@ #ifndef _PORTMANAGER_H_ #define _PORTMANAGER_H_ -#include <_robus.h> +#include <_robus_network.h> /******************************************************************************* * Definitions diff --git a/network/robus/inc/reception.h b/network/robus_network/inc/reception.h similarity index 98% rename from network/robus/inc/reception.h rename to network/robus_network/inc/reception.h index 25ccf749d..f04abef0a 100644 --- a/network/robus/inc/reception.h +++ b/network/robus_network/inc/reception.h @@ -7,7 +7,7 @@ #ifndef _RECEPTION_H_ #define _RECEPTION_H_ -#include "_robus.h" +#include "_robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/network/robus/inc/robus.h b/network/robus_network/inc/robus_network.h similarity index 100% rename from network/robus/inc/robus.h rename to network/robus_network/inc/robus_network.h diff --git a/network/robus/inc/transmission.h b/network/robus_network/inc/transmission.h similarity index 98% rename from network/robus/inc/transmission.h rename to network/robus_network/inc/transmission.h index d910a4453..a86a963d9 100644 --- a/network/robus/inc/transmission.h +++ b/network/robus_network/inc/transmission.h @@ -7,7 +7,7 @@ #ifndef _TRANSMISSION_H_ #define _TRANSMISSION_H_ -#include "_robus.h" +#include "_robus_network.h" #include "robus_config.h" /******************************************************************************* * Definitions diff --git a/network/robus_network/library.json b/network/robus_network/library.json new file mode 100644 index 000000000..5a692189a --- /dev/null +++ b/network/robus_network/library.json @@ -0,0 +1,23 @@ +{ + "name": "robus_network", + "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service", + "description": "A very handy half duplex serial network interface specialy crafted and optimized for Luos.", + "version": "3.0.0", + "authors": { + "name": "Luos", + "url": "https://luos.io" + }, + "homepage": "https://luos.io", + "license": "MIT", + "headers": "robus_network.h", + "build": { + "extraScript": "robus_select_hal_script.py" + }, + "dependencies": { + "luos_engine": "^3.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Luos-io/luos_engine" + } +} diff --git a/network/robus/robus_config.h b/network/robus_network/robus_config.h similarity index 100% rename from network/robus/robus_config.h rename to network/robus_network/robus_config.h diff --git a/network/robus_network/robus_select_hal_script.py b/network/robus_network/robus_select_hal_script.py new file mode 100644 index 000000000..ced9b644f --- /dev/null +++ b/network/robus_network/robus_select_hal_script.py @@ -0,0 +1,58 @@ +#!/usr/bin/python +from os import path +import sys +import click +from os.path import join, realpath +Import('env') + +click.secho("Robus network build configuration:", underline=True) +# Find the appropriate hal +find_HAL = False +envdefs = env['CPPDEFINES'].copy() +for item in envdefs: + if isinstance(item, tuple) and item[0] == "ROBUSHAL": + find_HAL = True + if (path.exists("HAL/" + item[1])): + click.secho( + "\t* %s HAL selected for Robus network." % item[1], fg="green") + if (path.exists("HAL/" + item[1] + "/hal_script.py")): + # This is an extra script dedicated to this HAL, run it + hal_script_path = realpath("HAL/" + item[1] + "/hal_script.py") + env.SConscript(hal_script_path, exports="env") + click.secho("") + + else: + click.secho("\t* %s Robus network HAL not found" % + item[1], fg="red") + click.secho("") + + env.Append(CPPPATH=[realpath("HAL/" + item[1])]) + env.Append(CPPPATH=[realpath("inc/")]) + env.Append(CPPPATH=[realpath(".")]) + env.Append( + SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) + +if (find_HAL == False): + for item in envdefs: + if isinstance(item, tuple) and item[0] == "LUOSHAL": + find_HAL = True + if (path.exists("HAL/" + item[1])): + click.secho( + "\t* %s HAL selected for Robus network." % item[1], fg="green") + if (path.exists("HAL/" + item[1] + "/hal_script.py")): + # This is an extra script dedicated to this HAL, run it + hal_script_path = realpath( + "HAL/" + item[1] + "/hal_script.py") + env.SConscript(hal_script_path, exports="env") + click.secho("") + + else: + click.secho("\t* %s Robus network HAL not found" % + item[1], fg="red") + click.secho("") + + env.Append(CPPPATH=[realpath("HAL/" + item[1])]) + env.Append(CPPPATH=[realpath("inc/")]) + env.Append(CPPPATH=[realpath(".")]) + env.Append( + SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) diff --git a/network/robus/selftest/selftest.c b/network/robus_network/selftest/selftest.c similarity index 100% rename from network/robus/selftest/selftest.c rename to network/robus_network/selftest/selftest.c diff --git a/network/robus/selftest/selftest.h b/network/robus_network/selftest/selftest.h similarity index 94% rename from network/robus/selftest/selftest.h rename to network/robus_network/selftest/selftest.h index ad50af925..cb72ce73e 100644 --- a/network/robus/selftest/selftest.h +++ b/network/robus_network/selftest/selftest.h @@ -8,7 +8,7 @@ #define SELFTEST_H #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" void selftest_SetRxFlag(void); void selftest_run(void (*ok_callback)(void), void (*ko_callback)(void)); diff --git a/network/robus/src/port_manager.c b/network/robus_network/src/port_manager.c similarity index 100% rename from network/robus/src/port_manager.c rename to network/robus_network/src/port_manager.c diff --git a/network/robus/src/reception.c b/network/robus_network/src/reception.c similarity index 99% rename from network/robus/src/reception.c rename to network/robus_network/src/reception.c index aaf89f0e3..987fc393a 100644 --- a/network/robus/src/reception.c +++ b/network/robus_network/src/reception.c @@ -44,7 +44,7 @@ #include #include "reception.h" #include "robus_hal.h" -#include "robus.h" +#include "robus_network.h" #include "context.h" /******************************************************************************* * Definitions diff --git a/network/robus/src/robus.c b/network/robus_network/src/robus.c similarity index 99% rename from network/robus/src/robus.c rename to network/robus_network/src/robus.c index 576ab8b9b..4faf22f3e 100644 --- a/network/robus/src/robus.c +++ b/network/robus_network/src/robus.c @@ -6,7 +6,7 @@ ******************************************************************************/ #include #include -#include "robus.h" +#include "robus_network.h" #include "transmission.h" #include "reception.h" #include "port_manager.h" diff --git a/network/robus/src/transmission.c b/network/robus_network/src/transmission.c similarity index 100% rename from network/robus/src/transmission.c rename to network/robus_network/src/transmission.c diff --git a/platformio.ini b/platformio.ini index efd7d324a..a9c82b9a1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,9 +17,12 @@ platform = native lib_deps= throwtheswitch/Unity + robus_network test_framework = unity -lib_extra_dirs = $PROJECT_DIR/../ +lib_extra_dirs = + $PROJECT_DIR/network/ # include the folder hosting robus_network + $PROJECT_DIR/../ # include the folder hosting Luos_engine build_unflags = -Os build_flags = @@ -33,4 +36,4 @@ build_type = debug test_build_src = true ; To debug a test, replace "test_template" by the directory test name you want to debug (example : "test_msg_alloc") -debug_test = tests_io/test_msg_alloc +debug_test = tests_core/tests_od/test_pressure diff --git a/source_filter_script.py b/source_filter_script.py index 7c208ab38..2ae3fbbbd 100644 --- a/source_filter_script.py +++ b/source_filter_script.py @@ -38,7 +38,8 @@ # install pyluos try: import pyluos - env.Execute("$PYTHONEXE -m pip install pyluos --upgrade --quiet") + # env.Execute( + # "$PYTHONEXE -m pip install pyluos --upgrade --quiet") except ImportError: # module doesn't exist, deal with it. env.Execute("$PYTHONEXE -m pip install pyluos") pass @@ -53,9 +54,7 @@ luos_telemetry["pyluos_rev"] = "none" sources = ["+<*.c>", - "+<../../../network/robus/src/*.c>", "+<../../IO/src/*.c>", - "+<../../../network/robus/selftest/*.c>", "+<../../profiles/state/*.c>", "+<../../profiles/motor/*.c>", "+<../../profiles/servo_motor/*.c>", @@ -69,16 +68,11 @@ for item in envdefs: if (isinstance(item, tuple) and item[0] == "LUOSHAL") and (find_HAL == False): find_HAL = True - if (path.exists("network/robus/HAL/" + item[1]) and path.exists("engine/HAL/" + item[1])): + if (path.exists("engine/HAL/" + item[1])): if not visited_key in global_env: click.secho( - "\t* %s HAL selected for Luos and Robus." % item[1], fg="green") + "\t* %s HAL selected for luos_engine." % item[1], fg="green") luos_telemetry["luos_hal"] = item[1] - if (path.exists("network/robus/HAL/" + item[1] + "/hal_script.py")): - # This is an extra script dedicated to this HAL, run it - hal_script_path = realpath( - "network/robus/HAL/" + item[1] + "/hal_script.py") - env.SConscript(hal_script_path, exports="env") if (path.exists("engine/HAL/" + item[1] + "/hal_script.py")): # This is an extra script dedicated to this HAL, run it hal_script_path = realpath( @@ -88,10 +82,7 @@ if not visited_key in global_env: click.secho("\t* %s HAL not found" % item[1], fg="red") luos_telemetry["luos_hal"] = "invalid" + str(item[1]) - env.Append(CPPPATH=[realpath("network/robus/HAL/" + item[1])]) env.Append(CPPPATH=[realpath("engine/HAL/" + item[1])]) - env.Append( - SRC_FILTER=["+<../../../network/robus/HAL/%s/*.c>" % item[1]]) env.Append(SRC_FILTER=["+<../../HAL/%s/*.c>" % item[1]]) if (item == 'NOTELEMETRY'): telemetry = False @@ -118,7 +109,7 @@ if (item == 'UNIT_TEST'): click.secho("Native unit testing:", underline=True) current_os = pf.system() - click.secho("\t* Native Mock HAL for %s is selected for Luos and Robus." % + click.secho("\t* Native Mock HAL for %s is selected for Luos." % current_os, fg="green") env.Append(SRC_FILTER=["+<../../../test/_resources/*>"]) for resources in scandir(getcwd() + "/test/_resources"): diff --git a/test/_resources/Unity/unit_test.h b/test/_resources/Unity/unit_test.h index 19fec4537..5cc79304c 100644 --- a/test/_resources/Unity/unit_test.h +++ b/test/_resources/Unity/unit_test.h @@ -6,9 +6,8 @@ #include #include "../../../.pio/libdeps/native/Unity/src/unity.h" #include "luos_hal.h" -#include "robus_hal.h" #include "luos_engine.h" -#include "robus.h" +#include "robus_network.h" #include "luos_utils.h" #include diff --git a/test/_resources/node_config.h b/test/_resources/node_config.h index dac293479..3573b6828 100644 --- a/test/_resources/node_config.h +++ b/test/_resources/node_config.h @@ -12,8 +12,7 @@ * with your need concerning among of data transiting through the network * or network speed for example * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. + * Luos libraries can be use with a lot a MCU family. * This configuration can be modify here to fit with you design by * preprocessor definitions of MCU Hardware needs * From dc6f2585967db273ac0b4591001ae823aab65b4f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 5 Jul 2023 19:04:38 +0200 Subject: [PATCH 099/198] Modify master detection to be non-blocking. This allows networks to manage reception and send in loop. --- engine/IO/inc/luos_io.h | 2 +- engine/IO/src/luos_io.c | 289 +++++++++++++++++++----------- engine/core/inc/routing_table.h | 2 +- engine/core/src/routing_table.c | 248 +++++++++++++++---------- test/tests_io/test_luos_io/main.c | 19 -- 5 files changed, 342 insertions(+), 218 deletions(-) diff --git a/engine/IO/inc/luos_io.h b/engine/IO/inc/luos_io.h index ac2da676c..473e5857b 100644 --- a/engine/IO/inc/luos_io.h +++ b/engine/IO/inc/luos_io.h @@ -25,7 +25,7 @@ // generic functions void LuosIO_Init(void); void LuosIO_Loop(void); -uint16_t LuosIO_TopologyDetection(service_t *service, connection_t *connection_table); +int LuosIO_TopologyDetection(service_t *service, connection_t *connection_table); error_return_t LuosIO_Send(service_t *service, msg_t *msg); // Job management diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 775ae7d28..59ff104c3 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -19,8 +19,8 @@ /******************************************************************************* * Definitions ******************************************************************************/ -static error_return_t LuosIO_StartTopologyDetection(service_t *service); -static error_return_t LuosIO_DetectNextNodes(service_t *service); +static int LuosIO_StartTopologyDetection(service_t *service); +static int LuosIO_DetectNextNodes(service_t *service); static error_return_t LuosIO_ConsumeMsg(const msg_t *input); static void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *routeTB_msg); @@ -91,6 +91,7 @@ void LuosIO_Init(void) ******************************************************************************/ void LuosIO_Loop(void) { + static bool detec_state_machine = false; // Execute message allocation tasks MsgAlloc_Loop(); Phy_Loop(); @@ -102,8 +103,18 @@ void LuosIO_Loop(void) detection_service->id = 1; // Generate the filters Service_GenerateId(1); - RoutingTB_DetectServices(detection_service); - detection_service = NULL; + // Turn on the infinite loop to perform the detection + detec_state_machine = true; + } + if (detec_state_machine == true) + { + // Check if the detection is finished + if (RoutingTB_DetectServices(detection_service)) + { + // Turn off the infinite loop + detec_state_machine = false; + detection_service = NULL; + } } } @@ -187,47 +198,75 @@ error_return_t LuosIO_Send(service_t *service, msg_t *msg) * @param service pointer to the detecting service * @return The number of detected node. ******************************************************************************/ -uint16_t LuosIO_TopologyDetection(service_t *service, connection_t *connection_table) +int LuosIO_TopologyDetection(service_t *service, connection_t *connection_table) { - uint8_t redetect_nb = 0; - bool detect_enabled = true; - connection_table_ptr = connection_table; + static uint8_t redetect_nb = 0; + static uint8_t detect_state_machine = 0; + int result; - // If a detection is in progress, don't do an another detection and return 0 - if (Node_GetState() >= LOCAL_DETECTION) + switch (detect_state_machine) { - connection_table_ptr = NULL; - return 0; - } - while (detect_enabled) - { - detect_enabled = false; - - // Reset all detection state of services on the network to start a new detection - LuosIO_StartTopologyDetection(service); - // Make sure that the detection is not interrupted - if (Node_GetState() == EXTERNAL_DETECTION) - { - connection_table_ptr = NULL; - return 0; - } - // Setup local node - Node_Get()->node_id = 1; - last_node = 1; - // Setup sending service id - service->id = 1; - // Consider this node as ready - // Clear the nodeID waiting flag - Node_WaitId(); - - if (LuosIO_DetectNextNodes(service) == FAILED) - { - // check the number of retry we made - LUOS_ASSERT((redetect_nb <= 4)); - // Detection fail, restart it - redetect_nb++; - detect_enabled = true; - } + case 0: + connection_table_ptr = connection_table; + // If a detection is in progress, don't do an another detection and return 0 + if (Node_GetState() >= LOCAL_DETECTION) + { + connection_table_ptr = NULL; + return -1; + } + detect_state_machine++; + case 1: + // Reset all detection state of services on the network to start a new detection + result = LuosIO_StartTopologyDetection(service); + if (result <= 0) + { + return result; + } + detect_state_machine++; + case 2: + // Make sure that the detection is not interrupted + if (Node_GetState() == EXTERNAL_DETECTION) + { + connection_table_ptr = NULL; + return -1; + } + // Setup local node + Node_Get()->node_id = 1; + last_node = 1; + // Setup sending service id + service->id = 1; + // Consider this node as ready + // Clear the nodeID waiting flag + Node_WaitId(); + detect_state_machine++; + case 3: + // results: + // -1 : detection failed + // 0 : detection in progress + // 1 : detection finished + result = LuosIO_DetectNextNodes(service); + if (result == -1) + { + // check the number of retry we made + LUOS_ASSERT((redetect_nb <= 4)); + // Detection fail, restart it + redetect_nb++; + // Go back to stage 1 + detect_state_machine = 1; + return 0; + } + if (result == 0) + { + // Detection in progress + return 0; + } + // We finished the topology detection + detect_state_machine = 0; + redetect_nb = 0; + break; + default: + LUOS_ASSERT(0); + break; } connection_table_ptr = NULL; return last_node; @@ -238,53 +277,80 @@ uint16_t LuosIO_TopologyDetection(service_t *service, connection_t *connection_t * @param service pointer to the detecting service * @return The number of detected node. ******************************************************************************/ -static error_return_t LuosIO_StartTopologyDetection(service_t *service) +static int LuosIO_StartTopologyDetection(service_t *service) { + static uint8_t detect_state_machine = 0; + static uint32_t start_tick; msg_t msg; - uint8_t try_nbr = 0; - msg.header.target = BROADCAST_VAL; - msg.header.target_mode = BROADCAST; - msg.header.cmd = START_DETECTION; - msg.header.size = 0; - do - { - // If a detection is in progress, don't do an another detection and return 0 - if (Node_GetState() >= LOCAL_DETECTION) - { - return 0; - } - // Load the message to send - Luos_SendMsg(service, &msg); - // Wait until message is actually transmitted - while (Phy_TxAllComplete() != SUCCEED) - ; - // Reinit Phy (this will call LuosIO_Reset) - Phy_ResetAll(); - // Wait 2ms to be sure all previous messages are received and treated by other nodes - uint32_t start_tick = LuosHAL_GetSystick(); - while (LuosHAL_GetSystick() - start_tick < 2) - ; - // Resend the message just to be sure that no other messages were revceived during the reset. - Luos_SendMsg(service, &msg); - // Wait until message is actually transmitted - while (Phy_TxAllComplete() != SUCCEED) - ; - // Wait 2ms to be sure all previous messages are received and treated by other nodes - start_tick = LuosHAL_GetSystick(); - while (LuosHAL_GetSystick() - start_tick < 2) - ; - try_nbr++; - - } while ((MsgAlloc_IsEmpty() != SUCCEED) || (try_nbr > 5)); - // Reinit our node id - Node_Get()->node_id = 0; - if (try_nbr < 5) + switch (detect_state_machine) { - Node_SetState(LOCAL_DETECTION); - return SUCCEED; + case 0: + // If a detection is in progress, don't do an another detection and return 0 + if (Node_GetState() >= LOCAL_DETECTION) + { + return -1; + } + // Load the message to send + msg.header.target = BROADCAST_VAL; + msg.header.target_mode = BROADCAST; + msg.header.cmd = START_DETECTION; + msg.header.size = 0; + Luos_SendMsg(service, &msg); + detect_state_machine++; + case 1: + // Wait until the message is transmitted + if (Phy_TxAllComplete() != SUCCEED) + { + return 0; + } + detect_state_machine++; + case 2: + // Reinit Phy (this will call LuosIO_Reset) + Phy_ResetAll(); + // Wait 2ms to be sure all previous messages are received and treated by other nodes + start_tick = LuosHAL_GetSystick(); + detect_state_machine++; + case 3: + // Wait 2ms for the other to manage the message + if (LuosHAL_GetSystick() - start_tick < 2) + { + return 0; + } + detect_state_machine++; + case 4: + // Resend the message just to be sure that no other messages were revceived during the reset. + msg.header.target = BROADCAST_VAL; + msg.header.target_mode = BROADCAST; + msg.header.cmd = START_DETECTION; + msg.header.size = 0; + Luos_SendMsg(service, &msg); + detect_state_machine++; + case 5: + // Wait until the message is transmitted + if (Phy_TxAllComplete() != SUCCEED) + { + return 0; + } + start_tick = LuosHAL_GetSystick(); + detect_state_machine++; + case 6: + // Wait 2ms to be sure all previous messages are received and treated by other nodes + if (LuosHAL_GetSystick() - start_tick < 2) + { + return 0; + } + + // Reinit our node id + Node_Get()->node_id = 0; + Node_SetState(LOCAL_DETECTION); + detect_state_machine = 0; + return 1; + default: + LUOS_ASSERT(0); + break; } - return FAILED; + return -1; } /****************************************************************************** @@ -575,28 +641,49 @@ static inline void LuosIO_TransmitLocalRoutingTable(service_t *service, msg_t *r * @param service pointer to the detecting service * @return None. ******************************************************************************/ -static error_return_t LuosIO_DetectNextNodes(service_t *service) +static int LuosIO_DetectNextNodes(service_t *service) { - // Lets try to find other nodes - while (Phy_FindNextNode() == SUCCEED) + static uint8_t detect_state_machine = 0; + static uint32_t start_tick; + + switch (detect_state_machine) { - // Wait the end of transmission - while (Phy_TxAllComplete() == FAILED) - ; - // When phy loop will receive the reply it will store and manage the new node_id and send it to the next node. - // We just have to wait the end of the treatment of the entire branch - uint32_t start_tick = LuosHAL_GetSystick(); - while (Phy_Busy()) - { - LuosIO_Loop(); - if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) + case 0: + // Lets try to find other nodes + if (Phy_FindNextNode() != SUCCEED) { - // Topology detection is too long, we should abort it and restart - return FAILED; + // No more nodes to detect + return 1; } - } + detect_state_machine++; + case 1: + // Wait the end of transmission + if (Phy_TxAllComplete() == FAILED) + { + // Transmission is not finished + return 0; + } + start_tick = LuosHAL_GetSystick(); + detect_state_machine++; + case 2: + // When phy loop will receive the reply it will store and manage the new node_id and send it to the next node. + // We just have to wait the end of the treatment of the entire branch + if (Phy_Busy()) + { + if (LuosHAL_GetSystick() - start_tick > DETECTION_TIMEOUT_MS) + { + // Topology detection is too long, we should abort it and restart + return -1; + } + return 0; + } + detect_state_machine = 0; + return 1; + default: + LUOS_ASSERT(0); + break; } - return SUCCEED; + return -1; } /****************************************************************************** diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index a50dfb946..1b0890497 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -73,7 +73,7 @@ uint16_t RoutingTB_NodeIDFromID(uint16_t id); // ********************* routing_table management tools ************************ void RoutingTB_ComputeRoutingTableEntryNB(void); -void RoutingTB_DetectServices(service_t *service); +bool RoutingTB_DetectServices(service_t *service); void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node); void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service); void RoutingTB_RemoveNode(uint16_t nodeid); diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 89d3104f3..f07433caf 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -30,9 +30,8 @@ uint16_t RoutingTB_IDFromAlias(char *alias); char *RoutingTB_AliasFromId(uint16_t id); static uint16_t RoutingTB_BigestNodeID(void); uint16_t RoutingTB_GetServiceIndex(uint16_t id); -bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg); -static void RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table); +static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table); static void RoutingTB_Share(service_t *service, uint16_t nb_node); static void RoutingTB_SendEndDetection(service_t *service); @@ -155,7 +154,7 @@ void RoutingTB_ComputeRoutingTableEntryNB(void) { for (uint16_t i = 0; i < MAX_RTB_ENTRY; i++) { - if (routing_table[i].mode == SERVICE) + if ((routing_table[i].mode == SERVICE) && (last_service < routing_table[i].id)) { last_service = routing_table[i].id; } @@ -205,95 +204,111 @@ static void RoutingTB_AddNumToAlias(char *alias, uint8_t num) sprintf(alias, "%s%d", alias_copy, num); } -/****************************************************************************** - * @brief Time out to receive en route table from - * @param service : Service receive - * @param intro_msg : into route table message - * @return None - ******************************************************************************/ -bool RoutingTB_WaitRoutingTable(service_t *service, msg_t *intro_msg) -{ - LUOS_ASSERT((service != 0) && (intro_msg != 0)); - const uint8_t timeout = 15; // timeout in ms - const uint16_t entry_bkp = last_routing_table_entry; - Luos_SendMsg(service, intro_msg); - uint32_t timestamp = LuosHAL_GetSystick(); - while ((LuosHAL_GetSystick() - timestamp) < timeout) - { - // If this request is for a service in this board allow him to respond. - Luos_Loop(); - if (entry_bkp != last_routing_table_entry) - { - return true; - } - } - return false; -} - /****************************************************************************** * @brief Generate Complete route table with local route table receive * @param service : Service in node * @param nb_node : Node number on network * @return None ******************************************************************************/ -static void RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table) +static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table) { LUOS_ASSERT(service); // Asks for introduction for every found node (even the one detecting). - uint16_t try_nb = 0; - uint16_t last_node_id = RoutingTB_BigestNodeID(); - uint16_t last_service_id = 0; + uint16_t try_nb = 0; + static uint16_t last_node_id = 0; + uint16_t last_service_id = 0; msg_t intro_msg; - while ((last_node_id < nb_node) && (try_nb < nb_node)) + uint16_t nb_service; + static uint16_t rtb_next_node_index; + static uint8_t detect_state_machine = 0; + static uint16_t entry_bkp; + static uint32_t timestamp; + + switch (detect_state_machine) { - try_nb++; - intro_msg.header.cmd = LOCAL_RTB; - intro_msg.header.target_mode = NODEIDACK; - // Target next unknown node - intro_msg.header.target = last_node_id + 1; - // set the first service id it can use - intro_msg.header.size = 2; - last_service_id = RoutingTB_BigestID() + 1; - memcpy(intro_msg.data, &last_service_id, sizeof(uint16_t)); - // save the current last routing table entry allowing us to easily write the connection informations later - uint16_t rtb_next_node_index = RoutingTB_GetLastEntry(); - // Ask to introduce and wait for a reply - if (!RoutingTB_WaitRoutingTable(service, &intro_msg)) - { - // We don't get the answer - nb_node = last_node_id; + case 0: + if ((last_node_id >= nb_node) || (try_nb >= nb_node)) + { + // Go to check alias duplication step + detect_state_machine = 2; + return 0; + } + try_nb++; + intro_msg.header.cmd = LOCAL_RTB; + intro_msg.header.target_mode = NODEIDACK; + // Target next unknown node + intro_msg.header.target = last_node_id + 1; + // set the first service id it can use + intro_msg.header.size = 2; + last_service_id = RoutingTB_BigestID() + 1; + memcpy(intro_msg.data, &last_service_id, sizeof(uint16_t)); + // save the current last routing table entry allowing us to easily write the connection informations later + rtb_next_node_index = RoutingTB_GetLastEntry(); + entry_bkp = last_routing_table_entry; + Luos_SendMsg(service, &intro_msg); + timestamp = LuosHAL_GetSystick(); + detect_state_machine++; + case 1: + if ((LuosHAL_GetSystick() - timestamp) >= 200) + { + // Time out is reached + // We don't get the answer + nb_node = last_node_id; + // Go directly to Alias duplication check + detect_state_machine = 2; + return 0; + } + // If this request is for a service in this board allow him to respond. + if (entry_bkp == last_routing_table_entry) + { + // We don't get the answer yet + return 0; + } + // We get the answer + // The node answer don't include connection because the node don't know it yet + // add this information to the routing table + LUOS_ASSERT(routing_table[rtb_next_node_index].mode == NODE); + routing_table[rtb_next_node_index].connection = connection_table[last_node_id]; + last_node_id = RoutingTB_BigestNodeID(); + // Go back to step 0 to ask the routing table of the next node + detect_state_machine = 0; + return 0; break; - } - // The node answer don't include connection because the node don't know it yet - // add this information to the routing table - LUOS_ASSERT(routing_table[rtb_next_node_index].mode == NODE); - routing_table[rtb_next_node_index].connection = connection_table[last_node_id]; - last_node_id = RoutingTB_BigestNodeID(); - } - // Check Alias duplication. - uint16_t nb_service = RoutingTB_BigestID(); - for (uint16_t id = 1; id <= nb_service; id++) - { - int32_t found_id = RoutingTB_IDFromAlias(RoutingTB_AliasFromId(id)); - if ((found_id != id) & (found_id != -1)) - { - // The found_id don't match with the actual ID of the service because the alias already exist - // Find the new alias to give him - uint8_t annotation = 1; - char base_alias[MAX_ALIAS_SIZE] = {0}; - memcpy(base_alias, RoutingTB_AliasFromId(id), MAX_ALIAS_SIZE); - // Add a number after alias in routing table - RoutingTB_AddNumToAlias(RoutingTB_AliasFromId(id), annotation++); - // check another time if this alias is already used - while (RoutingTB_IDFromAlias(RoutingTB_AliasFromId(id)) != id) + case 2: + // Check Alias duplication. + nb_service = RoutingTB_BigestID(); + for (uint16_t id = 1; id <= nb_service; id++) { - // This alias is already used. - // Remove the number previously setuped by overwriting it with the base_alias - memcpy(RoutingTB_AliasFromId(id), base_alias, MAX_ALIAS_SIZE); - RoutingTB_AddNumToAlias(RoutingTB_AliasFromId(id), annotation++); + int32_t found_id = RoutingTB_IDFromAlias(RoutingTB_AliasFromId(id)); + if ((found_id != id) & (found_id != -1)) + { + // The found_id don't match with the actual ID of the service because the alias already exist + // Find the new alias to give him + uint8_t annotation = 1; + char base_alias[MAX_ALIAS_SIZE] = {0}; + memcpy(base_alias, RoutingTB_AliasFromId(id), MAX_ALIAS_SIZE); + // Add a number after alias in routing table + RoutingTB_AddNumToAlias(RoutingTB_AliasFromId(id), annotation++); + // check another time if this alias is already used + while (RoutingTB_IDFromAlias(RoutingTB_AliasFromId(id)) != id) + { + // This alias is already used. + // Remove the number previously setuped by overwriting it with the base_alias + memcpy(RoutingTB_AliasFromId(id), base_alias, MAX_ALIAS_SIZE); + RoutingTB_AddNumToAlias(RoutingTB_AliasFromId(id), annotation++); + } + } } - } + detect_state_machine = 0; + last_node_id = 0; + return 1; + break; + default: + LUOS_ASSERT(0); + break; } + LUOS_ASSERT(0); + return -1; } /****************************************************************************** @@ -363,28 +378,69 @@ void RoutingTB_SendEndDetection(service_t *service) * If multiple services have the same name it will be changed with a number in it * Automatically at the end this function create a list of sensors id * @param service : Service who send - * @return None + * @return return true if the detection is complete ******************************************************************************/ -void RoutingTB_DetectServices(service_t *service) +bool RoutingTB_DetectServices(service_t *service) { LUOS_ASSERT(service); - // Create a connetion list to store all the connection describing the topology - connection_t connection_table[MAX_NODE_NUMBER]; - memset(connection_table, 0xFFFFFFFF, sizeof(connection_table)); - // Starts the topology detection. - uint16_t nb_node = LuosIO_TopologyDetection(service, connection_table); - // Clear data reception state - Luos_ReceiveData(NULL, NULL, NULL); - // Clear the routing table. - RoutingTB_Erase(); - // Generate the routing_table - RoutingTB_Generate(service, nb_node, connection_table); - // We have a complete routing table now share it with others. - RoutingTB_Share(service, nb_node); - // Send a message to indicate the end of the detection - RoutingTB_SendEndDetection(service); - // Clear statistic of node who start the detction - Luos_ResetStatistic(); + static uint8_t detect_state_machine = 0; + static uint16_t nb_node = 0; + static connection_t connection_table[MAX_NODE_NUMBER]; + int result; + switch (detect_state_machine) + { + case 0: + // Create a connetion list to store all the connection describing the topology + memset(connection_table, 0xFF, sizeof(connection_table)); + detect_state_machine++; + case 1: + result = LuosIO_TopologyDetection(service, connection_table); + if (result == 0) + { + // No node detected meaning that the detection is not finished + return false; + } + if (result < 0) + { + // another detection is in progress, stop this one + detect_state_machine = 0; + return true; + } + nb_node = (uint16_t)result; + // Clear data reception state + Luos_ReceiveData(NULL, NULL, NULL); + // Clear the routing table. + RoutingTB_Erase(); + detect_state_machine++; + case 2: + // Generate the routing_table + result = RoutingTB_Generate(service, nb_node, connection_table); + if (result == 0) + { + // RTB generation not finished + return false; + } + if (result < 0) + { + // another detection is in progress, stop this one + detect_state_machine = 0; + return true; + } + // We have a complete routing table now share it with others. + RoutingTB_Share(service, nb_node); + // Send a message to indicate the end of the detection + RoutingTB_SendEndDetection(service); + // Clear statistic of node who start the detction + Luos_ResetStatistic(); + detect_state_machine = 0; + return true; + break; + default: + LUOS_ASSERT(0); + break; + } + LUOS_ASSERT(0); + return false; } /****************************************************************************** diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index 15664a515..4c91ed2b0 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -96,25 +96,6 @@ void unittest_luosIO_loop() TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; } - - NEW_TEST_CASE("Check that the detection treatment is done in loop"); - { - TRY - { - LuosIO_Init(); - Flag_DetectServices = true; - detection_service = &service_ctx.list[0]; - LuosIO_Loop(); - TEST_ASSERT_EQUAL(NULL, detection_service); - TEST_ASSERT_EQUAL(false, Flag_DetectServices); - TEST_ASSERT_EQUAL(1, service_ctx.list[0].id); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } } void unittest_luosIO_TransmitLocalRoutingTable() From 8c7a6de3e00b9f471d0d5b6400aae83c94f3ed4f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 10 Jul 2023 16:52:31 +0200 Subject: [PATCH 100/198] Add a Pure Arduino Luos HAL --- engine/HAL/ARDUINO/luos_hal.c | 190 +++++++++++++++++++++++++++ engine/HAL/ARDUINO/luos_hal.h | 49 +++++++ engine/HAL/ARDUINO/luos_hal_config.h | 38 ++++++ 3 files changed, 277 insertions(+) create mode 100644 engine/HAL/ARDUINO/luos_hal.c create mode 100644 engine/HAL/ARDUINO/luos_hal.h create mode 100644 engine/HAL/ARDUINO/luos_hal_config.h diff --git a/engine/HAL/ARDUINO/luos_hal.c b/engine/HAL/ARDUINO/luos_hal.c new file mode 100644 index 000000000..359527279 --- /dev/null +++ b/engine/HAL/ARDUINO/luos_hal.c @@ -0,0 +1,190 @@ +/****************************************************************************** + * @file luosHAL + * @brief Luos Hardware Abstration Layer. Describe Low layer fonction + * @MCU Family ATSAMD21 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#include "luos_hal.h" + +#include +#include + +// MCU dependencies this HAL is for family Atmel ATSAMD21 you can find + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#define DEFAULT_TIMEOUT 30 +#define TIMEOUT_ACK DEFAULT_TIMEOUT / 4 +/******************************************************************************* + * Variables + ******************************************************************************/ + +// timestamp variable +uint64_t start_offset; +/******************************************************************************* + * Function + ******************************************************************************/ +static void LuosHAL_SystickInit(void); +static void LuosHAL_FlashInit(void); + +/////////////////////////Luos Library Needed function/////////////////////////// + +/****************************************************************************** + * @brief Luos HAL general initialisation + * @param None + * @return None + ******************************************************************************/ +void LuosHAL_Init(void) +{ + // Systick Initialization + LuosHAL_SystickInit(); + + // Flash Initialization + LuosHAL_FlashInit(); + + // start timestamp + LuosHAL_StartTimestamp(); +} +/****************************************************************************** + * @brief Luos HAL general disable IRQ + * @param Enable : Set to "True" to enable IRQ, "False" otherwise + * @return None + ******************************************************************************/ +_CRITICAL void LuosHAL_SetIrqState(bool Enable) +{ +} +/****************************************************************************** + * @brief Luos HAL general systick tick at 1ms initialize + * @param None + * @return Tick Counter + ******************************************************************************/ +static void LuosHAL_SystickInit(void) +{ +} +/****************************************************************************** + * @brief Luos HAL general systick tick at 1ms + * @param None + * @return Tick Counter + ******************************************************************************/ +_CRITICAL uint32_t LuosHAL_GetSystick(void) +{ + return millis(); +} + +/****************************************************************************** + * @brief Luos GetTimestamp + * @param None + * @return uint64_t + ******************************************************************************/ +_CRITICAL uint64_t LuosHAL_GetTimestamp(void) +{ + return micros() * 1000 - start_offset; +} + +/****************************************************************************** + * @brief Luos start Timestamp + * @param None + * @return None + ******************************************************************************/ +_CRITICAL void LuosHAL_StartTimestamp(void) +{ + start_offset = LuosHAL_GetSystick(); +} + +/****************************************************************************** + * @brief Luos stop Timestamp + * @param None + * @return None + ******************************************************************************/ +_CRITICAL void LuosHAL_StopTimestamp(void) +{ + start_offset = 0; +} + +/****************************************************************************** + * @brief Flash Initialisation + * @param None + * @return None + ******************************************************************************/ +static void LuosHAL_FlashInit(void) +{ +} +/****************************************************************************** + * @brief Set boot mode in shared flash memory + * @param None + * @return + ******************************************************************************/ +_CRITICAL void LuosHAL_SetMode(uint8_t mode) +{ +} + +/****************************************************************************** + * @brief Save node ID in shared flash memory + * @param node_id + * @return + ******************************************************************************/ +_CRITICAL void LuosHAL_SaveNodeID(uint16_t node_id) +{ +} + +/****************************************************************************** + * @brief Software reboot the microprocessor + * @param None + * @return + ******************************************************************************/ +void LuosHAL_Reboot(void) +{ +} + +#ifdef BOOTLOADER +/****************************************************************************** + * @brief Get node id saved in flash memory + * @param Address + * @return node_id + ******************************************************************************/ +uint16_t LuosHAL_GetNodeID(void) +{ +} + +/****************************************************************************** + * @brief Programm flash memory + * @param address : Start address + * @param size :: Data size + * @param data : Pointer to data + * @return + ******************************************************************************/ +void LuosHAL_ProgramFlash(uint32_t address, uint8_t page, uint16_t size, uint8_t *data) +{ +} + +/****************************************************************************** + * @brief DeInit Bootloader peripherals + * @param None + * @return + ******************************************************************************/ +void LuosHAL_DeInit(void) +{ +} + +/****************************************************************************** + * @brief DeInit Bootloader peripherals + * @param None + * @return + ******************************************************************************/ +typedef void (*pFunction)(void); /*!< Function pointer definition */ + +void LuosHAL_JumpToApp(uint32_t app_addr) +{ +} + +/****************************************************************************** + * @brief Return bootloader mode saved in flash + * @param None + * @return + ******************************************************************************/ +uint8_t LuosHAL_GetMode(void) +{ +} +#endif diff --git a/engine/HAL/ARDUINO/luos_hal.h b/engine/HAL/ARDUINO/luos_hal.h new file mode 100644 index 000000000..b9e626394 --- /dev/null +++ b/engine/HAL/ARDUINO/luos_hal.h @@ -0,0 +1,49 @@ +/****************************************************************************** + * @file luosHAL + * @brief Luos Hardware Abstration Layer. Describe Low layer fonction + * @MCU Family ATSAMD21 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _LUOSHAL_H_ +#define _LUOSHAL_H_ + +#include +#include +#include "luos_hal_config.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#define _CRITICAL + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Function + ******************************************************************************/ +void LuosHAL_Init(void); +void LuosHAL_SetIrqState(bool Enable); +uint32_t LuosHAL_GetSystick(void); + +// bootloader functions +void LuosHAL_SetMode(uint8_t mode); +void LuosHAL_Reboot(void); +void LuosHAL_SaveNodeID(uint16_t); + +#ifdef BOOTLOADER_CONFIG +void LuosHAL_DeInit(void); +void LuosHAL_JumpToApp(uint32_t); +uint8_t LuosHAL_GetMode(void); +uint16_t LuosHAL_GetNodeID(void); +void LuosHAL_ProgramFlash(uint32_t, uint8_t, uint16_t, uint8_t *); +#endif + +// timestamp functions +uint64_t LuosHAL_GetTimestamp(void); +void LuosHAL_StartTimestamp(void); +void LuosHAL_StopTimestamp(void); + +#endif /* _LUOSHAL_H_ */ diff --git a/engine/HAL/ARDUINO/luos_hal_config.h b/engine/HAL/ARDUINO/luos_hal_config.h new file mode 100644 index 000000000..ff2264f50 --- /dev/null +++ b/engine/HAL/ARDUINO/luos_hal_config.h @@ -0,0 +1,38 @@ +/****************************************************************************** + * @file luosHAL_Config + * @brief This file allow you to configure LuosHAL according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file if you want to ovewrite change define in you project + * @MCU Family ATSAMD21 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _LUOSHAL_CONFIG_H_ +#define _LUOSHAL_CONFIG_H_ + +#include + +#endif + +/******************************************************************************* + * DEFINE THREAD MUTEX LOCKING AND UNLOCKING FUNCTIONS + ******************************************************************************/ +#ifndef MSGALLOC_MUTEX_LOCK +#define MSGALLOC_MUTEX_LOCK +#endif +#ifndef MSGALLOC_MUTEX_UNLOCK +#define MSGALLOC_MUTEX_UNLOCK +#endif + +#ifndef LUOS_MUTEX_LOCK +#define LUOS_MUTEX_LOCK +#endif +#ifndef LUOS_MUTEX_UNLOCK +#define LUOS_MUTEX_UNLOCK +#endif + +/******************************************************************************* + * BOOTLOADER CONFIG + ******************************************************************************/ + +#endif /* _LUOSHAL_CONFIG_H_ */ From ca1574215084410a291f5cef71782248317e4bf4 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 13 Jul 2023 12:41:47 +0200 Subject: [PATCH 101/198] Secure Pipe using Serial for STM32G4 clock configuration --- tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.h | 14 ++++++++++++-- tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.h | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.h b/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.h index 5e3cd228f..f4bfe255b 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.h +++ b/tool_services/pipe/SERIAL/NUCLEO-G431/pipe_com.h @@ -38,14 +38,24 @@ #define PIPE_COM_IRQ USART2_IRQn #define PIPE_COM_IRQHANDLER() USART2_IRQHandler() - #define PIPE_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define PIPE_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) #define PIPE_RX_DMA DMA1 #define PIPE_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 #define PIPE_RX_DMA_REQUEST LL_DMAMUX_REQ_USART2_RX #define PIPE_RX_DMA_TC(PIPE_RX_DMA) LL_DMA_IsActiveFlag_TC3(PIPE_RX_DMA) #define PIPE_RX_DMA_CLEAR_TC(PIPE_RX_DMA) LL_DMA_ClearFlag_TC3(PIPE_RX_DMA) - #define PIPE_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define PIPE_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) #define PIPE_TX_DMA DMA1 #define PIPE_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 #define PIPE_TX_DMA_REQUEST LL_DMAMUX_REQ_USART2_TX diff --git a/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.h b/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.h index db6ec258e..d98df92a6 100644 --- a/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.h +++ b/tool_services/pipe/SERIAL/NUCLEO-G474/pipe_com.h @@ -38,14 +38,24 @@ #define PIPE_COM_IRQ LPUART1_IRQn #define PIPE_COM_IRQHANDLER() LPUART1_IRQHandler() - #define PIPE_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define PIPE_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) #define PIPE_RX_DMA DMA1 #define PIPE_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 #define PIPE_RX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_RX #define PIPE_RX_DMA_TC(PIPE_RX_DMA) LL_DMA_IsActiveFlag_TC3(PIPE_RX_DMA) #define PIPE_RX_DMA_CLEAR_TC(PIPE_RX_DMA) LL_DMA_ClearFlag_TC3(PIPE_RX_DMA) - #define PIPE_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define PIPE_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) #define PIPE_TX_DMA DMA1 #define PIPE_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 #define PIPE_TX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_TX From c1f8950eb10bea5fda2dc9d680bff9e6275be798 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 17 Jul 2023 17:01:11 +0200 Subject: [PATCH 102/198] Optimize freeRTOS example to fit in RAM --- examples/projects/l0/button_freertos/node_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/projects/l0/button_freertos/node_config.h b/examples/projects/l0/button_freertos/node_config.h index 2862baca5..a191b492d 100644 --- a/examples/projects/l0/button_freertos/node_config.h +++ b/examples/projects/l0/button_freertos/node_config.h @@ -45,8 +45,8 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 5 -#define MAX_PROFILE_NUMBER 5 +#define MAX_SERVICE_NUMBER 1 +#define MAX_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* From 071816369e61a3150729431a3b8ea90fb61094ee Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 4 Jul 2023 17:57:51 +0200 Subject: [PATCH 103/198] Create a serial_network --- .github/workflows/pio_release.yml | 25 + engine/HAL/ARDUINO/luos_hal_config.h | 10 +- engine/IO/src/luos_io.c | 2 +- .../projects/l0/button/lib/Button/button.c | 5 +- examples/projects/l0/button/platformio.ini | 1 + examples/projects/l0/button/src/main.c | 5 +- examples/projects/l0/gpio/platformio.ini | 1 + examples/projects/l0/gpio/src/main.c | 5 +- .../HAL/ARDUINO/serial_network_hal.cpp | 70 +++ .../HAL/ARDUINO/serial_network_hal.h | 54 ++ .../HAL/NATIVE/serial_network_hal.c | 352 +++++++++++++ .../HAL/NATIVE/serial_network_hal.h | 19 + .../HAL/STM32F0/serial_network_hal.c | 221 ++++++++ .../HAL/STM32F0/serial_network_hal.h | 54 ++ .../HAL/STM32F4/serial_network_hal.c | 224 +++++++++ .../HAL/STM32F4/serial_network_hal.h | 54 ++ .../HAL/STM32G431/serial_network_hal.c | 227 +++++++++ .../HAL/STM32G431/serial_network_hal.h | 65 +++ .../HAL/STM32G474/serial_network_hal.c | 227 +++++++++ .../HAL/STM32G474/serial_network_hal.h | 66 +++ .../HAL/STM32L4/serial_network_hal.c | 223 ++++++++ .../HAL/STM32L4/serial_network_hal.h | 54 ++ .../HAL/template/serial_network_hal.c | 99 ++++ .../HAL/template/serial_network_hal.h | 19 + network/serial_network/inc/_serial_network.h | 17 + network/serial_network/inc/serial_network.h | 25 + network/serial_network/library.json | 23 + .../serial_select_hal_script.py | 56 +++ network/serial_network/src/serial_network.c | 476 ++++++++++++++++++ 29 files changed, 2666 insertions(+), 13 deletions(-) create mode 100644 network/serial_network/HAL/ARDUINO/serial_network_hal.cpp create mode 100644 network/serial_network/HAL/ARDUINO/serial_network_hal.h create mode 100644 network/serial_network/HAL/NATIVE/serial_network_hal.c create mode 100644 network/serial_network/HAL/NATIVE/serial_network_hal.h create mode 100644 network/serial_network/HAL/STM32F0/serial_network_hal.c create mode 100644 network/serial_network/HAL/STM32F0/serial_network_hal.h create mode 100644 network/serial_network/HAL/STM32F4/serial_network_hal.c create mode 100644 network/serial_network/HAL/STM32F4/serial_network_hal.h create mode 100644 network/serial_network/HAL/STM32G431/serial_network_hal.c create mode 100644 network/serial_network/HAL/STM32G431/serial_network_hal.h create mode 100644 network/serial_network/HAL/STM32G474/serial_network_hal.c create mode 100644 network/serial_network/HAL/STM32G474/serial_network_hal.h create mode 100644 network/serial_network/HAL/STM32L4/serial_network_hal.c create mode 100644 network/serial_network/HAL/STM32L4/serial_network_hal.h create mode 100644 network/serial_network/HAL/template/serial_network_hal.c create mode 100644 network/serial_network/HAL/template/serial_network_hal.h create mode 100644 network/serial_network/inc/_serial_network.h create mode 100644 network/serial_network/inc/serial_network.h create mode 100644 network/serial_network/library.json create mode 100644 network/serial_network/serial_select_hal_script.py create mode 100644 network/serial_network/src/serial_network.c diff --git a/.github/workflows/pio_release.yml b/.github/workflows/pio_release.yml index 02b511303..63d4fea65 100644 --- a/.github/workflows/pio_release.yml +++ b/.github/workflows/pio_release.yml @@ -229,3 +229,28 @@ jobs: pio package pack pio package publish --owner luos --non-interactive cd ../.. + + deploy_serial: + needs: check_valid_tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install platformio + - name: publish robus network + env: + PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }} + run: | + # ***** Serial network publication ***** + cd network/serial_network + # We don't publish examples with this one. + + pio package pack + pio package publish --owner luos --non-interactive + cd ../.. diff --git a/engine/HAL/ARDUINO/luos_hal_config.h b/engine/HAL/ARDUINO/luos_hal_config.h index ff2264f50..7400cc2cb 100644 --- a/engine/HAL/ARDUINO/luos_hal_config.h +++ b/engine/HAL/ARDUINO/luos_hal_config.h @@ -12,23 +12,21 @@ #include -#endif - /******************************************************************************* * DEFINE THREAD MUTEX LOCKING AND UNLOCKING FUNCTIONS ******************************************************************************/ #ifndef MSGALLOC_MUTEX_LOCK -#define MSGALLOC_MUTEX_LOCK + #define MSGALLOC_MUTEX_LOCK #endif #ifndef MSGALLOC_MUTEX_UNLOCK -#define MSGALLOC_MUTEX_UNLOCK + #define MSGALLOC_MUTEX_UNLOCK #endif #ifndef LUOS_MUTEX_LOCK -#define LUOS_MUTEX_LOCK + #define LUOS_MUTEX_LOCK #endif #ifndef LUOS_MUTEX_UNLOCK -#define LUOS_MUTEX_UNLOCK + #define LUOS_MUTEX_UNLOCK #endif /******************************************************************************* diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 59ff104c3..91608074a 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -247,7 +247,7 @@ int LuosIO_TopologyDetection(service_t *service, connection_t *connection_table) result = LuosIO_DetectNextNodes(service); if (result == -1) { - // check the number of retry we made + // Check the number of retry we made LUOS_ASSERT((redetect_nb <= 4)); // Detection fail, restart it redetect_nb++; diff --git a/examples/projects/l0/button/lib/Button/button.c b/examples/projects/l0/button/lib/Button/button.c index 34213ea07..b061ccc31 100644 --- a/examples/projects/l0/button/lib/Button/button.c +++ b/examples/projects/l0/button/lib/Button/button.c @@ -36,7 +36,8 @@ void Button_Init(void) // Profile configuration button.access = READ_ONLY_ACCESS; // Service creation following state profile - ProfileState_CreateService(&button, 0, "button", revision); + service_t *service = ProfileState_CreateService(&button, 0, "button", revision); + Luos_Detect(service); } /****************************************************************************** @@ -47,4 +48,4 @@ void Button_Init(void) void Button_Loop(void) { ll_button_read(&button.state); -} \ No newline at end of file +} diff --git a/examples/projects/l0/button/platformio.ini b/examples/projects/l0/button/platformio.ini index 17077b40a..995f62e3a 100644 --- a/examples/projects/l0/button/platformio.ini +++ b/examples/projects/l0/button/platformio.ini @@ -22,6 +22,7 @@ lib_deps = luos_engine@^3.0.0 robus_network Button + serial_network debug_tool = stlink [env:l0] diff --git a/examples/projects/l0/button/src/main.c b/examples/projects/l0/button/src/main.c index 49cdb2ca3..e1cdc439c 100644 --- a/examples/projects/l0/button/src/main.c +++ b/examples/projects/l0/button/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" /* USER CODE END Includes */ @@ -91,7 +91,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); - Robus_Init(); + Serial_Init(); Button_Init(); /* USER CODE END 2 */ @@ -100,6 +100,7 @@ int main(void) while (1) { Luos_Loop(); + Serial_Loop(); Button_Loop(); /* USER CODE END WHILE */ diff --git a/examples/projects/l0/gpio/platformio.ini b/examples/projects/l0/gpio/platformio.ini index 1f63f5dcf..b4d1dafeb 100644 --- a/examples/projects/l0/gpio/platformio.ini +++ b/examples/projects/l0/gpio/platformio.ini @@ -22,6 +22,7 @@ lib_deps = luos_engine@^3.0.0 robus_network Gpio_dev + serial_network debug_tool = stlink [env:l0] diff --git a/examples/projects/l0/gpio/src/main.c b/examples/projects/l0/gpio/src/main.c index 67b1c8c72..f85701902 100644 --- a/examples/projects/l0/gpio/src/main.c +++ b/examples/projects/l0/gpio/src/main.c @@ -26,7 +26,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "gpio_dev.h" /* USER CODE END Includes */ @@ -89,7 +89,7 @@ int main(void) /* Initialize all configured peripherals */ /* USER CODE BEGIN 2 */ Luos_Init(); - Robus_Init(); + Serial_Init(); GpioDev_Init(); /* USER CODE END 2 */ @@ -98,6 +98,7 @@ int main(void) while (1) { Luos_Loop(); + Serial_Loop(); GpioDev_Loop(); /* USER CODE END WHILE */ diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp new file mode 100644 index 000000000..a29ceb9c2 --- /dev/null +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp @@ -0,0 +1,70 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#include + +#ifdef __cplusplus +extern "C" +{ +#endif +#include "serial_network_hal.h" +#include "_serial_network.h" +#ifdef __cplusplus +} +#endif +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + Serial.begin(SERIAL_COM_DEFAULTBAUDRATE); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ + uint8_t data = 0; + while (Serial.available() > 0) + { + data = Serial.read(); + Serial_ReceptionAdd(&data, 1); + } +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + Serial.write(data, size); +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the serial port number here + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.h b/network/serial_network/HAL/ARDUINO/serial_network_hal.h new file mode 100644 index 000000000..e53eadaf2 --- /dev/null +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() + #define SERIAL_TX_PIN GPIO_PIN_10 + #define SERIAL_TX_PORT GPIOB + #define SERIAL_TX_AF GPIO_AF4_USART3 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() + #define SERIAL_RX_PIN GPIO_PIN_11 + #define SERIAL_RX_PORT GPIOB + #define SERIAL_RX_AF GPIO_AF4_USART3 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() + #define SERIAL_COM USART3 + #define SERIAL_COM_IRQ USART3_4_IRQn + #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 + #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 + #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c new file mode 100644 index 000000000..cbdff8e63 --- /dev/null +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -0,0 +1,352 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include +#include +#include +#include "luos_utils.h" + +#ifdef _WIN32 + #include +#else + #include + #include + #include + #include + #include +#endif + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +#ifdef _WIN32 +HANDLE hSerial; +#else +int serial_port; +#endif + +char portname[128]; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +char *stripStr(char *string) +{ + // non_space_count to keep the frequency of non space characters + int ok_char_count = 0; + + // Traverse a string and if it is non space or carriage return character then, place it at index non_space_count + for (int i = 0; string[i] != '\0'; i++) + { + if ((string[i] != ' ') && (string[i] != '\n') && (string[i] != '\r')) + { + // This character is OK + string[ok_char_count] = string[i]; + ok_char_count++; // non_space_count incremented + } + } + // Finally placing final character at the string end + string[ok_char_count] = '\0'; + return string; +} + +#ifdef _WIN32 +void set_serial_raw_mode(HANDLE hSerial) +{ + DCB dcbSerialParams = {0}; + dcbSerialParams.DCBlength = sizeof(dcbSerialParams); + + if (!GetCommState(hSerial, &dcbSerialParams)) + { + perror("Error getting serial port state"); + LUOS_ASSERT(0); + return; + } + + dcbSerialParams.BaudRate = SERIAL_NETWORK_BAUDRATE; + dcbSerialParams.ByteSize = 8; + dcbSerialParams.StopBits = ONESTOPBIT; + dcbSerialParams.Parity = NOPARITY; + dcbSerialParams.fBinary = TRUE; + dcbSerialParams.fRtsControl = RTS_CONTROL_DISABLE; + dcbSerialParams.fOutxCtsFlow = FALSE; + dcbSerialParams.fDtrControl = DTR_CONTROL_DISABLE; + dcbSerialParams.fOutxDsrFlow = FALSE; + dcbSerialParams.fOutX = FALSE; + dcbSerialParams.fInX = FALSE; + // dcbSerialParams.XonChar = 17; // ASCII XON (Ctrl-Q) + // dcbSerialParams.XoffChar = 19; // ASCII XOFF (Ctrl-S) + + if (!SetCommState(hSerial, &dcbSerialParams)) + { + perror("Error setting serial port state"); + LUOS_ASSERT(0); + return; + } + + COMMTIMEOUTS timeouts = {0}; + timeouts.ReadIntervalTimeout = MAXDWORD; + timeouts.ReadTotalTimeoutConstant = 0; + timeouts.ReadTotalTimeoutMultiplier = 0; + timeouts.WriteTotalTimeoutConstant = 0; + timeouts.WriteTotalTimeoutMultiplier = 0; + + if (!SetCommTimeouts(hSerial, &timeouts)) + { + perror("Error setting serial port timeouts"); + LUOS_ASSERT(0); + return; + } + + // Setup a 4k buffer + if (!SetupComm(hSerial, 4096, 4096)) + { + perror("Error setting serial port buffer size"); + return; + } +} +#else +void set_termios_raw_mode(struct termios *tty) +{ + tty->c_cflag |= (CLOCAL | CREAD); + tty->c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK | ECHONL | ISIG | IEXTEN); + #ifdef ECHOCTL + tty->c_lflag &= ~ECHOCTL; // netbsd workaround for Erk + #endif + #ifdef ECHOKE + tty->c_lflag &= ~ECHOKE; // netbsd workaround for Erk + #endif + tty->c_oflag &= ~(OPOST | ONLCR | OCRNL); + tty->c_iflag &= ~(INLCR | IGNCR | ICRNL | IGNBRK); + #ifdef IUCLC + tty->c_iflag &= ~IUCLC; + #endif + #ifdef PARMRK + tty->c_iflag &= ~PARMRK; + #endif + + tty->c_cflag |= CS8; + tty->c_cflag &= ~(CSTOPB); + tty->c_cflag &= ~(PARENB | PARODD); + + #ifdef CMSPAR + tty->c_cflag &= ~CMSPAR; + #endif + + #ifdef IXANY + tty->c_iflag &= ~(IXON | IXOFF | IXANY); + #else + tty->c_iflag &= ~(IXON | IXOFF); + #endif + + #ifdef CRTSCTS + tty->c_cflag &= ~(CRTSCTS); + #elif defined(CNEW_RTSCTS) + tty->c_cflag &= ~(CNEW_RTSCTS); + #endif + + tty->c_cc[VMIN] = 0; + tty->c_cc[VTIME] = 0; +} +#endif + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + rx_buffer_size = buffer_size; + // Init the serial peripheral + +#ifndef SERIAL_PORT + #ifdef _WIN32 + printf("Please enter the serial port name (ex: COM1): "); + #else + printf("Please enter the serial port name (ex: /dev/ttyUSB0): "); + #endif + fgets(portname, sizeof(portname), stdin); +#else + printf("Using default serial port: %s\n", SERIAL_PORT); + memcpy(portname, SERIAL_PORT, strlen(SERIAL_PORT)); +#endif + stripStr(portname); + printf("Connection on serial port %s at %d baud\n", portname, SERIAL_COM_DEFAULTBAUDRATE); + +// Open the serial port +#ifdef _WIN32 + HANDLE hSerial; + hSerial = CreateFile( + portname, + GENERIC_READ | GENERIC_WRITE, + 0, // exclusive access + NULL, // no security + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, + 0); + if (hSerial == INVALID_HANDLE_VALUE) + { + printf("Error opening serial port\n"); + LUOS_ASSERT(0); + } + // Set serial port parameters + set_serial_raw_mode(hSerial); + + // DCB dcbSerialParams = {0}; + // dcbSerialParams.DCBlength = sizeof(dcbSerialParams); + // if (!GetCommState(hSerial, &dcbSerialParams)) + // { + // printf("Error getting serial port state\n"); + // CloseHandle(hSerial); + // LUOS_ASSERT(0); + // } + // dcbSerialParams.BaudRate = SERIAL_NETWORK_BAUDRATE; + // dcbSerialParams.ByteSize = 8; + // dcbSerialParams.StopBits = ONESTOPBIT; + // dcbSerialParams.Parity = NOPARITY; + // if (!SetCommState(hSerial, &dcbSerialParams)) + // { + // printf("Error setting serial port state\n"); + // CloseHandle(hSerial); + // LUOS_ASSERT(0); + // } +#else + serial_port = open(portname, O_RDWR | O_NOCTTY | O_NONBLOCK); + if (serial_port < 0) + { + printf("Error opening serial port\n"); + printf("Error code: %d\n", errno); + LUOS_ASSERT(0); + while (1) + ; + } + struct termios tty; + memset(&tty, 0, sizeof(tty)); + if (tcgetattr(serial_port, &tty) != 0) + { + printf("Error getting serial port attributes\n"); + printf("Error code: %d\n", errno); + close(serial_port); + LUOS_ASSERT(0); + } + + // Set raw mode without any special handling of input/output + // cfmakeraw(&tty); + set_termios_raw_mode(&tty); + + // Set output/ input to be non-blocking + // tty.c_cc[VMIN] = 0; + // tty.c_cc[VTIME] = 0; + + if (tcsetattr(serial_port, TCSANOW, &tty) != 0) + { + printf("Error setting serial port attributes\n"); + printf("Error code: %d\n", errno); + close(serial_port); + LUOS_ASSERT(0); + } + tcflush(serial_port, TCIOFLUSH); + + // Bypass baudrate speed limitations of termios by using ioctl + #define IOSSIOSPEED 0x80045402 + speed_t speed = SERIAL_COM_DEFAULTBAUDRATE; + if (ioctl(serial_port, IOSSIOSPEED, &speed) < 0) + { + printf("Error setting baudrate attributes\n"); + printf("Error code: %d\n", errno); + close(serial_port); + LUOS_ASSERT(0); + } +#endif +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ + char recvData[1000]; +#ifdef _WIN32 + DWORD bytesRead; + if (!ReadFile(hSerial, recvData, sizeof(recvData), &bytesRead, NULL)) + { + printf("Error reading from serial port\n"); + CloseHandle(hSerial); + LUOS_ASSERT(0); + } +#else + ssize_t bytesRead; + bytesRead = read(serial_port, recvData, sizeof(recvData)); +#endif + if (bytesRead > 0) + { + Serial_ReceptionAdd((uint8_t *)recvData, (uint32_t)bytesRead); + } +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ +#ifdef _WIN32 + DWORD bytesWritten; + if (!WriteFile(hSerial, data, size, &bytesWritten, NULL)) + { + printf("Error writing to serial port\n"); + CloseHandle(hSerial); + LUOS_ASSERT(0); + } +#else + + // Check if the output buffer is full + int bytes_in_buffer; + ssize_t bytesWritten; + ioctl(serial_port, TIOCOUTQ, &bytes_in_buffer); + printf("%d bytes present before adding %d other.\n", bytes_in_buffer, size); + bytesWritten = write(serial_port, data, size); + LUOS_ASSERT(bytesWritten == size); + // tcdrain(serial_port); + if (bytesWritten < 0) + { + printf("Error writing to serial port\n"); + close(serial_port); + LUOS_ASSERT(0); + } +#endif + Serial_TransmissionEnd(); +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the COM port number here + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.h b/network/serial_network/HAL/NATIVE/serial_network_hal.h new file mode 100644 index 000000000..3af2174ef --- /dev/null +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.h @@ -0,0 +1,19 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" +#include "stdbool.h" + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); // Init the serial communication +void SerialHAL_Loop(void); // Do your loop stuff if needed +void SerialHAL_Send(uint8_t *data, uint16_t size); // Send data trough the DMA +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.c b/network/serial_network/HAL/STM32F0/serial_network_hal.c new file mode 100644 index 000000000..f0b721fe8 --- /dev/null +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.c @@ -0,0 +1,221 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include "stm32f0xx_hal.h" +#include "stm32f0xx_ll_usart.h" +#include "stm32f0xx_ll_dma.h" +#include "stm32f0xx_ll_gpio.h" +#include "stm32f0xx_ll_dma.h" +#include "stm32f0xx_ll_system.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +volatile uint16_t RX_PrevPointerPosition = 0; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + rx_buffer_size = buffer_size; + RX_PrevPointerPosition = 0; + + LL_USART_DeInit(SERIAL_COM); + /////////////////////////////// + // GPIO SERIAL Init + /////////////////////////////// + SERIAL_TX_CLK(); + SERIAL_RX_CLK(); + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + // TX + GPIO_InitStruct.Pin = SERIAL_TX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_TX_AF; + HAL_GPIO_Init(SERIAL_TX_PORT, &GPIO_InitStruct); + // RX + GPIO_InitStruct.Pin = SERIAL_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_RX_AF; + HAL_GPIO_Init(SERIAL_RX_PORT, &GPIO_InitStruct); + + /////////////////////////////// + // USART SERIAL Init + /////////////////////////////// + SERIAL_COM_CLOCK_ENABLE(); + + LL_USART_InitTypeDef USART_InitStruct; + // Initialise USART3 + LL_USART_Disable(SERIAL_COM); + USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; + USART_InitStruct.StopBits = LL_USART_STOPBITS_1; + USART_InitStruct.Parity = LL_USART_PARITY_NONE; + USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; + USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; + USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; + while (LL_USART_Init(SERIAL_COM, &USART_InitStruct) != SUCCESS) + ; + LL_USART_Enable(SERIAL_COM); + + LL_USART_ClearFlag_IDLE(SERIAL_COM); + LL_USART_EnableIT_IDLE(SERIAL_COM); + + HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); + HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); + + RX_PrevPointerPosition = 0; + + __HAL_RCC_DMA1_CLK_ENABLE(); + + /////////////////////////////// + // DMA SERIAL Init + /////////////////////////////// + SERIAL_RX_DMA_CLOCK_ENABLE(); + SERIAL_TX_DMA_CLOCK_ENABLE(); + + // RX DMA + LL_DMA_DisableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_SetDataTransferDirection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_DIRECTION_PERIPH_TO_MEMORY); + LL_DMA_SetChannelPriorityLevel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MODE_CIRCULAR); + LL_DMA_SetPeriphIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_SYSCFG_SetRemapDMA_USART(SERIAL_RX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->RDR); + LL_DMA_SetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, buffer_size); + LL_DMA_SetMemoryAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)rx_buffer); + LL_USART_EnableDMAReq_RX(SERIAL_COM); + LL_DMA_EnableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + // TX DMA + LL_DMA_SetDataTransferDirection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_SYSCFG_SetRemapDMA_USART(SERIAL_TX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->TDR); + LL_USART_EnableDMAReq_TX(SERIAL_COM); + HAL_NVIC_EnableIRQ(SERIAL_TX_DMA_IRQ); + HAL_NVIC_SetPriority(SERIAL_TX_DMA_IRQ, 1, 1); + + LL_DMA_EnableIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + LL_DMA_DisableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetMemoryAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetDataLength(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, size); + LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER() +{ + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + + // check if we receive an IDLE on usart3 + if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) + { + LL_USART_ClearFlag_IDLE(SERIAL_COM); + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(size); + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if (SERIAL_TX_DMA_TC(SERIAL_TX_DMA) != RESET) + { + // Clear the DMA irq flags + SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the USARt peeripheral number as port number + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.h b/network/serial_network/HAL/STM32F0/serial_network_hal.h new file mode 100644 index 000000000..e53eadaf2 --- /dev/null +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() + #define SERIAL_TX_PIN GPIO_PIN_10 + #define SERIAL_TX_PORT GPIOB + #define SERIAL_TX_AF GPIO_AF4_USART3 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() + #define SERIAL_RX_PIN GPIO_PIN_11 + #define SERIAL_RX_PORT GPIOB + #define SERIAL_RX_AF GPIO_AF4_USART3 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() + #define SERIAL_COM USART3 + #define SERIAL_COM_IRQ USART3_4_IRQn + #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 + #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 + #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.c b/network/serial_network/HAL/STM32F4/serial_network_hal.c new file mode 100644 index 000000000..52dcd9ec6 --- /dev/null +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.c @@ -0,0 +1,224 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include "stm32f4xx_hal.h" +#include "stm32f4xx_ll_usart.h" +#include "stm32f4xx_ll_gpio.h" +#include "stm32f4xx_ll_exti.h" +#include "stm32f4xx_ll_dma.h" +#include "stm32f4xx_ll_system.h" +#include "stm32f4xx_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +volatile uint16_t RX_PrevPointerPosition = 0; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + rx_buffer_size = buffer_size; + RX_PrevPointerPosition = 0; + + LL_USART_DeInit(SERIAL_COM); + /////////////////////////////// + // GPIO SERIAL Init + /////////////////////////////// + SERIAL_TX_CLK(); + SERIAL_RX_CLK(); + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + // TX + GPIO_InitStruct.Pin = SERIAL_TX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_TX_AF; + HAL_GPIO_Init(SERIAL_TX_PORT, &GPIO_InitStruct); + // RX + GPIO_InitStruct.Pin = SERIAL_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_RX_AF; + HAL_GPIO_Init(SERIAL_RX_PORT, &GPIO_InitStruct); + + /////////////////////////////// + // USART SERIAL Init + /////////////////////////////// + SERIAL_COM_CLOCK_ENABLE(); + + LL_USART_InitTypeDef USART_InitStruct; + // Initialise USART3 + LL_USART_Disable(SERIAL_COM); + USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; + USART_InitStruct.StopBits = LL_USART_STOPBITS_1; + USART_InitStruct.Parity = LL_USART_PARITY_NONE; + USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; + USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; + USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; + while (LL_USART_Init(SERIAL_COM, &USART_InitStruct) != SUCCESS) + ; + LL_USART_Enable(SERIAL_COM); + + LL_USART_ClearFlag_IDLE(SERIAL_COM); + LL_USART_EnableIT_IDLE(SERIAL_COM); + + HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); + HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); + + RX_PrevPointerPosition = 0; + + /////////////////////////////// + // DMA SERIAL Init + /////////////////////////////// + LL_DMA_DeInit(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_DeInit(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + + SERIAL_RX_DMA_CLOCK_ENABLE(); + SERIAL_TX_DMA_CLOCK_ENABLE(); + + // RX DMA + LL_DMA_DisableStream(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_SetChannelSelection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, SERIAL_TX_DMA_REQUEST); + LL_DMA_SetDataTransferDirection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_DIRECTION_PERIPH_TO_MEMORY); + LL_DMA_SetStreamPriorityLevel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MODE_CIRCULAR); + LL_DMA_SetPeriphIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->DR); + LL_DMA_SetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, buffer_size); + LL_DMA_SetMemoryAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)rx_buffer); + LL_USART_EnableDMAReq_RX(SERIAL_COM); + LL_DMA_EnableStream(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + // TX DMA + LL_DMA_DisableStream(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetChannelSelection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, SERIAL_TX_DMA_REQUEST); + LL_DMA_SetDataTransferDirection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetStreamPriorityLevel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->DR); + LL_USART_EnableDMAReq_TX(SERIAL_COM); + HAL_NVIC_EnableIRQ(SERIAL_TX_DMA_IRQ); + HAL_NVIC_SetPriority(SERIAL_TX_DMA_IRQ, 1, 1); + + LL_DMA_EnableIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + LL_DMA_DisableStream(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetMemoryAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetDataLength(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, size); + LL_DMA_EnableStream(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER() +{ + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + + // check if we receive an IDLE on usart3 + if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) + { + LL_USART_ClearFlag_IDLE(SERIAL_COM); + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(size); + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if ((SERIAL_TX_DMA_TC(SERIAL_TX_DMA) != RESET) && (LL_DMA_IsEnabledIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL) != RESET)) + { + // Clear the DMA irq flags + SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the USARt peeripheral number as port number + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.h b/network/serial_network/HAL/STM32F4/serial_network_hal.h new file mode 100644 index 000000000..27b596ddf --- /dev/null +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_TX_PIN GPIO_PIN_2 + #define SERIAL_TX_PORT GPIOA + #define SERIAL_TX_AF GPIO_AF7_USART2 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_RX_PIN GPIO_PIN_3 + #define SERIAL_RX_PORT GPIOA + #define SERIAL_RX_AF GPIO_AF7_USART2 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() + #define SERIAL_COM USART2 + #define SERIAL_COM_IRQ USART2_IRQn + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_STREAM_5 + #define SERIAL_RX_DMA_REQUEST LL_DMA_CHANNEL_4 + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC5(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC5(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_STREAM_6 + #define SERIAL_TX_DMA_REQUEST LL_DMA_CHANNEL_4 + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Stream6_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Stream6_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.c b/network/serial_network/HAL/STM32G431/serial_network_hal.c new file mode 100644 index 000000000..5ef7ad973 --- /dev/null +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.c @@ -0,0 +1,227 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include "luos_utils.h" +#include "stm32g4xx_hal.h" +#include "stm32g4xx_ll_usart.h" +#include "stm32g4xx_ll_gpio.h" +#include "stm32g4xx_ll_exti.h" +#include "stm32g4xx_ll_dma.h" +#include "stm32g4xx_ll_system.h" +#include "stm32g4xx_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +volatile uint16_t RX_PrevPointerPosition = 0; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + LUOS_ASSERT(rx_buffer); + rx_buffer_size = buffer_size; + RX_PrevPointerPosition = 0; + + LL_USART_DeInit(SERIAL_COM); + /////////////////////////////// + // GPIO SERIAL Init + /////////////////////////////// + SERIAL_TX_CLK(); + SERIAL_RX_CLK(); + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + // TX + GPIO_InitStruct.Pin = SERIAL_TX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_TX_AF; + HAL_GPIO_Init(SERIAL_TX_PORT, &GPIO_InitStruct); + // RX + GPIO_InitStruct.Pin = SERIAL_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_RX_AF; + HAL_GPIO_Init(SERIAL_RX_PORT, &GPIO_InitStruct); + + /////////////////////////////// + // USART SERIAL Init + /////////////////////////////// + SERIAL_COM_CLOCK_ENABLE(); + + LL_USART_InitTypeDef USART_InitStruct; + // Initialise USART3 + LL_USART_Disable(SERIAL_COM); + USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.PrescalerValue = LL_USART_PRESCALER_DIV1; + USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; + USART_InitStruct.StopBits = LL_USART_STOPBITS_1; + USART_InitStruct.Parity = LL_USART_PARITY_NONE; + USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; + USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; + USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; + while (LL_USART_Init(SERIAL_COM, &USART_InitStruct) != SUCCESS) + ; + LL_USART_Enable(SERIAL_COM); + + LL_USART_ClearFlag_IDLE(SERIAL_COM); + LL_USART_EnableIT_IDLE(SERIAL_COM); + + HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); + HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); + + /////////////////////////////// + // DMA SERIAL Init + /////////////////////////////// + LL_DMA_DeInit(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_DeInit(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + + SERIAL_RX_DMA_CLOCK_ENABLE(); + SERIAL_TX_DMA_CLOCK_ENABLE(); + + // Pipe to Luos + LL_DMA_DisableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_SetDataTransferDirection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_DIRECTION_PERIPH_TO_MEMORY); + LL_DMA_SetChannelPriorityLevel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MODE_CIRCULAR); + LL_DMA_SetPeriphIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, SERIAL_RX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->RDR); + LL_DMA_SetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, rx_buffer_size); + LL_DMA_SetMemoryAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)rx_buffer); + LL_USART_EnableDMAReq_RX(SERIAL_COM); + LL_DMA_EnableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + // Luos to Pipe + LL_DMA_SetDataTransferDirection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, SERIAL_TX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->TDR); + LL_USART_EnableDMAReq_TX(SERIAL_COM); + HAL_NVIC_EnableIRQ(SERIAL_TX_DMA_IRQ); + HAL_NVIC_SetPriority(SERIAL_TX_DMA_IRQ, 1, 1); + + LL_DMA_EnableIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + LL_DMA_DisableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetMemoryAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetDataLength(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, size); + LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER() +{ + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + + // check if we receive an IDLE on usart3 + if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) + { + LL_USART_ClearFlag_IDLE(SERIAL_COM); + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + if (size != 0) + { + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(size); + } + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if ((SERIAL_TX_DMA_TC(SERIAL_TX_DMA) != RESET) && (LL_DMA_IsEnabledIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL) != RESET)) + { + // Clear the DMA irq flags + SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the USARt peeripheral number as port number + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.h b/network/serial_network/HAL/STM32G431/serial_network_hal.h new file mode 100644 index 000000000..97bf5099f --- /dev/null +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h + +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_TX_PIN GPIO_PIN_2 + #define SERIAL_TX_PORT GPIOA + #define SERIAL_TX_AF GPIO_AF7_USART2 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_RX_PIN GPIO_PIN_3 + #define SERIAL_RX_PORT GPIOA + #define SERIAL_RX_AF GPIO_AF7_USART2 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() + #define SERIAL_COM USART2 + #define SERIAL_COM_IRQ USART2_IRQn + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 + #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_USART2_RX + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 + #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_USART2_TX + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.c b/network/serial_network/HAL/STM32G474/serial_network_hal.c new file mode 100644 index 000000000..74d4863da --- /dev/null +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.c @@ -0,0 +1,227 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include "luos_utils.h" +#include "stm32g4xx_hal.h" +#include "stm32g4xx_ll_lpuart.h" +#include "stm32g4xx_ll_gpio.h" +#include "stm32g4xx_ll_exti.h" +#include "stm32g4xx_ll_dma.h" +#include "stm32g4xx_ll_system.h" +#include "stm32g4xx_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +volatile uint16_t RX_PrevPointerPosition = 0; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + LUOS_ASSERT(rx_buffer); + rx_buffer_size = buffer_size; + RX_PrevPointerPosition = 0; + + LL_LPUART_DeInit(SERIAL_COM); + /////////////////////////////// + // GPIO SERIAL Init + /////////////////////////////// + SERIAL_TX_CLK(); + SERIAL_RX_CLK(); + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + // TX + GPIO_InitStruct.Pin = SERIAL_TX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_TX_AF; + HAL_GPIO_Init(SERIAL_TX_PORT, &GPIO_InitStruct); + // RX + GPIO_InitStruct.Pin = SERIAL_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_RX_AF; + HAL_GPIO_Init(SERIAL_RX_PORT, &GPIO_InitStruct); + + /////////////////////////////// + // USART SERIAL Init + /////////////////////////////// + SERIAL_COM_CLOCK_ENABLE(); + + LL_LPUART_InitTypeDef LPUART_InitStruct; + // Initialise USART3 + LL_LPUART_Disable(SERIAL_COM); + LPUART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + LPUART_InitStruct.PrescalerValue = LL_LPUART_PRESCALER_DIV1; + LPUART_InitStruct.DataWidth = LL_LPUART_DATAWIDTH_8B; + LPUART_InitStruct.StopBits = LL_LPUART_STOPBITS_1; + LPUART_InitStruct.Parity = LL_LPUART_PARITY_NONE; + LPUART_InitStruct.TransferDirection = LL_LPUART_DIRECTION_TX_RX; + LPUART_InitStruct.HardwareFlowControl = LL_LPUART_HWCONTROL_NONE; + // LPUART_InitStruct.OverSampling = LL_LPUART_OVERSAMPLING_16; + while (LL_LPUART_Init(SERIAL_COM, &LPUART_InitStruct) != SUCCESS) + ; + LL_LPUART_Enable(SERIAL_COM); + + LL_LPUART_ClearFlag_IDLE(SERIAL_COM); + LL_LPUART_EnableIT_IDLE(SERIAL_COM); + + HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); + HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); + + /////////////////////////////// + // DMA SERIAL Init + /////////////////////////////// + LL_DMA_DeInit(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_DeInit(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + + SERIAL_RX_DMA_CLOCK_ENABLE(); + SERIAL_TX_DMA_CLOCK_ENABLE(); + + // RX DMA + LL_DMA_DisableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_SetDataTransferDirection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_DIRECTION_PERIPH_TO_MEMORY); + LL_DMA_SetChannelPriorityLevel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MODE_CIRCULAR); + LL_DMA_SetPeriphIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, SERIAL_RX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->RDR); + LL_DMA_SetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, buffer_size); + LL_DMA_SetMemoryAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)rx_buffer); + LL_LPUART_EnableDMAReq_RX(SERIAL_COM); + LL_DMA_EnableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + // TX DMA + LL_DMA_SetDataTransferDirection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, SERIAL_TX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->TDR); + LL_LPUART_EnableDMAReq_TX(SERIAL_COM); + HAL_NVIC_EnableIRQ(SERIAL_TX_DMA_IRQ); + HAL_NVIC_SetPriority(SERIAL_TX_DMA_IRQ, 1, 1); + + LL_DMA_EnableIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + LL_DMA_DisableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetMemoryAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetDataLength(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, size); + LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER() +{ + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + + // check if we receive an IDLE on usart3 + if (LL_LPUART_IsActiveFlag_IDLE(SERIAL_COM)) + { + LL_LPUART_ClearFlag_IDLE(SERIAL_COM); + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + if (size != 0) + { + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(size); + } + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if ((SERIAL_TX_DMA_TC(SERIAL_TX_DMA) != RESET) && (LL_DMA_IsEnabledIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL) != RESET)) + { + // Clear the DMA irq flags + SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the USARt peeripheral number as port number + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.h b/network/serial_network/HAL/STM32G474/serial_network_hal.h new file mode 100644 index 000000000..9d10933b2 --- /dev/null +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.h @@ -0,0 +1,66 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h + +// Nucleo G474RE configuration +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_TX_PIN GPIO_PIN_2 + #define SERIAL_TX_PORT GPIOA + #define SERIAL_TX_AF GPIO_AF12_LPUART1 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_RX_PIN GPIO_PIN_3 + #define SERIAL_RX_PORT GPIOA + #define SERIAL_RX_AF GPIO_AF12_LPUART1 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_LPUART1_CLK_ENABLE() + #define SERIAL_COM LPUART1 + #define SERIAL_COM_IRQ LPUART1_IRQn + #define SERIAL_COM_IRQHANDLER() LPUART1_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 + #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_RX + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 + #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_TX + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.c b/network/serial_network/HAL/STM32L4/serial_network_hal.c new file mode 100644 index 000000000..b496ca016 --- /dev/null +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.c @@ -0,0 +1,223 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +#include "stm32l4xx_hal.h" +#include "stm32l4xx_ll_usart.h" +#include "stm32l4xx_ll_gpio.h" +#include "stm32l4xx_ll_exti.h" +#include "stm32l4xx_ll_dma.h" +#include "stm32l4xx_ll_system.h" +#include "stm32l4xx_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +volatile uint16_t RX_PrevPointerPosition = 0; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + rx_buffer_size = buffer_size; + RX_PrevPointerPosition = 0; + + LL_USART_DeInit(SERIAL_COM); + /////////////////////////////// + // GPIO SERIAL Init + /////////////////////////////// + SERIAL_TX_CLK(); + SERIAL_RX_CLK(); + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + // TX + GPIO_InitStruct.Pin = SERIAL_TX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_TX_AF; + HAL_GPIO_Init(SERIAL_TX_PORT, &GPIO_InitStruct); + // RX + GPIO_InitStruct.Pin = SERIAL_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = SERIAL_RX_AF; + HAL_GPIO_Init(SERIAL_RX_PORT, &GPIO_InitStruct); + + /////////////////////////////// + // USART SERIAL Init + /////////////////////////////// + SERIAL_COM_CLOCK_ENABLE(); + + LL_USART_InitTypeDef USART_InitStruct; + // Initialise USART3 + LL_USART_Disable(SERIAL_COM); + USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; + USART_InitStruct.StopBits = LL_USART_STOPBITS_1; + USART_InitStruct.Parity = LL_USART_PARITY_NONE; + USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; + USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; + USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; + while (LL_USART_Init(SERIAL_COM, &USART_InitStruct) != SUCCESS) + ; + LL_USART_Enable(SERIAL_COM); + + LL_USART_ClearFlag_IDLE(SERIAL_COM); + LL_USART_EnableIT_IDLE(SERIAL_COM); + + HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); + HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); + + RX_PrevPointerPosition = 0; + + /////////////////////////////// + // DMA SERIAL Init + /////////////////////////////// + LL_DMA_DeInit(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_DeInit(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + + SERIAL_RX_DMA_CLOCK_ENABLE(); + SERIAL_TX_DMA_CLOCK_ENABLE(); + + // RX DMA + LL_DMA_DisableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + LL_DMA_SetDataTransferDirection(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_DIRECTION_PERIPH_TO_MEMORY); + LL_DMA_SetChannelPriorityLevel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MODE_CIRCULAR); + LL_DMA_SetPeriphIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, SERIAL_RX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->RDR); + LL_DMA_SetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, buffer_size); + LL_DMA_SetMemoryAddress(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL, (uint32_t)rx_buffer); + LL_USART_EnableDMAReq_RX(SERIAL_COM); + LL_DMA_EnableChannel(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + // TX DMA + LL_DMA_SetDataTransferDirection(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphRequest(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, SERIAL_TX_DMA_REQUEST); + + // Prepare buffer + LL_DMA_SetPeriphAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)&SERIAL_COM->TDR); + LL_USART_EnableDMAReq_TX(SERIAL_COM); + HAL_NVIC_EnableIRQ(SERIAL_TX_DMA_IRQ); + HAL_NVIC_SetPriority(SERIAL_TX_DMA_IRQ, 1, 1); + + LL_DMA_EnableIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + LL_DMA_DisableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); + LL_DMA_SetMemoryAddress(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetDataLength(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL, size); + LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER() +{ + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + + // check if we receive an IDLE on usart3 + if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) + { + LL_USART_ClearFlag_IDLE(SERIAL_COM); + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(size); + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if ((SERIAL_TX_DMA_TC(SERIAL_TX_DMA) != RESET) && (LL_DMA_IsEnabledIT_TC(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL) != RESET)) + { + // Clear the DMA irq flags + SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} + +uint8_t SerialHAL_GetPort(void) +{ + // We may return the USARt peeripheral number as port number + // For now let's just consider that the port is 0 + return 0; +} diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.h b/network/serial_network/HAL/STM32L4/serial_network_hal.h new file mode 100644 index 000000000..ae33d2ff4 --- /dev/null +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" + +// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine +// SERIAL configuration usart or DMA If you need change something in this configuration +// you must redefine all the configuration in you node_config.h +#ifndef SERIAL_CONFIG + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_TX_PIN GPIO_PIN_2 + #define SERIAL_TX_PORT GPIOA + #define SERIAL_TX_AF GPIO_AF7_USART2 + + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); + #define SERIAL_RX_PIN GPIO_PIN_15 + #define SERIAL_RX_PORT GPIOA + #define SERIAL_RX_AF GPIO_AF3_USART2 + + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() + #define SERIAL_COM USART2 + #define SERIAL_COM_IRQ USART2_IRQn + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() + + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define SERIAL_RX_DMA DMA1 + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 + #define SERIAL_RX_DMA_REQUEST LL_DMA_REQUEST_2 + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) + + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); + #define SERIAL_TX_DMA DMA1 + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 + #define SERIAL_TX_DMA_REQUEST LL_DMA_REQUEST_2 + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) + #define SERIAL_TX_DMA_IRQ DMA1_Channel7_IRQn + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel7_IRQHandler() +#endif + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); +void SerialHAL_Loop(void); +void SerialHAL_Send(uint8_t *data, uint16_t size); +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/HAL/template/serial_network_hal.c b/network/serial_network/HAL/template/serial_network_hal.c new file mode 100644 index 000000000..7997b0214 --- /dev/null +++ b/network/serial_network/HAL/template/serial_network_hal.c @@ -0,0 +1,99 @@ +/****************************************************************************** + * @file serial_hal + * @brief serial communication hardware abstraction layer + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#include "serial_network_hal.h" +#include "_serial_network.h" +// TODO: Include the needed files + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_COM_DEFAULTBAUDRATE + #define SERIAL_COM_DEFAULTBAUDRATE 1000000 +#endif + +/******************************************************************************* + * Variables + ******************************************************************************/ +static uint32_t rx_buffer_size; +// TODO: Declare the needed variables + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + * ****************************************************************************/ +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) +{ + rx_buffer_size = buffer_size; + // Init the serial peripheral + // TODO: Init the used usart peripheral using the SERIAL_COM_DEFAULTBAUDRATE baudrate. + // TODO: Init TX pin with the given pin and port and set it as tx for the usart. Select the appropriate alternate function. + // TODO: Init the Serial TX DMA interface, use it in normal mode and make it raise an IRQ when finished. + + // TODO: Init RX pin with the given pin and port and set it as rx for the usart. Select the appropriate alternate function. + // TODO: Init the serial RX DMA interface to move RX bytes in the rx_buffer, use it in circular mode and make it loop on buffer_size. Do not make it raise an IRQ when finished. + // TODO: Enable the serial RX Idle IRQ to raise an interrupt when a the RX line is idle +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void SerialHAL_Loop(void) +{ + // If you want to receive data here, you can. +} + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param data pointer of the data to send + * @param size size of the data to send + * @return None + ******************************************************************************/ +void SerialHAL_Send(uint8_t *data, uint16_t size) +{ + // TODO: Start the DMA transfert to transmit data from data[0] to data[size] +} + +/****************************************************************************** + * @brief RX Serial IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_COM_IRQHANDLER(void) +{ + // Check if this IRQ is due to RX Idle + if (/*TODO: Check if this IRQ means that RX is Idle*/) + { + // TODO: Clear the RX idle IRQ flag + uint32_t received_data = rx_buffer_size - /* TODO: Get the size of the data received by the DMA*/; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionEnd(received_data); + } +} + +/****************************************************************************** + * @brief TX DMA IRQ handler + * @param None + * @return None + ******************************************************************************/ +void SERIAL_TX_DMA_IRQHANDLER() +{ + // Check if TX DMA is finished + if (/* TODO: Check if this irq means that TX DMA is finished*/) + { + // TODO: Clear the DMA irq flags + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); + } +} diff --git a/network/serial_network/HAL/template/serial_network_hal.h b/network/serial_network/HAL/template/serial_network_hal.h new file mode 100644 index 000000000..3af2174ef --- /dev/null +++ b/network/serial_network/HAL/template/serial_network_hal.h @@ -0,0 +1,19 @@ +/****************************************************************************** + * @file serial_hal + * @brief hardware abstraction layer of serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef _SERIAL_HAL_H_ +#define _SERIAL_HAL_H_ + +#include "stdint.h" +#include "stdbool.h" + +void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); // Init the serial communication +void SerialHAL_Loop(void); // Do your loop stuff if needed +void SerialHAL_Send(uint8_t *data, uint16_t size); // Send data trough the DMA +uint8_t SerialHAL_GetPort(void); // Return the port number of the serial communication + +#endif /* _SERIAL_HAL_H_ */ diff --git a/network/serial_network/inc/_serial_network.h b/network/serial_network/inc/_serial_network.h new file mode 100644 index 000000000..e2dde95d7 --- /dev/null +++ b/network/serial_network/inc/_serial_network.h @@ -0,0 +1,17 @@ +/****************************************************************************** + * @file _serial_network.h + * @brief Private serial communication driver functions for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +#ifndef __SERIAL_H_ +#define __SERIAL_H_ + +#include + +void Serial_TransmissionEnd(void); +void Serial_ReceptionAdd(uint8_t *data, uint32_t size); +void Serial_ReceptionEnd(uint32_t size); + +#endif /* __SERIAL_H_ */ diff --git a/network/serial_network/inc/serial_network.h b/network/serial_network/inc/serial_network.h new file mode 100644 index 000000000..453bcabc9 --- /dev/null +++ b/network/serial_network/inc/serial_network.h @@ -0,0 +1,25 @@ +/****************************************************************************** + * @file serial_network.h + * @brief serial communication driver for luos framework + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _LUOS_SERIAL_H_ +#define _LUOS_SERIAL_H_ + +#include "luos_phy.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#ifndef SERIAL_TX_BUFFER_SIZE + #define SERIAL_RX_BUFFER_SIZE 512 +#endif + +/******************************************************************************* + * Function + ******************************************************************************/ +void Serial_Init(void); +void Serial_Loop(void); + +#endif /* _LUOS_SERIAL_H_ */ diff --git a/network/serial_network/library.json b/network/serial_network/library.json new file mode 100644 index 000000000..e1a8def38 --- /dev/null +++ b/network/serial_network/library.json @@ -0,0 +1,23 @@ +{ + "name": "serial_network", + "keywords": "serial,network,microservice,luos,operating system,os,embedded,communication,service,ST,cJSON", + "description": "A serial network interface dedicated to Luos.", + "version": "1.0.0", + "authors": { + "name": "Luos", + "url": "https://luos.io" + }, + "homepage": "https://luos.io", + "license": "MIT", + "headers": "serial_network.h", + "build": { + "extraScript": "serial_select_hal_script.py" + }, + "dependencies": { + "luos_engine": "^3.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Luos-io/luos_engine" + } +} diff --git a/network/serial_network/serial_select_hal_script.py b/network/serial_network/serial_select_hal_script.py new file mode 100644 index 000000000..efd6ea182 --- /dev/null +++ b/network/serial_network/serial_select_hal_script.py @@ -0,0 +1,56 @@ +#!/usr/bin/python +from os import path +import sys +import click +from os.path import join, realpath +Import('env') + +click.secho("Serial network build configuration:", underline=True) +# Find the appropriate hal +find_HAL = False +envdefs = env['CPPDEFINES'].copy() +for item in envdefs: + if isinstance(item, tuple) and item[0] == "SERIALHAL": + find_HAL = True + if (path.exists("HAL/" + item[1])): + click.secho( + "\t* %s HAL selected for Serial network." % item[1], fg="green") + if (path.exists("HAL/" + item[1] + "/hal_script.py")): + # This is an extra script dedicated to this HAL, run it + hal_script_path = realpath("HAL/" + item[1] + "/hal_script.py") + env.SConscript(hal_script_path, exports="env") + click.secho("") + + else: + click.secho("\t* %s Serial network HAL not found" % + item[1], fg="red") + click.secho("") + + env.Append(CPPPATH=[realpath("HAL/" + item[1])]) + env.Append(CPPPATH=[realpath("inc/")]) + env.Append( + SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) + +if (find_HAL == False): + for item in envdefs: + if isinstance(item, tuple) and item[0] == "LUOSHAL": + find_HAL = True + if (path.exists("HAL/" + item[1])): + click.secho( + "\t* %s HAL selected for Serial network." % item[1], fg="green") + if (path.exists("HAL/" + item[1] + "/hal_script.py")): + # This is an extra script dedicated to this HAL, run it + hal_script_path = realpath( + "HAL/" + item[1] + "/hal_script.py") + env.SConscript(hal_script_path, exports="env") + click.secho("") + + else: + click.secho("\t* %s Serial network HAL not found" % + item[1], fg="red") + click.secho("") + + env.Append(CPPPATH=[realpath("HAL/" + item[1])]) + env.Append(CPPPATH=[realpath("inc/")]) + env.Append( + SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c new file mode 100644 index 000000000..89a2ea33a --- /dev/null +++ b/network/serial_network/src/serial_network.c @@ -0,0 +1,476 @@ +/****************************************************************************** + * @file serial_network.c + * @brief serial communication driver for Luos library + * @author Luos + * @version 0.0.0 + ******************************************************************************/ + +/****************************************************************************** + * # Serial Topology management algorythm: + * +------------+--------------+ +--------------+------------+ + * | 1st node (master) | | 2nd node | + * +------------+--------------+ +--------------+------------+ + * | luos_phy |serial_network| |serial_network| luos_phy | + * +------------+--------------+ +--------------+------------+ + * | ping ---+--> ping | -------> | ping ---+->phy_source| + * | <-+--------------+---msgs---+--------------+-> | + * | | | | | ping others| + * | topo_done <+-- de-ping | <------- | de-ping <-+--- ping | + * | ping others| | | |------+->topo_done | + * +------------+--------------+ +--------------+------------+ + * The ping and de-ping are the exact same request and reply sequence. The only difference is the direction of the message. + * ping : SerialHeader_t + SERIAL_FOOTER --> answer : SerialHeader_t + 1 byte + SERIAL_FOOTER + * + * # Serial protocol: + * ---------------------------------------------------------------------- + * | SERIAL_HEADER | size | data | SERIAL_FOOTER | + * ---------------------------------------------------------------------- + * | SerialHeader_t | + ******************************************************************************/ + +#include "luos_phy.h" +#include "serial_network.h" +#include "_serial_network.h" +#include "serial_network_hal.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#define SERIAL_HEADER 0x7E +#define SERIAL_FOOTER 0x81 + +// Phy callback definitions +static void Serial_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job); +static error_return_t Serial_RunTopology(luos_phy_t *phy_ptr, uint8_t *portId); +static void Serial_Reset(luos_phy_t *phy_ptr); +static void Serial_Send(void); + +typedef struct __attribute__((__packed__)) +{ + uint8_t header; + uint16_t size; +} SerialHeader_t; + +/******************************************************************************* + * Variables + ******************************************************************************/ +luos_phy_t *phy_serial; +volatile bool sending = false; // This flag is true when TX is busy +volatile bool wait_reception = false; // This flag is true when we are waiting for a reply to a ping + +uint8_t TX_data[sizeof(msg_t) + sizeof(SerialHeader_t) + 1]; // This buffer is used to prepare the message to send +uint8_t RX_data[SERIAL_RX_BUFFER_SIZE]; // This buffer is used to store received bytes and used as ring buffer +uint32_t rx_size = 0; +bool we_initiate_ping = false; +bool next_ping_is_deping = false; + +/******************************************************************************* + * Function + ******************************************************************************/ + +/****************************************************************************** + * @brief Initialisation of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void Serial_Init(void) +{ + // Instantiate the phy struct + phy_serial = Phy_Create(Serial_JobHandler, Serial_RunTopology, Serial_Reset); + LUOS_ASSERT(phy_serial); + + Serial_Reset(phy_serial); + SerialHAL_Init(RX_data, SERIAL_RX_BUFFER_SIZE); + + phy_serial->rx_timestamp = 0; + phy_serial->rx_buffer_base = RX_data; + phy_serial->rx_data = RX_data; // In our case we don't need to use this pointer because we use DMA to receive complete messages in one time. + phy_serial->rx_keep = true; +} + +/****************************************************************************** + * @brief Reset the serial communication variables + * @return None + ******************************************************************************/ +void Serial_Reset(luos_phy_t *phy_ptr) +{ + // Init the serial communication variables + sending = false; + wait_reception = false; + rx_size = 0; + we_initiate_ping = false; + next_ping_is_deping = false; +} + +/****************************************************************************** + * @brief Function called to move the rx buffer pointer + * @param size size to move the pointer + * @return None + ******************************************************************************/ +static void Serial_MoveRxPtr(uint8_t size) +{ + // Move the rx buffer pointer + LUOS_ASSERT(rx_size >= size); + Phy_SetIrqState(false); + phy_serial->rx_buffer_base += size; + if (phy_serial->rx_buffer_base >= RX_data + sizeof(RX_data)) + { + // We are at the end of the buffer, we need to go back to the beginning + phy_serial->rx_buffer_base = RX_data + (phy_serial->rx_buffer_base - (RX_data + sizeof(RX_data))); + } + phy_serial->rx_data = phy_serial->rx_buffer_base; + rx_size -= size; + Phy_SetIrqState(true); +} + +/****************************************************************************** + * @brief Loop of the Serial communication + * @param None + * @return None + ******************************************************************************/ +void Serial_Loop(void) +{ + SerialHAL_Loop(); + + // Manage received data + while (rx_size > 0) + { + /*********************************************** + * 1 - Receive the header and check if the message is complete + *********************************************/ + if (rx_size < sizeof(SerialHeader_t)) + { + // We don't receive the complete header yet. + return; + } + SerialHeader_t header; + // Check if the header address is after the end of the buffer + if (((uintptr_t)RX_data + sizeof(RX_data)) - ((uintptr_t)(phy_serial->rx_buffer_base)) < sizeof(SerialHeader_t)) + { + // Header is cut by the end of the buffer + // We need to go back to the beginning of the buffer + uint8_t buffer_end_size = ((uintptr_t)RX_data + sizeof(RX_data)) - (uintptr_t)(phy_serial->rx_buffer_base); + memcpy(&header, phy_serial->rx_buffer_base, buffer_end_size); + memcpy(&header + buffer_end_size, RX_data, sizeof(SerialHeader_t) - buffer_end_size); + } + else + { + // Header is continuous + memcpy(&header, phy_serial->rx_buffer_base, sizeof(SerialHeader_t)); + } + // Now we have the complete header, check if we receive the complete message + if (rx_size < header.size + sizeof(SerialHeader_t) + 1) + { + // We don't receive the complete message yet. + return; + } + /*********************************************** + * 2 - Receive the message + *********************************************/ + uint8_t *footer_position = &phy_serial->rx_buffer_base[header.size + sizeof(SerialHeader_t)]; + // Check if the footer address is after the end of the buffer + if ((uintptr_t)footer_position >= (uintptr_t)RX_data + sizeof(RX_data)) + { + // We need to go back to the beginning of the buffer + footer_position = (uint8_t *)((uintptr_t)RX_data + ((uintptr_t)footer_position - ((uintptr_t)RX_data + sizeof(RX_data)))); + } + while ((header.header != SERIAL_HEADER) || (*footer_position != SERIAL_FOOTER)) + { + // This is not a correct message, we need to go to the next byte + Serial_MoveRxPtr(1); + if (rx_size == 0) + { + // We don't have data to parse anymore + return; + } + } + if (rx_size < sizeof(SerialHeader_t)) + { + // We don't receive the complete message yet. + return; + } + /*********************************************** + * 3 - Process the message + *********************************************/ + if ((header.size > sizeof(msg_t)) || (header.size < sizeof(header_t))) + { + // This is not a standars message. + if (header.size == 0) + { + // This is a ping or a de-ping message + // - The ping message indicate that a master node is looking for this one + // - The de-ping message indicate that we are the master node. We already ping this node by calling Serial_RunTopology and we need to consider this branch as done + + // message reply to it + sending = true; + Phy_SetIrqState(true); + // We can send the message + // Add the encapsulation to the message + SerialHeader_t header_rply; + header_rply.header = SERIAL_HEADER; + // By adding 1 data, this message will be received but not interpreted + header_rply.size = 1; + memcpy(TX_data, &header_rply, sizeof(SerialHeader_t)); + TX_data[sizeof(SerialHeader_t)] = 0; + TX_data[sizeof(SerialHeader_t) + 1] = SERIAL_FOOTER; + + // Send the message + SerialHAL_Send(TX_data, sizeof(SerialHeader_t) + 2); + + // Did we receive this ping from a master node or are we the node that initiate the ping? + if (we_initiate_ping == false) + { + // We receive this ping from a master node + // This port become the topology source of this node + // Notify luos_phy about it + Phy_Topologysource(phy_serial, SerialHAL_GetPort()); + // The next ping we send will be a deping + next_ping_is_deping = true; + } + else + { + // We already ping this node, we need to consider this branch as done + Phy_TopologyDone(phy_serial); + we_initiate_ping = false; + } + } + // This is not a correct message, we need to trash it + Serial_MoveRxPtr(header.size + sizeof(SerialHeader_t) + 1); + } + else + { + // This message is correct and have actual data to parse, we can process it + // First, we need to remove the header encapsulation + Serial_MoveRxPtr(sizeof(SerialHeader_t)); + + uint8_t continuous_data[header.size]; + uint8_t *rx_buffer_base_bkp = phy_serial->rx_buffer_base; + // Check if the message is continuous in the buffer + if (phy_serial->rx_buffer_base + header.size > RX_data + sizeof(RX_data)) + { + // The message is not continuous in the buffer, we need to move it + uint8_t size = RX_data + sizeof(RX_data) - phy_serial->rx_buffer_base; + memcpy(continuous_data, phy_serial->rx_buffer_base, size); + memcpy(continuous_data + size, RX_data, header.size - size); + phy_serial->rx_buffer_base = continuous_data; + phy_serial->rx_data = continuous_data; + } + // The phy manager will need the data to be continuous in memory, so we need to move it + + // Give only the header to begin + phy_serial->received_data = sizeof(header_t); + Phy_ComputeHeader(phy_serial); + if (phy_serial->rx_keep == true) + { + // Header compute ask us to keep this message, to give it to an other phy. We already have the complete message, we can give it + phy_serial->received_data = header.size; + // We want to keep this message, we can validate it + Phy_ValidMsg(phy_serial); + if (phy_serial->rx_data == NULL) + { + // The message wasn't kept, there is no more space on the buffer, or the message is corrupted. + // This is a critical failure + LUOS_ASSERT(0); + } + } + phy_serial->rx_buffer_base = rx_buffer_base_bkp; + // The message have been consumed, we can move the rx buffer pointer + Serial_MoveRxPtr(header.size + 1); + } + } +} + +/****************************************************************************** + * @brief Serial job handler + * @param phy_ptr + * @param job + * @return None + ******************************************************************************/ +void Serial_JobHandler(luos_phy_t *phy_ptr, phy_job_t *job) +{ + // Try to directly transmit... Who knows perhaps the line is free + Serial_Send(); +} + +/****************************************************************************** + * @brief We finished to send the message, try to send another one + * @param None + * @return None + ******************************************************************************/ +_CRITICAL void Serial_TransmissionEnd(void) +{ + sending = false; + // We transmitted this message, we can remove it then send another one + // We may had a reset during this transmission, so we need to check if we still have something to transmit + if (phy_serial->job_nb > 0) + { + phy_job_t *job = Phy_GetJob(phy_serial); + job->phy_data = 0; + Phy_RmJob(phy_serial, job); + Serial_Send(); + } +} + +/****************************************************************************** + * @brief Try to send a message + * @param None + * @return None + * ****************************************************************************/ +_CRITICAL void Serial_Send(void) +{ + phy_job_t *job = Phy_GetJob(phy_serial); + if (job == NULL) + { + return; + } + Phy_SetIrqState(false); + if (sending == false) + { + sending = true; + Phy_SetIrqState(true); + // We can send the message + // Add the encapsulation to the message + SerialHeader_t header; + header.header = SERIAL_HEADER; + header.size = job->size; + memcpy(TX_data, &header, sizeof(SerialHeader_t)); + memcpy(TX_data + sizeof(SerialHeader_t), job->msg_pt, sizeof(msg_t)); + if (job->timestamp) + { + // Convert date to a sendable timestamp and put it in the end of the message + time_luos_t timestamp = Phy_ComputeMsgTimestamp(job); + memcpy(&TX_data[sizeof(SerialHeader_t) + job->size - +sizeof(timestamp)], ×tamp, sizeof(time_luos_t)); + TX_data[sizeof(SerialHeader_t) + job->size] = SERIAL_FOOTER; + } + else + { + TX_data[sizeof(SerialHeader_t) + job->size] = SERIAL_FOOTER; + // Send the message + } + SerialHAL_Send(TX_data, job->size + sizeof(SerialHeader_t) + 1); + } + Phy_SetIrqState(true); +} + +/****************************************************************************** + * @brief Store received data in the rx buffer + * @param data data to store + * @param size size of the data + * @return None + *****************************************************************************/ +_CRITICAL void Serial_ReceptionAdd(uint8_t *data, uint32_t size) +{ + if (rx_size == 0) + { + // This is probably the first data we received for this message, we need to timestamp the reception date. + // Watch out, if the loop is executed very slowly we may receive multiple messages in the same loop. This could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. Anyway we even didn't have any way to store multiple timestamp... + phy_serial->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - (size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE)); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) + } + uint32_t copy_size = (uintptr_t)&RX_data + sizeof(RX_data) - (uintptr_t)phy_serial->rx_buffer_base + rx_size; + if (copy_size > size) + { + copy_size = size; + } + memcpy(phy_serial->rx_buffer_base + rx_size, data, copy_size); + if (copy_size < size) + { + memcpy(RX_data, data + copy_size, size - copy_size); + } + rx_size += size; + if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) + { + // We received the answer of a topology ping, just indicate that we receive it + wait_reception = false; + } +} + +/****************************************************************************** + * @brief Reception end callback + * @param None + * @return None + ******************************************************************************/ +_CRITICAL void Serial_ReceptionEnd(uint32_t size) +{ + // Reception is finished, we can parse the message + rx_size += size; + // We consider this as the end of a complete message + // If we received multiple messages in this call, this could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. + phy_serial->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - (rx_size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE)); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) + LUOS_ASSERT(rx_size < sizeof(RX_data)); + if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) + { + // We received the answer of a topology ping, just indicate that we receive it + wait_reception = false; + } +} + +/****************************************************************************** + * @brief Find the next neighbour on this phy + * @param None + * @return error_return_t + ******************************************************************************/ +error_return_t Serial_RunTopology(luos_phy_t *phy_ptr, uint8_t *portId) +{ + // Send a ping message + + // While the transmission is not availble, we wait + while (sending == true) + ; + Phy_SetIrqState(false); + if (sending == false) + { + sending = true; + Phy_SetIrqState(true); + // We can send the message + // Add the encapsulation to the message + SerialHeader_t header; + header.header = SERIAL_HEADER; + header.size = 0; + memcpy(TX_data, &header, sizeof(SerialHeader_t)); + TX_data[sizeof(SerialHeader_t)] = SERIAL_FOOTER; + + // Send the message + SerialHAL_Send(TX_data, sizeof(SerialHeader_t) + 1); + } + else + { + Phy_SetIrqState(true); + LUOS_ASSERT(0); + } + + // Now we have to wait for the answer during max 200 ms + wait_reception = true; + uint32_t timeout = LuosHAL_GetSystick() + 200; + while ((wait_reception == true) && (LuosHAL_GetSystick() < timeout)) + { + // Treat potential received data + Serial_Loop(); + } + // Check if we received the answer + if (wait_reception == false) + { + // We received the answer + // We have to find out if this ping was a ping or a de-ping + if (next_ping_is_deping == true) + { + // This was a de-ping, we need to consider this branch as done + Phy_TopologyDone(phy_serial); + next_ping_is_deping = false; + return FAILED; + } + else + { + // We have to wait a de-ping to consider this branch as done + // Save a flag to indicate that we initiate a ping + we_initiate_ping = true; + return SUCCEED; + } + } + else + { + // We didn't receive the answer, consider this branch as done + we_initiate_ping = false; + Phy_TopologyDone(phy_serial); + return FAILED; + } +} From c3ddb9be75a3d51e0c258ea2877ee23e01c8b621 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 7 Jul 2023 14:33:02 +0200 Subject: [PATCH 104/198] OK serial test with Native gate and L0 button --- examples/projects/l0/button/lib/Button/button.c | 3 +-- examples/projects/l0/button/platformio.ini | 1 - examples/projects/native/gate_wscom/platformio.ini | 2 +- examples/projects/native/gate_wscom/src/main.c | 11 +++++++---- examples/projects/native/led/platformio.ini | 2 +- examples/projects/native/led/src/main.c | 5 +++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/projects/l0/button/lib/Button/button.c b/examples/projects/l0/button/lib/Button/button.c index b061ccc31..3005acb65 100644 --- a/examples/projects/l0/button/lib/Button/button.c +++ b/examples/projects/l0/button/lib/Button/button.c @@ -36,8 +36,7 @@ void Button_Init(void) // Profile configuration button.access = READ_ONLY_ACCESS; // Service creation following state profile - service_t *service = ProfileState_CreateService(&button, 0, "button", revision); - Luos_Detect(service); + ProfileState_CreateService(&button, 0, "button", revision); } /****************************************************************************** diff --git a/examples/projects/l0/button/platformio.ini b/examples/projects/l0/button/platformio.ini index 995f62e3a..421c5d9c1 100644 --- a/examples/projects/l0/button/platformio.ini +++ b/examples/projects/l0/button/platformio.ini @@ -20,7 +20,6 @@ board = l0 framework = stm32cube lib_deps = luos_engine@^3.0.0 - robus_network Button serial_network debug_tool = stlink diff --git a/examples/projects/native/gate_wscom/platformio.ini b/examples/projects/native/gate_wscom/platformio.ini index cd2b02bcd..d76767f39 100644 --- a/examples/projects/native/gate_wscom/platformio.ini +++ b/examples/projects/native/gate_wscom/platformio.ini @@ -19,7 +19,7 @@ lib_extra_dirs = platform = native lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Pipe Gate build_unflags = -Os diff --git a/examples/projects/native/gate_wscom/src/main.c b/examples/projects/native/gate_wscom/src/main.c index fe7365b54..161e248b1 100644 --- a/examples/projects/native/gate_wscom/src/main.c +++ b/examples/projects/native/gate_wscom/src/main.c @@ -1,5 +1,5 @@ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "pipe.h" #include "gate.h" #include @@ -17,14 +17,17 @@ void *Gate_Pipe_LoopThread(void *vargp) int main(void) { Luos_Init(); - Robus_Init(); + Serial_Init(); Pipe_Init(); Gate_Init(); // Create a thread to convert messages into Json and steam them using Websocket - pthread_t thread_id; - pthread_create(&thread_id, NULL, Gate_Pipe_LoopThread, NULL); + // pthread_t thread_id; + // pthread_create(&thread_id, NULL, Gate_Pipe_LoopThread, NULL); while (1) { Luos_Loop(); + Serial_Loop(); + Pipe_Loop(); + Gate_Loop(); } } diff --git a/examples/projects/native/led/platformio.ini b/examples/projects/native/led/platformio.ini index fa191afac..9264d26e6 100644 --- a/examples/projects/native/led/platformio.ini +++ b/examples/projects/native/led/platformio.ini @@ -18,7 +18,7 @@ lib_extra_dirs = platform = native lib_deps = Led - robus_network + serial_network build_unflags = -Os build_flags = -I inc diff --git a/examples/projects/native/led/src/main.c b/examples/projects/native/led/src/main.c index ba4fb4c5f..1ec6286cb 100644 --- a/examples/projects/native/led/src/main.c +++ b/examples/projects/native/led/src/main.c @@ -1,15 +1,16 @@ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "led.h" int main(void) { Luos_Init(); - Robus_Init(); + Serial_Init(); Led_Init(); while (1) { Luos_Loop(); + Serial_Loop(); Led_Loop(); } } From 5a721dafb98d1b8babc40c19e158fe9e797302f0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 11 Jul 2023 13:05:19 +0200 Subject: [PATCH 105/198] OK serial test with native gate and G474 and G431 button --- .../NUCLEO-G431KB/button/platformio.ini | 4 +- .../projects/NUCLEO-G431KB/button/src/main.c | 5 +- .../NUCLEO-G474RE/button/lib/Button/button.h | 1 - .../NUCLEO-G474RE/button/platformio.ini | 4 +- .../projects/NUCLEO-G474RE/button/src/gpio.c | 71 ++-- .../projects/NUCLEO-G474RE/button/src/main.c | 7 +- .../button/src/stm32g4xx_hal_msp.c | 58 +-- .../NUCLEO-G474RE/button/src/stm32g4xx_it.c | 118 +++--- .../button/src/system_stm32g4xx.c | 362 +++++++++--------- 9 files changed, 317 insertions(+), 313 deletions(-) diff --git a/examples/projects/NUCLEO-G431KB/button/platformio.ini b/examples/projects/NUCLEO-G431KB/button/platformio.ini index 5313a69a9..2b77f463a 100644 --- a/examples/projects/NUCLEO-G431KB/button/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/button/platformio.ini @@ -20,7 +20,7 @@ board = nucleo_g431kb framework = stm32cube lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Button debug_tool = stlink upload_protocol = stlink @@ -33,6 +33,7 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32G4 + -DSERIALHAL=STM32G431 [env:nucleo_g431kb_with_bootloader] board_build.ldscript = linker/custom_Luos_bootloader_script.ld @@ -44,6 +45,7 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32G4 + -DSERIALHAL=STM32G431 upload_protocol = custom upload_flags = -t2 diff --git a/examples/projects/NUCLEO-G431KB/button/src/main.c b/examples/projects/NUCLEO-G431KB/button/src/main.c index 11a4c21f7..d46289bfd 100644 --- a/examples/projects/NUCLEO-G431KB/button/src/main.c +++ b/examples/projects/NUCLEO-G431KB/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" /* USER CODE END Includes */ @@ -88,7 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); - Robus_Init(); + Serial_Init(); Button_Init(); /* USER CODE END 2 */ @@ -100,6 +100,7 @@ int main(void) /* USER CODE BEGIN 3 */ Luos_Loop(); + Serial_Loop(); Button_Loop(); } /* USER CODE END 3 */ diff --git a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h index 391034b43..29464d5e3 100644 --- a/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-G474RE/button/lib/Button/button.h @@ -8,7 +8,6 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G474RE/button/platformio.ini b/examples/projects/NUCLEO-G474RE/button/platformio.ini index b6d6dac6f..af333b60a 100644 --- a/examples/projects/NUCLEO-G474RE/button/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/button/platformio.ini @@ -21,7 +21,7 @@ board = nucleo_g474re framework = stm32cube lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Button debug_tool = stlink upload_protocol = stlink @@ -34,6 +34,7 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32G4 + -DSERIALHAL=STM32G474 [env:nucleo_g474re_with_bootloader] board_build.ldscript = linker/custom_Luos_bootloader_script.ld @@ -45,6 +46,7 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32G4 + -DSERIALHAL=STM32G474 upload_protocol = custom upload_flags = -t2 diff --git a/examples/projects/NUCLEO-G474RE/button/src/gpio.c b/examples/projects/NUCLEO-G474RE/button/src/gpio.c index bfbead5c8..cefdc6b51 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/gpio.c +++ b/examples/projects/NUCLEO-G474RE/button/src/gpio.c @@ -1,21 +1,21 @@ /** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ + ****************************************************************************** + * @file gpio.c + * @brief This file provides code for the configuration + * of all used GPIO pins. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ /* Includes ------------------------------------------------------------------*/ #include "gpio.h" @@ -32,32 +32,31 @@ /* USER CODE END 1 */ /** Configure pins -*/ + */ void MX_GPIO_Init(void) { - GPIO_InitTypeDef GPIO_InitStruct = {0}; + GPIO_InitTypeDef GPIO_InitStruct = {0}; - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pin : PtPin */ + GPIO_InitStruct.Pin = BTN_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pin : PtPin */ + GPIO_InitStruct.Pin = LED_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); } /* USER CODE BEGIN 2 */ diff --git a/examples/projects/NUCLEO-G474RE/button/src/main.c b/examples/projects/NUCLEO-G474RE/button/src/main.c index a4a3f3b8b..0aeda414e 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/main.c +++ b/examples/projects/NUCLEO-G474RE/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" /* USER CODE END Includes */ @@ -89,7 +89,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ LUOS_ADD_PACKAGE(Button) - LUOS_ADD_PACKAGE(Robus) + LUOS_ADD_PACKAGE(Serial) /* USER CODE END 2 */ /* Infinite loop */ @@ -135,7 +135,8 @@ void SystemClock_Config(void) } /** Initializes the CPU, AHB and APB buses clocks */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; diff --git a/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_hal_msp.c b/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_hal_msp.c index bcb709652..0096a09b3 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_hal_msp.c +++ b/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_hal_msp.c @@ -1,22 +1,22 @@ /* USER CODE BEGIN Header */ /** - ****************************************************************************** - * @file stm32g4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ + ****************************************************************************** + * @file stm32g4xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2021 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ @@ -59,26 +59,26 @@ /* USER CODE END 0 */ /** - * Initializes the Global MSP. - */ + * Initializes the Global MSP. + */ void HAL_MspInit(void) { - /* USER CODE BEGIN MspInit 0 */ + /* USER CODE BEGIN MspInit 0 */ - /* USER CODE END MspInit 0 */ + /* USER CODE END MspInit 0 */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); + __HAL_RCC_SYSCFG_CLK_ENABLE(); + __HAL_RCC_PWR_CLK_ENABLE(); - /* System interrupt init*/ + /* System interrupt init*/ - /** Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral - */ - //HAL_PWREx_DisableUCPDDeadBattery(); + /** Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral + */ + // HAL_PWREx_DisableUCPDDeadBattery(); - /* USER CODE BEGIN MspInit 1 */ + /* USER CODE BEGIN MspInit 1 */ - /* USER CODE END MspInit 1 */ + /* USER CODE END MspInit 1 */ } /* USER CODE BEGIN 1 */ diff --git a/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_it.c b/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_it.c index 4cbb9db25..2e52f9297 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_it.c +++ b/examples/projects/NUCLEO-G474RE/button/src/stm32g4xx_it.c @@ -69,14 +69,14 @@ */ void NMI_Handler(void) { - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ } /** @@ -84,14 +84,14 @@ void NMI_Handler(void) */ void HardFault_Handler(void) { - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } } /** @@ -99,14 +99,14 @@ void HardFault_Handler(void) */ void MemManage_Handler(void) { - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } } /** @@ -114,14 +114,14 @@ void MemManage_Handler(void) */ void BusFault_Handler(void) { - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } } /** @@ -129,14 +129,14 @@ void BusFault_Handler(void) */ void UsageFault_Handler(void) { - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } } /** @@ -144,12 +144,12 @@ void UsageFault_Handler(void) */ void SVC_Handler(void) { - /* USER CODE BEGIN SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 0 */ - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ - /* USER CODE END SVCall_IRQn 1 */ + /* USER CODE END SVCall_IRQn 1 */ } /** @@ -157,12 +157,12 @@ void SVC_Handler(void) */ void DebugMon_Handler(void) { - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - /* USER CODE END DebugMonitor_IRQn 1 */ + /* USER CODE END DebugMonitor_IRQn 1 */ } /** @@ -170,12 +170,12 @@ void DebugMon_Handler(void) */ void PendSV_Handler(void) { - /* USER CODE BEGIN PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 0 */ - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ - /* USER CODE END PendSV_IRQn 1 */ + /* USER CODE END PendSV_IRQn 1 */ } /** @@ -183,13 +183,13 @@ void PendSV_Handler(void) */ void SysTick_Handler(void) { - /* USER CODE BEGIN SysTick_IRQn 0 */ + /* USER CODE BEGIN SysTick_IRQn 0 */ - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ - /* USER CODE END SysTick_IRQn 1 */ + /* USER CODE END SysTick_IRQn 1 */ } /******************************************************************************/ @@ -203,12 +203,12 @@ void SysTick_Handler(void) /* USER CODE BEGIN 1 */ void EXTI9_5_IRQHandler(void) { - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); } void EXTI4_IRQHandler(void) { - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); } /* USER CODE END 1 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/button/src/system_stm32g4xx.c b/examples/projects/NUCLEO-G474RE/button/src/system_stm32g4xx.c index 3dd84e854..0c74693cf 100644 --- a/examples/projects/NUCLEO-G474RE/button/src/system_stm32g4xx.c +++ b/examples/projects/NUCLEO-G474RE/button/src/system_stm32g4xx.c @@ -1,80 +1,80 @@ /** - ****************************************************************************** - * @file system_stm32g4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32g4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32g4xx.s" file, to - * configure the system clock before to branch to main program. - * - * This file configures the system clock as follows: - *============================================================================= - *----------------------------------------------------------------------------- - * System Clock source | HSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 1 - *----------------------------------------------------------------------------- - * PLL_M | 1 - *----------------------------------------------------------------------------- - * PLL_N | 16 - *----------------------------------------------------------------------------- - * PLL_P | 7 - *----------------------------------------------------------------------------- - * PLL_Q | 2 - *----------------------------------------------------------------------------- - * PLL_R | 2 - *----------------------------------------------------------------------------- - * Require 48MHz for RNG | Disabled - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ + ****************************************************************************** + * @file system_stm32g4xx.c + * @author MCD Application Team + * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File + * + * This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32g4xx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * After each device reset the HSI (16 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32g4xx.s" file, to + * configure the system clock before to branch to main program. + * + * This file configures the system clock as follows: + *============================================================================= + *----------------------------------------------------------------------------- + * System Clock source | HSI + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 16000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 16000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 1 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 1 + *----------------------------------------------------------------------------- + * PLL_M | 1 + *----------------------------------------------------------------------------- + * PLL_N | 16 + *----------------------------------------------------------------------------- + * PLL_P | 7 + *----------------------------------------------------------------------------- + * PLL_Q | 2 + *----------------------------------------------------------------------------- + * PLL_R | 2 + *----------------------------------------------------------------------------- + * Require 48MHz for RNG | Disabled + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ /** @addtogroup CMSIS - * @{ - */ + * @{ + */ /** @addtogroup stm32g4xx_system - * @{ - */ + * @{ + */ /** @addtogroup STM32G4xx_System_Private_Includes - * @{ - */ + * @{ + */ #include "stm32g4xx.h" @@ -87,43 +87,43 @@ #endif /* HSI_VALUE */ /** - * @} - */ + * @} + */ /** @addtogroup STM32G4xx_System_Private_TypesDefinitions - * @{ - */ + * @{ + */ /** - * @} - */ + * @} + */ /** @addtogroup STM32G4xx_System_Private_Defines - * @{ - */ + * @{ + */ /************************* Miscellaneous Configuration ************************/ /*!< Uncomment the following line if you need to relocate your vector Table in Internal SRAM. */ /* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x08000000UL /*!< Vector Table base offset field. \ +#define VECT_TAB_OFFSET 0x00UL /*!< Vector Table base offset field. \ This value must be a multiple of 0x200. */ - /******************************************************************************/ - /** - * @} - */ + /******************************************************************************/ + /** + * @} + */ /** @addtogroup STM32G4xx_System_Private_Macros - * @{ - */ + * @{ + */ /** - * @} - */ + * @} + */ /** @addtogroup STM32G4xx_System_Private_Variables - * @{ - */ + * @{ + */ /* The SystemCoreClock variable is updated in three ways: 1) by calling CMSIS function SystemCoreClockUpdate() 2) by calling HAL API function HAL_RCC_GetHCLKFreq() @@ -135,135 +135,135 @@ uint32_t SystemCoreClock = HSI_VALUE; const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; -const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; +const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; /** - * @} - */ + * @} + */ /** @addtogroup STM32G4xx_System_Private_FunctionPrototypes - * @{ - */ + * @{ + */ /** - * @} - */ + * @} + */ /** @addtogroup STM32G4xx_System_Private_Functions - * @{ - */ + * @{ + */ /** - * @brief Setup the microcontroller system. - * @param None - * @retval None - */ + * @brief Setup the microcontroller system. + * @param None + * @retval None + */ void SystemInit(void) { /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << (10 * 2)) | (3UL << (11 * 2))); /* set CP10 and CP11 Full Access */ + SCB->CPACR |= ((3UL << (10 * 2)) | (3UL << (11 * 2))); /* set CP10 and CP11 Full Access */ #endif - /* Configure the Vector Table location add offset address ------------------*/ + /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ + SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ + SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ #endif } /** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (**) HSI_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (***) HSE_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) + * or HSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (**) HSI_VALUE is a constant defined in stm32g4xx_hal.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (***) HSE_VALUE is a constant defined in stm32g4xx_hal.h file (default value + * 8 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ void SystemCoreClockUpdate(void) { - uint32_t tmp, pllvco, pllr, pllsource, pllm; + uint32_t tmp, pllvco, pllr, pllsource, pllm; - /* Get SYSCLK source -------------------------------------------------------*/ - switch (RCC->CFGR & RCC_CFGR_SWS) - { - case 0x04: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; + /* Get SYSCLK source -------------------------------------------------------*/ + switch (RCC->CFGR & RCC_CFGR_SWS) + { + case 0x04: /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; - case 0x08: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; + case 0x08: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; - case 0x0C: /* PLL used as system clock source */ - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN + case 0x0C: /* PLL used as system clock source */ + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLR */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); - pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> 4) + 1U; - if (pllsource == 0x02UL) /* HSI used as PLL clock source */ - { - pllvco = (HSI_VALUE / pllm); - } - else /* HSE used as PLL clock source */ - { - pllvco = (HSE_VALUE / pllm); - } - pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 8); - pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> 25) + 1U) * 2U; - SystemCoreClock = pllvco / pllr; - break; + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); + pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> 4) + 1U; + if (pllsource == 0x02UL) /* HSI used as PLL clock source */ + { + pllvco = (HSI_VALUE / pllm); + } + else /* HSE used as PLL clock source */ + { + pllvco = (HSE_VALUE / pllm); + } + pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 8); + pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> 25) + 1U) * 2U; + SystemCoreClock = pllvco / pllr; + break; - default: - break; - } - /* Compute HCLK clock frequency --------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; + default: + break; + } + /* Compute HCLK clock frequency --------------------------------------------*/ + /* Get HCLK prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; + /* HCLK clock frequency */ + SystemCoreClock >>= tmp; } /** - * @} - */ + * @} + */ /** - * @} - */ + * @} + */ /** - * @} - */ + * @} + */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ From d60e27ea525abbbc7712780e4205c20d2ffc0198 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 11 Jul 2023 14:38:12 +0200 Subject: [PATCH 106/198] OK serial test with Native gate and STM32L4 button --- examples/projects/NUCLEO-L432KC/button/lib/Button/button.h | 1 - examples/projects/NUCLEO-L432KC/button/platformio.ini | 2 +- examples/projects/NUCLEO-L432KC/button/src/main.c | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h index 391034b43..29464d5e3 100644 --- a/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-L432KC/button/lib/Button/button.h @@ -8,7 +8,6 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/button/platformio.ini b/examples/projects/NUCLEO-L432KC/button/platformio.ini index 391e4a2f0..195f52fc1 100644 --- a/examples/projects/NUCLEO-L432KC/button/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/button/platformio.ini @@ -20,7 +20,7 @@ board = nucleo_l432kc framework = stm32cube lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Button debug_tool = stlink upload_protocol = stlink diff --git a/examples/projects/NUCLEO-L432KC/button/src/main.c b/examples/projects/NUCLEO-L432KC/button/src/main.c index 8b8a35b29..020569afe 100644 --- a/examples/projects/NUCLEO-L432KC/button/src/main.c +++ b/examples/projects/NUCLEO-L432KC/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" /* USER CODE END Includes */ @@ -88,7 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); - Robus_Init(); + Serial_Init(); Button_Init(); /* USER CODE END 2 */ @@ -100,6 +100,7 @@ int main(void) /* USER CODE BEGIN 3 */ Luos_Loop(); + Serial_Loop(); Button_Loop(); } /* USER CODE END 3 */ From 60f86afd92856c260f5e6a40214ebdb7fabaecc4 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 11 Jul 2023 14:54:35 +0200 Subject: [PATCH 107/198] OK serial test with Native gate and STM32F4 button --- examples/projects/NUCLEO-F401RE/button/lib/Button/button.h | 1 - examples/projects/NUCLEO-F401RE/button/platformio.ini | 2 +- examples/projects/NUCLEO-F401RE/button/src/main.c | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h index 391034b43..29464d5e3 100644 --- a/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h +++ b/examples/projects/NUCLEO-F401RE/button/lib/Button/button.h @@ -8,7 +8,6 @@ #define BUTTON_H #include "luos_engine.h" -#include "robus_network.h" /******************************************************************************* * Definitions ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/button/platformio.ini b/examples/projects/NUCLEO-F401RE/button/platformio.ini index a5858e7cc..46caa33d0 100644 --- a/examples/projects/NUCLEO-F401RE/button/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/button/platformio.ini @@ -20,7 +20,7 @@ board = nucleo_f401re framework = stm32cube lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Button debug_tool = stlink diff --git a/examples/projects/NUCLEO-F401RE/button/src/main.c b/examples/projects/NUCLEO-F401RE/button/src/main.c index bf478866e..ccc5ae691 100644 --- a/examples/projects/NUCLEO-F401RE/button/src/main.c +++ b/examples/projects/NUCLEO-F401RE/button/src/main.c @@ -24,7 +24,7 @@ /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" /* USER CODE END Includes */ @@ -88,7 +88,7 @@ int main(void) MX_GPIO_Init(); /* USER CODE BEGIN 2 */ Luos_Init(); - Robus_Init(); + Serial_Init(); Button_Init(); /* USER CODE END 2 */ @@ -100,6 +100,7 @@ int main(void) /* USER CODE BEGIN 3 */ Luos_Loop(); + Serial_Loop(); Button_Loop(); } /* USER CODE END 3 */ From 418b4173537f3f9b2f827b3bfe1f1abc3c3b55af Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 10 Jul 2023 16:52:49 +0200 Subject: [PATCH 108/198] OK serial test with Native gate and Arduino button and led, fix #440 --- examples/projects/Arduino/button/platformio.ini | 10 ++++------ examples/projects/Arduino/button/src/Button.cpp | 5 +++-- examples/projects/Arduino/led/lib/led/led.h | 1 - examples/projects/Arduino/led/platformio.ini | 5 +++-- examples/projects/Arduino/led/src/led.cpp | 5 +++-- .../serial_network/HAL/ARDUINO/serial_network_hal.cpp | 2 ++ network/serial_network/HAL/NATIVE/serial_network_hal.c | 1 + 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/examples/projects/Arduino/button/platformio.ini b/examples/projects/Arduino/button/platformio.ini index 1ce8c45dd..64af7d27f 100644 --- a/examples/projects/Arduino/button/platformio.ini +++ b/examples/projects/Arduino/button/platformio.ini @@ -24,7 +24,7 @@ default_envs = zero [env] -lib_extra_dirs = +lib_extra_dirs = $PROJECT_DIR/../../../../../ $PROJECT_DIR/../../../../network/ lib_ldf_mode =off @@ -34,17 +34,15 @@ build_unflags = -Os build_flags = -O1 -include node_config.h - -D LUOSHAL=ATSAMD21_ARDUINO + -D LUOSHAL=ARDUINO + -D SERIAL_COM_DEFAULTBAUDRATE=115200 lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Button - [env:zero] board = mkrzero -platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git - [env:seed] board = seeed_xiao diff --git a/examples/projects/Arduino/button/src/Button.cpp b/examples/projects/Arduino/button/src/Button.cpp index e6a55c41d..489371785 100644 --- a/examples/projects/Arduino/button/src/Button.cpp +++ b/examples/projects/Arduino/button/src/Button.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "button.h" #ifdef __cplusplus @@ -21,7 +21,7 @@ extern "C" void setup() { Luos_Init(); - Robus_Init(); + Serial_Init(); Button_Init(); } /****************************************************************************** @@ -32,5 +32,6 @@ void setup() void loop() { Luos_Loop(); + Serial_Loop(); Button_Loop(); } diff --git a/examples/projects/Arduino/led/lib/led/led.h b/examples/projects/Arduino/led/lib/led/led.h index e606ea77c..64026325c 100644 --- a/examples/projects/Arduino/led/lib/led/led.h +++ b/examples/projects/Arduino/led/lib/led/led.h @@ -8,7 +8,6 @@ #define LED_H #include "luos_engine.h" -#include "robus_network.h" /******************************************************************************* * Definitions diff --git a/examples/projects/Arduino/led/platformio.ini b/examples/projects/Arduino/led/platformio.ini index 86a753ab2..a380de2e2 100644 --- a/examples/projects/Arduino/led/platformio.ini +++ b/examples/projects/Arduino/led/platformio.ini @@ -35,15 +35,16 @@ build_flags = -O1 -include node_config.h -D LUOSHAL=ATSAMD21_ARDUINO + -D SERIALHAL=ARDUINO lib_deps = luos_engine@^3.0.0 - robus_network + serial_network Led [env:zero] board = mkrzero -platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git +; platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git [env:seed] diff --git a/examples/projects/Arduino/led/src/led.cpp b/examples/projects/Arduino/led/src/led.cpp index b005406a1..57cfad0ba 100644 --- a/examples/projects/Arduino/led/src/led.cpp +++ b/examples/projects/Arduino/led/src/led.cpp @@ -6,7 +6,7 @@ extern "C" #endif #include "luos_engine.h" -#include "robus_network.h" +#include "serial_network.h" #include "led.h" #ifdef __cplusplus @@ -21,7 +21,7 @@ extern "C" void setup() { Luos_Init(); - Robus_Init(); + Serial_Init(); Led_Init(); } /****************************************************************************** @@ -32,5 +32,6 @@ void setup() void loop() { Luos_Loop(); + Serial_Loop(); Led_Loop(); } diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp index a29ceb9c2..cc73d2507 100644 --- a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp @@ -60,6 +60,8 @@ void SerialHAL_Loop(void) void SerialHAL_Send(uint8_t *data, uint16_t size) { Serial.write(data, size); + // Call the callback managing the end of the transmission + Serial_TransmissionEnd(); } uint8_t SerialHAL_GetPort(void) diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index cbdff8e63..821b55e56 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -280,6 +280,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LUOS_ASSERT(0); } #endif + sleep(2); } /****************************************************************************** From c4c709481a9c2b3bba884a6bb3603498aeb1947d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Jul 2023 14:22:44 +0200 Subject: [PATCH 109/198] Improve Luos configuration parameters --- engine/IO/src/filter.c | 12 ++--- engine/core/inc/service.h | 10 ++-- engine/core/inc/struct_luos.h | 2 +- engine/core/src/luos_engine.c | 6 +-- engine/core/src/profile_core.c | 4 +- engine/core/src/pub_sub.c | 8 +-- engine/core/src/routing_table.c | 6 +-- engine/core/src/service.c | 8 +-- engine/engine_config.h | 46 ++++++++-------- .../Arduino/bldc_simple_foc/node_config.h | 9 ++-- .../projects/Arduino/button/node_config.h | 9 ++-- .../Arduino/fingerprint/node_config.h | 9 ++-- .../Arduino/gate_serialcom/node_config.h | 17 +++--- .../Arduino/inspector_serialcom/node_config.h | 13 ++--- examples/projects/Arduino/lcd/node_config.h | 9 ++-- examples/projects/Arduino/led/node_config.h | 9 ++-- .../Arduino/servo_motor/node_config.h | 9 ++-- .../Arduino/stepper_simple_foc/node_config.h | 9 ++-- examples/projects/ESP32/button/node_config.h | 7 +-- .../ESP32/button_arduino/node_config.h | 7 +-- .../ESP32/gate_serialcom/node_config.h | 8 +-- .../gate_serialcom_arduino/node_config.h | 8 +-- .../projects/ESP32/gate_wscom/node_config.h | 8 +-- .../ESP32/gate_wscom_arduino/node_config.h | 10 ++-- examples/projects/ESP32/led/node_config.h | 7 +-- .../NUCLEO-F072RB/barometer/node_config.h | 4 +- .../NUCLEO-F072RB/bootloader/node_config.h | 7 +-- .../NUCLEO-F072RB/button/node_config.h | 11 ++-- .../NUCLEO-F072RB/dc_motor/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 10 ++-- .../inspector_serialcom/node_config.h | 9 ++-- .../NUCLEO-F072RB/potentiometer/node_config.h | 9 ++-- .../NUCLEO-F401RE/bootloader/node_config.h | 7 +-- .../NUCLEO-F401RE/button/node_config.h | 9 ++-- .../NUCLEO-F401RE/dc_motor/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../inspector_serialcom/node_config.h | 13 ++--- .../projects/NUCLEO-F401RE/led/node_config.h | 9 ++-- .../NUCLEO-F401RE/potentiometer/node_config.h | 9 ++-- .../NUCLEO-F410RB/bootloader/node_config.h | 9 ++-- .../NUCLEO-F410RB/button/node_config.h | 9 ++-- .../NUCLEO-F410RB/dc_motor/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../inspector_serialcom/node_config.h | 13 ++--- .../projects/NUCLEO-F410RB/led/node_config.h | 9 ++-- .../NUCLEO-F410RB/potentiometer/node_config.h | 9 ++-- .../NUCLEO-G431KB/bootloader/node_config.h | 7 +-- .../NUCLEO-G431KB/button/node_config.h | 9 ++-- .../NUCLEO-G431KB/dc_motor/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../inspector_serialcom/node_config.h | 13 ++--- .../NUCLEO-G431KB/potentiometer/node_config.h | 9 ++-- .../NUCLEO-G474RE/bootloader/node_config.h | 7 +-- .../NUCLEO-G474RE/button/node_config.h | 7 +-- .../gate_serialcom/node_config.h | 13 ++--- .../inspector_serialcom/node_config.h | 13 ++--- .../NUCLEO-L073RZ/bootloader/node_config.h | 7 +-- .../NUCLEO-L073RZ/button/node_config.h | 11 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../NUCLEO-L432KC/bootloader/node_config.h | 7 +-- .../NUCLEO-L432KC/button/node_config.h | 9 ++-- .../NUCLEO-L432KC/dc_motor/node_config.h | 9 ++-- .../NUCLEO-L432KC/fingerprint/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../projects/NUCLEO-L432KC/gpio/node_config.h | 9 ++-- .../inspector_serialcom/node_config.h | 13 ++--- .../projects/NUCLEO-L432KC/lcd/node_config.h | 9 ++-- .../projects/NUCLEO-L432KC/led/node_config.h | 9 ++-- .../NUCLEO-L432KC/potentiometer/node_config.h | 9 ++-- .../NUCLEO-L432KC/servo/node_config.h | 9 ++-- .../SAMD21XPLAINED/button/node_config.h | 9 ++-- .../bootloader/node_config.h | 9 ++-- .../STM32F4-discovery/button/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../inspector_serialcom/node_config.h | 13 ++--- .../bootloader/node_config.h | 9 ++-- .../STM32L4S5_discovery/button/node_config.h | 9 ++-- .../gate_serialcom/node_config.h | 13 ++--- .../bike_alarm/alarm_controller/node_config.h | 7 +-- .../bike_alarm/start_controller/node_config.h | 7 +-- examples/projects/l0/bootloader/node_config.h | 9 ++-- examples/projects/l0/button/node_config.h | 11 ++-- .../projects/l0/button_freertos/node_config.h | 13 ++--- .../l0/controller_motor/node_config.h | 11 ++-- examples/projects/l0/dc_motor/node_config.h | 9 ++-- .../l0/demo/detection_button/node_config.h | 7 +-- .../l0/demo/ledstrip_position/node_config.h | 9 ++-- .../l0/demo/motor_copy_app/node_config.h | 11 ++-- .../l0/demo/motor_demo_app/node_config.h | 11 ++-- examples/projects/l0/distance/node_config.h | 9 ++-- examples/projects/l0/dxl/lib/Dxl/dxl.c | 12 ++--- examples/projects/l0/dxl/node_config.h | 11 ++-- .../projects/l0/fingerprint/node_config.h | 9 ++-- .../projects/l0/gate_serialcom/node_config.h | 13 ++--- examples/projects/l0/gpio/node_config.h | 11 ++-- examples/projects/l0/imu/node_config.h | 9 ++-- .../l0/inspector_serialcom/node_config.h | 9 ++-- examples/projects/l0/lcd/node_config.h | 9 ++-- examples/projects/l0/led/node_config.h | 9 ++-- examples/projects/l0/led_fader/node_config.h | 9 ++-- examples/projects/l0/led_strip/node_config.h | 9 ++-- .../projects/l0/light_sensor/node_config.h | 9 ++-- examples/projects/l0/load/node_config.h | 9 ++-- .../projects/l0/potentiometer/node_config.h | 9 ++-- .../projects/l0/power_switch/node_config.h | 11 ++-- examples/projects/l0/servo/node_config.h | 9 ++-- examples/projects/l0/stepper/node_config.h | 11 ++-- examples/projects/native/button/node_config.h | 8 +-- .../projects/native/gate_wscom/node_config.h | 12 ++--- examples/projects/native/led/node_config.h | 8 +-- .../projects/native/ping_pong/node_config.h | 16 +++--- test/_resources/node_config.h | 6 +-- test/tests_core/test_pub_sub/main.c | 30 +++++------ test/tests_io/test_filter/main.c | 54 +++++++++---------- 114 files changed, 639 insertions(+), 546 deletions(-) diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index 50bafcbee..db34aaf6a 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -67,8 +67,8 @@ void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) // Shift byte byte Mask of bit address LUOS_ASSERT((service_id > 0) - && (service_id <= 4096 - MAX_SERVICE_NUMBER) - && (service_number <= MAX_SERVICE_NUMBER)); + && (service_id <= 4096 - MAX_LOCAL_SERVICE_NUMBER) + && (service_number <= MAX_LOCAL_SERVICE_NUMBER)); Filter_IdInit(); uint16_t tempo = 0; filter_ctx.IDShiftMask = (service_id - 1) / 8; // aligned to byte @@ -88,7 +88,7 @@ void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) ******************************************************************************/ void Filter_AddTopic(uint16_t topic_id) { - LUOS_ASSERT(topic_id < LAST_TOPIC); + LUOS_ASSERT(topic_id < MAX_LOCAL_TOPIC_NUMBER); // Add 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] |= 1 << (topic_id - ((int)(topic_id / 8)) * 8); } @@ -100,7 +100,7 @@ void Filter_AddTopic(uint16_t topic_id) ******************************************************************************/ void Filter_RmTopic(uint16_t topic_id) { - LUOS_ASSERT(topic_id < LAST_TOPIC); + LUOS_ASSERT(topic_id < MAX_LOCAL_TOPIC_NUMBER); // Remove 1 to the bit corresponding to the topic in multicast mask filter_ctx.TopicMask[(topic_id / 8)] &= ~(1 << (topic_id - ((int)(topic_id / 8)) * 8)); } @@ -116,7 +116,7 @@ _CRITICAL bool Filter_ServiceID(uint16_t service_id) //--------------------------->|__________| // Shift byte byte Mask of bit address // In an node, service ID are consecutive - // MaskID is byte field wich have the size of MAX_SERVICE_NUMBER + // MaskID is byte field wich have the size of MAX_LOCAL_SERVICE_NUMBER // Shift depend od ID of first service in Node (shift = NodeID/8) LUOS_ASSERT(service_id <= 4096); uint16_t compare = 0; @@ -144,7 +144,7 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) { uint8_t compare = 0; // Make sure there is a topic that can be received by the node - if (topic_id < LAST_TOPIC) + if (topic_id < MAX_LOCAL_TOPIC_NUMBER) { compare = topic_id - ((topic_id / 8) * 8); // Search if topic exists in mask diff --git a/engine/core/inc/service.h b/engine/core/inc/service.h index 423a9aa1a..c390e37a9 100644 --- a/engine/core/inc/service.h +++ b/engine/core/inc/service.h @@ -13,16 +13,16 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#if (MAX_SERVICE_NUMBER <= 8) +#if (MAX_LOCAL_SERVICE_NUMBER <= 8) typedef uint8_t service_filter_t; -#elif (MAX_SERVICE_NUMBER <= 16) +#elif (MAX_LOCAL_SERVICE_NUMBER <= 16) typedef uint16_t service_filter_t; -#elif (MAX_SERVICE_NUMBER <= 32) +#elif (MAX_LOCAL_SERVICE_NUMBER <= 32) typedef uint32_t service_filter_t; -#elif (MAX_SERVICE_NUMBER <= 64) +#elif (MAX_LOCAL_SERVICE_NUMBER <= 64) typedef uint64_t service_filter_t; #else - #error "MAX_SERVICE_NUMBER is too high" + #error "MAX_LOCAL_SERVICE_NUMBER is too high" #endif /******************************************************************************* diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 76a17eb98..320f91c6c 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -212,7 +212,7 @@ typedef struct service_t // Private Variables uint16_t last_topic_position; /*!< Position pointer of the last topic added. */ - uint16_t topic_list[LAST_TOPIC]; /*!< multicast target bank. */ + uint16_t topic_list[MAX_LOCAL_TOPIC_NUMBER]; /*!< multicast target bank. */ timed_update_t auto_refresh; /*!< service auto refresh context. */ void *profile_context; /*!< Pointer to the profile context. */ diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 4e67499f3..70bdc92fc 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -19,7 +19,7 @@ * Variables ******************************************************************************/ const revision_t luos_version = {.major = 3, .minor = 0, .build = 0}; -package_t package_table[MAX_SERVICE_NUMBER]; +package_t package_table[MAX_LOCAL_SERVICE_NUMBER]; uint16_t package_number = 0; /******************************************************************************* @@ -347,8 +347,8 @@ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data) { // Manage buffer session (one per service) - static uint32_t data_size[MAX_SERVICE_NUMBER] = {0}; - static uint32_t total_data_size[MAX_SERVICE_NUMBER] = {0}; + static uint32_t data_size[MAX_LOCAL_SERVICE_NUMBER] = {0}; + static uint32_t total_data_size[MAX_LOCAL_SERVICE_NUMBER] = {0}; static uint16_t last_msg_size = 0; // When this function receive a data from a NULL service it is an error and we should reinit the reception state diff --git a/engine/core/src/profile_core.c b/engine/core/src/profile_core.c index 4adbd4d51..bc51c465d 100644 --- a/engine/core/src/profile_core.c +++ b/engine/core/src/profile_core.c @@ -8,7 +8,7 @@ #include "profile_core.h" // static initialization of profile table -profile_core_t profile_table[MAX_PROFILE_NUMBER]; +profile_core_t profile_table[MAX_LOCAL_PROFILE_NUMBER]; uint16_t available_index = 0; uint16_t head_profile_index = 0; @@ -39,7 +39,7 @@ profile_core_t *ProfileCore_GetNew(bool profile_mode) head_profile_index = available_index; // update available profile index - LUOS_ASSERT(available_index <= (MAX_PROFILE_NUMBER - 1)); + LUOS_ASSERT(available_index <= (MAX_LOCAL_PROFILE_NUMBER - 1)); available_index += 1; new_profile = &profile_table[available_index - 1]; diff --git a/engine/core/src/pub_sub.c b/engine/core/src/pub_sub.c index ebbe41f1f..d034a2c76 100644 --- a/engine/core/src/pub_sub.c +++ b/engine/core/src/pub_sub.c @@ -30,7 +30,7 @@ ******************************************************************************/ uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id) { - LUOS_ASSERT((topic_id < LAST_TOPIC) + LUOS_ASSERT((topic_id < MAX_LOCAL_TOPIC_NUMBER) && (service != NULL)); unsigned char i; for (i = 0; i < service->last_topic_position; i++) @@ -50,14 +50,14 @@ uint8_t PubSub_IsTopicSubscribed(service_t *service, uint16_t topic_id) error_return_t Luos_Subscribe(service_t *service, uint16_t topic) { // Assert if we add a topic that is greater than the max topic value - LUOS_ASSERT((topic < LAST_TOPIC) + LUOS_ASSERT((topic < MAX_LOCAL_TOPIC_NUMBER) && (service != 0)); // Put this topic in the multicast bank Filter_AddTopic(topic); // Check if target exists or if we reached the maximum topics number - if ((PubSub_IsTopicSubscribed(service, topic) == false) && (service->last_topic_position < LAST_TOPIC)) + if ((PubSub_IsTopicSubscribed(service, topic) == false) && (service->last_topic_position < MAX_LOCAL_TOPIC_NUMBER)) { service->topic_list[service->last_topic_position] = topic; service->last_topic_position++; @@ -74,7 +74,7 @@ error_return_t Luos_Subscribe(service_t *service, uint16_t topic) ******************************************************************************/ error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic) { - LUOS_ASSERT((topic < LAST_TOPIC) + LUOS_ASSERT((topic < MAX_LOCAL_TOPIC_NUMBER) && (service != 0)); error_return_t err = FAILED; diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index f07433caf..8b4646623 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -186,14 +186,14 @@ static void RoutingTB_AddNumToAlias(char *alias, uint8_t num) if (num > 99) // only 2 digit are alowed when add alias number { // This is probably a mistake, put an error into the alias - memset(alias, 0, ALIAS_SIZE); + memset(alias, 0, MAX_ALIAS_SIZE - 1); memcpy(alias, "error", strlen("error")); return; } // Change size to fit into 15 characters - if (strlen(alias) > (ALIAS_SIZE - intsize)) + if (strlen(alias) > (MAX_ALIAS_SIZE - 1 - intsize)) { - alias[(ALIAS_SIZE - intsize)] = '\0'; + alias[(MAX_ALIAS_SIZE - 1 - intsize)] = '\0'; } else { diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 16ec1a777..6496d3d35 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -18,7 +18,7 @@ ******************************************************************************/ typedef struct { - service_t list[MAX_SERVICE_NUMBER]; + service_t list[MAX_LOCAL_SERVICE_NUMBER]; uint16_t number; } service_ctx_t; @@ -369,7 +369,7 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a service->statistics.max_retry = 0; // Clear topic number service->last_topic_position = 0; - for (uint16_t i = 0; i < LAST_TOPIC; i++) + for (uint16_t i = 0; i < MAX_LOCAL_TOPIC_NUMBER; i++) { service->topic_list[i] = 0; } @@ -400,7 +400,7 @@ service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *a } service_ctx.number++; - LUOS_ASSERT(service_ctx.number <= MAX_SERVICE_NUMBER); + LUOS_ASSERT(service_ctx.number <= MAX_LOCAL_SERVICE_NUMBER); return service; } @@ -470,5 +470,5 @@ void Luos_ServicesClear(void) service_ctx.number = 0; // Clear service table - memset((void *)service_ctx.list, 0, sizeof(service_t) * MAX_SERVICE_NUMBER); + memset((void *)service_ctx.list, 0, sizeof(service_t) * MAX_LOCAL_SERVICE_NUMBER); } diff --git a/engine/engine_config.h b/engine/engine_config.h index 2c0b791cb..3127461e9 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -10,51 +10,53 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command -#define ALIAS_SIZE 15 // Number of max char for service alias -#define MAX_ALIAS_SIZE 16 -#define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection -#define BOOT_TIMEOUT 1000 -#define DEFAULTID 0x00 -#define PROTOCOL_REVISION 0 -#define BROADCAST_VAL 0x0FFF +#define LUOS_LAST_RESERVED_CMD 42 // Last Luos reserved command +#define MAX_ALIAS_SIZE 16 // Number of max char for service alias +#define DETECTION_TIMEOUT_MS 10000 // Timeout used to detect a failed detection +#define DEFAULTID 0x00 // The default ID of a Luos service +#define PROTOCOL_REVISION 0 // The Luos protocol revision +#define BROADCAST_VAL 0x0FFF // The broadcast target value +#define MAX_DATA_MSG_SIZE 128 // The maximum size of a data message -#define MAX_DATA_MSG_SIZE 128 +#ifndef MAX_LOCAL_SERVICE_NUMBER + #define MAX_LOCAL_SERVICE_NUMBER 5 // The maximum number of local services +#endif #ifndef MAX_SERVICE_NUMBER - #define MAX_SERVICE_NUMBER 5 + #define MAX_SERVICE_NUMBER 20 // The maximum number of services in the complete architecture #endif #ifndef MAX_NODE_NUMBER - #define MAX_NODE_NUMBER 20 + #define MAX_NODE_NUMBER 20 // The maximum number of nodes in the complete architecture #endif -#ifndef MAX_RTB_ENTRY - #define MAX_RTB_ENTRY 40 +#ifdef MAX_RTB_ENTRY + #error 'MAX_RTB_ENTRY' configuration is deprecated and have been replaced by MAX_NODE_NUMBER and MAX_SERVICE_NUMBER. MAX_RTB_ENTRY is now automatically calculated by the engine based on these values. #endif +#define MAX_RTB_ENTRY (MAX_NODE_NUMBER + MAX_SERVICE_NUMBER) #ifdef MAX_CONTAINER_NUMBER - #error 'MAX_CONTAINER_NUMBER' is deprecated since luos_engine@2.0.0, replace it by 'MAX_SERVICE_NUMBER', see: www.github.com/Luos-io/luos_engine/releases/tag/2.0.0 for more information. + #error 'MAX_CONTAINER_NUMBER' is deprecated since luos_engine@2.0.0, replace it by 'MAX_LOCAL_SERVICE_NUMBER', see: www.github.com/Luos-io/luos_engine/releases/tag/2.0.0 for more information. #endif -#ifndef MAX_PROFILE_NUMBER - #define MAX_PROFILE_NUMBER MAX_SERVICE_NUMBER +#ifndef MAX_LOCAL_PROFILE_NUMBER + #define MAX_LOCAL_PROFILE_NUMBER MAX_LOCAL_SERVICE_NUMBER // The maximum number of profile in the node #endif #ifndef MSG_BUFFER_SIZE - #define MSG_BUFFER_SIZE 3 * sizeof(msg_t) + #define MSG_BUFFER_SIZE 3 * sizeof(msg_t) // The size of the message buffer #endif #ifndef MAX_MSG_NB - #define MAX_MSG_NB 2 * MAX_SERVICE_NUMBER + #define MAX_MSG_NB 2 * MAX_LOCAL_SERVICE_NUMBER // The maximum number of message referenced by Luos #endif -#ifndef LAST_TOPIC - #define LAST_TOPIC 20 +#ifndef MAX_LOCAL_TOPIC_NUMBER + #define MAX_LOCAL_TOPIC_NUMBER 20 // The maximum number of topic in the node #endif // Tab of byte. + 2 for overlap ID because aligned to byte -#define ID_MASK_SIZE ((MAX_SERVICE_NUMBER / 8) + 2) -#define TOPIC_MASK_SIZE ((LAST_TOPIC / 8) + 2) +#define ID_MASK_SIZE ((MAX_LOCAL_SERVICE_NUMBER / 8) + 2) +#define TOPIC_MASK_SIZE ((MAX_LOCAL_TOPIC_NUMBER / 8) + 2) #endif /* _ENGINE_CONFIG_H_ */ diff --git a/examples/projects/Arduino/bldc_simple_foc/node_config.h b/examples/projects/Arduino/bldc_simple_foc/node_config.h index 6e43f2e33..42aebae5b 100644 --- a/examples/projects/Arduino/bldc_simple_foc/node_config.h +++ b/examples/projects/Arduino/bldc_simple_foc/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define ARDUINO_PTPA_PIN 19 diff --git a/examples/projects/Arduino/button/node_config.h b/examples/projects/Arduino/button/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/Arduino/button/node_config.h +++ b/examples/projects/Arduino/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/Arduino/fingerprint/node_config.h b/examples/projects/Arduino/fingerprint/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/Arduino/fingerprint/node_config.h +++ b/examples/projects/Arduino/fingerprint/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/Arduino/gate_serialcom/node_config.h b/examples/projects/Arduino/gate_serialcom/node_config.h index b2fd0f8f2..afef8d159 100644 --- a/examples/projects/Arduino/gate_serialcom/node_config.h +++ b/examples/projects/Arduino/gate_serialcom/node_config.h @@ -37,18 +37,19 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 1024 -#define MAX_MSG_NB 30 +#define MAX_LOCAL_SERVICE_NUMBER 2 +#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -93,13 +94,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/Arduino/inspector_serialcom/node_config.h b/examples/projects/Arduino/inspector_serialcom/node_config.h index 8f21d5357..0eba5c73a 100644 --- a/examples/projects/Arduino/inspector_serialcom/node_config.h +++ b/examples/projects/Arduino/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 1024 #define MAX_MSG_NB 30 //#define NODETECTION @@ -94,13 +95,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/Arduino/lcd/node_config.h b/examples/projects/Arduino/lcd/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/Arduino/lcd/node_config.h +++ b/examples/projects/Arduino/lcd/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/Arduino/led/node_config.h b/examples/projects/Arduino/led/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/Arduino/led/node_config.h +++ b/examples/projects/Arduino/led/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/Arduino/servo_motor/node_config.h b/examples/projects/Arduino/servo_motor/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/Arduino/servo_motor/node_config.h +++ b/examples/projects/Arduino/servo_motor/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/Arduino/stepper_simple_foc/node_config.h b/examples/projects/Arduino/stepper_simple_foc/node_config.h index 3bbad9405..a8cc0fee0 100644 --- a/examples/projects/Arduino/stepper_simple_foc/node_config.h +++ b/examples/projects/Arduino/stepper_simple_foc/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define ARDUINO_PTPA_PIN 19 diff --git a/examples/projects/ESP32/button/node_config.h b/examples/projects/ESP32/button/node_config.h index c943cc773..0cc8afa85 100644 --- a/examples/projects/ESP32/button/node_config.h +++ b/examples/projects/ESP32/button/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -98,7 +98,8 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size diff --git a/examples/projects/ESP32/button_arduino/node_config.h b/examples/projects/ESP32/button_arduino/node_config.h index c943cc773..0cc8afa85 100644 --- a/examples/projects/ESP32/button_arduino/node_config.h +++ b/examples/projects/ESP32/button_arduino/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -98,7 +98,8 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size diff --git a/examples/projects/ESP32/gate_serialcom/node_config.h b/examples/projects/ESP32/gate_serialcom/node_config.h index dd56027d0..ca1360ea5 100644 --- a/examples/projects/ESP32/gate_serialcom/node_config.h +++ b/examples/projects/ESP32/gate_serialcom/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -99,13 +99,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 2048 #define PIPE_RX_BUFFER_SIZE 2048 #define PIPE_TX_BUFFER_SIZE 4096 diff --git a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h index c0fb39334..4bddb2297 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -99,13 +99,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 2048 #define PIPE_RX_BUFFER_SIZE 2048 #define PIPE_TX_BUFFER_SIZE 4096 diff --git a/examples/projects/ESP32/gate_wscom/node_config.h b/examples/projects/ESP32/gate_wscom/node_config.h index 438723a60..66d17c0eb 100644 --- a/examples/projects/ESP32/gate_wscom/node_config.h +++ b/examples/projects/ESP32/gate_wscom/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -98,13 +98,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 2048 diff --git a/examples/projects/ESP32/gate_wscom_arduino/node_config.h b/examples/projects/ESP32/gate_wscom_arduino/node_config.h index c86f144f4..b17b8b8ed 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_wscom_arduino/node_config.h @@ -37,15 +37,15 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 20 #define MSG_BUFFER_SIZE 1024 #define DEFAULTBAUDRATE 500000 @@ -100,13 +100,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 2048 #define PIPE_RX_BUFFER_SIZE 2048 #define PIPE_TX_BUFFER_SIZE 4096 diff --git a/examples/projects/ESP32/led/node_config.h b/examples/projects/ESP32/led/node_config.h index c943cc773..0cc8afa85 100644 --- a/examples/projects/ESP32/led/node_config.h +++ b/examples/projects/ESP32/led/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ @@ -98,7 +98,8 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size diff --git a/examples/projects/NUCLEO-F072RB/barometer/node_config.h b/examples/projects/NUCLEO-F072RB/barometer/node_config.h index 2fc863673..3afe576e5 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/barometer/node_config.h @@ -37,10 +37,10 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h index 0d73ae7aa..d2b89921b 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F072RB/button/node_config.h b/examples/projects/NUCLEO-F072RB/button/node_config.h index a191b492d..65e537ff3 100644 --- a/examples/projects/NUCLEO-F072RB/button/node_config.h +++ b/examples/projects/NUCLEO-F072RB/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h index e005456e0..cdb64ba3e 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h index f6e95bcd2..fe9254f27 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h @@ -37,15 +37,15 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -99,13 +99,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h index 9d0e413fa..6fd9a9666 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h index 230da0845..247bb6179 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F401RE/button/node_config.h b/examples/projects/NUCLEO-F401RE/button/node_config.h index 2f61b7924..0642f73db 100644 --- a/examples/projects/NUCLEO-F401RE/button/node_config.h +++ b/examples/projects/NUCLEO-F401RE/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h index 997e5d960..992ebdf6d 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h index 30971136d..e4313a688 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -129,13 +130,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h index c155b6677..b6f574d4f 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -128,13 +129,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-F401RE/led/node_config.h b/examples/projects/NUCLEO-F401RE/led/node_config.h index 2f61b7924..0642f73db 100644 --- a/examples/projects/NUCLEO-F401RE/led/node_config.h +++ b/examples/projects/NUCLEO-F401RE/led/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h index b8b47bc7f..acb38ebe4 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h index d764c20cf..82f8b41bf 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 10 #define MAX_BUFFER_SIZE 512 diff --git a/examples/projects/NUCLEO-F410RB/button/node_config.h b/examples/projects/NUCLEO-F410RB/button/node_config.h index 9d5ee10ae..ee5ae8c4f 100644 --- a/examples/projects/NUCLEO-F410RB/button/node_config.h +++ b/examples/projects/NUCLEO-F410RB/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h index 997e5d960..992ebdf6d 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h index 70a84c3d8..319e114f4 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -128,13 +129,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h index 560662e5b..52b6a3e4e 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION @@ -129,13 +130,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-F410RB/led/node_config.h b/examples/projects/NUCLEO-F410RB/led/node_config.h index 00cc3c093..ed05a94eb 100644 --- a/examples/projects/NUCLEO-F410RB/led/node_config.h +++ b/examples/projects/NUCLEO-F410RB/led/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h index b8b47bc7f..acb38ebe4 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h index 28fbda3ff..9f5087f4b 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G431KB/button/node_config.h b/examples/projects/NUCLEO-G431KB/button/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-G431KB/button/node_config.h +++ b/examples/projects/NUCLEO-G431KB/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h index 1900fb99e..66a880967 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h index 83173ee64..c3b26eaab 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -100,13 +101,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h index 50c7c3240..67894ac88 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION @@ -101,13 +102,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h index 1900fb99e..66a880967 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h index 28fbda3ff..9f5087f4b 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G474RE/button/node_config.h b/examples/projects/NUCLEO-G474RE/button/node_config.h index 0603cb86e..7492a3cdc 100644 --- a/examples/projects/NUCLEO-G474RE/button/node_config.h +++ b/examples/projects/NUCLEO-G474RE/button/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h index 83173ee64..c3b26eaab 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -100,13 +101,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h index 50c7c3240..67894ac88 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION @@ -101,13 +102,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index 0e7056282..c78e5d531 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -38,11 +38,12 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index 2c230b3e1..34b869ac6 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -38,17 +38,18 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define DEFAULTBAUDRATE 500000 -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h index 96b0111e3..379489262 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define DEFAULTBAUDRATE 500000 -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -108,13 +109,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h index bbf53e225..dc3397a15 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/NUCLEO-L432KC/button/node_config.h b/examples/projects/NUCLEO-L432KC/button/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/button/node_config.h +++ b/examples/projects/NUCLEO-L432KC/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h index 83173ee64..c3b26eaab 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -100,13 +101,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-L432KC/gpio/node_config.h b/examples/projects/NUCLEO-L432KC/gpio/node_config.h index 22f3dad59..9591f5bfc 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gpio/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 10 +#define MAX_LOCAL_SERVICE_NUMBER 10 #define MSG_BUFFER_SIZE 512 #define MAX_MSG_NB 30 diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h index 50c7c3240..67894ac88 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION @@ -101,13 +102,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/NUCLEO-L432KC/lcd/node_config.h b/examples/projects/NUCLEO-L432KC/lcd/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/node_config.h +++ b/examples/projects/NUCLEO-L432KC/lcd/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/led/node_config.h b/examples/projects/NUCLEO-L432KC/led/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/led/node_config.h +++ b/examples/projects/NUCLEO-L432KC/led/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/servo/node_config.h b/examples/projects/NUCLEO-L432KC/servo/node_config.h index 53251109f..e5b8fbb94 100644 --- a/examples/projects/NUCLEO-L432KC/servo/node_config.h +++ b/examples/projects/NUCLEO-L432KC/servo/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/SAMD21XPLAINED/button/node_config.h b/examples/projects/SAMD21XPLAINED/button/node_config.h index 056ce9509..82621f87b 100644 --- a/examples/projects/SAMD21XPLAINED/button/node_config.h +++ b/examples/projects/SAMD21XPLAINED/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/STM32F4-discovery/bootloader/node_config.h b/examples/projects/STM32F4-discovery/bootloader/node_config.h index f6a8050cf..8a12a52ed 100644 --- a/examples/projects/STM32F4-discovery/bootloader/node_config.h +++ b/examples/projects/STM32F4-discovery/bootloader/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 10 #define MAX_BUFFER_SIZE 1024 diff --git a/examples/projects/STM32F4-discovery/button/node_config.h b/examples/projects/STM32F4-discovery/button/node_config.h index 20edd3990..75ec245b5 100644 --- a/examples/projects/STM32F4-discovery/button/node_config.h +++ b/examples/projects/STM32F4-discovery/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h index b33ba6c90..ed5848b56 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -103,13 +104,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h index d4ccaa925..74d43887f 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION @@ -104,13 +105,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h index 2d7560a79..3994ace3a 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h +++ b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/STM32L4S5_discovery/button/node_config.h b/examples/projects/STM32L4S5_discovery/button/node_config.h index aa20ab42f..d0e9dd6c6 100644 --- a/examples/projects/STM32L4S5_discovery/button/node_config.h +++ b/examples/projects/STM32L4S5_discovery/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h index bc9e029c7..3ed90f79d 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 @@ -171,13 +172,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 2048 diff --git a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h index 596ffe4c5..62806095a 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/l0/bike_alarm/start_controller/node_config.h b/examples/projects/l0/bike_alarm/start_controller/node_config.h index d0bdfb1bb..40e8116a8 100644 --- a/examples/projects/l0/bike_alarm/start_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/start_controller/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/l0/bootloader/node_config.h b/examples/projects/l0/bootloader/node_config.h index 5c42741a9..93e49a820 100644 --- a/examples/projects/l0/bootloader/node_config.h +++ b/examples/projects/l0/bootloader/node_config.h @@ -37,18 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 20 -#define MAX_RTB_ENTRY 80 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index a191b492d..65e537ff3 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/button_freertos/node_config.h b/examples/projects/l0/button_freertos/node_config.h index a191b492d..327eaf5e6 100644 --- a/examples/projects/l0/button_freertos/node_config.h +++ b/examples/projects/l0/button_freertos/node_config.h @@ -37,17 +37,18 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/controller_motor/node_config.h b/examples/projects/l0/controller_motor/node_config.h index bd2f26522..b960b0213 100644 --- a/examples/projects/l0/controller_motor/node_config.h +++ b/examples/projects/l0/controller_motor/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 2 #define MAX_MSG_NB 30 #define MSG_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/dc_motor/node_config.h b/examples/projects/l0/dc_motor/node_config.h index e005456e0..cdb64ba3e 100644 --- a/examples/projects/l0/dc_motor/node_config.h +++ b/examples/projects/l0/dc_motor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 5 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/l0/demo/detection_button/node_config.h b/examples/projects/l0/demo/detection_button/node_config.h index 2822eb9c3..bf59ddef9 100644 --- a/examples/projects/l0/demo/detection_button/node_config.h +++ b/examples/projects/l0/demo/detection_button/node_config.h @@ -37,11 +37,12 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ diff --git a/examples/projects/l0/demo/ledstrip_position/node_config.h b/examples/projects/l0/demo/ledstrip_position/node_config.h index ac78e0ec8..28ff8ae4a 100644 --- a/examples/projects/l0/demo/ledstrip_position/node_config.h +++ b/examples/projects/l0/demo/ledstrip_position/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 30 #define MAX_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/demo/motor_copy_app/node_config.h b/examples/projects/l0/demo/motor_copy_app/node_config.h index df7ef7d8c..40fe8ad1a 100644 --- a/examples/projects/l0/demo/motor_copy_app/node_config.h +++ b/examples/projects/l0/demo/motor_copy_app/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 5 -#define MAX_PROFILE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 5 +#define MAX_LOCAL_PROFILE_NUMBER 2 #define MAX_MSG_NB 30 #define MSG_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/demo/motor_demo_app/node_config.h b/examples/projects/l0/demo/motor_demo_app/node_config.h index df7ef7d8c..40fe8ad1a 100644 --- a/examples/projects/l0/demo/motor_demo_app/node_config.h +++ b/examples/projects/l0/demo/motor_demo_app/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 5 -#define MAX_PROFILE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 5 +#define MAX_LOCAL_PROFILE_NUMBER 2 #define MAX_MSG_NB 30 #define MSG_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/distance/node_config.h b/examples/projects/l0/distance/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/distance/node_config.h +++ b/examples/projects/l0/distance/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 3c4741a70..543c472ae 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -28,7 +28,7 @@ typedef struct unsigned char id; } dxl_t; -dxl_t dxl[MAX_SERVICE_NUMBER]; +dxl_t dxl[MAX_LOCAL_SERVICE_NUMBER]; volatile float trajectory_buf[BUFFER_SIZE]; volatile float measurement_buf[BUFFER_SIZE]; @@ -60,8 +60,8 @@ void Dxl_Init(void) void Dxl_Loop(void) { static int index = 0; - static uint32_t last_temp[MAX_SERVICE_NUMBER] = {0}; - static uint32_t last_sample[MAX_SERVICE_NUMBER] = {0}; + static uint32_t last_temp[MAX_LOCAL_SERVICE_NUMBER] = {0}; + static uint32_t last_sample[MAX_LOCAL_SERVICE_NUMBER] = {0}; // check motor values one by one // Get motor info if (dxl[index].id == 0) @@ -411,8 +411,8 @@ static void discover_dxl(void) // Clear service table Luos_ServicesClear(); // Clear local tables - memset((void *)dxl, 0, sizeof(dxl_t) * MAX_SERVICE_NUMBER); - for (dxl_id = 0; dxl_id < MAX_SERVICE_NUMBER; dxl_id++) + memset((void *)dxl, 0, sizeof(dxl_t) * MAX_LOCAL_SERVICE_NUMBER); + for (dxl_id = 0; dxl_id < MAX_LOCAL_SERVICE_NUMBER; dxl_id++) { memset(&dxl[dxl_id].dxl_motor, 0, sizeof(profile_servo_motor_t)); } @@ -493,7 +493,7 @@ static int find_id(service_t *service) { profile_core_t *profile = (profile_core_t *)service->profile_context; int i = 0; - for (i = 0; i <= MAX_SERVICE_NUMBER; i++) + for (i = 0; i <= MAX_LOCAL_SERVICE_NUMBER; i++) { if ((uint32_t)profile->profile_data == (uint32_t)&dxl[i].dxl_motor) return i; diff --git a/examples/projects/l0/dxl/node_config.h b/examples/projects/l0/dxl/node_config.h index e7c266871..826cf8105 100644 --- a/examples/projects/l0/dxl/node_config.h +++ b/examples/projects/l0/dxl/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 10 -#define MAX_PROFILE_NUMBER 20 +#define MAX_LOCAL_SERVICE_NUMBER 10 +#define MAX_LOCAL_PROFILE_NUMBER 20 #define MAX_MSG_NB 30 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/l0/fingerprint/node_config.h b/examples/projects/l0/fingerprint/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/fingerprint/node_config.h +++ b/examples/projects/l0/fingerprint/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index ab8acc44f..aad78e990 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 1024 #define MAX_MSG_NB 40 /******************************************************************************* @@ -99,13 +100,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 1024 #define PIPE_TX_BUFFER_SIZE 1024 #define PIPE_RX_BUFFER_SIZE 2048 diff --git a/examples/projects/l0/gpio/node_config.h b/examples/projects/l0/gpio/node_config.h index c4c0396e1..7fe7991c3 100644 --- a/examples/projects/l0/gpio/node_config.h +++ b/examples/projects/l0/gpio/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 9 -#define MAX_PROFILE_NUMBER 9 +#define MAX_LOCAL_SERVICE_NUMBER 9 +#define MAX_LOCAL_PROFILE_NUMBER 9 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/l0/imu/node_config.h b/examples/projects/l0/imu/node_config.h index c042ad0c3..202c62497 100644 --- a/examples/projects/l0/imu/node_config.h +++ b/examples/projects/l0/imu/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/inspector_serialcom/node_config.h b/examples/projects/l0/inspector_serialcom/node_config.h index 9d0e413fa..6fd9a9666 100644 --- a/examples/projects/l0/inspector_serialcom/node_config.h +++ b/examples/projects/l0/inspector_serialcom/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 +#define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 #define NODETECTION diff --git a/examples/projects/l0/lcd/node_config.h b/examples/projects/l0/lcd/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/lcd/node_config.h +++ b/examples/projects/l0/lcd/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/led/node_config.h b/examples/projects/l0/led/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/led/node_config.h +++ b/examples/projects/l0/led/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/led_fader/node_config.h b/examples/projects/l0/led_fader/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/led_fader/node_config.h +++ b/examples/projects/l0/led_fader/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/led_strip/node_config.h b/examples/projects/l0/led_strip/node_config.h index 06230d3e5..4c7d98934 100644 --- a/examples/projects/l0/led_strip/node_config.h +++ b/examples/projects/l0/led_strip/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 30 #define MAX_BUFFER_SIZE 1024 diff --git a/examples/projects/l0/light_sensor/node_config.h b/examples/projects/l0/light_sensor/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/light_sensor/node_config.h +++ b/examples/projects/l0/light_sensor/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/load/node_config.h b/examples/projects/l0/load/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/load/node_config.h +++ b/examples/projects/l0/load/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/potentiometer/node_config.h b/examples/projects/l0/potentiometer/node_config.h index 0e964aac5..45b5aa221 100644 --- a/examples/projects/l0/potentiometer/node_config.h +++ b/examples/projects/l0/potentiometer/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/power_switch/node_config.h b/examples/projects/l0/power_switch/node_config.h index a191b492d..65e537ff3 100644 --- a/examples/projects/l0/power_switch/node_config.h +++ b/examples/projects/l0/power_switch/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/l0/servo/node_config.h b/examples/projects/l0/servo/node_config.h index 7a554101a..24a31ae48 100644 --- a/examples/projects/l0/servo/node_config.h +++ b/examples/projects/l0/servo/node_config.h @@ -37,15 +37,16 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 4 +#define MAX_LOCAL_SERVICE_NUMBER 4 #define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 512 diff --git a/examples/projects/l0/stepper/node_config.h b/examples/projects/l0/stepper/node_config.h index a191b492d..65e537ff3 100644 --- a/examples/projects/l0/stepper/node_config.h +++ b/examples/projects/l0/stepper/node_config.h @@ -37,16 +37,17 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer - * MAX_RTB_ENTRY | 40 | Max entries in the routing table + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/native/button/node_config.h b/examples/projects/native/button/node_config.h index bf418c0b4..084b12960 100644 --- a/examples/projects/native/button/node_config.h +++ b/examples/projects/native/button/node_config.h @@ -37,15 +37,15 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index cc9e21a84..46aa0f3b7 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -39,15 +39,15 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 2 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 2 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 200 /******************************************************************************* @@ -100,13 +100,13 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define MAX_RTB_ENTRY 40 #define GATE_BUFF_SIZE 65000 #define PIPE_RX_BUFFER_SIZE 65000 #define PIPE_TX_BUFFER_SIZE 65000 diff --git a/examples/projects/native/led/node_config.h b/examples/projects/native/led/node_config.h index bf418c0b4..084b12960 100644 --- a/examples/projects/native/led/node_config.h +++ b/examples/projects/native/led/node_config.h @@ -37,15 +37,15 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 /******************************************************************************* diff --git a/examples/projects/native/ping_pong/node_config.h b/examples/projects/native/ping_pong/node_config.h index f1cdf8ff6..97912b290 100644 --- a/examples/projects/native/ping_pong/node_config.h +++ b/examples/projects/native/ping_pong/node_config.h @@ -37,17 +37,19 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 1 -#define MAX_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 -#define MAX_RTB_ENTRY 100 +#define MAX_LOCAL_SERVICE_NUMBER 1 +#define MAX_LOCAL_PROFILE_NUMBER 1 +#define MAX_MSG_NB 5 +#define MAX_NODE_NB 50 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/test/_resources/node_config.h b/test/_resources/node_config.h index 3573b6828..c82573e2d 100644 --- a/test/_resources/node_config.h +++ b/test/_resources/node_config.h @@ -32,14 +32,14 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * MAX_SERVICE_NUMBER | 5 | Service number in the node + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_SERVICE_NUMBER | Message number in Luos buffer + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_SERVICE_NUMBER 25 +#define MAX_LOCAL_SERVICE_NUMBER 25 #define MSG_BUFFER_SIZE 25 * sizeof(msg_t) #define MAX_MSG_NB 100 diff --git a/test/tests_core/test_pub_sub/main.c b/test/tests_core/test_pub_sub/main.c index f0de19953..05cd88b37 100644 --- a/test/tests_core/test_pub_sub/main.c +++ b/test/tests_core/test_pub_sub/main.c @@ -22,7 +22,7 @@ void unittest_PubSub_IsTopicSubscribed(void) { // Init default scenario context Init_Context(); - PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC); + PubSub_IsTopicSubscribed(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -65,7 +65,7 @@ void unittest_Luos_Subscribe(void) { // Init default scenario context Init_Context(); - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); + Luos_Subscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -79,11 +79,11 @@ void unittest_Luos_Subscribe(void) TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 1)); TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, 2)); - TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1)); TEST_ASSERT_EQUAL(3, default_sc.App_1.app->last_topic_position); TEST_ASSERT_EQUAL(1, default_sc.App_1.app->topic_list[0]); TEST_ASSERT_EQUAL(2, default_sc.App_1.app->topic_list[1]); - TEST_ASSERT_EQUAL(LAST_TOPIC - 1, default_sc.App_1.app->topic_list[2]); + TEST_ASSERT_EQUAL(MAX_LOCAL_TOPIC_NUMBER - 1, default_sc.App_1.app->topic_list[2]); } CATCH { @@ -99,15 +99,15 @@ void unittest_Luos_Subscribe(void) // Init default scenario context Init_Context(); - for (uint8_t i = 0; i < LAST_TOPIC; i++) + for (uint8_t i = 0; i < MAX_LOCAL_TOPIC_NUMBER; i++) { TEST_ASSERT_EQUAL(SUCCEED, Luos_Subscribe(default_sc.App_1.app, i)); TEST_ASSERT_EQUAL(i + 1, default_sc.App_1.app->last_topic_position); } - TEST_ASSERT_EQUAL(LAST_TOPIC, default_sc.App_1.app->last_topic_position); + TEST_ASSERT_EQUAL(MAX_LOCAL_TOPIC_NUMBER, default_sc.App_1.app->last_topic_position); - TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, LAST_TOPIC - 1)); + TEST_ASSERT_TRUE(PubSub_IsTopicSubscribed(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -158,12 +158,12 @@ void unittest_Luos_Subscribe(void) RESET_ASSERT(); - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); + Luos_Subscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1); TEST_ASSERT_FALSE(IS_ASSERT()); TRY { - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC); + Luos_Subscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER); } TEST_ASSERT_TRUE(IS_ASSERT()); } @@ -275,11 +275,11 @@ void unittest_Luos_Unsubscribe(void) { // Init default scenario context Init_Context(); - Luos_Subscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); - Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); - error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, LAST_TOPIC - 1); + Luos_Subscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); + Luos_Unsubscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); + error_return_t err = Luos_Unsubscribe(default_sc.App_1.app, MAX_LOCAL_TOPIC_NUMBER - 1); TEST_ASSERT_EQUAL(err, FAILED); } CATCH @@ -430,7 +430,7 @@ void unittest_Luos_Unsubscribe(void) Init_Context(); Luos_Subscribe(default_sc.App_1.app, 2); - default_sc.App_1.app->last_topic_position = LAST_TOPIC; + default_sc.App_1.app->last_topic_position = MAX_LOCAL_TOPIC_NUMBER; TEST_ASSERT_EQUAL(SUCCEED, Luos_Unsubscribe(default_sc.App_1.app, 2)); TEST_ASSERT_EQUAL(FAILED, Luos_Unsubscribe(default_sc.App_1.app, 2)); } diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index c0f1522c0..a17091bd0 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -56,7 +56,7 @@ void unittest_Filter_ServiceId() } } - service_number = MAX_SERVICE_NUMBER; + service_number = MAX_LOCAL_SERVICE_NUMBER; NEW_TEST_CASE("Service ID mask test with max services"); { Filter_IdInit(); @@ -109,12 +109,12 @@ void unittest_Filter_ServiceId() } } - NEW_TEST_CASE("Overlap the MAX_SERVICE_NUMBER"); + NEW_TEST_CASE("Overlap the MAX_LOCAL_SERVICE_NUMBER"); { Filter_IdInit(); TRY { - Filter_AddServiceId(1, MAX_SERVICE_NUMBER + 1); + Filter_AddServiceId(1, MAX_LOCAL_SERVICE_NUMBER + 1); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -125,8 +125,8 @@ void unittest_Filter_ServiceId() Filter_IdInit(); TRY { - Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER, service_number); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_SERVICE_NUMBER)); + Filter_AddServiceId(4096 - MAX_LOCAL_SERVICE_NUMBER, service_number); + TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_LOCAL_SERVICE_NUMBER)); } CATCH { @@ -135,7 +135,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(4096 - MAX_SERVICE_NUMBER + 1, service_number); + Filter_AddServiceId(4096 - MAX_LOCAL_SERVICE_NUMBER + 1, service_number); } TEST_ASSERT_TRUE(IS_ASSERT()); @@ -166,8 +166,8 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + Filter_AddTopic(MAX_LOCAL_TOPIC_NUMBER - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -177,18 +177,18 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC)); + Filter_AddTopic(MAX_LOCAL_TOPIC_NUMBER); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER)); } TEST_ASSERT_TRUE(IS_ASSERT()); Filter_TopicInit(); TRY { - Filter_AddTopic(LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); - Filter_RmTopic(LAST_TOPIC - 1); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + Filter_AddTopic(MAX_LOCAL_TOPIC_NUMBER - 1); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); + Filter_RmTopic(MAX_LOCAL_TOPIC_NUMBER - 1); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -198,7 +198,7 @@ void unittest_Filter_Topic() Filter_TopicInit(); TRY { - Filter_RmTopic(LAST_TOPIC); + Filter_RmTopic(MAX_LOCAL_TOPIC_NUMBER); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -215,7 +215,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -230,7 +230,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -245,7 +245,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -254,13 +254,13 @@ void unittest_Filter_Topic() TRY { - Filter_AddTopic(LAST_TOPIC - 1); + Filter_AddTopic(MAX_LOCAL_TOPIC_NUMBER - 1); TEST_ASSERT_EQUAL(true, Filter_Topic(0)); TEST_ASSERT_EQUAL(true, Filter_Topic(1)); TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -275,7 +275,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -290,7 +290,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(true, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -305,7 +305,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -320,7 +320,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -335,7 +335,7 @@ void unittest_Filter_Topic() TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(true, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(true, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { @@ -344,13 +344,13 @@ void unittest_Filter_Topic() TRY { - Filter_RmTopic(LAST_TOPIC - 1); + Filter_RmTopic(MAX_LOCAL_TOPIC_NUMBER - 1); TEST_ASSERT_EQUAL(false, Filter_Topic(0)); TEST_ASSERT_EQUAL(false, Filter_Topic(1)); TEST_ASSERT_EQUAL(false, Filter_Topic(2)); TEST_ASSERT_EQUAL(false, Filter_Topic(3)); TEST_ASSERT_EQUAL(false, Filter_Topic(4)); - TEST_ASSERT_EQUAL(false, Filter_Topic(LAST_TOPIC - 1)); + TEST_ASSERT_EQUAL(false, Filter_Topic(MAX_LOCAL_TOPIC_NUMBER - 1)); } CATCH { From e74f10a4e2ddc2f763330766e699bcf6974e03cb Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 18 Jul 2023 17:52:50 +0200 Subject: [PATCH 110/198] Hide uselees routing function to users --- engine/IO/src/luos_io.c | 1 + engine/core/inc/_routing_table.h | 33 ++++++++++++++++++++ engine/core/inc/routing_table.h | 14 --------- engine/core/src/routing_table.c | 1 + test/_resources/Scenarios/default_scenario.c | 1 + 5 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 engine/core/inc/_routing_table.h diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 91608074a..f6bf1783e 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -13,6 +13,7 @@ #include "luos_utils.h" #include "luos_hal.h" #include "luos_engine.h" +#include "_routing_table.h" #include "_luos_phy.h" #include "stats.h" diff --git a/engine/core/inc/_routing_table.h b/engine/core/inc/_routing_table.h new file mode 100644 index 000000000..39d0d8c9c --- /dev/null +++ b/engine/core/inc/_routing_table.h @@ -0,0 +1,33 @@ +/****************************************************************************** + * @file routingTable + * @brief routing table description function + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef ROUTING_TABLE +#define ROUTING_TABLE + +#include "struct_luos.h" +#include "luos_list.h" +#include "node.h" +#include "routing_table.h" + +/******************************************************************************* + * Function + ******************************************************************************/ +// ********************* routing_table search tools ************************ +uint16_t RoutingTB_NodeIDFromID(uint16_t id); + +// ********************* routing_table management tools ************************ +void RoutingTB_ComputeRoutingTableEntryNB(void); +bool RoutingTB_DetectServices(service_t *service); +void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node); +void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service); +void RoutingTB_RemoveNode(uint16_t nodeid); +void RoutingTB_RemoveService(uint16_t id); +void RoutingTB_Erase(void); +routing_table_t *RoutingTB_Get(void); +uint16_t *RoutingTB_GetLastNode(void); +uint16_t RoutingTB_GetLastEntry(void); + +#endif /* ROUTING_TABLE */ diff --git a/engine/core/inc/routing_table.h b/engine/core/inc/routing_table.h index 1b0890497..952a3e43b 100644 --- a/engine/core/inc/routing_table.h +++ b/engine/core/inc/routing_table.h @@ -68,20 +68,6 @@ typedef struct /******************************************************************************* * Function ******************************************************************************/ -// ********************* routing_table search tools ************************ -uint16_t RoutingTB_NodeIDFromID(uint16_t id); - -// ********************* routing_table management tools ************************ -void RoutingTB_ComputeRoutingTableEntryNB(void); -bool RoutingTB_DetectServices(service_t *service); -void RoutingTB_ConvertNodeToRoutingTable(routing_table_t *entry, node_t *node); -void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *service); -void RoutingTB_RemoveNode(uint16_t nodeid); -void RoutingTB_RemoveService(uint16_t id); -void RoutingTB_Erase(void); -routing_table_t *RoutingTB_Get(void); -uint16_t *RoutingTB_GetLastNode(void); -uint16_t RoutingTB_GetLastEntry(void); // ********************* routing table filtering ******************************** error_return_t RTFilter_InitCheck(search_result_t *result); diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 8b4646623..be3e42636 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -9,6 +9,7 @@ #include #include #include "routing_table.h" +#include "_routing_table.h" #include "luos_hal.h" #include "luos_engine.h" #include "struct_engine.h" diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index 6eb0b3d44..ac5e0be21 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -6,6 +6,7 @@ ******************************************************************************/ #include #include "default_scenario.h" +#include "_routing_table.h" /******************************************************************************* * Variables From 80100f457a7c131460a8f457c702da1061ff6e16 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Jul 2023 11:53:16 +0200 Subject: [PATCH 111/198] Improve Robus configuration flags naming --- .../Arduino/bldc_simple_foc/node_config.h | 22 +-- .../projects/Arduino/button/node_config.h | 24 +-- .../Arduino/fingerprint/node_config.h | 24 +-- .../Arduino/gate_serialcom/node_config.h | 22 +-- .../Arduino/inspector_serialcom/node_config.h | 28 ++-- examples/projects/Arduino/lcd/node_config.h | 24 +-- examples/projects/Arduino/led/node_config.h | 22 +-- .../Arduino/servo_motor/node_config.h | 24 +-- .../Arduino/stepper_simple_foc/node_config.h | 32 ++-- examples/projects/ESP32/button/node_config.h | 22 +-- .../ESP32/button_arduino/node_config.h | 22 +-- .../ESP32/gate_serialcom/node_config.h | 22 +-- .../gate_serialcom_arduino/node_config.h | 22 +-- .../projects/ESP32/gate_wscom/node_config.h | 22 +-- .../ESP32/gate_wscom_arduino/node_config.h | 28 ++-- examples/projects/ESP32/led/node_config.h | 22 +-- .../NUCLEO-F072RB/barometer/node_config.h | 22 +-- .../NUCLEO-F072RB/bootloader/node_config.h | 22 +-- .../NUCLEO-F072RB/button/node_config.h | 22 +-- .../NUCLEO-F072RB/dc_motor/node_config.h | 26 ++-- .../gate_serialcom/node_config.h | 26 ++-- .../inspector_serialcom/node_config.h | 26 ++-- .../NUCLEO-F072RB/potentiometer/node_config.h | 24 +-- .../NUCLEO-F401RE/bootloader/node_config.h | 30 ++-- .../NUCLEO-F401RE/button/node_config.h | 30 ++-- .../NUCLEO-F401RE/dc_motor/node_config.h | 26 ++-- .../gate_serialcom/node_config.h | 34 ++--- .../inspector_serialcom/node_config.h | 34 ++--- .../projects/NUCLEO-F401RE/led/node_config.h | 32 ++-- .../NUCLEO-F401RE/potentiometer/node_config.h | 24 +-- .../NUCLEO-F410RB/bootloader/node_config.h | 34 ++--- .../NUCLEO-F410RB/button/node_config.h | 30 ++-- .../NUCLEO-F410RB/dc_motor/node_config.h | 26 ++-- .../gate_serialcom/node_config.h | 34 ++--- .../inspector_serialcom/node_config.h | 34 ++--- .../projects/NUCLEO-F410RB/led/node_config.h | 32 ++-- .../NUCLEO-F410RB/potentiometer/node_config.h | 24 +-- .../NUCLEO-G431KB/bootloader/node_config.h | 22 +-- .../NUCLEO-G431KB/button/node_config.h | 22 +-- .../NUCLEO-G431KB/dc_motor/node_config.h | 24 +-- .../gate_serialcom/node_config.h | 26 ++-- .../inspector_serialcom/node_config.h | 26 ++-- .../NUCLEO-G431KB/potentiometer/node_config.h | 24 +-- .../NUCLEO-G474RE/bootloader/node_config.h | 22 +-- .../button/include/luos_hal_configuration.h | 24 +-- .../NUCLEO-G474RE/button/node_config.h | 22 +-- .../gate_serialcom/node_config.h | 22 +-- .../inspector_serialcom/node_config.h | 26 ++-- .../NUCLEO-L073RZ/bootloader/node_config.h | 22 +-- .../NUCLEO-L073RZ/button/node_config.h | 22 +-- .../gate_serialcom/node_config.h | 28 ++-- .../NUCLEO-L432KC/bootloader/node_config.h | 22 +-- .../NUCLEO-L432KC/button/node_config.h | 22 +-- .../NUCLEO-L432KC/dc_motor/node_config.h | 24 +-- .../NUCLEO-L432KC/fingerprint/node_config.h | 24 +-- .../gate_serialcom/node_config.h | 22 +-- .../projects/NUCLEO-L432KC/gpio/node_config.h | 26 ++-- .../inspector_serialcom/node_config.h | 26 ++-- .../projects/NUCLEO-L432KC/lcd/node_config.h | 24 +-- .../projects/NUCLEO-L432KC/led/node_config.h | 22 +-- .../NUCLEO-L432KC/potentiometer/node_config.h | 24 +-- .../NUCLEO-L432KC/servo/node_config.h | 24 +-- .../SAMD21XPLAINED/button/node_config.h | 22 +-- .../bootloader/node_config.h | 26 ++-- .../STM32F4-discovery/button/node_config.h | 22 +-- .../gate_serialcom/node_config.h | 26 ++-- .../inspector_serialcom/node_config.h | 26 ++-- .../bootloader/node_config.h | 40 ++--- .../STM32L4S5_discovery/button/node_config.h | 42 ++--- .../gate_serialcom/node_config.h | 42 ++--- .../bike_alarm/alarm_controller/node_config.h | 22 +-- .../bike_alarm/start_controller/node_config.h | 22 +-- examples/projects/l0/bootloader/node_config.h | 22 +-- examples/projects/l0/button/node_config.h | 22 +-- .../projects/l0/button_freertos/node_config.h | 22 +-- .../l0/controller_motor/node_config.h | 26 ++-- examples/projects/l0/dc_motor/node_config.h | 26 ++-- .../l0/demo/detection_button/node_config.h | 22 +-- .../l0/demo/ledstrip_position/node_config.h | 26 ++-- .../l0/demo/motor_copy_app/node_config.h | 26 ++-- .../l0/demo/motor_demo_app/node_config.h | 26 ++-- examples/projects/l0/distance/node_config.h | 24 +-- examples/projects/l0/dxl/node_config.h | 26 ++-- .../projects/l0/fingerprint/node_config.h | 24 +-- .../projects/l0/gate_serialcom/node_config.h | 22 +-- examples/projects/l0/gpio/node_config.h | 24 +-- examples/projects/l0/imu/node_config.h | 26 ++-- .../l0/inspector_serialcom/node_config.h | 22 +-- examples/projects/l0/lcd/node_config.h | 24 +-- examples/projects/l0/led/node_config.h | 22 +-- examples/projects/l0/led_fader/node_config.h | 24 +-- examples/projects/l0/led_strip/node_config.h | 22 +-- .../projects/l0/light_sensor/node_config.h | 24 +-- examples/projects/l0/load/node_config.h | 24 +-- .../projects/l0/potentiometer/node_config.h | 24 +-- .../projects/l0/power_switch/node_config.h | 24 +-- examples/projects/l0/servo/node_config.h | 26 ++-- examples/projects/l0/stepper/node_config.h | 24 +-- examples/projects/native/button/node_config.h | 24 +-- .../projects/native/gate_wscom/node_config.h | 24 +-- examples/projects/native/led/node_config.h | 24 +-- .../projects/native/ping_pong/node_config.h | 22 +-- .../robus_network/HAL/ATSAMD21/robus_hal.c | 144 +++++++++--------- .../HAL/ATSAMD21/robus_hal_config.h | 48 +++--- .../HAL/ATSAMD21_ARDUINO/board_config.h | 30 ++-- .../HAL/ATSAMD21_ARDUINO/robus_hal.c | 144 +++++++++--------- .../HAL/ATSAMD21_ARDUINO/robus_hal_config.h | 48 +++--- .../HAL/ATSAMD21_MBED/robus_hal.c | 144 +++++++++--------- .../HAL/ATSAMD21_MBED/robus_hal_config.h | 48 +++--- .../robus_network/HAL/ESP32/board_config.h | 2 +- network/robus_network/HAL/ESP32/robus_hal.c | 26 ++-- .../HAL/ESP32/robus_hal_config.h | 12 +- network/robus_network/HAL/NATIVE/robus_hal.h | 2 +- .../HAL/NATIVE/robus_hal_config.h | 48 +++--- network/robus_network/HAL/STM32F0/robus_hal.c | 138 ++++++++--------- .../HAL/STM32F0/robus_hal_config.h | 48 +++--- network/robus_network/HAL/STM32F4/robus_hal.c | 144 +++++++++--------- .../HAL/STM32F4/robus_hal_config.h | 52 +++---- network/robus_network/HAL/STM32G4/robus_hal.c | 138 ++++++++--------- .../HAL/STM32G4/robus_hal_config.h | 48 +++--- network/robus_network/HAL/STM32L0/robus_hal.c | 138 ++++++++--------- .../HAL/STM32L0/robus_hal_config.h | 48 +++--- network/robus_network/HAL/STM32L4/robus_hal.c | 138 ++++++++--------- .../HAL/STM32L4/robus_hal_config.h | 48 +++--- .../robus_network/HAL/STUB/robus_hal_config.h | 48 +++--- .../robus_network/HAL/template/robus_hal.c | 6 +- .../HAL/template/robus_hal_config.h | 44 +++--- test/_resources/node_config.h | 7 +- tool_services/gate/TinyJSON/bootloader_ex.c | 2 +- tool_services/gate/TinyJSON/convert.c | 1 + tool_services/gate/pipe_link.c | 1 + 131 files changed, 2161 insertions(+), 2158 deletions(-) diff --git a/examples/projects/Arduino/bldc_simple_foc/node_config.h b/examples/projects/Arduino/bldc_simple_foc/node_config.h index 42aebae5b..3fe08e2a5 100644 --- a/examples/projects/Arduino/bldc_simple_foc/node_config.h +++ b/examples/projects/Arduino/bldc_simple_foc/node_config.h @@ -72,19 +72,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/button/node_config.h b/examples/projects/Arduino/button/node_config.h index 82621f87b..961af2512 100644 --- a/examples/projects/Arduino/button/node_config.h +++ b/examples/projects/Arduino/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/fingerprint/node_config.h b/examples/projects/Arduino/fingerprint/node_config.h index 82621f87b..961af2512 100644 --- a/examples/projects/Arduino/fingerprint/node_config.h +++ b/examples/projects/Arduino/fingerprint/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/gate_serialcom/node_config.h b/examples/projects/Arduino/gate_serialcom/node_config.h index afef8d159..6d70ccedc 100644 --- a/examples/projects/Arduino/gate_serialcom/node_config.h +++ b/examples/projects/Arduino/gate_serialcom/node_config.h @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/inspector_serialcom/node_config.h b/examples/projects/Arduino/inspector_serialcom/node_config.h index 0eba5c73a..42567b221 100644 --- a/examples/projects/Arduino/inspector_serialcom/node_config.h +++ b/examples/projects/Arduino/inspector_serialcom/node_config.h @@ -48,9 +48,9 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 1024 -#define MAX_MSG_NB 30 -//#define NODETECTION +#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +// #define NODETECTION /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/lcd/node_config.h b/examples/projects/Arduino/lcd/node_config.h index 82621f87b..961af2512 100644 --- a/examples/projects/Arduino/lcd/node_config.h +++ b/examples/projects/Arduino/lcd/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/led/node_config.h b/examples/projects/Arduino/led/node_config.h index 82621f87b..dc8a32407 100644 --- a/examples/projects/Arduino/led/node_config.h +++ b/examples/projects/Arduino/led/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/servo_motor/node_config.h b/examples/projects/Arduino/servo_motor/node_config.h index 82621f87b..961af2512 100644 --- a/examples/projects/Arduino/servo_motor/node_config.h +++ b/examples/projects/Arduino/servo_motor/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/Arduino/stepper_simple_foc/node_config.h b/examples/projects/Arduino/stepper_simple_foc/node_config.h index a8cc0fee0..9d6b1d679 100644 --- a/examples/projects/Arduino/stepper_simple_foc/node_config.h +++ b/examples/projects/Arduino/stepper_simple_foc/node_config.h @@ -48,20 +48,20 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 #define ARDUINO_PTPA_PIN 19 #define ARDUINO_PTPB_PIN 7 -#define LUOS_TIMER_LOCK_ENABLE() \ +#define ROBUS_TIMER_LOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TC4_TC5_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_TC4; \ } while (0U) -#define LUOS_TIMER TC4 -#define LUOS_TIMER_IRQ TC4_IRQn -#define LUOS_TIMER_IRQHANDLER() TC4_Handler() +#define ROBUS_TIMER TC4 +#define ROBUS_TIMER_IRQ TC4_IRQn +#define ROBUS_TIMER_IRQHANDLER() TC4_Handler() /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -82,19 +82,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/ESP32/button/node_config.h b/examples/projects/ESP32/button/node_config.h index 0cc8afa85..cb3e1a007 100644 --- a/examples/projects/ESP32/button/node_config.h +++ b/examples/projects/ESP32/button/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/button_arduino/node_config.h b/examples/projects/ESP32/button_arduino/node_config.h index 0cc8afa85..cb3e1a007 100644 --- a/examples/projects/ESP32/button_arduino/node_config.h +++ b/examples/projects/ESP32/button_arduino/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/gate_serialcom/node_config.h b/examples/projects/ESP32/gate_serialcom/node_config.h index ca1360ea5..8bdeb7443 100644 --- a/examples/projects/ESP32/gate_serialcom/node_config.h +++ b/examples/projects/ESP32/gate_serialcom/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h index 4bddb2297..f52aa9d51 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/gate_wscom/node_config.h b/examples/projects/ESP32/gate_wscom/node_config.h index 66d17c0eb..a0cc2e465 100644 --- a/examples/projects/ESP32/gate_wscom/node_config.h +++ b/examples/projects/ESP32/gate_wscom/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/gate_wscom_arduino/node_config.h b/examples/projects/ESP32/gate_wscom_arduino/node_config.h index b17b8b8ed..0e035363b 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_wscom_arduino/node_config.h @@ -46,9 +46,9 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 20 -#define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define MAX_MSG_NB 20 +#define MSG_BUFFER_SIZE 1024 +#define DEFAULTBAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/ESP32/led/node_config.h b/examples/projects/ESP32/led/node_config.h index 0cc8afa85..cb3e1a007 100644 --- a/examples/projects/ESP32/led/node_config.h +++ b/examples/projects/ESP32/led/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/barometer/node_config.h b/examples/projects/NUCLEO-F072RB/barometer/node_config.h index 3afe576e5..bb12fbb4d 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/barometer/node_config.h @@ -64,19 +64,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h index d2b89921b..6a6669822 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * BOOT_START_ADDRESS | * SHARED_MEMORY_ADDRESS | diff --git a/examples/projects/NUCLEO-F072RB/button/node_config.h b/examples/projects/NUCLEO-F072RB/button/node_config.h index 65e537ff3..a2f0f9305 100644 --- a/examples/projects/NUCLEO-F072RB/button/node_config.h +++ b/examples/projects/NUCLEO-F072RB/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h index cdb64ba3e..2d45ceb93 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 5 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h index fe9254f27..c8afde3c1 100644 --- a/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/gate_serialcom/node_config.h @@ -46,8 +46,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h index 6fd9a9666..cbd40e31d 100644 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h index 247bb6179..4ab69e4ed 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -102,10 +102,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F401RE/button/node_config.h b/examples/projects/NUCLEO-F401RE/button/node_config.h index 0642f73db..e7818dc34 100644 --- a/examples/projects/NUCLEO-F401RE/button/node_config.h +++ b/examples/projects/NUCLEO-F401RE/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -104,10 +104,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h index 992ebdf6d..d0c06e415 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 5 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h index e4313a688..77027fb1d 100644 --- a/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ @@ -106,10 +106,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h index b6f574d4f..49f211a3d 100644 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -105,10 +105,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F401RE/led/node_config.h b/examples/projects/NUCLEO-F401RE/led/node_config.h index 0642f73db..b36051575 100644 --- a/examples/projects/NUCLEO-F401RE/led/node_config.h +++ b/examples/projects/NUCLEO-F401RE/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -104,10 +104,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h index acb38ebe4..cb4b3a6eb 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h index 82f8b41bf..2fbdfedc5 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 -#define MAX_BUFFER_SIZE 512 +#define MAX_MSG_NB 10 +#define MAX_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -104,10 +104,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() -#define LUOS_TIMER TIM5 -#define LUOS_TIMER_IRQ TIM5_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() +#define ROBUS_TIMER TIM5 +#define ROBUS_TIMER_IRQ TIM5_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F410RB/button/node_config.h b/examples/projects/NUCLEO-F410RB/button/node_config.h index ee5ae8c4f..863662eeb 100644 --- a/examples/projects/NUCLEO-F410RB/button/node_config.h +++ b/examples/projects/NUCLEO-F410RB/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -104,10 +104,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() -#define LUOS_TIMER TIM5 -#define LUOS_TIMER_IRQ TIM5_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() +#define ROBUS_TIMER TIM5 +#define ROBUS_TIMER_IRQ TIM5_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h index 992ebdf6d..d0c06e415 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 5 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h index 319e114f4..9ad10a3a0 100644 --- a/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -105,10 +105,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() -#define LUOS_TIMER TIM5 -#define LUOS_TIMER_IRQ TIM5_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() +#define ROBUS_TIMER TIM5 +#define ROBUS_TIMER_IRQ TIM5_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h index 52b6a3e4e..dabe2928f 100644 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* @@ -106,10 +106,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() -#define LUOS_TIMER TIM5 -#define LUOS_TIMER_IRQ TIM5_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() +#define ROBUS_TIMER TIM5 +#define ROBUS_TIMER_IRQ TIM5_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() /******************************************************************************* * FLASH CONFIGURATION FOR APP WITH BOOTLOADER diff --git a/examples/projects/NUCLEO-F410RB/led/node_config.h b/examples/projects/NUCLEO-F410RB/led/node_config.h index ed05a94eb..8ffbb4fd2 100644 --- a/examples/projects/NUCLEO-F410RB/led/node_config.h +++ b/examples/projects/NUCLEO-F410RB/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size @@ -108,10 +108,10 @@ /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define LUOS_TIMER TIM3 -#define LUOS_TIMER_IRQ TIM3_IRQn -#define LUOS_TIMER_IRQHANDLER() TIM3_IRQHandler() +#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() +#define ROBUS_TIMER TIM3 +#define ROBUS_TIMER_IRQ TIM3_IRQn +#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() /******************************************************************************* * FLASH CONFIG ******************************************************************************/ diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h index acb38ebe4..cb4b3a6eb 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h index 9f5087f4b..69376eb0f 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/button/node_config.h b/examples/projects/NUCLEO-G431KB/button/node_config.h index e5b8fbb94..be4afa01d 100644 --- a/examples/projects/NUCLEO-G431KB/button/node_config.h +++ b/examples/projects/NUCLEO-G431KB/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h index 66a880967..2135215e6 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h index c3b26eaab..7c26bd8bb 100644 --- a/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h index 67894ac88..528815815 100644 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h index 66a880967..2135215e6 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h index 9f5087f4b..69376eb0f 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G474RE/button/include/luos_hal_configuration.h b/examples/projects/NUCLEO-G474RE/button/include/luos_hal_configuration.h index 136a68a06..8ce04ed3a 100644 --- a/examples/projects/NUCLEO-G474RE/button/include/luos_hal_configuration.h +++ b/examples/projects/NUCLEO-G474RE/button/include/luos_hal_configuration.h @@ -14,12 +14,12 @@ * PINOUT CONFIG ******************************************************************************/ #ifndef PORT_CLOCK_ENABLE -#define PORT_CLOCK_ENABLE() \ - do \ - { \ - __HAL_RCC_GPIOB_CLK_ENABLE(); \ - __HAL_RCC_GPIOC_CLK_ENABLE(); \ - } while (0U) + #define PORT_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_GPIOB_CLK_ENABLE(); \ + __HAL_RCC_GPIOC_CLK_ENABLE(); \ + } while (0U) #endif // PTP pin definition @@ -49,14 +49,14 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() -#define LUOS_COM USART3 -#define LUOS_COM_IRQ USART3_IRQn -#define LUOS_COM_IRQHANDLER() USART3_IRQHandler() +#define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() +#define ROBUS_COM USART3 +#define ROBUS_COM_IRQ USART3_IRQn +#define ROBUS_COM_IRQHANDLER() USART3_IRQHandler() /******************************************************************************* * FLASH CONFIG ******************************************************************************/ -#define LUOS_DMA_REQUEST LL_DMAMUX_REQ_USART3_TX +#define ROBUS_DMA_REQUEST LL_DMAMUX_REQ_USART3_TX -#endif /* _LUOSHAL_CONFIGURATION_H_ */ \ No newline at end of file +#endif /* _LUOSHAL_CONFIGURATION_H_ */ diff --git a/examples/projects/NUCLEO-G474RE/button/node_config.h b/examples/projects/NUCLEO-G474RE/button/node_config.h index 7492a3cdc..078ca55e5 100644 --- a/examples/projects/NUCLEO-G474RE/button/node_config.h +++ b/examples/projects/NUCLEO-G474RE/button/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h index c3b26eaab..3902eff35 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h index 67894ac88..528815815 100644 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index c78e5d531..e76188fac 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index 34b869ac6..45905739d 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h index 379489262..f6624b543 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h @@ -46,10 +46,10 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define DEFAULTBAUDRATE 500000 #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h index dc3397a15..beb3f8c6f 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/button/node_config.h b/examples/projects/NUCLEO-L432KC/button/node_config.h index e5b8fbb94..be4afa01d 100644 --- a/examples/projects/NUCLEO-L432KC/button/node_config.h +++ b/examples/projects/NUCLEO-L432KC/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h index e5b8fbb94..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h index e5b8fbb94..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h index c3b26eaab..3902eff35 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/gpio/node_config.h b/examples/projects/NUCLEO-L432KC/gpio/node_config.h index 9591f5bfc..b8a46d675 100644 --- a/examples/projects/NUCLEO-L432KC/gpio/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gpio/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 10 -#define MSG_BUFFER_SIZE 512 -#define MAX_MSG_NB 30 +#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 30 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h index 67894ac88..528815815 100644 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/lcd/node_config.h b/examples/projects/NUCLEO-L432KC/lcd/node_config.h index e5b8fbb94..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/node_config.h +++ b/examples/projects/NUCLEO-L432KC/lcd/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/led/node_config.h b/examples/projects/NUCLEO-L432KC/led/node_config.h index e5b8fbb94..be4afa01d 100644 --- a/examples/projects/NUCLEO-L432KC/led/node_config.h +++ b/examples/projects/NUCLEO-L432KC/led/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h index e5b8fbb94..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/NUCLEO-L432KC/servo/node_config.h b/examples/projects/NUCLEO-L432KC/servo/node_config.h index e5b8fbb94..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/servo/node_config.h +++ b/examples/projects/NUCLEO-L432KC/servo/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/SAMD21XPLAINED/button/node_config.h b/examples/projects/SAMD21XPLAINED/button/node_config.h index 82621f87b..dc8a32407 100644 --- a/examples/projects/SAMD21XPLAINED/button/node_config.h +++ b/examples/projects/SAMD21XPLAINED/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/STM32F4-discovery/bootloader/node_config.h b/examples/projects/STM32F4-discovery/bootloader/node_config.h index 8a12a52ed..62688c38a 100644 --- a/examples/projects/STM32F4-discovery/bootloader/node_config.h +++ b/examples/projects/STM32F4-discovery/bootloader/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 -#define MAX_BUFFER_SIZE 1024 +#define MAX_MSG_NB 10 +#define MAX_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/STM32F4-discovery/button/node_config.h b/examples/projects/STM32F4-discovery/button/node_config.h index 75ec245b5..7e4f40773 100644 --- a/examples/projects/STM32F4-discovery/button/node_config.h +++ b/examples/projects/STM32F4-discovery/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h index ed5848b56..683421362 100644 --- a/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h index 74d43887f..bb0b229f0 100644 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h +++ b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h index 3994ace3a..b08e09cb1 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h +++ b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ #define MCUFREQ 120000000 // MCU frequence #define TIMERDIV 1 // clock divider for timer clock chosen @@ -125,23 +125,23 @@ * COM CONFIG ******************************************************************************/ -#define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() -#define LUOS_COM UART4 -#define LUOS_COM_IRQ UART4_IRQn -#define LUOS_COM_IRQHANDLER() UART4_IRQHandler() +#define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() +#define ROBUS_COM UART4 +#define ROBUS_COM_IRQ UART4_IRQn +#define ROBUS_COM_IRQHANDLER() UART4_IRQHandler() /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#define LUOS_DMA_CLOCK_ENABLE() \ +#define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ } while (0U) -#define LUOS_DMA DMA1 -#define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_1 -#define LUOS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX +#define ROBUS_DMA DMA1 +#define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_1 +#define ROBUS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ diff --git a/examples/projects/STM32L4S5_discovery/button/node_config.h b/examples/projects/STM32L4S5_discovery/button/node_config.h index d0e9dd6c6..76d572167 100644 --- a/examples/projects/STM32L4S5_discovery/button/node_config.h +++ b/examples/projects/STM32L4S5_discovery/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler + + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ #define MCUFREQ 120000000 // MCU frequence #define TIMERDIV 1 // clock divider for timer clock chosen @@ -125,23 +125,23 @@ * COM CONFIG ******************************************************************************/ -#define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() -#define LUOS_COM UART4 -#define LUOS_COM_IRQ UART4_IRQn -#define LUOS_COM_IRQHANDLER() UART4_IRQHandler() +#define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() +#define ROBUS_COM UART4 +#define ROBUS_COM_IRQ UART4_IRQn +#define ROBUS_COM_IRQHANDLER() UART4_IRQHandler() /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#define LUOS_DMA_CLOCK_ENABLE() \ +#define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ } while (0U) -#define LUOS_DMA DMA1 -#define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_1 -#define LUOS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX +#define ROBUS_DMA DMA1 +#define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_1 +#define ROBUS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ diff --git a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h index 3ed90f79d..52a9f2309 100644 --- a/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h +++ b/examples/projects/STM32L4S5_discovery/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ #define MCUFREQ 120000000 // MCU frequence #define TIMERDIV 1 // clock divider for timer clock chosen @@ -126,23 +126,23 @@ * COM CONFIG ******************************************************************************/ -#define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() -#define LUOS_COM UART4 -#define LUOS_COM_IRQ UART4_IRQn -#define LUOS_COM_IRQHANDLER() UART4_IRQHandler() +#define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_UART4_CLK_ENABLE() +#define ROBUS_COM UART4 +#define ROBUS_COM_IRQ UART4_IRQn +#define ROBUS_COM_IRQHANDLER() UART4_IRQHandler() /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#define LUOS_DMA_CLOCK_ENABLE() \ +#define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ } while (0U) -#define LUOS_DMA DMA1 -#define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_1 -#define LUOS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX +#define ROBUS_DMA DMA1 +#define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_1 +#define ROBUS_DMA_REQUEST LL_DMAMUX_REQ_UART4_TX /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ diff --git a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h index 62806095a..2ca36271e 100644 --- a/examples/projects/l0/bike_alarm/alarm_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/alarm_controller/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/bike_alarm/start_controller/node_config.h b/examples/projects/l0/bike_alarm/start_controller/node_config.h index 40e8116a8..4be7b60c0 100644 --- a/examples/projects/l0/bike_alarm/start_controller/node_config.h +++ b/examples/projects/l0/bike_alarm/start_controller/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/bootloader/node_config.h b/examples/projects/l0/bootloader/node_config.h index 93e49a820..0efac10c1 100644 --- a/examples/projects/l0/bootloader/node_config.h +++ b/examples/projects/l0/bootloader/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index 65e537ff3..a2f0f9305 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/button_freertos/node_config.h b/examples/projects/l0/button_freertos/node_config.h index 327eaf5e6..52cb97eab 100644 --- a/examples/projects/l0/button_freertos/node_config.h +++ b/examples/projects/l0/button_freertos/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/controller_motor/node_config.h b/examples/projects/l0/controller_motor/node_config.h index b960b0213..7ca9b39d9 100644 --- a/examples/projects/l0/controller_motor/node_config.h +++ b/examples/projects/l0/controller_motor/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 2 -#define MAX_MSG_NB 30 -#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +#define MSG_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/dc_motor/node_config.h b/examples/projects/l0/dc_motor/node_config.h index cdb64ba3e..2d45ceb93 100644 --- a/examples/projects/l0/dc_motor/node_config.h +++ b/examples/projects/l0/dc_motor/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 5 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/demo/detection_button/node_config.h b/examples/projects/l0/demo/detection_button/node_config.h index bf59ddef9..e91918143 100644 --- a/examples/projects/l0/demo/detection_button/node_config.h +++ b/examples/projects/l0/demo/detection_button/node_config.h @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/demo/ledstrip_position/node_config.h b/examples/projects/l0/demo/ledstrip_position/node_config.h index 28ff8ae4a..1eda203e0 100644 --- a/examples/projects/l0/demo/ledstrip_position/node_config.h +++ b/examples/projects/l0/demo/ledstrip_position/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 30 -#define MAX_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +#define MAX_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/demo/motor_copy_app/node_config.h b/examples/projects/l0/demo/motor_copy_app/node_config.h index 40fe8ad1a..b136b8113 100644 --- a/examples/projects/l0/demo/motor_copy_app/node_config.h +++ b/examples/projects/l0/demo/motor_copy_app/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 5 #define MAX_LOCAL_PROFILE_NUMBER 2 -#define MAX_MSG_NB 30 -#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +#define MSG_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/demo/motor_demo_app/node_config.h b/examples/projects/l0/demo/motor_demo_app/node_config.h index 40fe8ad1a..b136b8113 100644 --- a/examples/projects/l0/demo/motor_demo_app/node_config.h +++ b/examples/projects/l0/demo/motor_demo_app/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 5 #define MAX_LOCAL_PROFILE_NUMBER 2 -#define MAX_MSG_NB 30 -#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +#define MSG_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/distance/node_config.h b/examples/projects/l0/distance/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/distance/node_config.h +++ b/examples/projects/l0/distance/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/dxl/node_config.h b/examples/projects/l0/dxl/node_config.h index 826cf8105..299aadc6c 100644 --- a/examples/projects/l0/dxl/node_config.h +++ b/examples/projects/l0/dxl/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 10 #define MAX_LOCAL_PROFILE_NUMBER 20 -#define MAX_MSG_NB 30 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 30 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/fingerprint/node_config.h b/examples/projects/l0/fingerprint/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/fingerprint/node_config.h +++ b/examples/projects/l0/fingerprint/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index aad78e990..225647240 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/gpio/node_config.h b/examples/projects/l0/gpio/node_config.h index 7fe7991c3..5a5763ef5 100644 --- a/examples/projects/l0/gpio/node_config.h +++ b/examples/projects/l0/gpio/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 9 #define MAX_LOCAL_PROFILE_NUMBER 9 -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/imu/node_config.h b/examples/projects/l0/imu/node_config.h index 202c62497..1e4692a87 100644 --- a/examples/projects/l0/imu/node_config.h +++ b/examples/projects/l0/imu/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 -#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 10 +#define MSG_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * FLASH_SECTOR | FLASH page size * PAGE_SIZE | FLASH page size diff --git a/examples/projects/l0/inspector_serialcom/node_config.h b/examples/projects/l0/inspector_serialcom/node_config.h index 6fd9a9666..f4c20c348 100644 --- a/examples/projects/l0/inspector_serialcom/node_config.h +++ b/examples/projects/l0/inspector_serialcom/node_config.h @@ -71,19 +71,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/lcd/node_config.h b/examples/projects/l0/lcd/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/lcd/node_config.h +++ b/examples/projects/l0/lcd/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/led/node_config.h b/examples/projects/l0/led/node_config.h index 45b5aa221..d11f59555 100644 --- a/examples/projects/l0/led/node_config.h +++ b/examples/projects/l0/led/node_config.h @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/led_fader/node_config.h b/examples/projects/l0/led_fader/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/led_fader/node_config.h +++ b/examples/projects/l0/led_fader/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/led_strip/node_config.h b/examples/projects/l0/led_strip/node_config.h index 4c7d98934..c8510269e 100644 --- a/examples/projects/l0/led_strip/node_config.h +++ b/examples/projects/l0/led_strip/node_config.h @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/light_sensor/node_config.h b/examples/projects/l0/light_sensor/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/light_sensor/node_config.h +++ b/examples/projects/l0/light_sensor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/load/node_config.h b/examples/projects/l0/load/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/load/node_config.h +++ b/examples/projects/l0/load/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/potentiometer/node_config.h b/examples/projects/l0/potentiometer/node_config.h index 45b5aa221..591039463 100644 --- a/examples/projects/l0/potentiometer/node_config.h +++ b/examples/projects/l0/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -68,19 +68,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/power_switch/node_config.h b/examples/projects/l0/power_switch/node_config.h index 65e537ff3..52cb97eab 100644 --- a/examples/projects/l0/power_switch/node_config.h +++ b/examples/projects/l0/power_switch/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/servo/node_config.h b/examples/projects/l0/servo/node_config.h index 24a31ae48..b668ab2c1 100644 --- a/examples/projects/l0/servo/node_config.h +++ b/examples/projects/l0/servo/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 4 -#define MAX_MSG_NB 10 -#define MSG_BUFFER_SIZE 512 +#define MAX_MSG_NB 10 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/l0/stepper/node_config.h b/examples/projects/l0/stepper/node_config.h index 65e537ff3..52cb97eab 100644 --- a/examples/projects/l0/stepper/node_config.h +++ b/examples/projects/l0/stepper/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/native/button/node_config.h b/examples/projects/native/button/node_config.h index 084b12960..2b7a9f49e 100644 --- a/examples/projects/native/button/node_config.h +++ b/examples/projects/native/button/node_config.h @@ -46,7 +46,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index 46aa0f3b7..94e496935 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 200 +#define MAX_MSG_NB 200 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -69,19 +69,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/native/led/node_config.h b/examples/projects/native/led/node_config.h index 084b12960..2b7a9f49e 100644 --- a/examples/projects/native/led/node_config.h +++ b/examples/projects/native/led/node_config.h @@ -46,7 +46,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -67,19 +67,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler ******************************************************************************/ /******************************************************************************* diff --git a/examples/projects/native/ping_pong/node_config.h b/examples/projects/native/ping_pong/node_config.h index 97912b290..7ee6b3d71 100644 --- a/examples/projects/native/ping_pong/node_config.h +++ b/examples/projects/native/ping_pong/node_config.h @@ -70,19 +70,19 @@ * COM_RX | Rx USART Com Pin/Port/Alternate * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - * LUOS_COM_CLOCK_ENABLE | Enable clock for USART - * LUOS_COM | USART number - * LUOS_COM_IRQ | USART IRQ number - * LUOS_COM_IRQHANDLER | Callback function for USART IRQ handler + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - * LUOS_DMA_CLOCK_ENABLE | Enable clock for DMA - * LUOS_DMA | DMA number - * LUOS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - * LUOS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * LUOS_TIMER | Timer number - * LUOS_TIMER_IRQ | Timer IRQ number - * LUOS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler * * WS_BROKER_ADDR | The broker adress in native mode. Default value is "ws://127.0.0.1:8000" ******************************************************************************/ diff --git a/network/robus_network/HAL/ATSAMD21/robus_hal.c b/network/robus_network/HAL/ATSAMD21/robus_hal.c index 9636840ab..e5d78d37d 100644 --- a/network/robus_network/HAL/ATSAMD21/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21/robus_hal.c @@ -85,56 +85,56 @@ void RobusHAL_ComInit(uint32_t Baudrate) { uint32_t baud = 0; // initialize clock - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); /* Disable the USART before configurations */ - LUOS_COM->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; + ROBUS_COM->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; /* Configure Baud Rate */ baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; - LUOS_COM->USART_INT.SERCOM_BAUD = SERCOM_USART_INT_BAUD_BAUD(baud); + ROBUS_COM->USART_INT.SERCOM_BAUD = SERCOM_USART_INT_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON - LUOS_COM->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_INT_CTRLA_RXPO(COM_RX_POS) + ROBUS_COM->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_INT_CTRLA_RXPO(COM_RX_POS) | SERCOM_USART_INT_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_INT_CTRLA_DORD_Msk | SERCOM_USART_INT_CTRLA_IBON_Msk | SERCOM_USART_INT_CTRLA_FORM(0x0) | SERCOM_USART_INT_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits - LUOS_COM->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT | SERCOM_USART_INT_CTRLB_SBMODE_1_BIT + ROBUS_COM->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT | SERCOM_USART_INT_CTRLB_SBMODE_1_BIT | SERCOM_USART_INT_CTRLB_RXEN_Msk | SERCOM_USART_INT_CTRLB_TXEN_Msk | SERCOM_USART_INT_CTRLB_SFDE_Msk; /* Enable the UART after the configurations */ - LUOS_COM->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + ROBUS_COM->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; /* Wait for sync */ - while (LUOS_COM->USART_INT.SERCOM_SYNCBUSY) + while (ROBUS_COM->USART_INT.SERCOM_SYNCBUSY) ; /* Clean IT */ - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RESETVALUE; + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RESETVALUE; /* Enable Receive Complete interrupt */ - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RXC_Msk; + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RXC_Msk; - NVIC_SetPriority(LUOS_COM_IRQ, 3); - NVIC_EnableIRQ(LUOS_COM_IRQ); + NVIC_SetPriority(ROBUS_COM_IRQ, 3); + NVIC_EnableIRQ(ROBUS_COM_IRQ); // Timeout Initialization timoutclockcnt = MCUFREQ / Baudrate; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); + ROBUS_DMA_CLOCK_ENABLE(); - LUOS_DMA->DMAC_BASEADDR = (uint32_t)&descriptor_section; - LUOS_DMA->DMAC_WRBADDR = (uint32_t)&write_back_section; - LUOS_DMA->DMAC_PRICTRL0 = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0_Msk | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1_Msk | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2_Msk | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3_Msk; - LUOS_DMA->DMAC_CHID = LUOS_DMA_CHANNEL; // DMA Channel - LUOS_DMA->DMAC_CHCTRLB = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(LUOS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->DMAC_BASEADDR = (uint32_t)&descriptor_section; + ROBUS_DMA->DMAC_WRBADDR = (uint32_t)&write_back_section; + ROBUS_DMA->DMAC_PRICTRL0 = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0_Msk | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1_Msk | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2_Msk | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3_Msk; + ROBUS_DMA->DMAC_CHID = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->DMAC_CHCTRLB = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.DMAC_BTCTRL = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID_Msk | DMAC_BTCTRL_SRCINC_Msk; - LUOS_DMA->DMAC_CTRL = DMAC_CTRL_DMAENABLE_Msk | DMAC_CTRL_LVLEN0_Msk | DMAC_CTRL_LVLEN1_Msk | DMAC_CTRL_LVLEN2_Msk | DMAC_CTRL_LVLEN3_Msk; + ROBUS_DMA->DMAC_CTRL = DMAC_CTRL_DMAENABLE_Msk | DMAC_CTRL_LVLEN0_Msk | DMAC_CTRL_LVLEN1_Msk | DMAC_CTRL_LVLEN2_Msk | DMAC_CTRL_LVLEN3_Msk; #endif } /****************************************************************************** @@ -166,13 +166,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_DRE_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_DRE_Msk; // disable IT #else - LUOS_DMA->DMAC_CHCTRLA &= ~DMAC_CHCTRLA_ENABLE_Msk; + ROBUS_DMA->DMAC_CHCTRLA &= ~DMAC_CHCTRLA_ENABLE_Msk; #endif // Disable Transmission complete interrupt - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; } } @@ -185,15 +185,15 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - while ((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk) + while ((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk) { - LUOS_COM->USART_INT.SERCOM_DATA; // clear data buffer + ROBUS_COM->USART_INT.SERCOM_DATA; // clear data buffer } - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RXC_Msk; + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_RXC_Msk; } else { - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_RXC_Msk; + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_RXC_Msk; } } /****************************************************************************** @@ -201,31 +201,31 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if (((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk) && ((LUOS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_RXC_Msk) == SERCOM_USART_INT_INTENSET_RXC_Msk)) + if (((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk) && ((ROBUS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_RXC_Msk) == SERCOM_USART_INT_INTENSET_RXC_Msk)) { // clean start bit detection - uint8_t data = LUOS_COM->USART_INT.SERCOM_DATA; + uint8_t data = ROBUS_COM->USART_INT.SERCOM_DATA; Recep_data(&data); if (data_size_to_transmit == 0) { - LUOS_COM->USART_INT.SERCOM_STATUS = SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk; - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; + ROBUS_COM->USART_INT.SERCOM_STATUS = SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk; + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; return; } } - else if ((LUOS_COM->USART_INT.SERCOM_STATUS & SERCOM_USART_INT_STATUS_FERR_Msk) == SERCOM_USART_INT_STATUS_FERR_Msk) + else if ((ROBUS_COM->USART_INT.SERCOM_STATUS & SERCOM_USART_INT_STATUS_FERR_Msk) == SERCOM_USART_INT_STATUS_FERR_Msk) { ctx.rx.status.rx_framing_error = true; } // Transmission management - if (((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_TXC_Msk) == SERCOM_USART_INT_INTFLAG_TXC_Msk) && ((LUOS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_TXC_Msk) == SERCOM_USART_INT_INTENSET_TXC_Msk)) + if (((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_TXC_Msk) == SERCOM_USART_INT_INTFLAG_TXC_Msk) && ((ROBUS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_TXC_Msk) == SERCOM_USART_INT_INTENSET_TXC_Msk)) { // Transmission complete data_size_to_transmit = 0; @@ -233,28 +233,28 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_TXC_Msk; // clear flag - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_TXC_Msk; // clear flag + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT } #ifdef USE_TX_IT - else if (((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk) && ((LUOS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_DRE_Msk) == SERCOM_USART_INT_INTENSET_DRE_Msk)) + else if (((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk) && ((ROBUS_COM->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_DRE_Msk) == SERCOM_USART_INT_INTENSET_DRE_Msk)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LUOS_COM->USART_INT.SERCOM_DATA = *(tx_data++); + ROBUS_COM->USART_INT.SERCOM_DATA = *(tx_data++); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_DRE_Msk; // clear flag - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_DRE_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_DRE_Msk; // clear flag + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_DRE_Msk; // disable IT // Enable Transmission complete interrupt - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // disable IT } } #endif - LUOS_COM->USART_INT.SERCOM_STATUS = SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk; - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; + ROBUS_COM->USART_INT.SERCOM_STATUS = SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk; + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; } /****************************************************************************** * @brief Process data transmit @@ -263,7 +263,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while ((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) != SERCOM_USART_INT_INTFLAG_DRE_Msk) + while ((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) != SERCOM_USART_INT_INTFLAG_DRE_Msk) ; // Disable RX detec pin if needed @@ -277,20 +277,20 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LUOS_COM->USART_INT.SERCOM_DATA = *(tx_data++); + ROBUS_COM->USART_INT.SERCOM_DATA = *(tx_data++); // Enable Transmission empty buffer interrupt to transmit next datas - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_DRE_Msk; // enable IT + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_DRE_Msk; // enable IT // Disable Transmission complete interrupt - LUOS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT + ROBUS_COM->USART_INT.SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk; // disable IT #else data_size_to_transmit = 0; // to not check IT TC during collision descriptor_section.DMAC_SRCADDR = (uint32_t)(data + size); - descriptor_section.DMAC_DSTADDR = (uint32_t)&LUOS_COM->USART_INT.SERCOM_DATA; + descriptor_section.DMAC_DSTADDR = (uint32_t)&ROBUS_COM->USART_INT.SERCOM_DATA; descriptor_section.DMAC_BTCNT = size; // Enable TX RobusHAL_SetTxState(true); - LUOS_DMA->DMAC_CHCTRLA |= DMAC_CHCTRLA_ENABLE_Msk; - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // enable IT + ROBUS_DMA->DMAC_CHCTRLA |= DMAC_CHCTRLA_ENABLE_Msk; + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // enable IT #endif } else @@ -298,14 +298,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 1; // This is a patch du to difference MCU frequency - while (LUOS_TIMER->COUNT16.TC_COUNT < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) + while (ROBUS_TIMER->COUNT16.TC_COUNT < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LUOS_COM->USART_INT.SERCOM_DATA = *data; + ROBUS_COM->USART_INT.SERCOM_DATA = *data; // Enable Transmission complete interrupt because we only have one. - LUOS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // enable IT + ROBUS_COM->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENSET_TXC_Msk; // enable IT } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -337,9 +337,9 @@ _CRITICAL void RobusHAL_SetRxDetecPin(uint8_t Enable) _CRITICAL uint8_t RobusHAL_GetTxLockState(void) { uint8_t result = false; - if ((LUOS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXS_Msk) == SERCOM_USART_INT_INTFLAG_RXS_Msk) + if ((ROBUS_COM->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXS_Msk) == SERCOM_USART_INT_INTFLAG_RXS_Msk) { - LUOS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; + ROBUS_COM->USART_INT.SERCOM_INTFLAG = SERCOM_USART_INT_INTFLAG_RXS_Msk; RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; } @@ -370,22 +370,22 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) static void RobusHAL_TimeoutInit(void) { // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); - LUOS_TIMER->COUNT16.TC_CTRLA = TC_CTRLA_RESETVALUE; - while ((LUOS_TIMER->COUNT16.TC_STATUS & TC_STATUS_SYNCBUSY_Msk)) + ROBUS_TIMER->COUNT16.TC_CTRLA = TC_CTRLA_RESETVALUE; + while ((ROBUS_TIMER->COUNT16.TC_STATUS & TC_STATUS_SYNCBUSY_Msk)) ; /* Configure counter mode & prescaler */ - LUOS_TIMER->COUNT16.TC_CTRLA = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; - LUOS_TIMER->COUNT16.TC_CTRLBSET = TC_CTRLBSET_ONESHOT_Msk; + ROBUS_TIMER->COUNT16.TC_CTRLA = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; + ROBUS_TIMER->COUNT16.TC_CTRLBSET = TC_CTRLBSET_ONESHOT_Msk; - LUOS_TIMER->COUNT16.TC_COUNT = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); + ROBUS_TIMER->COUNT16.TC_COUNT = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); /* Clear all interrupt flags */ - LUOS_TIMER->COUNT16.TC_INTENSET = TC_INTENSET_RESETVALUE; - LUOS_TIMER->COUNT16.TC_INTENSET = TC_INTENSET_OVF_Msk; + ROBUS_TIMER->COUNT16.TC_INTENSET = TC_INTENSET_RESETVALUE; + ROBUS_TIMER->COUNT16.TC_INTENSET = TC_INTENSET_OVF_Msk; - NVIC_SetPriority(LUOS_TIMER_IRQ, 3); - NVIC_EnableIRQ(LUOS_TIMER_IRQ); + NVIC_SetPriority(ROBUS_TIMER_IRQ, 3); + NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout for Rx communication @@ -394,13 +394,13 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // clear IT pending - LUOS_TIMER->COUNT16.TC_INTFLAG = TC_INTFLAG_OVF_Msk; // clear flag - LUOS_TIMER->COUNT16.TC_CTRLA &= ~TC_CTRLA_ENABLE_Msk; + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // clear IT pending + ROBUS_TIMER->COUNT16.TC_INTFLAG = TC_INTFLAG_OVF_Msk; // clear flag + ROBUS_TIMER->COUNT16.TC_CTRLA &= ~TC_CTRLA_ENABLE_Msk; if (nbrbit != 0) { - LUOS_TIMER->COUNT16.TC_COUNT = 0xFFFF - (timoutclockcnt * nbrbit); - LUOS_TIMER->COUNT16.TC_CTRLA |= TC_CTRLA_ENABLE_Msk; + ROBUS_TIMER->COUNT16.TC_COUNT = 0xFFFF - (timoutclockcnt * nbrbit); + ROBUS_TIMER->COUNT16.TC_CTRLA |= TC_CTRLA_ENABLE_Msk; } } /****************************************************************************** @@ -408,11 +408,11 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if ((LUOS_TIMER->COUNT16.TC_INTFLAG & TC_INTFLAG_OVF_Msk) == TC_INTFLAG_OVF_Msk) + if ((ROBUS_TIMER->COUNT16.TC_INTFLAG & TC_INTFLAG_OVF_Msk) == TC_INTFLAG_OVF_Msk) { - LUOS_TIMER->COUNT16.TC_INTFLAG = TC_INTFLAG_OVF_Msk; // clear + ROBUS_TIMER->COUNT16.TC_INTFLAG = TC_INTFLAG_OVF_Msk; // clear if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { RobusHAL_SetTxState(false); diff --git a/network/robus_network/HAL/ATSAMD21/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21/robus_hal_config.h index 7fe568a60..1c23d065c 100644 --- a/network/robus_network/HAL/ATSAMD21/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21/robus_hal_config.h @@ -119,61 +119,61 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() \ +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK_REGS->GCLK_CLKCTRL = GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN(0x0) | GCLK_CLKCTRL_CLKEN_Msk; \ PM_REGS->PM_APBCMASK |= PM_APBCMASK_SERCOM0_Msk; \ } while (0U) #endif -#ifndef LUOS_COM - #define LUOS_COM SERCOM0_REGS +#ifndef ROBUS_COM + #define ROBUS_COM SERCOM0_REGS #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ SERCOM0_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ SERCOM0_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() SERCOM0_Handler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() SERCOM0_Handler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() \ +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM_REGS->PM_AHBMASK |= PM_AHBMASK_DMAC_Msk; \ } while (0U) #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMAC_REGS +#ifndef ROBUS_DMA + #define ROBUS_DMA DMAC_REGS #endif -#ifndef LUOS_DMA_TRIGGER - #define LUOS_DMA_TRIGGER 2 +#ifndef ROBUS_DMA_TRIGGER + #define ROBUS_DMA_TRIGGER 2 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL 0 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL 0 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() \ +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK_REGS->GCLK_CLKCTRL = GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN(0x0) | GCLK_CLKCTRL_CLKEN_Msk; \ PM_REGS->PM_APBCMASK |= PM_APBCMASK_TC3_Msk; \ } while (0U) #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TC3_REGS +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TC3_REGS #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TC3_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TC3_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TC3_Handler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TC3_Handler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h index dfc684e43..d02698489 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h @@ -13,46 +13,46 @@ #include #if defined(ARDUINO_SAMD_ZERO) - #define LUOS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_SERCOM0; \ } while (0U) - #define LUOS_COM SERCOM0 - #define LUOS_COM_IRQ SERCOM0_IRQn - #define LUOS_COM_IRQHANDLER() SERCOM0_Handler() - #define LUOS_DMA_TRIGGER 2 + #define ROBUS_COM SERCOM0 + #define ROBUS_COM_IRQ SERCOM0_IRQn + #define ROBUS_COM_IRQHANDLER() SERCOM0_Handler() + #define ROBUS_DMA_TRIGGER 2 #endif #if (defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_MKRFox1200) \ || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) || defined(ARDUINO_SAMD_MKRGSM1400) \ || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRZERO) || defined(ARDUINO_SAMD_NANO_33_IOT) \ || defined(SAMD_MKRVIDOR4000)) - #define LUOS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM5_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_SERCOM5; \ } while (0U) - #define LUOS_COM SERCOM5 - #define LUOS_COM_IRQ SERCOM5_IRQn - #define LUOS_COM_IRQHANDLER() SERCOM5_Handler() - #define LUOS_DMA_TRIGGER 12 + #define ROBUS_COM SERCOM5 + #define ROBUS_COM_IRQ SERCOM5_IRQn + #define ROBUS_COM_IRQHANDLER() SERCOM5_Handler() + #define ROBUS_DMA_TRIGGER 12 #endif #if defined(SEEED_XIAO_M0) - #define LUOS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM4_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_SERCOM4; \ } while (0U) - #define LUOS_COM SERCOM4 - #define LUOS_COM_IRQ SERCOM4_IRQn - #define LUOS_COM_IRQHANDLER() SERCOM4_Handler() - #define LUOS_DMA_TRIGGER SERCOM4_DMAC_ID_TX + #define ROBUS_COM SERCOM4 + #define ROBUS_COM_IRQ SERCOM4_IRQn + #define ROBUS_COM_IRQHANDLER() SERCOM4_Handler() + #define ROBUS_DMA_TRIGGER SERCOM4_DMAC_ID_TX #define COM_TX_POS 0 // PAD0 #define COM_RX_POS 1 // PAD1 diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c index 9667c916f..6ca7b35ac 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c @@ -89,56 +89,56 @@ void RobusHAL_ComInit(uint32_t Baudrate) { uint32_t baud = 0; // initialize clock - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); /* Disable the USART before configurations */ - LUOS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; + ROBUS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; /* Configure Baud Rate */ baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; - LUOS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); + ROBUS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON - LUOS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) + ROBUS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) | SERCOM_USART_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits - LUOS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE + ROBUS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_SFDE; /* Enable the UART after the configurations */ - LUOS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; + ROBUS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; /* Wait for sync */ - while (LUOS_COM->USART.SYNCBUSY.bit.ENABLE) + while (ROBUS_COM->USART.SYNCBUSY.bit.ENABLE) ; /* Clean IT */ - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RESETVALUE; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RESETVALUE; /* Enable Receive Complete interrupt */ - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; - NVIC_SetPriority(LUOS_COM_IRQ, 3); - NVIC_EnableIRQ(LUOS_COM_IRQ); + NVIC_SetPriority(ROBUS_COM_IRQ, 3); + NVIC_EnableIRQ(ROBUS_COM_IRQ); // Timeout Initialization timoutclockcnt = MCUFREQ / Baudrate; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); + ROBUS_DMA_CLOCK_ENABLE(); - LUOS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; - LUOS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; - LUOS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; - LUOS_DMA->CHID.reg = LUOS_DMA_CHANNEL; // DMA Channel - LUOS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(LUOS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; + ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; + ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; + ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.BTCTRL.reg = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID | DMAC_BTCTRL_SRCINC; - LUOS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; + ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; #endif } /****************************************************************************** @@ -170,13 +170,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT #else - LUOS_DMA->CHCTRLA.reg &= ~DMAC_CHCTRLA_ENABLE; + ROBUS_DMA->CHCTRLA.reg &= ~DMAC_CHCTRLA_ENABLE; #endif // Disable Transmission complete interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start } } /****************************************************************************** @@ -188,15 +188,15 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - while ((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) + while ((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) { - LUOS_COM->USART.DATA.reg; + ROBUS_COM->USART.DATA.reg; } - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; } else { - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_RXC; + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_RXC; } } /****************************************************************************** @@ -204,31 +204,31 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_RXC) == SERCOM_USART_INTENSET_RXC)) + if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_RXC) == SERCOM_USART_INTENSET_RXC)) { // clean start bit detection - uint8_t data = LUOS_COM->USART.DATA.reg; + uint8_t data = ROBUS_COM->USART.DATA.reg; Recep_data(&data); if (data_size_to_transmit == 0) { - LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start return; } } - else if ((LUOS_COM->USART.STATUS.reg & SERCOM_USART_STATUS_FERR) == SERCOM_USART_STATUS_FERR) // check error on ligne + else if ((ROBUS_COM->USART.STATUS.reg & SERCOM_USART_STATUS_FERR) == SERCOM_USART_STATUS_FERR) // check error on ligne { ctx.rx.status.rx_framing_error = true; } // Transmission management - if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == SERCOM_USART_INTFLAG_TXC) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_TXC) == SERCOM_USART_INTENSET_TXC)) + if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == SERCOM_USART_INTFLAG_TXC) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_TXC) == SERCOM_USART_INTENSET_TXC)) { // Transmission complete data_size_to_transmit = 0; @@ -236,28 +236,28 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LUOS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_TXC; // clear flag - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_TXC; // clear flag + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT } #ifdef USE_TX_IT - else if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) == SERCOM_USART_INTFLAG_DRE) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_DRE) == SERCOM_USART_INTENSET_DRE)) + else if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) == SERCOM_USART_INTFLAG_DRE) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_DRE) == SERCOM_USART_INTENSET_DRE)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LUOS_COM->USART.DATA.reg = *(tx_data++); + ROBUS_COM->USART.DATA.reg = *(tx_data++); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LUOS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_DRE; // clear flag - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT + ROBUS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_DRE; // clear flag + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT // Enable Transmission complete interrupt - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // disable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // disable IT } } #endif - LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start } /****************************************************************************** * @brief Process data transmit @@ -266,7 +266,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while ((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) != SERCOM_USART_INTFLAG_DRE) + while ((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) != SERCOM_USART_INTFLAG_DRE) ; // Disable RX detec pin if needed @@ -280,20 +280,20 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LUOS_COM->USART.DATA.reg = *(tx_data++); + ROBUS_COM->USART.DATA.reg = *(tx_data++); // Enable Transmission empty buffer interrupt to transmit next datas - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_DRE; // enable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_DRE; // enable IT // Disable Transmission complete interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT #else data_size_to_transmit = 0; // to not check IT TC during collision descriptor_section.SRCADDR.reg = (uint32_t)(data + size); - descriptor_section.DSTADDR.reg = (uint32_t)&LUOS_COM->USART.DATA.reg; + descriptor_section.DSTADDR.reg = (uint32_t)&ROBUS_COM->USART.DATA.reg; descriptor_section.BTCNT.reg = size; // Enable TX RobusHAL_SetTxState(true); - LUOS_DMA->CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE; - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT + ROBUS_DMA->CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT #endif } else @@ -301,14 +301,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 0; // This is a patch du to difference MCU frequency - while (LUOS_TIMER->COUNT16.COUNT.reg < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) + while (ROBUS_TIMER->COUNT16.COUNT.reg < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LUOS_COM->USART.DATA.reg = *data; + ROBUS_COM->USART.DATA.reg = *data; // Enable Transmission complete interrupt because we only have one. - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -340,9 +340,9 @@ _CRITICAL void RobusHAL_SetRxDetecPin(uint8_t Enable) _CRITICAL uint8_t RobusHAL_GetTxLockState(void) { uint8_t result = false; - if (LUOS_COM->USART.INTFLAG.bit.RXS == 1) + if (ROBUS_COM->USART.INTFLAG.bit.RXS == 1) { - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; } @@ -373,22 +373,22 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) static void RobusHAL_TimeoutInit(void) { // initialize clock - LUOS_TIMER_LOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); - LUOS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_RESETVALUE; - while ((LUOS_TIMER->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY)) + ROBUS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_RESETVALUE; + while ((ROBUS_TIMER->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY)) ; /* Configure counter mode & prescaler */ - LUOS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; - LUOS_TIMER->COUNT16.CTRLBSET.bit.ONESHOT = 1; + ROBUS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; + ROBUS_TIMER->COUNT16.CTRLBSET.bit.ONESHOT = 1; - LUOS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); + ROBUS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); /* Clear all interrupt flags */ - LUOS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_RESETVALUE; - LUOS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_OVF; + ROBUS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_RESETVALUE; + ROBUS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_OVF; - NVIC_SetPriority(LUOS_TIMER_IRQ, 3); - NVIC_EnableIRQ(LUOS_TIMER_IRQ); + NVIC_SetPriority(ROBUS_TIMER_IRQ, 3); + NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout for Rx communication @@ -397,13 +397,13 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // clear IT pending - LUOS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; - LUOS_TIMER->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE; + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // clear IT pending + ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; + ROBUS_TIMER->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE; if (nbrbit != 0) { - LUOS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * nbrbit); - LUOS_TIMER->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE; + ROBUS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * nbrbit); + ROBUS_TIMER->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE; } } /****************************************************************************** @@ -411,11 +411,11 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LUOS_TIMER->COUNT16.INTFLAG.bit.OVF == 1) + if (ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF == 1) { - LUOS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; + ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { RobusHAL_SetTxState(false); diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h index 43b0db4d4..57394f36e 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h @@ -142,61 +142,61 @@ DEFAULT RobusHAL ARDUINO PIN CONFIGURATION /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() \ +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_SERCOM0; \ } while (0U) #endif -#ifndef LUOS_COM - #define LUOS_COM SERCOM0 +#ifndef ROBUS_COM + #define ROBUS_COM SERCOM0 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ SERCOM0_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ SERCOM0_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() SERCOM0_Handler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() SERCOM0_Handler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() \ +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM->APBCMASK.reg |= PM_AHBMASK_DMAC; \ } while (0U) #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMAC +#ifndef ROBUS_DMA + #define ROBUS_DMA DMAC #endif -#ifndef LUOS_DMA_TRIGGER - #define LUOS_DMA_TRIGGER 2 +#ifndef ROBUS_DMA_TRIGGER + #define ROBUS_DMA_TRIGGER 2 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL 0 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL 0 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_LOCK_ENABLE - #define LUOS_TIMER_LOCK_ENABLE() \ +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_TC3; \ } while (0U) #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TC3 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TC3 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TC3_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TC3_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TC3_Handler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TC3_Handler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c index 9549a0d4e..3939d22f6 100644 --- a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c @@ -87,41 +87,41 @@ void RobusHAL_ComInit(uint32_t Baudrate) uint32_t baud = 0; // initialize clock - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); /* Disable the USART before configurations */ - LUOS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; + ROBUS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; /* Configure Baud Rate */ baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; - LUOS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); + ROBUS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON - LUOS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) + ROBUS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) | SERCOM_USART_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits - LUOS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE + ROBUS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_SFDE; /* Enable the UART after the configurations */ - LUOS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; + ROBUS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; /* Wait for sync */ - // while (LUOS_COM->USART.SYNCBUSY.bit.ENABLE) + // while (ROBUS_COM->USART.SYNCBUSY.bit.ENABLE) // ; /* Clean IT */ - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RESETVALUE; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RESETVALUE; /* Enable Receive Complete interrupt */ - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; - NVIC_SetPriority(LUOS_COM_IRQ, 3); - NVIC_EnableIRQ(LUOS_COM_IRQ); + NVIC_SetPriority(ROBUS_COM_IRQ, 3); + NVIC_EnableIRQ(ROBUS_COM_IRQ); // Timeout Initialization timoutclockcnt @@ -129,15 +129,15 @@ void RobusHAL_ComInit(uint32_t Baudrate) RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); + ROBUS_DMA_CLOCK_ENABLE(); - LUOS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; - LUOS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; - LUOS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; - LUOS_DMA->CHID.reg = LUOS_DMA_CHANNEL; // DMA Channel - LUOS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(LUOS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; + ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; + ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; + ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.BTCTRL.reg = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID | DMAC_BTCTRL_SRCINC; - LUOS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; + ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; #endif } /****************************************************************************** @@ -169,13 +169,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT #else - LUOS_DMA->CHCTRLA.reg &= ~DMAC_CHCTRLA_ENABLE; + ROBUS_DMA->CHCTRLA.reg &= ~DMAC_CHCTRLA_ENABLE; #endif // Disable Transmission complete interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start } } /****************************************************************************** @@ -187,15 +187,15 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - while ((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) + while ((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) { - LUOS_COM->USART.DATA.reg; + ROBUS_COM->USART.DATA.reg; } - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_RXC; } else { - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_RXC; + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_RXC; } } /****************************************************************************** @@ -203,31 +203,31 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_RXC) == SERCOM_USART_INTENSET_RXC)) + if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_RXC) == SERCOM_USART_INTFLAG_RXC) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_RXC) == SERCOM_USART_INTENSET_RXC)) { // clean start bit detection - uint8_t data = LUOS_COM->USART.DATA.reg; + uint8_t data = ROBUS_COM->USART.DATA.reg; Recep_data(&data); if (data_size_to_transmit == 0) { - LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start return; } } - else if ((LUOS_COM->USART.STATUS.reg & SERCOM_USART_STATUS_FERR) == SERCOM_USART_STATUS_FERR) // check error on ligne + else if ((ROBUS_COM->USART.STATUS.reg & SERCOM_USART_STATUS_FERR) == SERCOM_USART_STATUS_FERR) // check error on ligne { ctx.rx.status.rx_framing_error = true; } // Transmission management - if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == SERCOM_USART_INTFLAG_TXC) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_TXC) == SERCOM_USART_INTENSET_TXC)) + if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == SERCOM_USART_INTFLAG_TXC) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_TXC) == SERCOM_USART_INTENSET_TXC)) { // Transmission complete data_size_to_transmit = 0; @@ -235,28 +235,28 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LUOS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_TXC; // clear flag - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_TXC; // clear flag + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT } #ifdef USE_TX_IT - else if (((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) == SERCOM_USART_INTFLAG_DRE) && ((LUOS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_DRE) == SERCOM_USART_INTENSET_DRE)) + else if (((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) == SERCOM_USART_INTFLAG_DRE) && ((ROBUS_COM->USART.INTENSET.reg & SERCOM_USART_INTENSET_DRE) == SERCOM_USART_INTENSET_DRE)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LUOS_COM->USART.DATA.reg = *(tx_data++); + ROBUS_COM->USART.DATA.reg = *(tx_data++); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LUOS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_DRE; // clear flag - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT + ROBUS_COM->USART.INTFLAG.reg = SERCOM_USART_INTFLAG_DRE; // clear flag + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_DRE; // disable IT // Enable Transmission complete interrupt - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // disable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // disable IT } } #endif - LUOS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.STATUS.reg = SERCOM_USART_STATUS_PERR | SERCOM_USART_STATUS_FERR | SERCOM_USART_STATUS_BUFOVF; + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start } /****************************************************************************** * @brief Process data transmit @@ -265,7 +265,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while ((LUOS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) != SERCOM_USART_INTFLAG_DRE) + while ((ROBUS_COM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_DRE) != SERCOM_USART_INTFLAG_DRE) ; // Disable RX detec pin if needed @@ -279,20 +279,20 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LUOS_COM->USART.DATA.reg = *(tx_data++); + ROBUS_COM->USART.DATA.reg = *(tx_data++); // Enable Transmission empty buffer interrupt to transmit next datas - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_DRE; // enable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_DRE; // enable IT // Disable Transmission complete interrupt - LUOS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT + ROBUS_COM->USART.INTENCLR.reg = SERCOM_USART_INTENCLR_TXC; // disable IT #else data_size_to_transmit = 0; // to not check IT TC during collision descriptor_section.SRCADDR.reg = (uint32_t)(data + size); - descriptor_section.DSTADDR.reg = (uint32_t)&LUOS_COM->USART.DATA.reg; + descriptor_section.DSTADDR.reg = (uint32_t)&ROBUS_COM->USART.DATA.reg; descriptor_section.BTCNT.reg = size; // Enable TX RobusHAL_SetTxState(true); - LUOS_DMA->CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE; - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT + ROBUS_DMA->CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE; + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT #endif } else @@ -300,14 +300,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 0; // This is a patch du to difference MCU frequency - while (LUOS_TIMER->COUNT16.COUNT.reg < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) + while (ROBUS_TIMER->COUNT16.COUNT.reg < (0xFFFF - (timoutclockcnt * (DEFAULT_TIMEOUT - TIMEOUT_ACK)))) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LUOS_COM->USART.DATA.reg = *data; + ROBUS_COM->USART.DATA.reg = *data; // Enable Transmission complete interrupt because we only have one. - LUOS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT + ROBUS_COM->USART.INTENSET.reg = SERCOM_USART_INTENSET_TXC; // enable IT } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -339,9 +339,9 @@ _CRITICAL void RobusHAL_SetRxDetecPin(uint8_t Enable) _CRITICAL uint8_t RobusHAL_GetTxLockState(void) { uint8_t result = false; - if (LUOS_COM->USART.INTFLAG.bit.RXS == 1) + if (ROBUS_COM->USART.INTFLAG.bit.RXS == 1) { - LUOS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start + ROBUS_COM->USART.INTFLAG.bit.RXS = 1; // clear flag rx start RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; } @@ -372,22 +372,22 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) static void RobusHAL_TimeoutInit(void) { // initialize clock - LUOS_TIMER_LOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); - LUOS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_RESETVALUE; - while ((LUOS_TIMER->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY)) + ROBUS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_RESETVALUE; + while ((ROBUS_TIMER->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY)) ; /* Configure counter mode & prescaler */ - LUOS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; - LUOS_TIMER->COUNT16.CTRLBSET.bit.ONESHOT = 1; + ROBUS_TIMER->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_WAVEGEN_MPWM; + ROBUS_TIMER->COUNT16.CTRLBSET.bit.ONESHOT = 1; - LUOS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); + ROBUS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * DEFAULT_TIMEOUT); /* Clear all interrupt flags */ - LUOS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_RESETVALUE; - LUOS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_OVF; + ROBUS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_RESETVALUE; + ROBUS_TIMER->COUNT16.INTENSET.reg = TC_INTENSET_OVF; - NVIC_SetPriority(LUOS_TIMER_IRQ, 3); - NVIC_EnableIRQ(LUOS_TIMER_IRQ); + NVIC_SetPriority(ROBUS_TIMER_IRQ, 3); + NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout for Rx communication @@ -396,13 +396,13 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // clear IT pending - LUOS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; - LUOS_TIMER->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE; + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // clear IT pending + ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; + ROBUS_TIMER->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE; if (nbrbit != 0) { - LUOS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * nbrbit); - LUOS_TIMER->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE; + ROBUS_TIMER->COUNT16.COUNT.reg = 0xFFFF - (timoutclockcnt * nbrbit); + ROBUS_TIMER->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE; } } /****************************************************************************** @@ -410,11 +410,11 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LUOS_TIMER->COUNT16.INTFLAG.bit.OVF == 1) + if (ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF == 1) { - LUOS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; + ROBUS_TIMER->COUNT16.INTFLAG.bit.OVF = 1; if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { RobusHAL_SetTxState(false); diff --git a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h index 6cc956272..149382460 100644 --- a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h @@ -115,62 +115,62 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() \ +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_SERCOM0; \ } while (0U) #endif -#ifndef LUOS_COM - #define LUOS_COM SERCOM0 +#ifndef ROBUS_COM + #define ROBUS_COM SERCOM0 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ SERCOM0_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ SERCOM0_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER +#ifndef ROBUS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() SERCOM0_Handler() + #define ROBUS_COM_IRQHANDLER() SERCOM0_Handler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() \ +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM->APBCMASK.reg |= PM_AHBMASK_DMAC; \ } while (0U) #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMAC +#ifndef ROBUS_DMA + #define ROBUS_DMA DMAC #endif -#ifndef LUOS_DMA_TRIGGER - #define LUOS_DMA_TRIGGER 2 +#ifndef ROBUS_DMA_TRIGGER + #define ROBUS_DMA_TRIGGER 2 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL 0 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL 0 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_LOCK_ENABLE - #define LUOS_TIMER_LOCK_ENABLE() \ +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ PM->APBCMASK.reg |= PM_APBCMASK_TC3; \ } while (0U) #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TC3 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TC3 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TC3_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TC3_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TC3_Handler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TC3_Handler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/ESP32/board_config.h b/network/robus_network/HAL/ESP32/board_config.h index 2a23d5b91..7f2f2b0d5 100644 --- a/network/robus_network/HAL/ESP32/board_config.h +++ b/network/robus_network/HAL/ESP32/board_config.h @@ -22,7 +22,7 @@ #define COM_TX_PIN GPIO_NUM_10 #define COM_RX_PIN GPIO_NUM_9 // this pin should pin pull up to vcc if no internal pull up - #define LUOS_TIMER_GROUP TIMER_GROUP_1 + #define ROBUS_TIMER_GROUP TIMER_GROUP_1 #elif CONFIG_IDF_TARGET_ESP32C3 #define PTPA_PIN GPIO_NUM_6 diff --git a/network/robus_network/HAL/ESP32/robus_hal.c b/network/robus_network/HAL/ESP32/robus_hal.c index 13f000502..39689fb07 100644 --- a/network/robus_network/HAL/ESP32/robus_hal.c +++ b/network/robus_network/HAL/ESP32/robus_hal.c @@ -67,14 +67,14 @@ gpio_config_t PinConfig; static uart_isr_handle_t handle_console; uart_hal_context_t uart_hal_context = { - .dev = UART_LL_GET_HW(LUOS_COM)}; + .dev = UART_LL_GET_HW(ROBUS_COM)}; gpio_hal_context_t gpio_hal_context = { .dev = GPIO_HAL_GET_HW(GPIO_PORT_0)}; timer_hal_context_t timeout_hal_context = { - .dev = TIMER_LL_GET_HW(LUOS_TIMER_GROUP), - .idx = LUOS_TIMER, + .dev = TIMER_LL_GET_HW(ROBUS_TIMER_GROUP), + .idx = ROBUS_TIMER, }; /******************************************************************************* @@ -170,19 +170,19 @@ void RobusHAL_ComInit(uint32_t Baudrate) .source_clk = UART_SCLK_APB, }; - if (uart_is_driver_installed(LUOS_COM) == true) + if (uart_is_driver_installed(ROBUS_COM) == true) { - ESP_ERROR_CHECK(uart_driver_delete(LUOS_COM)); + ESP_ERROR_CHECK(uart_driver_delete(ROBUS_COM)); } - ESP_ERROR_CHECK(uart_driver_install(LUOS_COM, RX_BUFFER_SIZE, TX_BUFFER_SIZE, 0, NULL, ESP_INTR_FLAG_IRAM)); - ESP_ERROR_CHECK(uart_param_config(LUOS_COM, &uart_config)); - ESP_ERROR_CHECK(uart_set_pin(LUOS_COM, COM_TX_PIN, COM_RX_PIN, GPIO_NUM_NC, GPIO_NUM_NC)); + ESP_ERROR_CHECK(uart_driver_install(ROBUS_COM, RX_BUFFER_SIZE, TX_BUFFER_SIZE, 0, NULL, ESP_INTR_FLAG_IRAM)); + ESP_ERROR_CHECK(uart_param_config(ROBUS_COM, &uart_config)); + ESP_ERROR_CHECK(uart_set_pin(ROBUS_COM, COM_TX_PIN, COM_RX_PIN, GPIO_NUM_NC, GPIO_NUM_NC)); uart_hal_set_rxfifo_full_thr(&uart_hal_context, 1); uart_hal_rxfifo_rst(&uart_hal_context); uart_hal_txfifo_rst(&uart_hal_context); - ESP_ERROR_CHECK(uart_isr_free(LUOS_COM)); - ESP_ERROR_CHECK(uart_isr_register(LUOS_COM, &RobusHAL_ComIrqHandler, NULL, ESP_INTR_FLAG_IRAM, &handle_console)); + ESP_ERROR_CHECK(uart_isr_free(ROBUS_COM)); + ESP_ERROR_CHECK(uart_isr_register(ROBUS_COM, &RobusHAL_ComIrqHandler, NULL, ESP_INTR_FLAG_IRAM, &handle_console)); uart_hal_disable_intr_mask(&uart_hal_context, UART_LL_INTR_MASK); @@ -208,7 +208,7 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) if (Enable == true) { // Put Tx in push pull - esp_rom_gpio_connect_out_signal(COM_TX_PIN, UART_PERIPH_SIGNAL(LUOS_COM, SOC_UART_TX_PIN_IDX), 0, 0); + esp_rom_gpio_connect_out_signal(COM_TX_PIN, UART_PERIPH_SIGNAL(ROBUS_COM, SOC_UART_TX_PIN_IDX), 0, 0); if (TX_EN_PIN != DISABLE) { gpio_hal_set_level(&gpio_hal_context, TX_EN_PIN, 1); @@ -400,8 +400,8 @@ static void RobusHAL_TimeoutInit(void) Timeout.counter_dir = TIMER_COUNT_UP; /*!< Counter direction */ Timeout.auto_reload = TIMER_AUTORELOAD_EN; /*!< Timer auto-reload */ Timeout.divider = Timer_Prescaler - 1; /*!< Counter clock divider. The divider's range is from from 2 to 65536. */ - timer_init(LUOS_TIMER_GROUP, LUOS_TIMER, &Timeout); - timer_isr_callback_add(LUOS_TIMER_GROUP, LUOS_TIMER, &RobusHAL_TimeoutIrqHandler, NULL, ESP_INTR_FLAG_IRAM); + timer_init(ROBUS_TIMER_GROUP, ROBUS_TIMER, &Timeout); + timer_isr_callback_add(ROBUS_TIMER_GROUP, ROBUS_TIMER, &RobusHAL_TimeoutIrqHandler, NULL, ESP_INTR_FLAG_IRAM); timer_hal_set_alarm_value(&timeout_hal_context, DEFAULT_TIMEOUT); RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } diff --git a/network/robus_network/HAL/ESP32/robus_hal_config.h b/network/robus_network/HAL/ESP32/robus_hal_config.h index d4db4a835..c08a61edf 100644 --- a/network/robus_network/HAL/ESP32/robus_hal_config.h +++ b/network/robus_network/HAL/ESP32/robus_hal_config.h @@ -66,17 +66,17 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM - #define LUOS_COM UART_NUM_1 +#ifndef ROBUS_COM + #define ROBUS_COM UART_NUM_1 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_GROUP - #define LUOS_TIMER_GROUP TIMER_GROUP_0 +#ifndef ROBUS_TIMER_GROUP + #define ROBUS_TIMER_GROUP TIMER_GROUP_0 #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIMER_0 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIMER_0 #endif #endif /* _LUOSHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/NATIVE/robus_hal.h b/network/robus_network/HAL/NATIVE/robus_hal.h index 8bad92a03..e7a070210 100644 --- a/network/robus_network/HAL/NATIVE/robus_hal.h +++ b/network/robus_network/HAL/NATIVE/robus_hal.h @@ -14,7 +14,7 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#define LUOS_UUID ((uint32_t *)0x00000001) +#define ROBUS_UUID ((uint32_t *)0x00000001) #define ADDRESS_ALIASES_FLASH ADDRESS_LAST_PAGE_FLASH #define ADDRESS_BOOT_FLAG_FLASH (ADDRESS_LAST_PAGE_FLASH + PAGE_SIZE) - 4 diff --git a/network/robus_network/HAL/NATIVE/robus_hal_config.h b/network/robus_network/HAL/NATIVE/robus_hal_config.h index 9e5394e34..6a54c1961 100644 --- a/network/robus_network/HAL/NATIVE/robus_hal_config.h +++ b/network/robus_network/HAL/NATIVE/robus_hal_config.h @@ -107,49 +107,49 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() X86_STUB +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() X86_STUB #endif -#ifndef LUOS_COM - #define LUOS_COM X86_STUB // STUB +#ifndef ROBUS_COM + #define ROBUS_COM X86_STUB // STUB #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ X86_STUB // STUB +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ X86_STUB // STUB #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() // STUB +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() // STUB #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() X86_STUB +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() X86_STUB #endif -#ifndef LUOS_DMA - #define LUOS_DMA X86_STUB // STUB +#ifndef ROBUS_DMA + #define ROBUS_DMA X86_STUB // STUB #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL X86_STUB // STUB +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL X86_STUB // STUB #endif -#ifndef LUOS_DMA_REMAP - #define LUOS_DMA_REMAP X86_STUB // STUB +#ifndef ROBUS_DMA_REMAP + #define ROBUS_DMA_REMAP X86_STUB // STUB #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_LOCK_ENABLE() // STUB +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() // STUB #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER X86_STUB // STUB +#ifndef ROBUS_TIMER + #define ROBUS_TIMER X86_STUB // STUB #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ X86_STUB // STUB +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ X86_STUB // STUB #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() x86_Timer_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() x86_Timer_IRQHandler() #endif #endif /* _ROBUSHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STM32F0/robus_hal.c b/network/robus_network/HAL/STM32F0/robus_hal.c index d53a24652..b04b833c0 100644 --- a/network/robus_network/HAL/STM32F0/robus_hal.c +++ b/network/robus_network/HAL/STM32F0/robus_hal.c @@ -89,12 +89,12 @@ void RobusHAL_Loop(void) ******************************************************************************/ void RobusHAL_ComInit(uint32_t Baudrate) { - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); LL_USART_InitTypeDef USART_InitStruct; // Initialise USART1 - LL_USART_Disable(LUOS_COM); + LL_USART_Disable(ROBUS_COM); USART_InitStruct.BaudRate = Baudrate; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; @@ -102,32 +102,32 @@ void RobusHAL_ComInit(uint32_t Baudrate) USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; - while (LL_USART_Init(LUOS_COM, &USART_InitStruct) != SUCCESS) + while (LL_USART_Init(ROBUS_COM, &USART_InitStruct) != SUCCESS) ; - LL_USART_Enable(LUOS_COM); + LL_USART_Enable(ROBUS_COM); // Enable Reception interrupt - LL_USART_EnableIT_RXNE(LUOS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); - HAL_NVIC_EnableIRQ(LUOS_COM_IRQ); - HAL_NVIC_SetPriority(LUOS_COM_IRQ, 0, 1); + HAL_NVIC_EnableIRQ(ROBUS_COM_IRQ); + HAL_NVIC_SetPriority(ROBUS_COM_IRQ, 0, 1); // Timeout Initialization Timer_Prescaler = (MCUFREQ / Baudrate) / TIMERDIV; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); - - LL_DMA_SetDataTransferDirection(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); - LL_DMA_SetChannelPriorityLevel(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); - LL_DMA_SetMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); - LL_DMA_SetPeriphIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); - LL_DMA_SetMemoryIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); - LL_DMA_SetPeriphSize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); - LL_DMA_SetMemorySize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); - LL_SYSCFG_SetRemapDMA_USART(LUOS_DMA_REMAP); - LL_DMA_SetPeriphAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)&LUOS_COM->TDR); + ROBUS_DMA_CLOCK_ENABLE(); + + LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_SYSCFG_SetRemapDMA_USART(ROBUS_DMA_REMAP); + LL_DMA_SetPeriphAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)&ROBUS_COM->TDR); #endif } /****************************************************************************** @@ -158,13 +158,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); #else - LL_USART_DisableDMAReq_TX(LUOS_COM); - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_USART_DisableDMAReq_TX(ROBUS_COM); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); #endif // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } } /****************************************************************************** @@ -176,14 +176,14 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - LL_USART_RequestRxDataFlush(LUOS_COM); // Clear data register - LL_USART_EnableDirectionRx(LUOS_COM); - LL_USART_EnableIT_RXNE(LUOS_COM); // Enable Rx IT + LL_USART_RequestRxDataFlush(ROBUS_COM); // Clear data register + LL_USART_EnableDirectionRx(ROBUS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); // Enable Rx IT } else { - LL_USART_DisableDirectionRx(LUOS_COM); - LL_USART_DisableIT_RXNE(LUOS_COM); // Disable Rx IT + LL_USART_DisableDirectionRx(ROBUS_COM); + LL_USART_DisableIT_RXNE(ROBUS_COM); // Disable Rx IT } } /****************************************************************************** @@ -191,31 +191,31 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if ((LL_USART_IsActiveFlag_RXNE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_RXNE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(ROBUS_COM) != RESET)) { // We receive a byte - uint8_t data = LL_USART_ReceiveData8(LUOS_COM); + uint8_t data = LL_USART_ReceiveData8(ROBUS_COM); Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; return; } } - else if (LL_USART_IsActiveFlag_FE(LUOS_COM) != RESET) + else if (LL_USART_IsActiveFlag_FE(ROBUS_COM) != RESET) { // Framing ERROR ctx.rx.status.rx_framing_error = true; } // Transmission management - if ((LL_USART_IsActiveFlag_TC(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_TC(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(ROBUS_COM) != RESET)) { // Transmission complete data_size_to_transmit = 0; @@ -223,26 +223,26 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LL_USART_ClearFlag_TC(LUOS_COM); - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_ClearFlag_TC(ROBUS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } #ifdef USE_TX_IT - else if ((LL_USART_IsActiveFlag_TXE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(LUOS_COM) != RESET)) + else if ((LL_USART_IsActiveFlag_TXE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(ROBUS_COM) != RESET)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); // Enable Transmission complete interrupt - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } } #endif - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; } /****************************************************************************** * @brief Process data transmit @@ -251,7 +251,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while (LL_USART_IsActiveFlag_TXE(LUOS_COM) == RESET) + while (LL_USART_IsActiveFlag_TXE(ROBUS_COM) == RESET) ; // Disable RX detec pin if needed @@ -265,27 +265,27 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); // Enable Transmission empty buffer interrupt to transmit next datas - LL_USART_EnableIT_TXE(LUOS_COM); + LL_USART_EnableIT_TXE(ROBUS_COM); // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); #else data_size_to_transmit = 0; // Reset this value avoiding to check IT TC during collision // Disable DMA to load new length to be tranmitted - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // configure address to be transmitted by DMA - LL_DMA_SetMemoryAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetMemoryAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)data); // set length to be tranmitted - LL_DMA_SetDataLength(LUOS_DMA, LUOS_DMA_CHANNEL, size); + LL_DMA_SetDataLength(ROBUS_DMA, ROBUS_DMA_CHANNEL, size); // set request DMA - LL_USART_EnableDMAReq_TX(LUOS_COM); + LL_USART_EnableDMAReq_TX(ROBUS_COM); // Enable TX RobusHAL_SetTxState(true); // Enable DMA again - LL_DMA_EnableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_EnableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // enable transmit complete - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); #endif } else @@ -293,14 +293,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) data_size_to_transmit = 1; // wait before send ack // this is a patch du to difference MCU frequency - while (LL_TIM_GetCounter(LUOS_TIMER) < TIMEOUT_ACK) + while (LL_TIM_GetCounter(ROBUS_TIMER) < TIMEOUT_ACK) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LL_USART_TransmitData8(LUOS_COM, *data); + LL_USART_TransmitData8(ROBUS_COM, *data); // Enable Transmission complete interrupt because we only have one. - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -334,7 +334,7 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) uint8_t result = false; #ifdef USART_ISR_BUSY - if (LL_USART_IsActiveFlag_BUSY(LUOS_COM) == true) + if (LL_USART_IsActiveFlag_BUSY(ROBUS_COM) == true) { RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; @@ -367,18 +367,18 @@ static void RobusHAL_TimeoutInit(void) LL_TIM_InitTypeDef TimerInit = {0}; // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); TimerInit.Autoreload = DEFAULT_TIMEOUT; TimerInit.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TimerInit.CounterMode = LL_TIM_COUNTERMODE_UP; TimerInit.Prescaler = Timer_Prescaler - 1; TimerInit.RepetitionCounter = 0; - while (LL_TIM_Init(LUOS_TIMER, &TimerInit) != SUCCESS) + while (LL_TIM_Init(ROBUS_TIMER, &TimerInit) != SUCCESS) ; - LL_TIM_EnableIT_UPDATE(LUOS_TIMER); - HAL_NVIC_SetPriority(LUOS_TIMER_IRQ, 0, 2); - HAL_NVIC_EnableIRQ(LUOS_TIMER_IRQ); + LL_TIM_EnableIT_UPDATE(ROBUS_TIMER); + HAL_NVIC_SetPriority(ROBUS_TIMER_IRQ, 0, 2); + HAL_NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout communication @@ -387,14 +387,14 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - LL_TIM_DisableCounter(LUOS_TIMER); - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // Clear IT pending NVIC - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_SetCounter(LUOS_TIMER, 0); // Reset counter + LL_TIM_DisableCounter(ROBUS_TIMER); + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // Clear IT pending NVIC + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_SetCounter(ROBUS_TIMER, 0); // Reset counter if (nbrbit != 0) { - LL_TIM_SetAutoReload(LUOS_TIMER, nbrbit); // reload value - LL_TIM_EnableCounter(LUOS_TIMER); + LL_TIM_SetAutoReload(ROBUS_TIMER, nbrbit); // reload value + LL_TIM_EnableCounter(ROBUS_TIMER); } } /****************************************************************************** @@ -402,12 +402,12 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LL_TIM_IsActiveFlag_UPDATE(LUOS_TIMER) != RESET) + if (LL_TIM_IsActiveFlag_UPDATE(ROBUS_TIMER) != RESET) { - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_DisableCounter(LUOS_TIMER); + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_DisableCounter(ROBUS_TIMER); if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { // Enable RX detection pin if needed diff --git a/network/robus_network/HAL/STM32F0/robus_hal_config.h b/network/robus_network/HAL/STM32F0/robus_hal_config.h index b922a0e12..d0cebac4f 100644 --- a/network/robus_network/HAL/STM32F0/robus_hal_config.h +++ b/network/robus_network/HAL/STM32F0/robus_hal_config.h @@ -109,48 +109,48 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() #endif -#ifndef LUOS_COM - #define LUOS_COM USART1 +#ifndef ROBUS_COM + #define ROBUS_COM USART1 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ USART1_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ USART1_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() USART1_IRQHandler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() USART1_IRQHandler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMA1 +#ifndef ROBUS_DMA + #define ROBUS_DMA DMA1 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_2 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_2 #endif -#ifndef LUOS_DMA_REMAP - #define LUOS_DMA_REMAP 0 +#ifndef ROBUS_DMA_REMAP + #define ROBUS_DMA_REMAP 0 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM6_CLK_ENABLE() +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM6_CLK_ENABLE() #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIM6 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIM6 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TIM6_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TIM6_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STM32F4/robus_hal.c b/network/robus_network/HAL/STM32F4/robus_hal.c index 49985e5e6..484ba00c5 100644 --- a/network/robus_network/HAL/STM32F4/robus_hal.c +++ b/network/robus_network/HAL/STM32F4/robus_hal.c @@ -90,12 +90,12 @@ void RobusHAL_Loop(void) ******************************************************************************/ void RobusHAL_ComInit(uint32_t Baudrate) { - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); LL_USART_InitTypeDef USART_InitStruct; // Initialise USART - LL_USART_Disable(LUOS_COM); + LL_USART_Disable(ROBUS_COM); USART_InitStruct.BaudRate = Baudrate; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; @@ -103,33 +103,33 @@ void RobusHAL_ComInit(uint32_t Baudrate) USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; - while (LL_USART_Init(LUOS_COM, &USART_InitStruct) != SUCCESS) + while (LL_USART_Init(ROBUS_COM, &USART_InitStruct) != SUCCESS) ; - LL_USART_Enable(LUOS_COM); + LL_USART_Enable(ROBUS_COM); // Enable Reception interrupt - LL_USART_EnableIT_RXNE(LUOS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); - HAL_NVIC_EnableIRQ(LUOS_COM_IRQ); - HAL_NVIC_SetPriority(LUOS_COM_IRQ, 0, 1); + HAL_NVIC_EnableIRQ(ROBUS_COM_IRQ); + HAL_NVIC_SetPriority(ROBUS_COM_IRQ, 0, 1); // Timeout Initialization Timer_Prescaler = (MCUFREQ / Baudrate) / TIMERDIV; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); - - LL_DMA_SetChannelSelection(LUOS_DMA, LUOS_DMA_STREAM, LUOS_DMA_CHANNEL); - LL_DMA_SetDataTransferDirection(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); - LL_DMA_SetStreamPriorityLevel(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_PRIORITY_LOW); - LL_DMA_SetMode(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_MODE_NORMAL); - LL_DMA_SetPeriphIncMode(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_PERIPH_NOINCREMENT); - LL_DMA_SetMemoryIncMode(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_MEMORY_INCREMENT); - LL_DMA_SetPeriphSize(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_PDATAALIGN_BYTE); - LL_DMA_SetMemorySize(LUOS_DMA, LUOS_DMA_STREAM, LL_DMA_MDATAALIGN_BYTE); - LL_DMA_DisableFifoMode(LUOS_DMA, LUOS_DMA_STREAM); - LL_DMA_SetPeriphAddress(LUOS_DMA, LUOS_DMA_STREAM, (uint32_t)&LUOS_COM->DR); + ROBUS_DMA_CLOCK_ENABLE(); + + LL_DMA_SetChannelSelection(ROBUS_DMA, ROBUS_DMA_STREAM, ROBUS_DMA_CHANNEL); + LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetStreamPriorityLevel(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(ROBUS_DMA, ROBUS_DMA_STREAM, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_DisableFifoMode(ROBUS_DMA, ROBUS_DMA_STREAM); + LL_DMA_SetPeriphAddress(ROBUS_DMA, ROBUS_DMA_STREAM, (uint32_t)&ROBUS_COM->DR); #endif } /****************************************************************************** @@ -160,13 +160,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); #else - LL_USART_DisableDMAReq_TX(LUOS_COM); - LL_DMA_DisableStream(LUOS_DMA, LUOS_DMA_STREAM); + LL_USART_DisableDMAReq_TX(ROBUS_COM); + LL_DMA_DisableStream(ROBUS_DMA, ROBUS_DMA_STREAM); #endif // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } } /****************************************************************************** @@ -178,14 +178,14 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - LL_USART_ReceiveData8(LUOS_COM); // empty buffer - LL_USART_EnableDirectionRx(LUOS_COM); - LL_USART_EnableIT_RXNE(LUOS_COM); // Enable Rx IT + LL_USART_ReceiveData8(ROBUS_COM); // empty buffer + LL_USART_EnableDirectionRx(ROBUS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); // Enable Rx IT } else { - LL_USART_DisableDirectionRx(LUOS_COM); - LL_USART_DisableIT_RXNE(LUOS_COM); // Disable Rx IT + LL_USART_DisableDirectionRx(ROBUS_COM); + LL_USART_DisableIT_RXNE(ROBUS_COM); // Disable Rx IT } } /****************************************************************************** @@ -193,30 +193,30 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if ((LL_USART_IsActiveFlag_RXNE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_RXNE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(ROBUS_COM) != RESET)) { // We receive a byte - uint8_t data = LL_USART_ReceiveData8(LUOS_COM); + uint8_t data = LL_USART_ReceiveData8(ROBUS_COM); Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { - LUOS_COM->SR = 0xFFFFFFFF; + ROBUS_COM->SR = 0xFFFFFFFF; return; } } - else if (LL_USART_IsActiveFlag_FE(LUOS_COM) != RESET) + else if (LL_USART_IsActiveFlag_FE(ROBUS_COM) != RESET) { // Framing ERROR ctx.rx.status.rx_framing_error = true; } // Transmission management - if ((LL_USART_IsActiveFlag_TC(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_TC(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(ROBUS_COM) != RESET)) { // Transmission complete data_size_to_transmit = 0; @@ -224,26 +224,26 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LL_USART_ClearFlag_TC(LUOS_COM); - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_ClearFlag_TC(ROBUS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } #ifdef USE_TX_IT - else if ((LL_USART_IsActiveFlag_TXE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(LUOS_COM) != RESET)) + else if ((LL_USART_IsActiveFlag_TXE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(ROBUS_COM) != RESET)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); // Enable Transmission complete interrupt - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } } #endif - LUOS_COM->SR = 0xFFFFFFFF; + ROBUS_COM->SR = 0xFFFFFFFF; } /****************************************************************************** * @brief Process data transmit @@ -252,7 +252,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while (LL_USART_IsActiveFlag_TXE(LUOS_COM) == RESET) + while (LL_USART_IsActiveFlag_TXE(ROBUS_COM) == RESET) ; // Disable RX detec pin if needed @@ -266,30 +266,30 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); // Enable Transmission empty buffer interrupt to transmit next datas - LL_USART_EnableIT_TXE(LUOS_COM); + LL_USART_EnableIT_TXE(ROBUS_COM); // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); #else data_size_to_transmit = 0; // to not check IT TC during collision // Disable DMA to load new length to be tranmitted - LL_DMA_DisableStream(LUOS_DMA, LUOS_DMA_STREAM); + LL_DMA_DisableStream(ROBUS_DMA, ROBUS_DMA_STREAM); // Configure address to be transmitted by DMA - LL_DMA_SetMemoryAddress(LUOS_DMA, LUOS_DMA_STREAM, (uint32_t)data); + LL_DMA_SetMemoryAddress(ROBUS_DMA, ROBUS_DMA_STREAM, (uint32_t)data); // Set length to be tranmitted - LL_DMA_SetDataLength(LUOS_DMA, LUOS_DMA_STREAM, size); + LL_DMA_SetDataLength(ROBUS_DMA, ROBUS_DMA_STREAM, size); // Set request DMA - LL_USART_EnableDMAReq_TX(LUOS_COM); + LL_USART_EnableDMAReq_TX(ROBUS_COM); // clear flag shity way must be change - LUOS_DMA->HIFCR = 0xFFFFFFFF; - LUOS_DMA->LIFCR = 0xFFFFFFFF; + ROBUS_DMA->HIFCR = 0xFFFFFFFF; + ROBUS_DMA->LIFCR = 0xFFFFFFFF; // Enable TX RobusHAL_SetTxState(true); // Enable DMA again - LL_DMA_EnableStream(LUOS_DMA, LUOS_DMA_STREAM); + LL_DMA_EnableStream(ROBUS_DMA, ROBUS_DMA_STREAM); // Enable transmit complete - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); #endif } else @@ -297,14 +297,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 1; // This is a patch du to difference MCU frequency - while (LL_TIM_GetCounter(LUOS_TIMER) < TIMEOUT_ACK) + while (LL_TIM_GetCounter(ROBUS_TIMER) < TIMEOUT_ACK) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LL_USART_TransmitData8(LUOS_COM, *data); + LL_USART_TransmitData8(ROBUS_COM, *data); // Enable Transmission complete interrupt because we only have one. - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -338,7 +338,7 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) uint8_t result = false; #ifdef USART_ISR_BUSY - if (LL_USART_IsActiveFlag_BUSY(LUOS_COM) == true) + if (LL_USART_IsActiveFlag_BUSY(ROBUS_COM) == true) { RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; @@ -371,18 +371,18 @@ static void RobusHAL_TimeoutInit(void) LL_TIM_InitTypeDef TimerInit = {0}; // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); TimerInit.Autoreload = DEFAULT_TIMEOUT; TimerInit.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TimerInit.CounterMode = LL_TIM_COUNTERMODE_UP; TimerInit.Prescaler = Timer_Prescaler - 1; TimerInit.RepetitionCounter = 0; - while (LL_TIM_Init(LUOS_TIMER, &TimerInit) != SUCCESS) + while (LL_TIM_Init(ROBUS_TIMER, &TimerInit) != SUCCESS) ; - LL_TIM_EnableIT_UPDATE(LUOS_TIMER); - HAL_NVIC_SetPriority(LUOS_TIMER_IRQ, 0, 2); - HAL_NVIC_EnableIRQ(LUOS_TIMER_IRQ); + LL_TIM_EnableIT_UPDATE(ROBUS_TIMER); + HAL_NVIC_SetPriority(ROBUS_TIMER_IRQ, 0, 2); + HAL_NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout for Rx communication @@ -391,14 +391,14 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - LL_TIM_DisableCounter(LUOS_TIMER); - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // Clear IT pending NVIC - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_SetCounter(LUOS_TIMER, 0); // Reset counter + LL_TIM_DisableCounter(ROBUS_TIMER); + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // Clear IT pending NVIC + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_SetCounter(ROBUS_TIMER, 0); // Reset counter if (nbrbit != 0) { - LL_TIM_SetAutoReload(LUOS_TIMER, nbrbit); // reload value - LL_TIM_EnableCounter(LUOS_TIMER); + LL_TIM_SetAutoReload(ROBUS_TIMER, nbrbit); // reload value + LL_TIM_EnableCounter(ROBUS_TIMER); } } /****************************************************************************** @@ -406,12 +406,12 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LL_TIM_IsActiveFlag_UPDATE(LUOS_TIMER) != RESET) + if (LL_TIM_IsActiveFlag_UPDATE(ROBUS_TIMER) != RESET) { - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_DisableCounter(LUOS_TIMER); + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_DisableCounter(ROBUS_TIMER); if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { // Enable RX detection pin if needed diff --git a/network/robus_network/HAL/STM32F4/robus_hal_config.h b/network/robus_network/HAL/STM32F4/robus_hal_config.h index 86e44f46e..0f130fa89 100644 --- a/network/robus_network/HAL/STM32F4/robus_hal_config.h +++ b/network/robus_network/HAL/STM32F4/robus_hal_config.h @@ -110,49 +110,49 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() #endif -#ifndef LUOS_COM - #define LUOS_COM USART1 +#ifndef ROBUS_COM + #define ROBUS_COM USART1 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ USART1_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ USART1_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() USART1_IRQHandler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() USART1_IRQHandler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA2_CLK_ENABLE(); +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA2_CLK_ENABLE(); #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMA2 +#ifndef ROBUS_DMA + #define ROBUS_DMA DMA2 #endif -#ifndef LUOS_DMA_STREAM - #define LUOS_DMA_STREAM LL_DMA_STREAM_7 +#ifndef ROBUS_DMA_STREAM + #define ROBUS_DMA_STREAM LL_DMA_STREAM_7 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_4 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_4 #endif -#ifndef LUOS_DMA_REMAP - #define LUOS_DMA_REMAP 0 +#ifndef ROBUS_DMA_REMAP + #define ROBUS_DMA_REMAP 0 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIM5 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIM5 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TIM5_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TIM5_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TIM5_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STM32G4/robus_hal.c b/network/robus_network/HAL/STM32G4/robus_hal.c index dc70622c2..d1800a356 100644 --- a/network/robus_network/HAL/STM32G4/robus_hal.c +++ b/network/robus_network/HAL/STM32G4/robus_hal.c @@ -91,12 +91,12 @@ void RobusHAL_Loop(void) ******************************************************************************/ void RobusHAL_ComInit(uint32_t Baudrate) { - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); LL_USART_InitTypeDef USART_InitStruct; // Initialise USART1 - LL_USART_Disable(LUOS_COM); + LL_USART_Disable(ROBUS_COM); USART_InitStruct.BaudRate = Baudrate; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; @@ -104,32 +104,32 @@ void RobusHAL_ComInit(uint32_t Baudrate) USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; - while (LL_USART_Init(LUOS_COM, &USART_InitStruct) != SUCCESS) + while (LL_USART_Init(ROBUS_COM, &USART_InitStruct) != SUCCESS) ; - LL_USART_Enable(LUOS_COM); + LL_USART_Enable(ROBUS_COM); // Enable Reception interrupt - LL_USART_EnableIT_RXNE(LUOS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); - HAL_NVIC_EnableIRQ(LUOS_COM_IRQ); - HAL_NVIC_SetPriority(LUOS_COM_IRQ, 0, 1); + HAL_NVIC_EnableIRQ(ROBUS_COM_IRQ); + HAL_NVIC_SetPriority(ROBUS_COM_IRQ, 0, 1); // Timeout Initialization Timer_Prescaler = (MCUFREQ / Baudrate) / TIMERDIV; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); - - LL_DMA_SetPeriphRequest(LUOS_DMA, LUOS_DMA_CHANNEL, LUOS_DMA_REQUEST); - LL_DMA_SetDataTransferDirection(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); - LL_DMA_SetChannelPriorityLevel(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); - LL_DMA_SetMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); - LL_DMA_SetPeriphIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); - LL_DMA_SetMemoryIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); - LL_DMA_SetPeriphSize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); - LL_DMA_SetMemorySize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); - LL_DMA_SetPeriphAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)&LUOS_COM->TDR); + ROBUS_DMA_CLOCK_ENABLE(); + + LL_DMA_SetPeriphRequest(ROBUS_DMA, ROBUS_DMA_CHANNEL, ROBUS_DMA_REQUEST); + LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)&ROBUS_COM->TDR); #endif } /****************************************************************************** @@ -160,13 +160,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); #else - LL_USART_DisableDMAReq_TX(LUOS_COM); - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_USART_DisableDMAReq_TX(ROBUS_COM); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); #endif // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } } /****************************************************************************** @@ -178,14 +178,14 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - LL_USART_RequestRxDataFlush(LUOS_COM); // Clear data register - LL_USART_EnableDirectionRx(LUOS_COM); - LL_USART_EnableIT_RXNE(LUOS_COM); // Enable Rx IT + LL_USART_RequestRxDataFlush(ROBUS_COM); // Clear data register + LL_USART_EnableDirectionRx(ROBUS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); // Enable Rx IT } else { - LL_USART_DisableDirectionRx(LUOS_COM); - LL_USART_DisableIT_RXNE(LUOS_COM); // Disable Rx IT + LL_USART_DisableDirectionRx(ROBUS_COM); + LL_USART_DisableIT_RXNE(ROBUS_COM); // Disable Rx IT } } /****************************************************************************** @@ -193,30 +193,30 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if ((LL_USART_IsActiveFlag_RXNE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_RXNE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(ROBUS_COM) != RESET)) { // We receive a byte - uint8_t data = LL_USART_ReceiveData8(LUOS_COM); + uint8_t data = LL_USART_ReceiveData8(ROBUS_COM); Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; return; } } - else if (LL_USART_IsActiveFlag_FE(LUOS_COM) != RESET) + else if (LL_USART_IsActiveFlag_FE(ROBUS_COM) != RESET) { // Framing ERROR ctx.rx.status.rx_framing_error = true; } // Transmission management - if ((LL_USART_IsActiveFlag_TC(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_TC(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(ROBUS_COM) != RESET)) { // Transmission complete data_size_to_transmit = 0; @@ -224,26 +224,26 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LL_USART_ClearFlag_TC(LUOS_COM); - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_ClearFlag_TC(ROBUS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } #ifdef USE_TX_IT - else if ((LL_USART_IsActiveFlag_TXE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(LUOS_COM) != RESET)) + else if ((LL_USART_IsActiveFlag_TXE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(ROBUS_COM) != RESET)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); // Enable Transmission complete interrupt - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } } #endif - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; } /****************************************************************************** * @brief Process data transmit @@ -252,7 +252,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while (LL_USART_IsActiveFlag_TXE(LUOS_COM) == RESET) + while (LL_USART_IsActiveFlag_TXE(ROBUS_COM) == RESET) ; // Disable RX detec pin if needed @@ -266,27 +266,27 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); // Enable Transmission empty buffer interrupt to transmit next datas - LL_USART_EnableIT_TXE(LUOS_COM); + LL_USART_EnableIT_TXE(ROBUS_COM); // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); #else data_size_to_transmit = 0; // to not check IT TC during collision // Disable DMA to load new length to be tranmitted - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // configure address to be transmitted by DMA - LL_DMA_SetMemoryAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetMemoryAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)data); // set length to be tranmitted - LL_DMA_SetDataLength(LUOS_DMA, LUOS_DMA_CHANNEL, size); + LL_DMA_SetDataLength(ROBUS_DMA, ROBUS_DMA_CHANNEL, size); // set request DMA - LL_USART_EnableDMAReq_TX(LUOS_COM); + LL_USART_EnableDMAReq_TX(ROBUS_COM); // Enable TX RobusHAL_SetTxState(true); // Enable DMA again - LL_DMA_EnableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_EnableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // enable transmit complete - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); #endif } else @@ -294,14 +294,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 1; // This is a patch du to difference MCU frequency - while (LL_TIM_GetCounter(LUOS_TIMER) < TIMEOUT_ACK) + while (LL_TIM_GetCounter(ROBUS_TIMER) < TIMEOUT_ACK) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LL_USART_TransmitData8(LUOS_COM, *data); + LL_USART_TransmitData8(ROBUS_COM, *data); // Enable Transmission complete interrupt because we only have one. - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -335,7 +335,7 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) uint8_t result = false; #ifdef USART_ISR_BUSY - if (LL_USART_IsActiveFlag_BUSY(LUOS_COM) == true) + if (LL_USART_IsActiveFlag_BUSY(ROBUS_COM) == true) { RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; @@ -368,18 +368,18 @@ static void RobusHAL_TimeoutInit(void) LL_TIM_InitTypeDef TimerInit = {0}; // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); TimerInit.Autoreload = DEFAULT_TIMEOUT; TimerInit.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TimerInit.CounterMode = LL_TIM_COUNTERMODE_UP; TimerInit.Prescaler = Timer_Prescaler - 1; TimerInit.RepetitionCounter = 0; - while (LL_TIM_Init(LUOS_TIMER, &TimerInit) != SUCCESS) + while (LL_TIM_Init(ROBUS_TIMER, &TimerInit) != SUCCESS) ; - LL_TIM_EnableIT_UPDATE(LUOS_TIMER); - HAL_NVIC_SetPriority(LUOS_TIMER_IRQ, 0, 2); - HAL_NVIC_EnableIRQ(LUOS_TIMER_IRQ); + LL_TIM_EnableIT_UPDATE(ROBUS_TIMER); + HAL_NVIC_SetPriority(ROBUS_TIMER_IRQ, 0, 2); + HAL_NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout communication @@ -388,14 +388,14 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - LL_TIM_DisableCounter(LUOS_TIMER); - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // Clear IT pending NVIC - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_SetCounter(LUOS_TIMER, 0); // Reset counter + LL_TIM_DisableCounter(ROBUS_TIMER); + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // Clear IT pending NVIC + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_SetCounter(ROBUS_TIMER, 0); // Reset counter if (nbrbit != 0) { - LL_TIM_SetAutoReload(LUOS_TIMER, nbrbit); // reload value - LL_TIM_EnableCounter(LUOS_TIMER); + LL_TIM_SetAutoReload(ROBUS_TIMER, nbrbit); // reload value + LL_TIM_EnableCounter(ROBUS_TIMER); } } /****************************************************************************** @@ -403,12 +403,12 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LL_TIM_IsActiveFlag_UPDATE(LUOS_TIMER) != RESET) + if (LL_TIM_IsActiveFlag_UPDATE(ROBUS_TIMER) != RESET) { - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_DisableCounter(LUOS_TIMER); + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_DisableCounter(ROBUS_TIMER); if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { // Enable RX detection pin if needed diff --git a/network/robus_network/HAL/STM32G4/robus_hal_config.h b/network/robus_network/HAL/STM32G4/robus_hal_config.h index 74277b865..d4ada2cdc 100644 --- a/network/robus_network/HAL/STM32G4/robus_hal_config.h +++ b/network/robus_network/HAL/STM32G4/robus_hal_config.h @@ -109,52 +109,52 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() #endif -#ifndef LUOS_COM - #define LUOS_COM USART1 +#ifndef ROBUS_COM + #define ROBUS_COM USART1 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ USART1_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ USART1_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() USART1_IRQHandler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() USART1_IRQHandler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() \ +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ } while (0U) #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMA1 +#ifndef ROBUS_DMA + #define ROBUS_DMA DMA1 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_1 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_1 #endif -#ifndef LUOS_DMA_REQUEST - #define LUOS_DMA_REQUEST LL_DMAMUX_REQ_USART1_TX +#ifndef ROBUS_DMA_REQUEST + #define ROBUS_DMA_REQUEST LL_DMAMUX_REQ_USART1_TX #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM7_CLK_ENABLE() +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM7_CLK_ENABLE() #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIM7 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIM7 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TIM7_DAC_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TIM7_DAC_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TIM7_DAC_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TIM7_DAC_IRQHandler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STM32L0/robus_hal.c b/network/robus_network/HAL/STM32L0/robus_hal.c index 5a25f9417..285122905 100644 --- a/network/robus_network/HAL/STM32L0/robus_hal.c +++ b/network/robus_network/HAL/STM32L0/robus_hal.c @@ -89,12 +89,12 @@ void RobusHAL_Loop(void) ******************************************************************************/ void RobusHAL_ComInit(uint32_t Baudrate) { - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); LL_USART_InitTypeDef USART_InitStruct; // Initialise USART1 - LL_USART_Disable(LUOS_COM); + LL_USART_Disable(ROBUS_COM); USART_InitStruct.BaudRate = Baudrate; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; @@ -102,32 +102,32 @@ void RobusHAL_ComInit(uint32_t Baudrate) USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; - while (LL_USART_Init(LUOS_COM, &USART_InitStruct) != SUCCESS) + while (LL_USART_Init(ROBUS_COM, &USART_InitStruct) != SUCCESS) ; - LL_USART_Enable(LUOS_COM); + LL_USART_Enable(ROBUS_COM); // Enable Reception interrupt - LL_USART_EnableIT_RXNE(LUOS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); - HAL_NVIC_EnableIRQ(LUOS_COM_IRQ); - HAL_NVIC_SetPriority(LUOS_COM_IRQ, 0, 1); + HAL_NVIC_EnableIRQ(ROBUS_COM_IRQ); + HAL_NVIC_SetPriority(ROBUS_COM_IRQ, 0, 1); // Timeout Initialization Timer_Prescaler = (MCUFREQ / Baudrate) / TIMERDIV; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); - - LL_DMA_SetPeriphRequest(LUOS_DMA, LUOS_DMA_CHANNEL, LUOS_DMA_REQUEST); - LL_DMA_SetDataTransferDirection(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); - LL_DMA_SetChannelPriorityLevel(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); - LL_DMA_SetMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); - LL_DMA_SetPeriphIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); - LL_DMA_SetMemoryIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); - LL_DMA_SetPeriphSize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); - LL_DMA_SetMemorySize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); - LL_DMA_SetPeriphAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)&LUOS_COM->TDR); + ROBUS_DMA_CLOCK_ENABLE(); + + LL_DMA_SetPeriphRequest(ROBUS_DMA, ROBUS_DMA_CHANNEL, ROBUS_DMA_REQUEST); + LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)&ROBUS_COM->TDR); #endif } /****************************************************************************** @@ -158,13 +158,13 @@ void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); #else - LL_USART_DisableDMAReq_TX(LUOS_COM); - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_USART_DisableDMAReq_TX(ROBUS_COM); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); #endif // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } } /****************************************************************************** @@ -176,14 +176,14 @@ void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - LL_USART_RequestRxDataFlush(LUOS_COM); // Clear data register - LL_USART_EnableDirectionRx(LUOS_COM); - LL_USART_EnableIT_RXNE(LUOS_COM); // Enable Rx IT + LL_USART_RequestRxDataFlush(ROBUS_COM); // Clear data register + LL_USART_EnableDirectionRx(ROBUS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); // Enable Rx IT } else { - LL_USART_DisableDirectionRx(LUOS_COM); - LL_USART_DisableIT_RXNE(LUOS_COM); // Disable Rx IT + LL_USART_DisableDirectionRx(ROBUS_COM); + LL_USART_DisableIT_RXNE(ROBUS_COM); // Disable Rx IT } } /****************************************************************************** @@ -191,31 +191,31 @@ void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -void LUOS_COM_IRQHANDLER() +void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if ((LL_USART_IsActiveFlag_RXNE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_RXNE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(ROBUS_COM) != RESET)) { // We receive a byte - uint8_t data = LL_USART_ReceiveData8(LUOS_COM); + uint8_t data = LL_USART_ReceiveData8(ROBUS_COM); Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; return; } } - else if (LL_USART_IsActiveFlag_FE(LUOS_COM) != RESET) + else if (LL_USART_IsActiveFlag_FE(ROBUS_COM) != RESET) { // Framing ERROR ctx.rx.status.rx_framing_error = true; } // Transmission management - if ((LL_USART_IsActiveFlag_TC(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_TC(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(ROBUS_COM) != RESET)) { // Transmission complete data_size_to_transmit = 0; @@ -223,26 +223,26 @@ void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LL_USART_ClearFlag_TC(LUOS_COM); - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_ClearFlag_TC(ROBUS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } #ifdef USE_TX_IT - else if ((LL_USART_IsActiveFlag_TXE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(LUOS_COM) != RESET)) + else if ((LL_USART_IsActiveFlag_TXE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(ROBUS_COM) != RESET)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); // Enable Transmission complete interrupt - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } } #endif - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; } /****************************************************************************** * @brief Process data transmit @@ -251,7 +251,7 @@ void LUOS_COM_IRQHANDLER() ******************************************************************************/ void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while (LL_USART_IsActiveFlag_TXE(LUOS_COM) == RESET) + while (LL_USART_IsActiveFlag_TXE(ROBUS_COM) == RESET) ; // Disable RX detec pin if needed @@ -265,27 +265,27 @@ void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); // Enable Transmission empty buffer interrupt to transmit next datas - LL_USART_EnableIT_TXE(LUOS_COM); + LL_USART_EnableIT_TXE(ROBUS_COM); // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); #else data_size_to_transmit = 0; // Reset this value avoiding to check IT TC during collision // Disable DMA to load new length to be tranmitted - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // configure address to be transmitted by DMA - LL_DMA_SetMemoryAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetMemoryAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)data); // set length to be tranmitted - LL_DMA_SetDataLength(LUOS_DMA, LUOS_DMA_CHANNEL, size); + LL_DMA_SetDataLength(ROBUS_DMA, ROBUS_DMA_CHANNEL, size); // set request DMA - LL_USART_EnableDMAReq_TX(LUOS_COM); + LL_USART_EnableDMAReq_TX(ROBUS_COM); // Enable TX RobusHAL_SetTxState(true); // Enable DMA again - LL_DMA_EnableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_EnableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // enable transmit complete - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); #endif } else @@ -293,14 +293,14 @@ void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // wait before send ack data_size_to_transmit = 1; // this is a patch du to difference MCU frequency - while (LL_TIM_GetCounter(LUOS_TIMER) < TIMEOUT_ACK) + while (LL_TIM_GetCounter(ROBUS_TIMER) < TIMEOUT_ACK) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LL_USART_TransmitData8(LUOS_COM, *data); + LL_USART_TransmitData8(ROBUS_COM, *data); // Enable Transmission complete interrupt because we only have one. - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -334,7 +334,7 @@ uint8_t RobusHAL_GetTxLockState(void) uint8_t result = false; #ifdef USART_ISR_BUSY - if (LL_USART_IsActiveFlag_BUSY(LUOS_COM) == true) + if (LL_USART_IsActiveFlag_BUSY(ROBUS_COM) == true) { RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; @@ -367,17 +367,17 @@ static void RobusHAL_TimeoutInit(void) LL_TIM_InitTypeDef TimerInit = {0}; // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); TimerInit.Autoreload = DEFAULT_TIMEOUT; TimerInit.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TimerInit.CounterMode = LL_TIM_COUNTERMODE_UP; TimerInit.Prescaler = Timer_Prescaler - 1; - while (LL_TIM_Init(LUOS_TIMER, &TimerInit) != SUCCESS) + while (LL_TIM_Init(ROBUS_TIMER, &TimerInit) != SUCCESS) ; - LL_TIM_EnableIT_UPDATE(LUOS_TIMER); - HAL_NVIC_SetPriority(LUOS_TIMER_IRQ, 0, 2); - HAL_NVIC_EnableIRQ(LUOS_TIMER_IRQ); + LL_TIM_EnableIT_UPDATE(ROBUS_TIMER); + HAL_NVIC_SetPriority(ROBUS_TIMER_IRQ, 0, 2); + HAL_NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout communication @@ -386,14 +386,14 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ void RobusHAL_ResetTimeout(uint16_t nbrbit) { - LL_TIM_DisableCounter(LUOS_TIMER); - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // Clear IT pending NVIC - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_SetCounter(LUOS_TIMER, 0); // Reset counter + LL_TIM_DisableCounter(ROBUS_TIMER); + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // Clear IT pending NVIC + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_SetCounter(ROBUS_TIMER, 0); // Reset counter if (nbrbit != 0) { - LL_TIM_SetAutoReload(LUOS_TIMER, nbrbit); // reload value - LL_TIM_EnableCounter(LUOS_TIMER); + LL_TIM_SetAutoReload(ROBUS_TIMER, nbrbit); // reload value + LL_TIM_EnableCounter(ROBUS_TIMER); } } /****************************************************************************** @@ -401,12 +401,12 @@ void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -void LUOS_TIMER_IRQHANDLER() +void ROBUS_TIMER_IRQHANDLER() { - if (LL_TIM_IsActiveFlag_UPDATE(LUOS_TIMER) != RESET) + if (LL_TIM_IsActiveFlag_UPDATE(ROBUS_TIMER) != RESET) { - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_DisableCounter(LUOS_TIMER); + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_DisableCounter(ROBUS_TIMER); if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { // Enable RX detection pin if needed diff --git a/network/robus_network/HAL/STM32L0/robus_hal_config.h b/network/robus_network/HAL/STM32L0/robus_hal_config.h index 193d90d52..d7d4664f1 100644 --- a/network/robus_network/HAL/STM32L0/robus_hal_config.h +++ b/network/robus_network/HAL/STM32L0/robus_hal_config.h @@ -109,48 +109,48 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() #endif -#ifndef LUOS_COM - #define LUOS_COM USART1 +#ifndef ROBUS_COM + #define ROBUS_COM USART1 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ USART1_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ USART1_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() USART1_IRQHandler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() USART1_IRQHandler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMA1 +#ifndef ROBUS_DMA + #define ROBUS_DMA DMA1 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_2 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_2 #endif -#ifndef LUOS_DMA_REQUEST - #define LUOS_DMA_REQUEST LL_DMA_REQUEST_3 +#ifndef ROBUS_DMA_REQUEST + #define ROBUS_DMA_REQUEST LL_DMA_REQUEST_3 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM6_CLK_ENABLE() +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM6_CLK_ENABLE() #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIM6 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIM6 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TIM6_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TIM6_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TIM6_DAC_IRQHandler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STM32L4/robus_hal.c b/network/robus_network/HAL/STM32L4/robus_hal.c index aadc29a1f..5f8d7ec1f 100644 --- a/network/robus_network/HAL/STM32L4/robus_hal.c +++ b/network/robus_network/HAL/STM32L4/robus_hal.c @@ -91,12 +91,12 @@ void RobusHAL_Loop(void) ******************************************************************************/ void RobusHAL_ComInit(uint32_t Baudrate) { - LUOS_COM_CLOCK_ENABLE(); + ROBUS_COM_CLOCK_ENABLE(); LL_USART_InitTypeDef USART_InitStruct; // Initialise USART1 - LL_USART_Disable(LUOS_COM); + LL_USART_Disable(ROBUS_COM); USART_InitStruct.BaudRate = Baudrate; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; @@ -104,32 +104,32 @@ void RobusHAL_ComInit(uint32_t Baudrate) USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX; USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE; USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16; - while (LL_USART_Init(LUOS_COM, &USART_InitStruct) != SUCCESS) + while (LL_USART_Init(ROBUS_COM, &USART_InitStruct) != SUCCESS) ; - LL_USART_Enable(LUOS_COM); + LL_USART_Enable(ROBUS_COM); // Enable Reception interrupt - LL_USART_EnableIT_RXNE(LUOS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); - HAL_NVIC_EnableIRQ(LUOS_COM_IRQ); - HAL_NVIC_SetPriority(LUOS_COM_IRQ, 0, 1); + HAL_NVIC_EnableIRQ(ROBUS_COM_IRQ); + HAL_NVIC_SetPriority(ROBUS_COM_IRQ, 0, 1); // Timeout Initialization Timer_Prescaler = (MCUFREQ / Baudrate) / TIMERDIV; RobusHAL_TimeoutInit(); #ifndef USE_TX_IT - LUOS_DMA_CLOCK_ENABLE(); - - LL_DMA_SetPeriphRequest(LUOS_DMA, LUOS_DMA_CHANNEL, LUOS_DMA_REQUEST); - LL_DMA_SetDataTransferDirection(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); - LL_DMA_SetChannelPriorityLevel(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); - LL_DMA_SetMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); - LL_DMA_SetPeriphIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); - LL_DMA_SetMemoryIncMode(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); - LL_DMA_SetPeriphSize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); - LL_DMA_SetMemorySize(LUOS_DMA, LUOS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); - LL_DMA_SetPeriphAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)&LUOS_COM->TDR); + ROBUS_DMA_CLOCK_ENABLE(); + + LL_DMA_SetPeriphRequest(ROBUS_DMA, ROBUS_DMA_CHANNEL, ROBUS_DMA_REQUEST); + LL_DMA_SetDataTransferDirection(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_DIRECTION_MEMORY_TO_PERIPH); + LL_DMA_SetChannelPriorityLevel(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PRIORITY_LOW); + LL_DMA_SetMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MODE_NORMAL); + LL_DMA_SetPeriphIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PERIPH_NOINCREMENT); + LL_DMA_SetMemoryIncMode(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MEMORY_INCREMENT); + LL_DMA_SetPeriphSize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_PDATAALIGN_BYTE); + LL_DMA_SetMemorySize(ROBUS_DMA, ROBUS_DMA_CHANNEL, LL_DMA_MDATAALIGN_BYTE); + LL_DMA_SetPeriphAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)&ROBUS_COM->TDR); #endif } /****************************************************************************** @@ -160,13 +160,13 @@ _CRITICAL void RobusHAL_SetTxState(uint8_t Enable) // Stop current transmit operation data_size_to_transmit = 0; // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); #else - LL_USART_DisableDMAReq_TX(LUOS_COM); - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_USART_DisableDMAReq_TX(ROBUS_COM); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); #endif // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } } /****************************************************************************** @@ -178,14 +178,14 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) { if (Enable == true) { - LL_USART_RequestRxDataFlush(LUOS_COM); // Clear data register - LL_USART_EnableDirectionRx(LUOS_COM); - LL_USART_EnableIT_RXNE(LUOS_COM); // Enable Rx IT + LL_USART_RequestRxDataFlush(ROBUS_COM); // Clear data register + LL_USART_EnableDirectionRx(ROBUS_COM); + LL_USART_EnableIT_RXNE(ROBUS_COM); // Enable Rx IT } else { - LL_USART_DisableDirectionRx(LUOS_COM); - LL_USART_DisableIT_RXNE(LUOS_COM); // Disable Rx IT + LL_USART_DisableDirectionRx(ROBUS_COM); + LL_USART_DisableIT_RXNE(ROBUS_COM); // Disable Rx IT } } /****************************************************************************** @@ -193,30 +193,30 @@ _CRITICAL void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_COM_IRQHANDLER() +_CRITICAL void ROBUS_COM_IRQHANDLER() { // Reset timeout to it's default value RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); // reception management - if ((LL_USART_IsActiveFlag_RXNE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_RXNE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_RXNE(ROBUS_COM) != RESET)) { // We receive a byte - uint8_t data = LL_USART_ReceiveData8(LUOS_COM); + uint8_t data = LL_USART_ReceiveData8(ROBUS_COM); Recep_data(&data); // send reception byte to state machine if (data_size_to_transmit == 0) { - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; return; } } - else if (LL_USART_IsActiveFlag_FE(LUOS_COM) != RESET) + else if (LL_USART_IsActiveFlag_FE(ROBUS_COM) != RESET) { // Framing ERROR ctx.rx.status.rx_framing_error = true; } // Transmission management - if ((LL_USART_IsActiveFlag_TC(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(LUOS_COM) != RESET)) + if ((LL_USART_IsActiveFlag_TC(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TC(ROBUS_COM) != RESET)) { // Transmission complete data_size_to_transmit = 0; @@ -224,26 +224,26 @@ _CRITICAL void LUOS_COM_IRQHANDLER() RobusHAL_SetTxState(false); RobusHAL_SetRxState(true); // Disable transmission complete IRQ - LL_USART_ClearFlag_TC(LUOS_COM); - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_ClearFlag_TC(ROBUS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); } #ifdef USE_TX_IT - else if ((LL_USART_IsActiveFlag_TXE(LUOS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(LUOS_COM) != RESET)) + else if ((LL_USART_IsActiveFlag_TXE(ROBUS_COM) != RESET) && (LL_USART_IsEnabledIT_TXE(ROBUS_COM) != RESET)) { // Transmit buffer empty (this is a software DMA) data_size_to_transmit--; - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); if (data_size_to_transmit == 0) { // Transmission complete, stop loading data and watch for the end of transmission // Disable Transmission empty buffer interrupt - LL_USART_DisableIT_TXE(LUOS_COM); + LL_USART_DisableIT_TXE(ROBUS_COM); // Enable Transmission complete interrupt - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } } #endif - LUOS_COM->ICR = 0xFFFFFFFF; + ROBUS_COM->ICR = 0xFFFFFFFF; } /****************************************************************************** * @brief Process data transmit @@ -252,7 +252,7 @@ _CRITICAL void LUOS_COM_IRQHANDLER() ******************************************************************************/ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) { - while (LL_USART_IsActiveFlag_TXE(LUOS_COM) == RESET) + while (LL_USART_IsActiveFlag_TXE(ROBUS_COM) == RESET) ; // Disable RX detec pin if needed @@ -266,27 +266,27 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) tx_data = data; #ifdef USE_TX_IT // Send the first byte - LL_USART_TransmitData8(LUOS_COM, *(tx_data++)); + LL_USART_TransmitData8(ROBUS_COM, *(tx_data++)); // Enable Transmission empty buffer interrupt to transmit next datas - LL_USART_EnableIT_TXE(LUOS_COM); + LL_USART_EnableIT_TXE(ROBUS_COM); // Disable Transmission complete interrupt - LL_USART_DisableIT_TC(LUOS_COM); + LL_USART_DisableIT_TC(ROBUS_COM); #else data_size_to_transmit = 0; // to not check IT TC during collision // Disable DMA to load new length to be tranmitted - LL_DMA_DisableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_DisableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // configure address to be transmitted by DMA - LL_DMA_SetMemoryAddress(LUOS_DMA, LUOS_DMA_CHANNEL, (uint32_t)data); + LL_DMA_SetMemoryAddress(ROBUS_DMA, ROBUS_DMA_CHANNEL, (uint32_t)data); // set length to be tranmitted - LL_DMA_SetDataLength(LUOS_DMA, LUOS_DMA_CHANNEL, size); + LL_DMA_SetDataLength(ROBUS_DMA, ROBUS_DMA_CHANNEL, size); // set request DMA - LL_USART_EnableDMAReq_TX(LUOS_COM); + LL_USART_EnableDMAReq_TX(ROBUS_COM); // Enable TX RobusHAL_SetTxState(true); // Enable DMA again - LL_DMA_EnableChannel(LUOS_DMA, LUOS_DMA_CHANNEL); + LL_DMA_EnableChannel(ROBUS_DMA, ROBUS_DMA_CHANNEL); // enable transmit complete - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); #endif } else @@ -294,14 +294,14 @@ _CRITICAL void RobusHAL_ComTransmit(uint8_t *data, uint16_t size) // Wait before send ack data_size_to_transmit = 1; // This is a patch du to difference MCU frequency - while (LL_TIM_GetCounter(LUOS_TIMER) < TIMEOUT_ACK) + while (LL_TIM_GetCounter(ROBUS_TIMER) < TIMEOUT_ACK) ; // Enable TX RobusHAL_SetTxState(true); // Transmit the only byte we have - LL_USART_TransmitData8(LUOS_COM, *data); + LL_USART_TransmitData8(ROBUS_COM, *data); // Enable Transmission complete interrupt because we only have one. - LL_USART_EnableIT_TC(LUOS_COM); + LL_USART_EnableIT_TC(ROBUS_COM); } RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); } @@ -335,7 +335,7 @@ _CRITICAL uint8_t RobusHAL_GetTxLockState(void) uint8_t result = false; #ifdef USART_ISR_BUSY - if (LL_USART_IsActiveFlag_BUSY(LUOS_COM) == true) + if (LL_USART_IsActiveFlag_BUSY(ROBUS_COM) == true) { RobusHAL_ResetTimeout(DEFAULT_TIMEOUT); result = true; @@ -368,18 +368,18 @@ static void RobusHAL_TimeoutInit(void) LL_TIM_InitTypeDef TimerInit = {0}; // initialize clock - LUOS_TIMER_CLOCK_ENABLE(); + ROBUS_TIMER_CLOCK_ENABLE(); TimerInit.Autoreload = DEFAULT_TIMEOUT; TimerInit.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; TimerInit.CounterMode = LL_TIM_COUNTERMODE_UP; TimerInit.Prescaler = Timer_Prescaler - 1; TimerInit.RepetitionCounter = 0; - while (LL_TIM_Init(LUOS_TIMER, &TimerInit) != SUCCESS) + while (LL_TIM_Init(ROBUS_TIMER, &TimerInit) != SUCCESS) ; - LL_TIM_EnableIT_UPDATE(LUOS_TIMER); - HAL_NVIC_SetPriority(LUOS_TIMER_IRQ, 0, 2); - HAL_NVIC_EnableIRQ(LUOS_TIMER_IRQ); + LL_TIM_EnableIT_UPDATE(ROBUS_TIMER); + HAL_NVIC_SetPriority(ROBUS_TIMER_IRQ, 0, 2); + HAL_NVIC_EnableIRQ(ROBUS_TIMER_IRQ); } /****************************************************************************** * @brief Luos Timeout communication @@ -388,14 +388,14 @@ static void RobusHAL_TimeoutInit(void) ******************************************************************************/ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) { - LL_TIM_DisableCounter(LUOS_TIMER); - NVIC_ClearPendingIRQ(LUOS_TIMER_IRQ); // Clear IT pending NVIC - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_SetCounter(LUOS_TIMER, 0); // Reset counter + LL_TIM_DisableCounter(ROBUS_TIMER); + NVIC_ClearPendingIRQ(ROBUS_TIMER_IRQ); // Clear IT pending NVIC + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_SetCounter(ROBUS_TIMER, 0); // Reset counter if (nbrbit != 0) { - LL_TIM_SetAutoReload(LUOS_TIMER, nbrbit); // reload value - LL_TIM_EnableCounter(LUOS_TIMER); + LL_TIM_SetAutoReload(ROBUS_TIMER, nbrbit); // reload value + LL_TIM_EnableCounter(ROBUS_TIMER); } } /****************************************************************************** @@ -403,12 +403,12 @@ _CRITICAL void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -_CRITICAL void LUOS_TIMER_IRQHANDLER() +_CRITICAL void ROBUS_TIMER_IRQHANDLER() { - if (LL_TIM_IsActiveFlag_UPDATE(LUOS_TIMER) != RESET) + if (LL_TIM_IsActiveFlag_UPDATE(ROBUS_TIMER) != RESET) { - LL_TIM_ClearFlag_UPDATE(LUOS_TIMER); - LL_TIM_DisableCounter(LUOS_TIMER); + LL_TIM_ClearFlag_UPDATE(ROBUS_TIMER); + LL_TIM_DisableCounter(ROBUS_TIMER); if ((ctx.tx.lock == true) && (RobusHAL_GetTxLockState() == false)) { // Enable RX detection pin if needed diff --git a/network/robus_network/HAL/STM32L4/robus_hal_config.h b/network/robus_network/HAL/STM32L4/robus_hal_config.h index f9d0f992b..c7bdfb362 100644 --- a/network/robus_network/HAL/STM32L4/robus_hal_config.h +++ b/network/robus_network/HAL/STM32L4/robus_hal_config.h @@ -108,46 +108,46 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() #endif -#ifndef LUOS_COM - #define LUOS_COM USART1 +#ifndef ROBUS_COM + #define ROBUS_COM USART1 #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ USART1_IRQn +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ USART1_IRQn #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() USART1_IRQHandler() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() USART1_IRQHandler() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); #endif -#ifndef LUOS_DMA - #define LUOS_DMA DMA1 +#ifndef ROBUS_DMA + #define ROBUS_DMA DMA1 #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL LL_DMA_CHANNEL_4 +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL LL_DMA_CHANNEL_4 #endif -#ifndef LUOS_DMA_REQUEST - #define LUOS_DMA_REQUEST LL_DMA_REQUEST_2 +#ifndef ROBUS_DMA_REQUEST + #define ROBUS_DMA_REQUEST LL_DMA_REQUEST_2 #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM7_CLK_ENABLE() +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM7_CLK_ENABLE() #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER TIM7 +#ifndef ROBUS_TIMER + #define ROBUS_TIMER TIM7 #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ TIM7_IRQn +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ TIM7_IRQn #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() TIM7_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() TIM7_IRQHandler() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/STUB/robus_hal_config.h b/network/robus_network/HAL/STUB/robus_hal_config.h index 9e5394e34..6a54c1961 100644 --- a/network/robus_network/HAL/STUB/robus_hal_config.h +++ b/network/robus_network/HAL/STUB/robus_hal_config.h @@ -107,49 +107,49 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE() X86_STUB +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE() X86_STUB #endif -#ifndef LUOS_COM - #define LUOS_COM X86_STUB // STUB +#ifndef ROBUS_COM + #define ROBUS_COM X86_STUB // STUB #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ X86_STUB // STUB +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ X86_STUB // STUB #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() // STUB +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() // STUB #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE() X86_STUB +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE() X86_STUB #endif -#ifndef LUOS_DMA - #define LUOS_DMA X86_STUB // STUB +#ifndef ROBUS_DMA + #define ROBUS_DMA X86_STUB // STUB #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL X86_STUB // STUB +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL X86_STUB // STUB #endif -#ifndef LUOS_DMA_REMAP - #define LUOS_DMA_REMAP X86_STUB // STUB +#ifndef ROBUS_DMA_REMAP + #define ROBUS_DMA_REMAP X86_STUB // STUB #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_CLOCK_ENABLE - #define LUOS_TIMER_LOCK_ENABLE() // STUB +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE() // STUB #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER X86_STUB // STUB +#ifndef ROBUS_TIMER + #define ROBUS_TIMER X86_STUB // STUB #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ X86_STUB // STUB +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ X86_STUB // STUB #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() x86_Timer_IRQHandler() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() x86_Timer_IRQHandler() #endif #endif /* _ROBUSHAL_CONFIG_H_ */ diff --git a/network/robus_network/HAL/template/robus_hal.c b/network/robus_network/HAL/template/robus_hal.c index ba0ee0e45..3cee9b0f0 100644 --- a/network/robus_network/HAL/template/robus_hal.c +++ b/network/robus_network/HAL/template/robus_hal.c @@ -210,7 +210,7 @@ void RobusHAL_SetRxState(uint8_t Enable) * @param None * @return None ******************************************************************************/ -void LUOS_COM_IRQHANDLER() +void ROBUS_COM_IRQHANDLER() { /************************************************************************* @@ -468,7 +468,7 @@ void RobusHAL_ResetTimeout(uint16_t nbrbit) * @param None * @return None ******************************************************************************/ -void LUOS_TIMER_IRQHANDLER() +void ROBUS_TIMER_IRQHANDLER() { /************************************************************************* * This is the callback function when a timout IRQ is raised. @@ -728,4 +728,4 @@ void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) } } #endif -} \ No newline at end of file +} diff --git a/network/robus_network/HAL/template/robus_hal_config.h b/network/robus_network/HAL/template/robus_hal_config.h index 76046d924..0e07ffe46 100644 --- a/network/robus_network/HAL/template/robus_hal_config.h +++ b/network/robus_network/HAL/template/robus_hal_config.h @@ -105,44 +105,44 @@ /******************************************************************************* * COM CONFIG ******************************************************************************/ -#ifndef LUOS_COM_CLOCK_ENABLE - #define LUOS_COM_CLOCK_ENABLE +#ifndef ROBUS_COM_CLOCK_ENABLE + #define ROBUS_COM_CLOCK_ENABLE #endif -#ifndef LUOS_COM - #define LUOS_COM +#ifndef ROBUS_COM + #define ROBUS_COM #endif -#ifndef LUOS_COM_IRQ - #define LUOS_COM_IRQ +#ifndef ROBUS_COM_IRQ + #define ROBUS_COM_IRQ #endif -#ifndef LUOS_COM_IRQHANDLER - #define LUOS_COM_IRQHANDLER() +#ifndef ROBUS_COM_IRQHANDLER + #define ROBUS_COM_IRQHANDLER() #endif /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#ifndef LUOS_DMA_CLOCK_ENABLE - #define LUOS_DMA_CLOCK_ENABLE +#ifndef ROBUS_DMA_CLOCK_ENABLE + #define ROBUS_DMA_CLOCK_ENABLE #endif -#ifndef LUOS_DMA - #define LUOS_DMA +#ifndef ROBUS_DMA + #define ROBUS_DMA #endif -#ifndef LUOS_DMA_CHANNEL - #define LUOS_DMA_CHANNEL +#ifndef ROBUS_DMA_CHANNEL + #define ROBUS_DMA_CHANNEL #endif /******************************************************************************* * COM TIMEOUT CONFIG ******************************************************************************/ -#ifndef LUOS_TIMER_LOCK_ENABLE - #define LUOS_TIMER_LOCK_ENABLE +#ifndef ROBUS_TIMER_CLOCK_ENABLE + #define ROBUS_TIMER_CLOCK_ENABLE #endif -#ifndef LUOS_TIMER - #define LUOS_TIMER +#ifndef ROBUS_TIMER + #define ROBUS_TIMER #endif -#ifndef LUOS_TIMER_IRQ - #define LUOS_TIMER_IRQ +#ifndef ROBUS_TIMER_IRQ + #define ROBUS_TIMER_IRQ #endif -#ifndef LUOS_TIMER_IRQHANDLER - #define LUOS_TIMER_IRQHANDLER() +#ifndef ROBUS_TIMER_IRQHANDLER + #define ROBUS_TIMER_IRQHANDLER() #endif #endif /* _RobusHAL_CONFIG_H_ */ diff --git a/test/_resources/node_config.h b/test/_resources/node_config.h index c82573e2d..6efcf7d6c 100644 --- a/test/_resources/node_config.h +++ b/test/_resources/node_config.h @@ -40,8 +40,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 25 -#define MSG_BUFFER_SIZE 25 * sizeof(msg_t) -#define MAX_MSG_NB 100 +#define MSG_BUFFER_SIZE 25 * sizeof(msg_t) +#define MAX_MSG_NB 100 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -86,7 +86,8 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_RTB_ENTRY | 40 | max number entry in routing table + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size diff --git a/tool_services/gate/TinyJSON/bootloader_ex.c b/tool_services/gate/TinyJSON/bootloader_ex.c index ce7b462e4..761ffc925 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.c +++ b/tool_services/gate/TinyJSON/bootloader_ex.c @@ -10,7 +10,7 @@ #include "luos_bootloader.h" #include "gate_config.h" #include "pipe_link.h" -#include "routing_table.h" +#include "_routing_table.h" /******************************************************************************* * Definitions diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index 07bd8a6ce..a07b5768d 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -14,6 +14,7 @@ #include "data_manager.h" #include "tiny-json.h" #include "bootloader_ex.h" +#include "_routing_table.h" #define MAX_JSON_FIELDS 50 diff --git a/tool_services/gate/pipe_link.c b/tool_services/gate/pipe_link.c index 94d4f845f..0af5fcecb 100644 --- a/tool_services/gate/pipe_link.c +++ b/tool_services/gate/pipe_link.c @@ -5,6 +5,7 @@ ******************************************************************************/ #include "pipe_link.h" #include "streaming.h" +#include "_routing_table.h" /******************************************************************************* * Definitions ******************************************************************************/ From 98154182557d637147e1613fb0bfc3eabfaf4f2b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Jul 2023 15:16:49 +0200 Subject: [PATCH 112/198] Add a serial_hal_config.h file --- .../HAL/ARDUINO/serial_hal_config.h | 102 ++++++++++++++++ .../HAL/ARDUINO/serial_network_hal.h | 37 +----- .../HAL/STM32F0/serial_hal_config.h | 102 ++++++++++++++++ .../HAL/STM32F0/serial_network_hal.h | 37 +----- .../HAL/STM32F4/serial_hal_config.h | 102 ++++++++++++++++ .../HAL/STM32F4/serial_network_hal.h | 37 +----- .../HAL/STM32G431/serial_hal_config.h | 112 ++++++++++++++++++ .../HAL/STM32G431/serial_network_hal.h | 48 +------- .../HAL/STM32G474/serial_hal_config.h | 112 ++++++++++++++++++ .../HAL/STM32G474/serial_network_hal.h | 49 +------- .../HAL/STM32L4/serial_hal_config.h | 102 ++++++++++++++++ .../HAL/STM32L4/serial_network_hal.h | 37 +----- .../HAL/template/serial_hal_config.h | 102 ++++++++++++++++ .../HAL/template/serial_network_hal.h | 2 +- 14 files changed, 741 insertions(+), 240 deletions(-) create mode 100644 network/serial_network/HAL/ARDUINO/serial_hal_config.h create mode 100644 network/serial_network/HAL/STM32F0/serial_hal_config.h create mode 100644 network/serial_network/HAL/STM32F4/serial_hal_config.h create mode 100644 network/serial_network/HAL/STM32G431/serial_hal_config.h create mode 100644 network/serial_network/HAL/STM32G474/serial_hal_config.h create mode 100644 network/serial_network/HAL/STM32L4/serial_hal_config.h create mode 100644 network/serial_network/HAL/template/serial_hal_config.h diff --git a/network/serial_network/HAL/ARDUINO/serial_hal_config.h b/network/serial_network/HAL/ARDUINO/serial_hal_config.h new file mode 100644 index 000000000..fe8d1d9dc --- /dev/null +++ b/network/serial_network/HAL/ARDUINO/serial_hal_config.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family ARDUINO + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_10 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOB +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF4_USART3 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_11 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOB +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF4_USART3 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM USART3 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART3_4_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.h b/network/serial_network/HAL/ARDUINO/serial_network_hal.h index e53eadaf2..db1d5d2b7 100644 --- a/network/serial_network/HAL/ARDUINO/serial_network_hal.h +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.h @@ -9,42 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() - #define SERIAL_TX_PIN GPIO_PIN_10 - #define SERIAL_TX_PORT GPIOB - #define SERIAL_TX_AF GPIO_AF4_USART3 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() - #define SERIAL_RX_PIN GPIO_PIN_11 - #define SERIAL_RX_PORT GPIOB - #define SERIAL_RX_AF GPIO_AF4_USART3 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() - #define SERIAL_COM USART3 - #define SERIAL_COM_IRQ USART3_4_IRQn - #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 - #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 - #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/STM32F0/serial_hal_config.h b/network/serial_network/HAL/STM32F0/serial_hal_config.h new file mode 100644 index 000000000..46ea253d2 --- /dev/null +++ b/network/serial_network/HAL/STM32F0/serial_hal_config.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family STM32FO + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_10 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOB +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF4_USART3 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_11 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOB +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF4_USART3 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() +#endif +#ifndef SERIAL_COM_CLOCK_DISABLE + #define SERIAL_COM USART3 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART3_4_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.h b/network/serial_network/HAL/STM32F0/serial_network_hal.h index e53eadaf2..db1d5d2b7 100644 --- a/network/serial_network/HAL/STM32F0/serial_network_hal.h +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.h @@ -9,42 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() - #define SERIAL_TX_PIN GPIO_PIN_10 - #define SERIAL_TX_PORT GPIOB - #define SERIAL_TX_AF GPIO_AF4_USART3 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOB_CLK_ENABLE() - #define SERIAL_RX_PIN GPIO_PIN_11 - #define SERIAL_RX_PORT GPIOB - #define SERIAL_RX_AF GPIO_AF4_USART3 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE() - #define SERIAL_COM USART3 - #define SERIAL_COM_IRQ USART3_4_IRQn - #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 - #define SERIAL_RX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 - #define SERIAL_TX_DMA_REQUEST LL_SYSCFG_USART3_RMP_DMA1CH67 - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_5_6_7_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/STM32F4/serial_hal_config.h b/network/serial_network/HAL/STM32F4/serial_hal_config.h new file mode 100644 index 000000000..daa8fbf0f --- /dev/null +++ b/network/serial_network/HAL/STM32F4/serial_hal_config.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family STM32F4 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_2 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOA +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF7_USART2 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_3 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOA +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF7_USART2 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM USART2 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART2_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_STREAM_5 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_DMA_CHANNEL_4 +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC5(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC5(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_STREAM_6 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_DMA_CHANNEL_4 +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Stream6_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Stream6_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.h b/network/serial_network/HAL/STM32F4/serial_network_hal.h index 27b596ddf..db1d5d2b7 100644 --- a/network/serial_network/HAL/STM32F4/serial_network_hal.h +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.h @@ -9,42 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_TX_PIN GPIO_PIN_2 - #define SERIAL_TX_PORT GPIOA - #define SERIAL_TX_AF GPIO_AF7_USART2 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_RX_PIN GPIO_PIN_3 - #define SERIAL_RX_PORT GPIOA - #define SERIAL_RX_AF GPIO_AF7_USART2 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() - #define SERIAL_COM USART2 - #define SERIAL_COM_IRQ USART2_IRQn - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_STREAM_5 - #define SERIAL_RX_DMA_REQUEST LL_DMA_CHANNEL_4 - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC5(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC5(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_STREAM_6 - #define SERIAL_TX_DMA_REQUEST LL_DMA_CHANNEL_4 - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Stream6_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Stream6_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/STM32G431/serial_hal_config.h b/network/serial_network/HAL/STM32G431/serial_hal_config.h new file mode 100644 index 000000000..78a6a096c --- /dev/null +++ b/network/serial_network/HAL/STM32G431/serial_hal_config.h @@ -0,0 +1,112 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family STM32F431 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_2 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOA +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF7_USART2 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_3 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOA +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF7_USART2 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM USART2 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART2_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_USART2_RX +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_USART2_TX +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.h b/network/serial_network/HAL/STM32G431/serial_network_hal.h index 97bf5099f..db1d5d2b7 100644 --- a/network/serial_network/HAL/STM32G431/serial_network_hal.h +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.h @@ -9,53 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h - -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_TX_PIN GPIO_PIN_2 - #define SERIAL_TX_PORT GPIOA - #define SERIAL_TX_AF GPIO_AF7_USART2 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_RX_PIN GPIO_PIN_3 - #define SERIAL_RX_PORT GPIOA - #define SERIAL_RX_AF GPIO_AF7_USART2 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() - #define SERIAL_COM USART2 - #define SERIAL_COM_IRQ USART2_IRQn - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() \ - do \ - { \ - __HAL_RCC_DMA1_CLK_ENABLE(); \ - __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ - } while (0U) - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 - #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_USART2_RX - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() \ - do \ - { \ - __HAL_RCC_DMA1_CLK_ENABLE(); \ - __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ - } while (0U) - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 - #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_USART2_TX - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/STM32G474/serial_hal_config.h b/network/serial_network/HAL/STM32G474/serial_hal_config.h new file mode 100644 index 000000000..05243322f --- /dev/null +++ b/network/serial_network/HAL/STM32G474/serial_hal_config.h @@ -0,0 +1,112 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family STM32F474 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_2 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOA +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF12_LPUART1 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_3 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOA +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF12_LPUART1 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_LPUART1_CLK_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM LPUART1 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ LPUART1_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() LPUART1_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_RX +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() \ + do \ + { \ + __HAL_RCC_DMA1_CLK_ENABLE(); \ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ + } while (0U) +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_TX +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.h b/network/serial_network/HAL/STM32G474/serial_network_hal.h index 9d10933b2..db1d5d2b7 100644 --- a/network/serial_network/HAL/STM32G474/serial_network_hal.h +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.h @@ -9,54 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h - -// Nucleo G474RE configuration -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_TX_PIN GPIO_PIN_2 - #define SERIAL_TX_PORT GPIOA - #define SERIAL_TX_AF GPIO_AF12_LPUART1 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_RX_PIN GPIO_PIN_3 - #define SERIAL_RX_PORT GPIOA - #define SERIAL_RX_AF GPIO_AF12_LPUART1 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_LPUART1_CLK_ENABLE() - #define SERIAL_COM LPUART1 - #define SERIAL_COM_IRQ LPUART1_IRQn - #define SERIAL_COM_IRQHANDLER() LPUART1_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() \ - do \ - { \ - __HAL_RCC_DMA1_CLK_ENABLE(); \ - __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ - } while (0U) - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_3 - #define SERIAL_RX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_RX - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC3(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC3(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() \ - do \ - { \ - __HAL_RCC_DMA1_CLK_ENABLE(); \ - __HAL_RCC_DMAMUX1_CLK_ENABLE(); \ - } while (0U) - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_4 - #define SERIAL_TX_DMA_REQUEST LL_DMAMUX_REQ_LPUART1_TX - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC4(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC4(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Channel4_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel4_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/STM32L4/serial_hal_config.h b/network/serial_network/HAL/STM32L4/serial_hal_config.h new file mode 100644 index 000000000..4cce7927f --- /dev/null +++ b/network/serial_network/HAL/STM32L4/serial_hal_config.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family STM32L4 + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN_2 +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIOA +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF7_USART2 +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN_15 +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIOA +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF3_USART2 +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM USART2 +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART2_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA1 +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST LL_DMA_REQUEST_2 +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE() +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA1 +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST LL_DMA_REQUEST_2 +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA1_Channel7_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel7_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.h b/network/serial_network/HAL/STM32L4/serial_network_hal.h index ae33d2ff4..db1d5d2b7 100644 --- a/network/serial_network/HAL/STM32L4/serial_network_hal.h +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.h @@ -9,42 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" - -// SERIAL_CONFIG need to be define in your node_config.h if you want to redefine -// SERIAL configuration usart or DMA If you need change something in this configuration -// you must redefine all the configuration in you node_config.h -#ifndef SERIAL_CONFIG - #define SERIAL_TX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_TX_PIN GPIO_PIN_2 - #define SERIAL_TX_PORT GPIOA - #define SERIAL_TX_AF GPIO_AF7_USART2 - - #define SERIAL_RX_CLK() __HAL_RCC_GPIOA_CLK_ENABLE(); - #define SERIAL_RX_PIN GPIO_PIN_15 - #define SERIAL_RX_PORT GPIOA - #define SERIAL_RX_AF GPIO_AF3_USART2 - - #define SERIAL_COM_CLOCK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() - #define SERIAL_COM USART2 - #define SERIAL_COM_IRQ USART2_IRQn - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() - - #define SERIAL_RX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); - #define SERIAL_RX_DMA DMA1 - #define SERIAL_RX_DMA_CHANNEL LL_DMA_CHANNEL_6 - #define SERIAL_RX_DMA_REQUEST LL_DMA_REQUEST_2 - #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) LL_DMA_IsActiveFlag_TC6(SERIAL_RX_DMA) - #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) LL_DMA_ClearFlag_TC6(SERIAL_RX_DMA) - - #define SERIAL_TX_DMA_CLOCK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE(); - #define SERIAL_TX_DMA DMA1 - #define SERIAL_TX_DMA_CHANNEL LL_DMA_CHANNEL_7 - #define SERIAL_TX_DMA_REQUEST LL_DMA_REQUEST_2 - #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) LL_DMA_IsActiveFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) LL_DMA_ClearFlag_TC7(SERIAL_TX_DMA) - #define SERIAL_TX_DMA_IRQ DMA1_Channel7_IRQn - #define SERIAL_TX_DMA_IRQHANDLER() DMA1_Channel7_IRQHandler() -#endif +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); void SerialHAL_Loop(void); diff --git a/network/serial_network/HAL/template/serial_hal_config.h b/network/serial_network/HAL/template/serial_hal_config.h new file mode 100644 index 000000000..d2f20f664 --- /dev/null +++ b/network/serial_network/HAL/template/serial_hal_config.h @@ -0,0 +1,102 @@ +/****************************************************************************** + * @file serial_hal_config + * @brief This file allow you to configure serial_hal according to your design + * this is the default configuration created by Luos team for this MCU Family + * Do not modify this file. + * If you want to ovewrite some, overlap the defines in your node_config.h + * @MCU Family TEMPLATE + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_HAL_CONFIG_H_ +#define _SERIAL_HAL_CONFIG_H_ + +// TX Pinout +#ifndef SERIAL_TX_CLK + #define SERIAL_TX_CLK() DEFAULT_CLK_PORT_ENABLE(); +#endif +#ifndef SERIAL_TX_PIN + #define SERIAL_TX_PIN GPIO_PIN +#endif +#ifndef SERIAL_TX_PORT + #define SERIAL_TX_PORT GPIO_PORT +#endif +#ifndef SERIAL_TX_AF + #define SERIAL_TX_AF GPIO_AF +#endif + +// RX Pinout +#ifndef SERIAL_RX_CLK + #define SERIAL_RX_CLK() DEFAULT_CLK_PORT_ENABLE(); +#endif +#ifndef SERIAL_RX_PIN + #define SERIAL_RX_PIN GPIO_PIN +#endif +#ifndef SERIAL_RX_PORT + #define SERIAL_RX_PORT GPIO_PORT +#endif +#ifndef SERIAL_RX_AF + #define SERIAL_RX_AF GPIO_AF +#endif + +// USART configuration +#ifndef SERIAL_COM_CLOCK_ENABLE + #define SERIAL_COM_CLOCK_ENABLE() DEFAULT_CLK_SERIAL_ENABLE() +#endif +#ifndef SERIAL_COM + #define SERIAL_COM USART +#endif +#ifndef SERIAL_COM_IRQ + #define SERIAL_COM_IRQ USART_IRQn +#endif +#ifndef SERIAL_COM_IRQHANDLER + #define SERIAL_COM_IRQHANDLER() USART_IRQHandler() +#endif + +// RX DMA configuration +#ifndef SERIAL_RX_DMA_CLOCK_ENABLE + #define SERIAL_RX_DMA_CLOCK_ENABLE() DEFAULT_CLK_DMA_ENABLE() +#endif +#ifndef SERIAL_RX_DMA + #define SERIAL_RX_DMA DMA +#endif +#ifndef SERIAL_RX_DMA_CHANNEL + #define SERIAL_RX_DMA_CHANNEL DMA_CHANNEL +#endif +#ifndef SERIAL_RX_DMA_REQUEST + #define SERIAL_RX_DMA_REQUEST DMA_REQUEST +#endif +#ifndef SERIAL_RX_DMA_TC + #define SERIAL_RX_DMA_TC(SERIAL_RX_DMA) TRANSFERT_COMPLETE(SERIAL_RX_DMA) +#endif +#ifndef SERIAL_RX_DMA_CLEAR_TC + #define SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA) TRANSFERT_COMPLETE_CLEAR(SERIAL_RX_DMA) +#endif + +// TX DMA configuration +#ifndef SERIAL_TX_DMA_CLOCK_ENABLE + #define SERIAL_TX_DMA_CLOCK_ENABLE() DEFAULT_CLK_DMA_ENABLE() +#endif +#ifndef SERIAL_TX_DMA + #define SERIAL_TX_DMA DMA +#endif +#ifndef SERIAL_TX_DMA_CHANNEL + #define SERIAL_TX_DMA_CHANNEL DMA_CHANNEL +#endif +#ifndef SERIAL_TX_DMA_REQUEST + #define SERIAL_TX_DMA_REQUEST DMA_REQUEST +#endif +#ifndef SERIAL_TX_DMA_TC + #define SERIAL_TX_DMA_TC(SERIAL_TX_DMA) TRANSFERT_COMPLETE(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_CLEAR_TC + #define SERIAL_TX_DMA_CLEAR_TC(SERIAL_TX_DMA) TRANSFERT_COMPLETE_CLEAR(SERIAL_TX_DMA) +#endif +#ifndef SERIAL_TX_DMA_IRQ + #define SERIAL_TX_DMA_IRQ DMA_IRQn +#endif +#ifndef SERIAL_TX_DMA_IRQHANDLER + #define SERIAL_TX_DMA_IRQHANDLER() DMA_Channel_IRQHandler() +#endif + +#endif /* _SERIAL_HAL_CONFIG_H_ */ diff --git a/network/serial_network/HAL/template/serial_network_hal.h b/network/serial_network/HAL/template/serial_network_hal.h index 3af2174ef..c37b40455 100644 --- a/network/serial_network/HAL/template/serial_network_hal.h +++ b/network/serial_network/HAL/template/serial_network_hal.h @@ -9,7 +9,7 @@ #define _SERIAL_HAL_H_ #include "stdint.h" -#include "stdbool.h" +#include "serial_hal_config.h" void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size); // Init the serial communication void SerialHAL_Loop(void); // Do your loop stuff if needed From 6ed4ed211494f575ef10f202868da02be917daaf Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 19 Jul 2023 19:13:31 +0200 Subject: [PATCH 113/198] Improve luos_phy.h public interface and adapt robus and Serial --- engine/IO/inc/_luos_phy.h | 3 +- engine/IO/inc/luos_phy.h | 20 ++++---- engine/IO/inc/struct_phy.h | 5 +- engine/IO/src/luos_io.c | 2 +- engine/IO/src/luos_phy.c | 55 ++++++++++++++++++--- network/robus_network/src/port_manager.c | 6 +-- network/robus_network/src/reception.c | 12 ++--- network/robus_network/src/robus.c | 3 +- network/robus_network/src/transmission.c | 6 +-- network/serial_network/src/serial_network.c | 8 +-- test/tests_io/test_phy/main.c | 32 ++++++------ 11 files changed, 97 insertions(+), 55 deletions(-) diff --git a/engine/IO/inc/_luos_phy.h b/engine/IO/inc/_luos_phy.h index 1ae38eb31..9e80860c0 100644 --- a/engine/IO/inc/_luos_phy.h +++ b/engine/IO/inc/_luos_phy.h @@ -19,6 +19,7 @@ void Phy_ResetAll(void); bool Phy_Busy(void); void Phy_Loop(void); luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); -error_return_t Phy_FindNextNode(void); // Use it to find the next node as a master. +error_return_t Phy_FindNextNode(void); // Use it to find the next node as a master. +phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. #endif /* _PRIVATE_LUOS_PHY_H_ */ diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 7d817e966..ea189c0d5 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -27,25 +27,27 @@ void Phy_SetIrqStateFunciton(IRQ_STATE irq_state); // Use it to reference your p void Phy_SetIrqState(bool state); // Use it to globally enable/disable all the phy irq. // Phy creation -luos_phy_t *Phy_Create(JOB_CB phy_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. +luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. // Topology management -void Phy_FindNextNodeJob(void); // Use it to find the next node that need to be detected accross phys. -void Phy_Topologysource(luos_phy_t *phy_ptr, uint8_t port_id); // The phy will call this function when a new node is detected on a specific port. +void Phy_TopologyNext(void); // Use it to find the next node that need to be detected accross phys. +void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id); // The phy will call this function when a new node is detected on a specific port. void Phy_TopologyDone(luos_phy_t *phy_ptr); // The phy will call this function when all its port detection are done. // Rx management void Phy_ComputeHeader(luos_phy_t *phy_ptr); // After receiving the first 7 bytes (the header) call this function to compute how you should manage the incoming message. void Phy_ValidMsg(luos_phy_t *phy_ptr); // After receiving as much valid bytes as phy_ptr.rx_size, call this function to validate the message. +void Phy_ResetMsg(luos_phy_t *phy_ptr); // Call this function to reset the rx process. // Tx management -time_luos_t Phy_ComputeTimestamp(phy_job_t *job); -uint16_t Phy_GetNodeId(void); +time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job); // Use it to compute the timestamp of the message to send. +time_luos_t Phy_GetTimestamp(void); // Use it to get the current timestamp. +uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) // Job management -void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead -phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. -phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. -void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. +void Phy_FailedJob(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead +phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. +void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. +uint16_t Phy_GetJobNumber(luos_phy_t *phy_ptr); // Use it to get the number of job to send. #endif /* _LUOS_PHY_H_ */ diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h index bb4663198..29d1cad63 100644 --- a/engine/IO/inc/struct_phy.h +++ b/engine/IO/inc/struct_phy.h @@ -10,6 +10,7 @@ #include #include #include "struct_luos.h" +#include "time_luos.h" /******************************************************************************* * Definitions @@ -46,8 +47,8 @@ typedef uint8_t phy_target_t; typedef struct luos_phy_t { // *************** RX information *************** - volatile int64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. - uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. + volatile time_luos_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. + uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. union { volatile uint8_t *rx_data; // Pointer to write received bytes. diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index f6bf1783e..f407b74b5 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -445,7 +445,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) Luos_SendMsg(service, &output_msg); // This message can't be send directly to avoid dispatch re-entrance issue. // To be able to send this message then run the detection of the other nodes we need to make it later on the LuosIO_Loop, so we put a flag for it. - Phy_FindNextNodeJob(); + Phy_TopologyNext(); // This message have been consumed return SUCCEED; break; diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 328949487..c540cb3f6 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -203,7 +203,9 @@ void Phy_Loop(void) /****************************************************************************** * @brief Instanciate a physical layer - * @param phy_cb callback to call when we want to transmit a message + * @param job_cb callback to call when we want to transmit a message + * @param run_topo callback to call when we want to run the topology detection + * @param reset_phy callback to call when we want to reset the phy * @return None ******************************************************************************/ luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) @@ -259,7 +261,7 @@ void Phy_SetIrqState(bool state) * @brief save a flag allowing to run a new discovering outside of IRQ (because this function is very long and can't be run in IRQ) * @return None ******************************************************************************/ -_CRITICAL void Phy_FindNextNodeJob(void) +_CRITICAL void Phy_TopologyNext(void) { phy_ctx.find_next_node_job = true; } @@ -341,7 +343,7 @@ error_return_t Phy_FindNextNode(void) * @param port_id id of the port detected in the phy * @return None ******************************************************************************/ -void Phy_Topologysource(luos_phy_t *phy_ptr, uint8_t port_id) +void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id) { LUOS_ASSERT((phy_ptr != NULL) && (port_id < 0xFF)); @@ -374,7 +376,9 @@ port_t *Phy_GetTopologysource(void) /****************************************************************************** * @brief return the local physical layer (only used by LuosIO, this function is private) * @param id of the phy we want - * @param phy_cb callback to call when we want to transmit a message + * @param job_cb callback to call when we want to transmit a message + * @param run_topo callback to call when we want to run a topology detection + * @param reset_phy callback to call when we want to reset the phy * @return None ******************************************************************************/ luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) @@ -466,7 +470,7 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) uint16_t my_job = phy_ctx.io_job_nb++; Phy_SetIrqState(true); // Now copy the data in the job - phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; + phy_ctx.io_job[my_job].timestamp = (uint64_t)TimeOD_TimeTo_ns(phy_ptr->rx_timestamp); phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; phy_ctx.io_job[my_job].phy_filter = phy_ptr->rx_phy_filter; phy_ctx.io_job[my_job].size = phy_ptr->rx_size; @@ -477,17 +481,41 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) } } +/****************************************************************************** + * @brief Consider the message as failed and reset the phy + * @param phy_ptr Pointer to the phy concerned by the allocation + * @return None + ******************************************************************************/ +_CRITICAL void Phy_ResetMsg(luos_phy_t *phy_ptr) +{ + phy_ptr->received_data = 0; + phy_ptr->rx_size = 0; + phy_ptr->rx_keep = true; + phy_ptr->rx_alloc_job = false; + phy_ptr->rx_data = phy_ptr->rx_buffer_base; +} + /****************************************************************************** * @brief Compute the timestamp to send with the message * @param job Pointer to the job concerned by this message * @return None ******************************************************************************/ -time_luos_t Phy_ComputeTimestamp(phy_job_t *job) +time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job) { LUOS_ASSERT((job != NULL) && (job->msg_pt != NULL) && (job->timestamp == true)); return Timestamp_ConvertToLatency(job->msg_pt); } +/****************************************************************************** + * @brief Get the current timestamp + * @param None + * @return Timestamp value + ******************************************************************************/ +_CRITICAL time_luos_t Phy_GetTimestamp(void) +{ + return TimeOD_TimeFrom_ns((double)LuosHAL_GetTimestamp()); +} + /****************************************************************************** * @brief return the node id * @return Node ID value @@ -625,7 +653,7 @@ static void Phy_Dispatch(void) * @param job pointer to the job that failed. * @return None ******************************************************************************/ -_CRITICAL void Phy_DeadTargetSpotted(luos_phy_t *phy_ptr, phy_job_t *job) +_CRITICAL void Phy_FailedJob(luos_phy_t *phy_ptr, phy_job_t *job) { // A phy failed to send a message, we need to be sure that our node don't try to contact this target again. LUOS_ASSERT((job != NULL) @@ -734,7 +762,7 @@ static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) * @param phy_ptr Phy to get the job from * @return Job pointer ******************************************************************************/ -_CRITICAL inline phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr) +inline phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr) { LUOS_ASSERT(phy_ptr != NULL); if (phy_ptr->job_nb == 0) @@ -841,6 +869,17 @@ _CRITICAL void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job) } } +/****************************************************************************** + * @brief Get the number of job in the phy queue + * @param phy_ptr Phy to get the job number from + * @return None + ******************************************************************************/ +inline uint16_t Phy_GetJobNumber(luos_phy_t *phy_ptr) +{ + LUOS_ASSERT(phy_ptr != NULL); + return phy_ptr->job_nb; +} + /****************************************************************************** * @brief define is there is something waiting to be sent or not * @return Succeed if nothing is waiting to be sent diff --git a/network/robus_network/src/port_manager.c b/network/robus_network/src/port_manager.c index 347e2f6a6..5bff7d5fc 100644 --- a/network/robus_network/src/port_manager.c +++ b/network/robus_network/src/port_manager.c @@ -90,7 +90,7 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) PortMng_Reset(); } // Ask Luos_phy to find another node - Phy_FindNextNodeJob(); + Phy_TopologyNext(); } else if (Port_ExpectedState == POKE) { @@ -102,7 +102,7 @@ _CRITICAL void PortMng_PtpHandler(uint8_t PortNbr) ctx.port.activ = PortNbr; // This port become the topology source of this node // Notify luos_phy about it - Phy_Topologysource(Robus_GetPhy(), PortNbr); + Phy_TopologySource(Robus_GetPhy(), PortNbr); } } /****************************************************************************** @@ -143,7 +143,7 @@ uint8_t PortMng_PokePort(uint8_t PortNbr) /****************************************************************************** * @brief being poked so poke next node to - * @param None + * @param portId pointer to the port id * @return true if a port have been poke else false ******************************************************************************/ error_return_t PortMng_PokeNextPort(uint8_t *portId) diff --git a/network/robus_network/src/reception.c b/network/robus_network/src/reception.c index 987fc393a..390eeb6e7 100644 --- a/network/robus_network/src/reception.c +++ b/network/robus_network/src/reception.c @@ -76,12 +76,11 @@ uint16_t crc_val = 0; // CRC value void Recep_Init(luos_phy_t *phy_robus) { LUOS_ASSERT(phy_robus != NULL); - LUOS_ASSERT(phy_robus->rx_alloc_job == false); // Initialize the reception state machine ctx.rx.status.unmap = 0; ctx.rx.callback = Recep_GetHeader; ctx.rx.status.identifier = 0xF; - phy_robus->rx_timestamp = 0; + phy_robus->rx_timestamp = TimeOD_TimeFrom_s(0.0); phy_robus->rx_buffer_base = data_rx; phy_robus->rx_data = data_rx; phy_robus->rx_keep = true; @@ -104,7 +103,7 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) // When we catch the first byte we timestamp the msg // We remove the time of the first byte to get the exact reception date. // 1 byte is 10 bits and we convert it to nanoseconds - phy_robus->rx_timestamp = LuosHAL_GetTimestamp() - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)DEFAULTBAUDRATE); + phy_robus->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)DEFAULTBAUDRATE)); // Declare Robus as busy ctx.tx.lock = true; @@ -281,11 +280,8 @@ _CRITICAL void Recep_Timeout(void) ******************************************************************************/ _CRITICAL void Recep_Reset(void) { - luos_phy_t *phy_robus = Robus_GetPhy(); - phy_robus->received_data = 0; - phy_robus->rx_size = 0; - phy_robus->rx_keep = true; - phy_robus->rx_alloc_job = false; + luos_phy_t *phy_robus = Robus_GetPhy(); + Phy_ResetMsg(phy_robus); crc_val = 0xFFFF; ctx.rx.status.rx_framing_error = false; ctx.rx.status.rx_error = false; diff --git a/network/robus_network/src/robus.c b/network/robus_network/src/robus.c index 4faf22f3e..dc2c5003d 100644 --- a/network/robus_network/src/robus.c +++ b/network/robus_network/src/robus.c @@ -112,7 +112,8 @@ void Robus_Reset(luos_phy_t *phy_ptr) /****************************************************************************** * @brief Find the next neighbour on this phy - * @param None + * @param phy_ptr + * @param portId pointer to the portId of the next node * @return error_return_t ******************************************************************************/ error_return_t Robus_RunTopology(luos_phy_t *phy_ptr, uint8_t *portId) diff --git a/network/robus_network/src/transmission.c b/network/robus_network/src/transmission.c index 66b773fe6..c1b463ac8 100644 --- a/network/robus_network/src/transmission.c +++ b/network/robus_network/src/transmission.c @@ -139,7 +139,7 @@ _CRITICAL void Transmit_Process() if (nbrRetry >= NBR_RETRY) { // We failed to transmit this message. We can't allow it, there is an issue on this target. - Phy_DeadTargetSpotted(robus_phy, job); + Phy_FailedJob(robus_phy, job); nbrRetry = 0; ctx.tx.collision = false; // Try to get a new job @@ -187,7 +187,7 @@ _CRITICAL void Transmit_Process() { // Convert date to a sendable timestamp and put it on the encapsulation - jobEncaps->timestamp = Phy_ComputeTimestamp(job); + jobEncaps->timestamp = Phy_ComputeMsgTimestamp(job); jobEncaps->timestamped_crc = ll_crc_compute(jobEncaps->unmaped, sizeof(time_luos_t), crc_val); jobEncaps->size = sizeof(time_luos_t) + CRC_SIZE; @@ -243,7 +243,7 @@ _CRITICAL void Transmit_End(void) luos_phy_t *robus_phy = Robus_GetPhy(); phy_job_t *job = Phy_GetJob(robus_phy); // We may had a reset during this transmission, so we need to check if we still have something to transmit - if (robus_phy->job_nb > 0) + if (Phy_GetJobNumber(robus_phy) > 0) { job->phy_data = 0; Phy_RmJob(robus_phy, job); diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 89a2ea33a..1ab634d89 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -82,7 +82,8 @@ void Serial_Init(void) Serial_Reset(phy_serial); SerialHAL_Init(RX_data, SERIAL_RX_BUFFER_SIZE); - phy_serial->rx_timestamp = 0; + phy_serial->rx_timestamp = TimeOD_TimeFrom_s(0.0); + ; phy_serial->rx_buffer_base = RX_data; phy_serial->rx_data = RX_data; // In our case we don't need to use this pointer because we use DMA to receive complete messages in one time. phy_serial->rx_keep = true; @@ -223,7 +224,7 @@ void Serial_Loop(void) // We receive this ping from a master node // This port become the topology source of this node // Notify luos_phy about it - Phy_Topologysource(phy_serial, SerialHAL_GetPort()); + Phy_TopologySource(phy_serial, SerialHAL_GetPort()); // The next ping we send will be a deping next_ping_is_deping = true; } @@ -302,7 +303,7 @@ _CRITICAL void Serial_TransmissionEnd(void) sending = false; // We transmitted this message, we can remove it then send another one // We may had a reset during this transmission, so we need to check if we still have something to transmit - if (phy_serial->job_nb > 0) + if (Phy_GetJobNumber(phy_serial) > 0) { phy_job_t *job = Phy_GetJob(phy_serial); job->phy_data = 0; @@ -377,6 +378,7 @@ _CRITICAL void Serial_ReceptionAdd(uint8_t *data, uint32_t size) memcpy(RX_data, data + copy_size, size - copy_size); } rx_size += size; + LUOS_ASSERT(rx_size < sizeof(RX_data)); if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) { // We received the answer of a topology ping, just indicate that we receive it diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index ed1ce02dc..c94eecf0d 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -447,7 +447,7 @@ void unittest_phy_deadTarget() // Create a fake phy job luos_phy->job_nb = 1; luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - Phy_DeadTargetSpotted(luos_phy, 0); + Phy_FailedJob(luos_phy, 0); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -458,7 +458,7 @@ void unittest_phy_deadTarget() // Create a fake phy job luos_phy->job_nb = 1; luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; - Phy_DeadTargetSpotted(0, &luos_phy->job[0]); + Phy_FailedJob(0, &luos_phy->job[0]); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -469,7 +469,7 @@ void unittest_phy_deadTarget() // Create a fake phy job luos_phy->job_nb = 1; luos_phy->job[0].data_pt = 0; - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -482,7 +482,7 @@ void unittest_phy_deadTarget() luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; msg_t *msg = (msg_t *)msg_buffer; msg->header.target_mode = 0x0f; - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -503,7 +503,7 @@ void unittest_phy_deadTarget() msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); } @@ -531,7 +531,7 @@ void unittest_phy_deadTarget() msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); @@ -560,7 +560,7 @@ void unittest_phy_deadTarget() msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(0, luos_phy->job_nb); @@ -593,7 +593,7 @@ void unittest_phy_deadTarget() msg->header.target = 1; TEST_ASSERT_EQUAL(0, phy_ctx.failed_job_nb); - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.failed_job[0].data_pt); TEST_ASSERT_EQUAL(1, luos_phy->job_nb); TEST_ASSERT_EQUAL(NULL, luos_phy->job[0].data_pt); @@ -663,7 +663,7 @@ void unittest_phy_loop() Luos_get_deadTarget = false; Robus_get_deadTarget = false; - Phy_DeadTargetSpotted(luos_phy, &luos_phy->job[0]); + Phy_FailedJob(luos_phy, &luos_phy->job[0]); TEST_ASSERT_EQUAL(1, phy_ctx.failed_job_nb); Phy_Loop(); @@ -969,7 +969,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_alloc_job = false; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = 10; + luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1006,7 +1006,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_alloc_job = false; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = 10; + luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1039,7 +1039,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_alloc_job = true; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = 10; + luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1066,7 +1066,7 @@ void unittest_phy_ComputeTimestamp() { TRY { - Phy_ComputeTimestamp(NULL); + Phy_ComputeMsgTimestamp(NULL); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1076,7 +1076,7 @@ void unittest_phy_ComputeTimestamp() phy_job_t job; job.timestamp = false; job.data_pt = (uint8_t *)msg_buffer; - Phy_ComputeTimestamp(&job); + Phy_ComputeMsgTimestamp(&job); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1086,7 +1086,7 @@ void unittest_phy_ComputeTimestamp() phy_job_t job; job.timestamp = true; job.data_pt = NULL; - Phy_ComputeTimestamp(&job); + Phy_ComputeMsgTimestamp(&job); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1115,7 +1115,7 @@ void unittest_phy_ComputeTimestamp() volatile time_luos_t timestamp = TimeOD_TimeFrom_ns(10); memcpy(&msg->data[msg->header.size], (void *)×tamp, sizeof(time_luos_t)); - volatile time_luos_t resulting_latency = Phy_ComputeTimestamp(&job); + volatile time_luos_t resulting_latency = Phy_ComputeMsgTimestamp(&job); TEST_ASSERT_EQUAL(0xAE, job.msg_pt->data[0]); #ifndef _WIN32 From 54d2280935bd84d90c031c0b6890392833086de5 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 14:58:47 +0200 Subject: [PATCH 114/198] !fix multi-phy --- engine/IO/inc/luos_phy.h | 2 +- engine/IO/inc/struct_phy.h | 4 ++-- engine/IO/src/luos_phy.c | 6 +++--- network/robus_network/src/reception.c | 4 ++-- network/serial_network/src/serial_network.c | 7 +++---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index ea189c0d5..41035872a 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -41,7 +41,7 @@ void Phy_ResetMsg(luos_phy_t *phy_ptr); // Call this function to reset the // Tx management time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job); // Use it to compute the timestamp of the message to send. -time_luos_t Phy_GetTimestamp(void); // Use it to get the current timestamp. +uint64_t Phy_GetTimestamp(void); // Use it to get the current timestamp in ns. uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) // Job management diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h index 29d1cad63..f390b85aa 100644 --- a/engine/IO/inc/struct_phy.h +++ b/engine/IO/inc/struct_phy.h @@ -47,8 +47,8 @@ typedef uint8_t phy_target_t; typedef struct luos_phy_t { // *************** RX information *************** - volatile time_luos_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. - uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. + volatile uint64_t rx_timestamp; // Timestamp of the last received message. We will use it to compute the date based on received latency. This value need to be stored in ns. + uint8_t *rx_buffer_base; // Pointer to the base of the buffer where we will store the begining of received data. union { volatile uint8_t *rx_data; // Pointer to write received bytes. diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index c540cb3f6..e90f71e66 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -470,7 +470,7 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) uint16_t my_job = phy_ctx.io_job_nb++; Phy_SetIrqState(true); // Now copy the data in the job - phy_ctx.io_job[my_job].timestamp = (uint64_t)TimeOD_TimeTo_ns(phy_ptr->rx_timestamp); + phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; phy_ctx.io_job[my_job].phy_filter = phy_ptr->rx_phy_filter; phy_ctx.io_job[my_job].size = phy_ptr->rx_size; @@ -511,9 +511,9 @@ time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job) * @param None * @return Timestamp value ******************************************************************************/ -_CRITICAL time_luos_t Phy_GetTimestamp(void) +_CRITICAL uint64_t Phy_GetTimestamp(void) { - return TimeOD_TimeFrom_ns((double)LuosHAL_GetTimestamp()); + return LuosHAL_GetTimestamp(); } /****************************************************************************** diff --git a/network/robus_network/src/reception.c b/network/robus_network/src/reception.c index 390eeb6e7..684e2b323 100644 --- a/network/robus_network/src/reception.c +++ b/network/robus_network/src/reception.c @@ -80,7 +80,7 @@ void Recep_Init(luos_phy_t *phy_robus) ctx.rx.status.unmap = 0; ctx.rx.callback = Recep_GetHeader; ctx.rx.status.identifier = 0xF; - phy_robus->rx_timestamp = TimeOD_TimeFrom_s(0.0); + phy_robus->rx_timestamp = 0; phy_robus->rx_buffer_base = data_rx; phy_robus->rx_data = data_rx; phy_robus->rx_keep = true; @@ -103,7 +103,7 @@ _CRITICAL void Recep_GetHeader(luos_phy_t *phy_robus, volatile uint8_t *data) // When we catch the first byte we timestamp the msg // We remove the time of the first byte to get the exact reception date. // 1 byte is 10 bits and we convert it to nanoseconds - phy_robus->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)DEFAULTBAUDRATE)); + phy_robus->rx_timestamp = Phy_GetTimestamp() - ((uint32_t)10 * (uint32_t)1000000000 / (uint32_t)ROBUS_NETWORK_BAUDRATE); // Declare Robus as busy ctx.tx.lock = true; diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 1ab634d89..ea72e2a12 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -82,8 +82,7 @@ void Serial_Init(void) Serial_Reset(phy_serial); SerialHAL_Init(RX_data, SERIAL_RX_BUFFER_SIZE); - phy_serial->rx_timestamp = TimeOD_TimeFrom_s(0.0); - ; + phy_serial->rx_timestamp = 0; phy_serial->rx_buffer_base = RX_data; phy_serial->rx_data = RX_data; // In our case we don't need to use this pointer because we use DMA to receive complete messages in one time. phy_serial->rx_keep = true; @@ -365,7 +364,7 @@ _CRITICAL void Serial_ReceptionAdd(uint8_t *data, uint32_t size) { // This is probably the first data we received for this message, we need to timestamp the reception date. // Watch out, if the loop is executed very slowly we may receive multiple messages in the same loop. This could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. Anyway we even didn't have any way to store multiple timestamp... - phy_serial->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - (size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE)); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) + phy_serial->rx_timestamp = Phy_GetTimestamp() - (size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) } uint32_t copy_size = (uintptr_t)&RX_data + sizeof(RX_data) - (uintptr_t)phy_serial->rx_buffer_base + rx_size; if (copy_size > size) @@ -397,7 +396,7 @@ _CRITICAL void Serial_ReceptionEnd(uint32_t size) rx_size += size; // We consider this as the end of a complete message // If we received multiple messages in this call, this could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. - phy_serial->rx_timestamp = TimeOD_TimeFrom_ns(TimeOD_TimeTo_ns(Phy_GetTimestamp()) - (rx_size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE)); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) + phy_serial->rx_timestamp = Phy_GetTimestamp() - (rx_size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) LUOS_ASSERT(rx_size < sizeof(RX_data)); if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) { From 23837317a7acc53d04e68e8257226776e52380f0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 14:59:26 +0200 Subject: [PATCH 115/198] Improve C++ compatibility by making it natively compilable in a C++ env --- engine/IO/inc/luos_phy.h | 79 +++++++------ engine/core/inc/luos_engine.h | 104 +++++++++--------- .../Arduino/led/lib/led/{led.c => led.cpp} | 5 +- examples/projects/Arduino/led/src/led.cpp | 10 -- network/robus_network/inc/robus_network.h | 17 ++- network/serial_network/inc/serial_network.h | 17 ++- tool_services/gate/gate.h | 29 +++-- tool_services/pipe/pipe.h | 18 ++- 8 files changed, 156 insertions(+), 123 deletions(-) rename examples/projects/Arduino/led/lib/led/{led.c => led.cpp} (95%) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 41035872a..590372dc4 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -6,6 +6,10 @@ ******************************************************************************/ #ifndef _LUOS_PHY_H_ #define _LUOS_PHY_H_ +#ifdef __cplusplus +extern "C" +{ +#endif #include #include @@ -14,40 +18,43 @@ #include "luos_utils.h" #include "luos_hal.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef void (*JOB_CB)(luos_phy_t *phy_ptr, phy_job_t *job); -typedef error_return_t (*RUN_TOPO)(luos_phy_t *phy_ptr, uint8_t *portId); -typedef void (*RESET_PHY)(luos_phy_t *phy_ptr); -typedef void (*IRQ_STATE)(bool state); - -// Irq management -void Phy_SetIrqStateFunciton(IRQ_STATE irq_state); // Use it to reference your phy specific Irq state management to Luos. -void Phy_SetIrqState(bool state); // Use it to globally enable/disable all the phy irq. - -// Phy creation -luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. - -// Topology management -void Phy_TopologyNext(void); // Use it to find the next node that need to be detected accross phys. -void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id); // The phy will call this function when a new node is detected on a specific port. -void Phy_TopologyDone(luos_phy_t *phy_ptr); // The phy will call this function when all its port detection are done. - -// Rx management -void Phy_ComputeHeader(luos_phy_t *phy_ptr); // After receiving the first 7 bytes (the header) call this function to compute how you should manage the incoming message. -void Phy_ValidMsg(luos_phy_t *phy_ptr); // After receiving as much valid bytes as phy_ptr.rx_size, call this function to validate the message. -void Phy_ResetMsg(luos_phy_t *phy_ptr); // Call this function to reset the rx process. - -// Tx management -time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job); // Use it to compute the timestamp of the message to send. -uint64_t Phy_GetTimestamp(void); // Use it to get the current timestamp in ns. -uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) - -// Job management -void Phy_FailedJob(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead -phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. -void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. -uint16_t Phy_GetJobNumber(luos_phy_t *phy_ptr); // Use it to get the number of job to send. - + /******************************************************************************* + * Definitions + ******************************************************************************/ + typedef void (*JOB_CB)(luos_phy_t *phy_ptr, phy_job_t *job); + typedef error_return_t (*RUN_TOPO)(luos_phy_t *phy_ptr, uint8_t *portId); + typedef void (*RESET_PHY)(luos_phy_t *phy_ptr); + typedef void (*IRQ_STATE)(bool state); + + // Irq management + void Phy_SetIrqStateFunciton(IRQ_STATE irq_state); // Use it to reference your phy specific Irq state management to Luos. + void Phy_SetIrqState(bool state); // Use it to globally enable/disable all the phy irq. + + // Phy creation + luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. + + // Topology management + void Phy_TopologyNext(void); // Use it to find the next node that need to be detected accross phys. + void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id); // The phy will call this function when a new node is detected on a specific port. + void Phy_TopologyDone(luos_phy_t *phy_ptr); // The phy will call this function when all its port detection are done. + + // Rx management + void Phy_ComputeHeader(luos_phy_t *phy_ptr); // After receiving the first 7 bytes (the header) call this function to compute how you should manage the incoming message. + void Phy_ValidMsg(luos_phy_t *phy_ptr); // After receiving as much valid bytes as phy_ptr.rx_size, call this function to validate the message. + void Phy_ResetMsg(luos_phy_t *phy_ptr); // Call this function to reset the rx process. + + // Tx management + time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job); // Use it to compute the timestamp of the message to send. + uint64_t Phy_GetTimestamp(void); // Use it to get the current timestamp in ns. + uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) + + // Job management + void Phy_FailedJob(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead + phy_job_t *Phy_GetJob(luos_phy_t *phy_ptr); // Use it to get the first job to send. + void Phy_RmJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to remove a job from your phy job list when it's done. + uint16_t Phy_GetJobNumber(luos_phy_t *phy_ptr); // Use it to get the number of job to send. + +#ifdef __cplusplus +} +#endif #endif /* _LUOS_PHY_H_ */ diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 43f9f3390..771af4739 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -5,7 +5,10 @@ ******************************************************************************/ #ifndef LUOS_ENGINE_H #define LUOS_ENGINE_H - +#ifdef __cplusplus +extern "C" +{ +#endif #include #include #include "luos_utils.h" @@ -23,60 +26,63 @@ #define LUOS_RUN() Luos_Run(); -/******************************************************************************* - * Function - ******************************************************************************/ -void Luos_Init(void); -void Luos_Loop(void); -void Luos_ResetStatistic(void); -const revision_t *Luos_GetVersion(void); -void Luos_SetIrqState(bool state); + /******************************************************************************* + * Function + ******************************************************************************/ + void Luos_Init(void); + void Luos_Loop(void); + void Luos_ResetStatistic(void); + const revision_t *Luos_GetVersion(void); + void Luos_SetIrqState(bool state); -// ***************** Node management ***************** -uint32_t Luos_GetSystick(void); -bool Luos_IsDetected(void); + // ***************** Node management ***************** + uint32_t Luos_GetSystick(void); + bool Luos_IsDetected(void); -// ***************** Package management ***************** -void Luos_AddPackage(void (*Init)(void), void (*Loop)(void)); -void Luos_Run(void); + // ***************** Package management ***************** + void Luos_AddPackage(void (*Init)(void), void (*Loop)(void)); + void Luos_Run(void); -// ***************** Service management ***************** -service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *alias, revision_t revision); -error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t size); -void Luos_Detect(service_t *service); -void Luos_ServicesClear(void); + // ***************** Service management ***************** + service_t *Luos_CreateService(SERVICE_CB service_cb, uint8_t type, const char *alias, revision_t revision); + error_return_t Luos_UpdateAlias(service_t *service, const char *alias, uint16_t size); + void Luos_Detect(service_t *service); + void Luos_ServicesClear(void); -// ***************** Messaging management ***************** + // ***************** Messaging management ***************** -void Luos_Flush(void); + void Luos_Flush(void); // *** Streaming management *** #include "streaming.h" -void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); -void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); -error_return_t Luos_ReceiveStreaming(service_t *service, const msg_t *msg, streaming_channel_t *stream); - -// *** Timestamping management (in file `timestamp.c`)*** -time_luos_t Luos_Timestamp(void); -bool Luos_IsMsgTimstamped(const msg_t *msg); -time_luos_t Luos_GetMsgTimestamp(msg_t *msg); -error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); - -// *** Pub/Sub management (in file `pub_sub.c`)*** -error_return_t Luos_Subscribe(service_t *service, uint16_t topic); -error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); - -// *** Big data management *** -void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); -int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data); - -// *** Basic transmission management *** -error_return_t Luos_SendMsg(service_t *service, msg_t *msg); -error_return_t Luos_TxComplete(void); - -// *** Polling reception management *** -error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write); -error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write); -uint16_t Luos_NbrAvailableMsg(void); - + void Luos_SendStreaming(service_t *service, msg_t *msg, streaming_channel_t *stream); + void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t *stream, uint32_t max_size); + error_return_t Luos_ReceiveStreaming(service_t *service, const msg_t *msg, streaming_channel_t *stream); + + // *** Timestamping management (in file `timestamp.c`)*** + time_luos_t Luos_Timestamp(void); + bool Luos_IsMsgTimstamped(const msg_t *msg); + time_luos_t Luos_GetMsgTimestamp(msg_t *msg); + error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); + + // *** Pub/Sub management (in file `pub_sub.c`)*** + error_return_t Luos_Subscribe(service_t *service, uint16_t topic); + error_return_t Luos_Unsubscribe(service_t *service, uint16_t topic); + + // *** Big data management *** + void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size); + int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data); + + // *** Basic transmission management *** + error_return_t Luos_SendMsg(service_t *service, msg_t *msg); + error_return_t Luos_TxComplete(void); + + // *** Polling reception management *** + error_return_t Luos_ReadMsg(service_t *service, msg_t *msg_to_write); + error_return_t Luos_ReadFromService(service_t *service, uint16_t id, msg_t *msg_to_write); + uint16_t Luos_NbrAvailableMsg(void); + +#ifdef __cplusplus +} +#endif #endif /* LUOS_ENGINE_H */ diff --git a/examples/projects/Arduino/led/lib/led/led.c b/examples/projects/Arduino/led/lib/led/led.cpp similarity index 95% rename from examples/projects/Arduino/led/lib/led/led.c rename to examples/projects/Arduino/led/lib/led/led.cpp index 4c067da66..4a5ee993c 100644 --- a/examples/projects/Arduino/led/lib/led/led.c +++ b/examples/projects/Arduino/led/lib/led/led.cpp @@ -28,7 +28,10 @@ void Led_Init(void) { pinMode(LED_BUILTIN, OUTPUT); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; + revision_t revision; + revision.major = 1; + revision.minor = 0; + revision.build = 0; Luos_CreateService(Led_MsgHandler, STATE_TYPE, "led_mod", revision); } /****************************************************************************** diff --git a/examples/projects/Arduino/led/src/led.cpp b/examples/projects/Arduino/led/src/led.cpp index 57cfad0ba..9a285d875 100644 --- a/examples/projects/Arduino/led/src/led.cpp +++ b/examples/projects/Arduino/led/src/led.cpp @@ -1,18 +1,8 @@ #include - -#ifdef __cplusplus -extern "C" -{ -#endif - #include "luos_engine.h" #include "serial_network.h" #include "led.h" -#ifdef __cplusplus -} -#endif - /****************************************************************************** * @brief Setup ardiuno * @param None diff --git a/network/robus_network/inc/robus_network.h b/network/robus_network/inc/robus_network.h index 21a696573..93a46b1c2 100644 --- a/network/robus_network/inc/robus_network.h +++ b/network/robus_network/inc/robus_network.h @@ -7,12 +7,19 @@ #ifndef _ROBUS_H_ #define _ROBUS_H_ +#ifdef __cplusplus +extern "C" +{ +#endif #include "luos_phy.h" -/******************************************************************************* - * Function - ******************************************************************************/ -void Robus_Init(void); -void Robus_Loop(void); + /******************************************************************************* + * Function + ******************************************************************************/ + void Robus_Init(void); + void Robus_Loop(void); +#ifdef __cplusplus +} +#endif #endif /* _ROBUS_H_ */ diff --git a/network/serial_network/inc/serial_network.h b/network/serial_network/inc/serial_network.h index 453bcabc9..c323fd9a1 100644 --- a/network/serial_network/inc/serial_network.h +++ b/network/serial_network/inc/serial_network.h @@ -7,6 +7,10 @@ #ifndef _LUOS_SERIAL_H_ #define _LUOS_SERIAL_H_ +#ifdef __cplusplus +extern "C" +{ +#endif #include "luos_phy.h" /******************************************************************************* @@ -16,10 +20,13 @@ #define SERIAL_RX_BUFFER_SIZE 512 #endif -/******************************************************************************* - * Function - ******************************************************************************/ -void Serial_Init(void); -void Serial_Loop(void); + /******************************************************************************* + * Function + ******************************************************************************/ + void Serial_Init(void); + void Serial_Loop(void); +#ifdef __cplusplus +} +#endif #endif /* _LUOS_SERIAL_H_ */ diff --git a/tool_services/gate/gate.h b/tool_services/gate/gate.h index 4b4c42705..a68348311 100644 --- a/tool_services/gate/gate.h +++ b/tool_services/gate/gate.h @@ -5,18 +5,25 @@ ******************************************************************************/ #ifndef GATE_H #define GATE_H +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* + * Definitions + ******************************************************************************/ -/******************************************************************************* - * Definitions - ******************************************************************************/ + /******************************************************************************* + * Variables + ******************************************************************************/ -/******************************************************************************* - * Variables - ******************************************************************************/ + /******************************************************************************* + * Function + ******************************************************************************/ + void Gate_Init(void); + void Gate_Loop(void); -/******************************************************************************* - * Function - ******************************************************************************/ -void Gate_Init(void); -void Gate_Loop(void); +#ifdef __cplusplus +} +#endif #endif /* GATE_H */ diff --git a/tool_services/pipe/pipe.h b/tool_services/pipe/pipe.h index e600661af..15d010b0c 100644 --- a/tool_services/pipe/pipe.h +++ b/tool_services/pipe/pipe.h @@ -6,11 +6,17 @@ ******************************************************************************/ #ifndef PIPE_H #define PIPE_H +#ifdef __cplusplus +extern "C" +{ +#endif + /******************************************************************************* + * Function + ******************************************************************************/ + void Pipe_Init(void); + void Pipe_Loop(void); -/******************************************************************************* - * Function - ******************************************************************************/ -void Pipe_Init(void); -void Pipe_Loop(void); - +#ifdef __cplusplus +} +#endif #endif /* PIPE_H */ From 1a0bf0077824d1bc41e786b885f7a1aa822c28da Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 2 Aug 2023 17:37:07 +0200 Subject: [PATCH 116/198] Remove networks from coverage, networks are very difficult to unit test, they are to close from hardware. --- .github/workflows/build.yml | 2 +- test/code_coverage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1840bd926..df44c1148 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: run: | sudo apt-get install -y lcov lcov -d .pio/build/native/ -c -o lcov.info - lcov --remove lcov.info '*/usr/*' '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o lcov.info + lcov --remove lcov.info '*/usr/*' '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' '*/network/*' -o lcov.info - if: matrix.os == 'ubuntu-latest' name: Coveralls diff --git a/test/code_coverage.py b/test/code_coverage.py index 675188bce..984068fc5 100755 --- a/test/code_coverage.py +++ b/test/code_coverage.py @@ -1,5 +1,5 @@ #!/usr/bin/env python import os os.system("lcov -d .pio/build/native/ -c -o lcov.info") -os.system("lcov --remove lcov.info '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o filtered_lcov.info") +os.system("lcov --remove lcov.info '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' '*/network/*' -o filtered_lcov.info") os.system("genhtml filtered_lcov.info -o cov/ --demangle-cpp") From 085e4962fa152b9aecebbbe342dab829517a8532 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 2 Aug 2023 19:05:38 +0200 Subject: [PATCH 117/198] Fix format --- engine/core/inc/struct_luos.h | 6 ++--- engine/core/src/luos_engine.c | 2 +- .../Arduino/bldc_simple_foc/node_config.h | 2 +- examples/projects/Arduino/led/node_config.h | 2 +- .../NUCLEO-F072RB/button/node_config.h | 2 +- .../NUCLEO-F401RE/button/node_config.h | 2 +- .../NUCLEO-F410RB/button/node_config.h | 2 +- .../NUCLEO-G431KB/button/node_config.h | 2 +- .../gate_serialcom/node_config.h | 4 +-- .../NUCLEO-L073RZ/button/node_config.h | 4 +-- .../NUCLEO-L432KC/button/node_config.h | 2 +- .../gate_serialcom/node_config.h | 4 +-- .../projects/NUCLEO-L432KC/led/node_config.h | 2 +- .../SAMD21XPLAINED/button/node_config.h | 2 +- .../STM32F4-discovery/button/node_config.h | 2 +- .../STM32L4S5_discovery/button/node_config.h | 4 +-- examples/projects/l0/button/node_config.h | 2 +- examples/projects/l0/dxl/lib/Dxl/dxl.c | 2 +- .../projects/l0/gate_serialcom/node_config.h | 4 +-- .../l0/inspector_serialcom/node_config.h | 4 +-- examples/projects/l0/led/node_config.h | 2 +- examples/projects/l0/led_strip/node_config.h | 4 +-- .../robus_network/HAL/ATSAMD21/robus_hal.c | 27 ++++++++++--------- .../HAL/ATSAMD21/robus_hal_config.h | 6 ++--- .../HAL/ATSAMD21_ARDUINO/board_config.h | 10 +++---- .../HAL/ATSAMD21_ARDUINO/robus_hal.c | 27 ++++++++++--------- .../HAL/ATSAMD21_ARDUINO/robus_hal_config.h | 6 ++--- .../HAL/ATSAMD21_MBED/robus_hal.c | 27 ++++++++++--------- .../HAL/ATSAMD21_MBED/robus_hal_config.h | 6 ++--- network/robus_network/HAL/NATIVE/robus_hal.c | 3 ++- .../HAL/NATIVE/robus_hal_config.h | 2 +- network/robus_network/HAL/STM32F0/robus_hal.c | 1 + network/robus_network/HAL/STM32F4/robus_hal.c | 1 + network/robus_network/HAL/STM32G4/robus_hal.c | 1 + .../HAL/STM32G4/robus_hal_config.h | 2 +- network/robus_network/HAL/STM32L0/robus_hal.c | 1 + network/robus_network/HAL/STM32L4/robus_hal.c | 1 + network/robus_network/HAL/STUB/robus_hal.c | 3 ++- .../robus_network/HAL/STUB/robus_hal_config.h | 2 +- .../robus_network/HAL/template/robus_hal.c | 1 + 40 files changed, 100 insertions(+), 89 deletions(-) diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 320f91c6c..4fd734858 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -211,10 +211,10 @@ typedef struct service_t service_stats_t statistics; /*!< service level statistics. */ // Private Variables - uint16_t last_topic_position; /*!< Position pointer of the last topic added. */ + uint16_t last_topic_position; /*!< Position pointer of the last topic added. */ uint16_t topic_list[MAX_LOCAL_TOPIC_NUMBER]; /*!< multicast target bank. */ - timed_update_t auto_refresh; /*!< service auto refresh context. */ - void *profile_context; /*!< Pointer to the profile context. */ + timed_update_t auto_refresh; /*!< service auto refresh context. */ + void *profile_context; /*!< Pointer to the profile context. */ } service_t; diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index 70bdc92fc..c61658836 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -349,7 +349,7 @@ int Luos_ReceiveData(service_t *service, const msg_t *msg, void *bin_data) // Manage buffer session (one per service) static uint32_t data_size[MAX_LOCAL_SERVICE_NUMBER] = {0}; static uint32_t total_data_size[MAX_LOCAL_SERVICE_NUMBER] = {0}; - static uint16_t last_msg_size = 0; + static uint16_t last_msg_size = 0; // When this function receive a data from a NULL service it is an error and we should reinit the reception state if (service == NULL) diff --git a/examples/projects/Arduino/bldc_simple_foc/node_config.h b/examples/projects/Arduino/bldc_simple_foc/node_config.h index 3fe08e2a5..1cd23bf71 100644 --- a/examples/projects/Arduino/bldc_simple_foc/node_config.h +++ b/examples/projects/Arduino/bldc_simple_foc/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 #define ARDUINO_PTPA_PIN 19 #define ARDUINO_PTPB_PIN 7 diff --git a/examples/projects/Arduino/led/node_config.h b/examples/projects/Arduino/led/node_config.h index dc8a32407..961af2512 100644 --- a/examples/projects/Arduino/led/node_config.h +++ b/examples/projects/Arduino/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F072RB/button/node_config.h b/examples/projects/NUCLEO-F072RB/button/node_config.h index a2f0f9305..52cb97eab 100644 --- a/examples/projects/NUCLEO-F072RB/button/node_config.h +++ b/examples/projects/NUCLEO-F072RB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F401RE/button/node_config.h b/examples/projects/NUCLEO-F401RE/button/node_config.h index e7818dc34..b36051575 100644 --- a/examples/projects/NUCLEO-F401RE/button/node_config.h +++ b/examples/projects/NUCLEO-F401RE/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F410RB/button/node_config.h b/examples/projects/NUCLEO-F410RB/button/node_config.h index 863662eeb..5c758889b 100644 --- a/examples/projects/NUCLEO-F410RB/button/node_config.h +++ b/examples/projects/NUCLEO-F410RB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G431KB/button/node_config.h b/examples/projects/NUCLEO-G431KB/button/node_config.h index be4afa01d..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-G431KB/button/node_config.h +++ b/examples/projects/NUCLEO-G431KB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h index 3902eff35..7c26bd8bb 100644 --- a/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-G474RE/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index 45905739d..3f899fc25 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -47,10 +47,10 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define DEFAULTBAUDRATE 500000 #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/button/node_config.h b/examples/projects/NUCLEO-L432KC/button/node_config.h index be4afa01d..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/button/node_config.h +++ b/examples/projects/NUCLEO-L432KC/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h index 3902eff35..7c26bd8bb 100644 --- a/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L432KC/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/led/node_config.h b/examples/projects/NUCLEO-L432KC/led/node_config.h index be4afa01d..1fc4cdf75 100644 --- a/examples/projects/NUCLEO-L432KC/led/node_config.h +++ b/examples/projects/NUCLEO-L432KC/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/SAMD21XPLAINED/button/node_config.h b/examples/projects/SAMD21XPLAINED/button/node_config.h index dc8a32407..961af2512 100644 --- a/examples/projects/SAMD21XPLAINED/button/node_config.h +++ b/examples/projects/SAMD21XPLAINED/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32F4-discovery/button/node_config.h b/examples/projects/STM32F4-discovery/button/node_config.h index 7e4f40773..029832089 100644 --- a/examples/projects/STM32F4-discovery/button/node_config.h +++ b/examples/projects/STM32F4-discovery/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32L4S5_discovery/button/node_config.h b/examples/projects/STM32L4S5_discovery/button/node_config.h index 76d572167..b80c9ab38 100644 --- a/examples/projects/STM32L4S5_discovery/button/node_config.h +++ b/examples/projects/STM32L4S5_discovery/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION @@ -132,7 +132,7 @@ /******************************************************************************* * DMA CONFIG ******************************************************************************/ -#define ROBUS_DMA_CLOCK_ENABLE() \ +#define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index a2f0f9305..52cb97eab 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 543c472ae..14eb2966e 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -59,7 +59,7 @@ void Dxl_Init(void) ******************************************************************************/ void Dxl_Loop(void) { - static int index = 0; + static int index = 0; static uint32_t last_temp[MAX_LOCAL_SERVICE_NUMBER] = {0}; static uint32_t last_sample[MAX_LOCAL_SERVICE_NUMBER] = {0}; // check motor values one by one diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index 225647240..68c0cdd4c 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 1024 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 1024 +#define MAX_MSG_NB 40 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION ******************************************************************************* diff --git a/examples/projects/l0/inspector_serialcom/node_config.h b/examples/projects/l0/inspector_serialcom/node_config.h index f4c20c348..cbd40e31d 100644 --- a/examples/projects/l0/inspector_serialcom/node_config.h +++ b/examples/projects/l0/inspector_serialcom/node_config.h @@ -48,8 +48,8 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 40 #define NODETECTION /******************************************************************************* diff --git a/examples/projects/l0/led/node_config.h b/examples/projects/l0/led/node_config.h index d11f59555..591039463 100644 --- a/examples/projects/l0/led/node_config.h +++ b/examples/projects/l0/led/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 5 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/led_strip/node_config.h b/examples/projects/l0/led_strip/node_config.h index c8510269e..7803dcc79 100644 --- a/examples/projects/l0/led_strip/node_config.h +++ b/examples/projects/l0/led_strip/node_config.h @@ -47,8 +47,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 30 -#define MAX_BUFFER_SIZE 1024 +#define MAX_MSG_NB 30 +#define MAX_BUFFER_SIZE 1024 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/network/robus_network/HAL/ATSAMD21/robus_hal.c b/network/robus_network/HAL/ATSAMD21/robus_hal.c index e5d78d37d..d83631384 100644 --- a/network/robus_network/HAL/ATSAMD21/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21/robus_hal.c @@ -91,19 +91,19 @@ void RobusHAL_ComInit(uint32_t Baudrate) ROBUS_COM->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; /* Configure Baud Rate */ - baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; + baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; ROBUS_COM->USART_INT.SERCOM_BAUD = SERCOM_USART_INT_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON ROBUS_COM->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_INT_CTRLA_RXPO(COM_RX_POS) - | SERCOM_USART_INT_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_INT_CTRLA_DORD_Msk - | SERCOM_USART_INT_CTRLA_IBON_Msk | SERCOM_USART_INT_CTRLA_FORM(0x0) - | SERCOM_USART_INT_CTRLA_SAMPR(0); + | SERCOM_USART_INT_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_INT_CTRLA_DORD_Msk + | SERCOM_USART_INT_CTRLA_IBON_Msk | SERCOM_USART_INT_CTRLA_FORM(0x0) + | SERCOM_USART_INT_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits ROBUS_COM->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT | SERCOM_USART_INT_CTRLB_SBMODE_1_BIT - | SERCOM_USART_INT_CTRLB_RXEN_Msk | SERCOM_USART_INT_CTRLB_TXEN_Msk - | SERCOM_USART_INT_CTRLB_SFDE_Msk; + | SERCOM_USART_INT_CTRLB_RXEN_Msk | SERCOM_USART_INT_CTRLB_TXEN_Msk + | SERCOM_USART_INT_CTRLB_SFDE_Msk; /* Enable the UART after the configurations */ ROBUS_COM->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; @@ -128,13 +128,13 @@ void RobusHAL_ComInit(uint32_t Baudrate) #ifndef USE_TX_IT ROBUS_DMA_CLOCK_ENABLE(); - ROBUS_DMA->DMAC_BASEADDR = (uint32_t)&descriptor_section; - ROBUS_DMA->DMAC_WRBADDR = (uint32_t)&write_back_section; - ROBUS_DMA->DMAC_PRICTRL0 = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0_Msk | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1_Msk | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2_Msk | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3_Msk; - ROBUS_DMA->DMAC_CHID = ROBUS_DMA_CHANNEL; // DMA Channel - ROBUS_DMA->DMAC_CHCTRLB = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->DMAC_BASEADDR = (uint32_t)&descriptor_section; + ROBUS_DMA->DMAC_WRBADDR = (uint32_t)&write_back_section; + ROBUS_DMA->DMAC_PRICTRL0 = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0_Msk | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1_Msk | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2_Msk | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3_Msk; + ROBUS_DMA->DMAC_CHID = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->DMAC_CHCTRLB = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.DMAC_BTCTRL = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID_Msk | DMAC_BTCTRL_SRCINC_Msk; - ROBUS_DMA->DMAC_CTRL = DMAC_CTRL_DMAENABLE_Msk | DMAC_CTRL_LVLEN0_Msk | DMAC_CTRL_LVLEN1_Msk | DMAC_CTRL_LVLEN2_Msk | DMAC_CTRL_LVLEN3_Msk; + ROBUS_DMA->DMAC_CTRL = DMAC_CTRL_DMAENABLE_Msk | DMAC_CTRL_LVLEN0_Msk | DMAC_CTRL_LVLEN1_Msk | DMAC_CTRL_LVLEN2_Msk | DMAC_CTRL_LVLEN3_Msk; #endif } /****************************************************************************** @@ -676,7 +676,8 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) *(uint16_t *)crc ^= dbyte << 8; for (uint8_t j = 0; j < 8; ++j) { - uint16_t mix = *(uint16_t *)crc & 0x8000; + uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/ATSAMD21/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21/robus_hal_config.h index 1c23d065c..87224b356 100644 --- a/network/robus_network/HAL/ATSAMD21/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21/robus_hal_config.h @@ -120,7 +120,7 @@ * COM CONFIG ******************************************************************************/ #ifndef ROBUS_COM_CLOCK_ENABLE - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK_REGS->GCLK_CLKCTRL = GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN(0x0) | GCLK_CLKCTRL_CLKEN_Msk; \ @@ -140,7 +140,7 @@ * DMA CONFIG ******************************************************************************/ #ifndef ROBUS_DMA_CLOCK_ENABLE - #define ROBUS_DMA_CLOCK_ENABLE() \ + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM_REGS->PM_AHBMASK |= PM_AHBMASK_DMAC_Msk; \ @@ -159,7 +159,7 @@ * COM TIMEOUT CONFIG ******************************************************************************/ #ifndef ROBUS_TIMER_CLOCK_ENABLE - #define ROBUS_TIMER_CLOCK_ENABLE() \ + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK_REGS->GCLK_CLKCTRL = GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN(0x0) | GCLK_CLKCTRL_CLKEN_Msk; \ diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h index d02698489..b3b40bd19 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/board_config.h @@ -13,7 +13,7 @@ #include #if defined(ARDUINO_SAMD_ZERO) - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ @@ -29,7 +29,7 @@ || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) || defined(ARDUINO_SAMD_MKRGSM1400) \ || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRZERO) || defined(ARDUINO_SAMD_NANO_33_IOT) \ || defined(SAMD_MKRVIDOR4000)) - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM5_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ @@ -43,7 +43,7 @@ #endif #if defined(SEEED_XIAO_M0) - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM4_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ @@ -53,8 +53,8 @@ #define ROBUS_COM_IRQ SERCOM4_IRQn #define ROBUS_COM_IRQHANDLER() SERCOM4_Handler() #define ROBUS_DMA_TRIGGER SERCOM4_DMAC_ID_TX - #define COM_TX_POS 0 // PAD0 - #define COM_RX_POS 1 // PAD1 + #define COM_TX_POS 0 // PAD0 + #define COM_RX_POS 1 // PAD1 #define ARDUINO_PTPA_PIN 1 #define ARDUINO_PTPB_PIN 2 diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c index 6ca7b35ac..ec5944d38 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c @@ -95,19 +95,19 @@ void RobusHAL_ComInit(uint32_t Baudrate) ROBUS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; /* Configure Baud Rate */ - baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; + baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; ROBUS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON ROBUS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) - | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD - | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) - | SERCOM_USART_CTRLA_SAMPR(0); + | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD + | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) + | SERCOM_USART_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits ROBUS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE - | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN - | SERCOM_USART_CTRLB_SFDE; + | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN + | SERCOM_USART_CTRLB_SFDE; /* Enable the UART after the configurations */ ROBUS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; @@ -132,13 +132,13 @@ void RobusHAL_ComInit(uint32_t Baudrate) #ifndef USE_TX_IT ROBUS_DMA_CLOCK_ENABLE(); - ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; - ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; - ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; - ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel - ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; + ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; + ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; + ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.BTCTRL.reg = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID | DMAC_BTCTRL_SRCINC; - ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; + ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; #endif } /****************************************************************************** @@ -645,7 +645,8 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) *(uint16_t *)crc ^= dbyte << 8; for (uint8_t j = 0; j < 8; ++j) { - uint16_t mix = *(uint16_t *)crc & 0x8000; + uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h index 57394f36e..0d1db5264 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal_config.h @@ -143,7 +143,7 @@ DEFAULT RobusHAL ARDUINO PIN CONFIGURATION * COM CONFIG ******************************************************************************/ #ifndef ROBUS_COM_CLOCK_ENABLE - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ @@ -163,7 +163,7 @@ DEFAULT RobusHAL ARDUINO PIN CONFIGURATION * DMA CONFIG ******************************************************************************/ #ifndef ROBUS_DMA_CLOCK_ENABLE - #define ROBUS_DMA_CLOCK_ENABLE() \ + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM->APBCMASK.reg |= PM_AHBMASK_DMAC; \ @@ -182,7 +182,7 @@ DEFAULT RobusHAL ARDUINO PIN CONFIGURATION * COM TIMEOUT CONFIG ******************************************************************************/ #ifndef ROBUS_TIMER_CLOCK_ENABLE - #define ROBUS_TIMER_CLOCK_ENABLE() \ + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ diff --git a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c index 3939d22f6..016a79224 100644 --- a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c @@ -93,19 +93,19 @@ void RobusHAL_ComInit(uint32_t Baudrate) ROBUS_COM->USART.CTRLA.reg &= ~SERCOM_USART_CTRLA_ENABLE; /* Configure Baud Rate */ - baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; + baud = 65536 - ((uint64_t)65536 * 16 * Baudrate) / MCUFREQ; ROBUS_COM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(baud); // Configures USART Clock Mode/ TXPO and RXPO/ Data Order/ Standby Mode/ Sampling rate/ IBON ROBUS_COM->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_CTRLA_RXPO(COM_RX_POS) - | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD - | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) - | SERCOM_USART_CTRLA_SAMPR(0); + | SERCOM_USART_CTRLA_TXPO(COM_TX_POS) | SERCOM_USART_CTRLA_DORD + | SERCOM_USART_CTRLA_IBON | SERCOM_USART_CTRLA_FORM(0x0) + | SERCOM_USART_CTRLA_SAMPR(0); // Configures RXEN/ TXEN/ CHSIZE/ Parity/ Stop bits ROBUS_COM->USART.CTRLB.reg = SERCOM_USART_CTRLB_CHSIZE(0) | SERCOM_USART_CTRLB_SBMODE - | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN - | SERCOM_USART_CTRLB_SFDE; + | SERCOM_USART_CTRLB_RXEN | SERCOM_USART_CTRLB_TXEN + | SERCOM_USART_CTRLB_SFDE; /* Enable the UART after the configurations */ ROBUS_COM->USART.CTRLA.reg |= SERCOM_USART_CTRLA_ENABLE; @@ -131,13 +131,13 @@ void RobusHAL_ComInit(uint32_t Baudrate) #ifndef USE_TX_IT ROBUS_DMA_CLOCK_ENABLE(); - ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; - ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; - ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; - ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel - ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); + ROBUS_DMA->BASEADDR.reg = (uint32_t)&descriptor_section; + ROBUS_DMA->WRBADDR.reg = (uint32_t)&write_back_section; + ROBUS_DMA->PRICTRL0.reg = DMAC_PRICTRL0_LVLPRI0(1UL) | DMAC_PRICTRL0_RRLVLEN0 | DMAC_PRICTRL0_LVLPRI1(1UL) | DMAC_PRICTRL0_RRLVLEN1 | DMAC_PRICTRL0_LVLPRI2(1UL) | DMAC_PRICTRL0_RRLVLEN2 | DMAC_PRICTRL0_LVLPRI3(1UL) | DMAC_PRICTRL0_RRLVLEN3; + ROBUS_DMA->CHID.reg = ROBUS_DMA_CHANNEL; // DMA Channel + ROBUS_DMA->CHCTRLB.reg = DMAC_CHCTRLB_TRIGACT(2) | DMAC_CHCTRLB_TRIGSRC(ROBUS_DMA_TRIGGER) | DMAC_CHCTRLB_LVL(0); descriptor_section.BTCTRL.reg = DMAC_BTCTRL_BLOCKACT_INT | DMAC_BTCTRL_BEATSIZE_BYTE | DMAC_BTCTRL_VALID | DMAC_BTCTRL_SRCINC; - ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; + ROBUS_DMA->CTRL.reg = DMAC_CTRL_DMAENABLE | DMAC_CTRL_LVLEN0 | DMAC_CTRL_LVLEN1 | DMAC_CTRL_LVLEN2 | DMAC_CTRL_LVLEN3; #endif } /****************************************************************************** @@ -674,7 +674,8 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) *(uint16_t *)crc ^= dbyte << 8; for (uint8_t j = 0; j < 8; ++j) { - uint16_t mix = *(uint16_t *)crc & 0x8000; + uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h index 149382460..315123bd2 100644 --- a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h +++ b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal_config.h @@ -116,7 +116,7 @@ * COM CONFIG ******************************************************************************/ #ifndef ROBUS_COM_CLOCK_ENABLE - #define ROBUS_COM_CLOCK_ENABLE() \ + #define ROBUS_COM_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM0_CORE_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ @@ -137,7 +137,7 @@ * DMA CONFIG ******************************************************************************/ #ifndef ROBUS_DMA_CLOCK_ENABLE - #define ROBUS_DMA_CLOCK_ENABLE() \ + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ PM->APBCMASK.reg |= PM_AHBMASK_DMAC; \ @@ -156,7 +156,7 @@ * COM TIMEOUT CONFIG ******************************************************************************/ #ifndef ROBUS_TIMER_CLOCK_ENABLE - #define ROBUS_TIMER_CLOCK_ENABLE() \ + #define ROBUS_TIMER_CLOCK_ENABLE() \ do \ { \ GCLK->CLKCTRL.reg = (uint16_t)(GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_TCC2_TC3_Val) | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_CLKEN); \ diff --git a/network/robus_network/HAL/NATIVE/robus_hal.c b/network/robus_network/HAL/NATIVE/robus_hal.c index dd1667409..096981441 100644 --- a/network/robus_network/HAL/NATIVE/robus_hal.c +++ b/network/robus_network/HAL/NATIVE/robus_hal.c @@ -492,7 +492,8 @@ void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) *(uint16_t *)crc ^= dbyte << 8; for (uint8_t j = 0; j < 8; ++j) { - uint16_t mix = *(uint16_t *)crc & 0x8000; + uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/NATIVE/robus_hal_config.h b/network/robus_network/HAL/NATIVE/robus_hal_config.h index 6a54c1961..881dd2e4f 100644 --- a/network/robus_network/HAL/NATIVE/robus_hal_config.h +++ b/network/robus_network/HAL/NATIVE/robus_hal_config.h @@ -101,7 +101,7 @@ #endif #ifndef PINOUT_IRQHANDLER -//#define PINOUT_IRQHANDLER(PIN) +// #define PINOUT_IRQHANDLER(PIN) #endif /******************************************************************************* diff --git a/network/robus_network/HAL/STM32F0/robus_hal.c b/network/robus_network/HAL/STM32F0/robus_hal.c index b04b833c0..5369c211b 100644 --- a/network/robus_network/HAL/STM32F0/robus_hal.c +++ b/network/robus_network/HAL/STM32F0/robus_hal.c @@ -646,6 +646,7 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STM32F4/robus_hal.c b/network/robus_network/HAL/STM32F4/robus_hal.c index 484ba00c5..a8bd26306 100644 --- a/network/robus_network/HAL/STM32F4/robus_hal.c +++ b/network/robus_network/HAL/STM32F4/robus_hal.c @@ -650,6 +650,7 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STM32G4/robus_hal.c b/network/robus_network/HAL/STM32G4/robus_hal.c index d1800a356..75d22fd84 100644 --- a/network/robus_network/HAL/STM32G4/robus_hal.c +++ b/network/robus_network/HAL/STM32G4/robus_hal.c @@ -647,6 +647,7 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STM32G4/robus_hal_config.h b/network/robus_network/HAL/STM32G4/robus_hal_config.h index d4ada2cdc..47f2b68f6 100644 --- a/network/robus_network/HAL/STM32G4/robus_hal_config.h +++ b/network/robus_network/HAL/STM32G4/robus_hal_config.h @@ -125,7 +125,7 @@ * DMA CONFIG ******************************************************************************/ #ifndef ROBUS_DMA_CLOCK_ENABLE - #define ROBUS_DMA_CLOCK_ENABLE() \ + #define ROBUS_DMA_CLOCK_ENABLE() \ do \ { \ __HAL_RCC_DMA1_CLK_ENABLE(); \ diff --git a/network/robus_network/HAL/STM32L0/robus_hal.c b/network/robus_network/HAL/STM32L0/robus_hal.c index 285122905..c08b6d6e9 100644 --- a/network/robus_network/HAL/STM32L0/robus_hal.c +++ b/network/robus_network/HAL/STM32L0/robus_hal.c @@ -645,6 +645,7 @@ void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STM32L4/robus_hal.c b/network/robus_network/HAL/STM32L4/robus_hal.c index 5f8d7ec1f..12c95af2b 100644 --- a/network/robus_network/HAL/STM32L4/robus_hal.c +++ b/network/robus_network/HAL/STM32L4/robus_hal.c @@ -647,6 +647,7 @@ _CRITICAL void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STUB/robus_hal.c b/network/robus_network/HAL/STUB/robus_hal.c index 0961c5ac6..b6cbdd824 100644 --- a/network/robus_network/HAL/STUB/robus_hal.c +++ b/network/robus_network/HAL/STUB/robus_hal.c @@ -246,7 +246,8 @@ void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) *(uint16_t *)crc ^= dbyte << 8; for (uint8_t j = 0; j < 8; ++j) { - uint16_t mix = *(uint16_t *)crc & 0x8000; + uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; diff --git a/network/robus_network/HAL/STUB/robus_hal_config.h b/network/robus_network/HAL/STUB/robus_hal_config.h index 6a54c1961..881dd2e4f 100644 --- a/network/robus_network/HAL/STUB/robus_hal_config.h +++ b/network/robus_network/HAL/STUB/robus_hal_config.h @@ -101,7 +101,7 @@ #endif #ifndef PINOUT_IRQHANDLER -//#define PINOUT_IRQHANDLER(PIN) +// #define PINOUT_IRQHANDLER(PIN) #endif /******************************************************************************* diff --git a/network/robus_network/HAL/template/robus_hal.c b/network/robus_network/HAL/template/robus_hal.c index 3cee9b0f0..db006031f 100644 --- a/network/robus_network/HAL/template/robus_hal.c +++ b/network/robus_network/HAL/template/robus_hal.c @@ -722,6 +722,7 @@ void RobusHAL_ComputeCRC(uint8_t *data, uint8_t *crc) for (uint8_t j = 0; j < 8; ++j) { uint16_t mix = *(uint16_t *)crc & 0x8000; + *(uint16_t *)crc = (*(uint16_t *)crc << 1); if (mix) *(uint16_t *)crc = *(uint16_t *)crc ^ 0x0007; From 07c499848d15258e2cdca6081b00a61132e012b7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 3 Aug 2023 18:14:23 +0200 Subject: [PATCH 118/198] Remove Inspector because we don't maintain it anymore. --- .github/workflows/pio_release.yml | 70 -- engine/core/inc/luos_list.h | 1 - .../Arduino/inspector_serialcom/node_config.h | 109 --- .../inspector_serialcom/platformio.ini | 59 -- .../src/Inspector_SerialCom.cpp | 32 - .../inspector_serialcom/README.md | 36 - .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32_assert.h | 54 -- .../include/stm32f0xx_hal_conf.h | 323 -------- .../include/stm32f0xx_it.h | 66 -- .../linker/custom_Luos_bootloader_script.ld | 182 ----- .../inspector_serialcom/node_config.h | 100 --- .../inspector_serialcom/platformio.ini | 58 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 181 ----- .../src/stm32f0xx_hal_msp.c | 84 -- .../inspector_serialcom/src/stm32f0xx_it.c | 149 ---- .../src/system_stm32f0xx.c | 331 -------- .../Inspector_SerialCom.ioc | 100 --- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32f4xx_hal_conf.h | 490 ------------ .../include/stm32f4xx_it.h | 70 -- .../linker/custom_Luos_bootloader_script.ld | 175 ----- .../inspector_serialcom/node_config.h | 144 ---- .../inspector_serialcom/platformio.ini | 56 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 191 ----- .../src/stm32f4xx_hal_msp.c | 84 -- .../inspector_serialcom/src/stm32f4xx_it.c | 219 ------ .../src/system_stm32f4xx.c | 730 ----------------- .../Inspector_SerialCom.ioc | 103 --- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32f4xx_hal_conf.h | 490 ------------ .../include/stm32f4xx_it.h | 70 -- .../linker/custom_Luos_bootloader_script.ld | 186 ----- .../inspector_serialcom/node_config.h | 144 ---- .../inspector_serialcom/platformio.ini | 56 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 192 ----- .../src/stm32f4xx_hal_msp.c | 84 -- .../inspector_serialcom/src/stm32f4xx_it.c | 219 ------ .../src/system_stm32f4xx.c | 730 ----------------- .../Inspector_SerialCom.ioc | 119 --- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32g4xx_hal_conf.h | 382 --------- .../include/stm32g4xx_it.h | 70 -- .../linker/custom_Luos_bootloader_script.ld | 175 ----- .../inspector_serialcom/node_config.h | 116 --- .../inspector_serialcom/platformio.ini | 58 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 191 ----- .../src/stm32g4xx_hal_msp.c | 88 --- .../inspector_serialcom/src/stm32g4xx_it.c | 214 ----- .../src/system_stm32g4xx.c | 270 ------- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32g4xx_hal_conf.h | 382 --------- .../include/stm32g4xx_it.h | 70 -- .../linker/custom_Luos_bootloader_script.ld | 175 ----- .../inspector_serialcom/node_config.h | 116 --- .../inspector_serialcom/platformio.ini | 57 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 192 ----- .../src/stm32g4xx_hal_msp.c | 88 --- .../inspector_serialcom/src/stm32g4xx_it.c | 214 ----- .../src/system_stm32g4xx.c | 269 ------- .../Inspector_SerialCom.ioc | 112 --- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32l4xx_hal_conf.h | 484 ------------ .../include/stm32l4xx_it.h | 70 -- .../linker/custom_Luos_bootloader_script.ld | 175 ----- .../inspector_serialcom/node_config.h | 116 --- .../inspector_serialcom/platformio.ini | 56 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 195 ----- .../src/stm32l4xx_hal_msp.c | 84 -- .../inspector_serialcom/src/stm32l4xx_it.c | 213 ----- .../src/system_stm32l4xx.c | 336 -------- .../Inspector_SerialCom.ioc | 104 --- .../inspector_serialcom/include/gpio.h | 50 -- .../inspector_serialcom/include/main.h | 76 -- .../include/stm32f4xx_hal_conf.h | 490 ------------ .../include/stm32f4xx_it.h | 70 -- .../linker/custom_app_script.ld | 207 ----- .../inspector_serialcom/node_config.h | 119 --- .../inspector_serialcom/platformio.ini | 67 -- .../inspector_serialcom/src/gpio.c | 66 -- .../inspector_serialcom/src/main.c | 192 ----- .../src/stm32f4xx_hal_msp.c | 84 -- .../inspector_serialcom/src/stm32f4xx_it.c | 218 ------ .../src/system_stm32f4xx.c | 731 ------------------ .../projects/l0/inspector_serialcom/Pipe.ioc | 87 --- .../projects/l0/inspector_serialcom/README.md | 36 - .../l0/inspector_serialcom/boards/l0.json | 37 - .../l0/inspector_serialcom/include/gpio.h | 50 -- .../l0/inspector_serialcom/include/main.h | 76 -- .../include/stm32_assert.h | 54 -- .../include/stm32f0xx_hal_conf.h | 323 -------- .../include/stm32f0xx_it.h | 66 -- .../linker/custom_Luos_bootloader_script.ld | 182 ----- .../l0/inspector_serialcom/node_config.h | 100 --- .../l0/inspector_serialcom/platformio.ini | 45 -- .../l0/inspector_serialcom/src/gpio.c | 67 -- .../l0/inspector_serialcom/src/main.c | 184 ----- .../src/stm32f0xx_hal_msp.c | 84 -- .../l0/inspector_serialcom/src/stm32f0xx_it.c | 149 ---- .../src/system_stm32f0xx.c | 333 -------- tool_services/inspector/README.md | 29 - tool_services/inspector/data_manager.c | 225 ------ tool_services/inspector/data_manager.h | 25 - tool_services/inspector/inspector.c | 61 -- tool_services/inspector/inspector.h | 22 - tool_services/inspector/library.json | 20 - tool_services/inspector/pipe_link.c | 134 ---- tool_services/inspector/pipe_link.h | 27 - 120 files changed, 17497 deletions(-) delete mode 100644 examples/projects/Arduino/inspector_serialcom/node_config.h delete mode 100644 examples/projects/Arduino/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/README.md delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32_assert.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_it.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_it.c delete mode 100644 examples/projects/NUCLEO-F072RB/inspector_serialcom/src/system_stm32f0xx.c delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/Inspector_SerialCom.ioc delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_it.h delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_it.c delete mode 100644 examples/projects/NUCLEO-F401RE/inspector_serialcom/src/system_stm32f4xx.c delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/Inspector_SerialCom.ioc delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_it.h delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_it.c delete mode 100644 examples/projects/NUCLEO-F410RB/inspector_serialcom/src/system_stm32f4xx.c delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/Inspector_SerialCom.ioc delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_it.h delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_it.c delete mode 100644 examples/projects/NUCLEO-G431KB/inspector_serialcom/src/system_stm32g4xx.c delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_it.h delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_it.c delete mode 100644 examples/projects/NUCLEO-G474RE/inspector_serialcom/src/system_stm32g4xx.c delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/Inspector_SerialCom.ioc delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/include/main.h delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_hal_conf.h delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_it.h delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_hal_msp.c delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_it.c delete mode 100644 examples/projects/NUCLEO-L432KC/inspector_serialcom/src/system_stm32l4xx.c delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/Inspector_SerialCom.ioc delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/include/main.h delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_hal_conf.h delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_it.h delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/linker/custom_app_script.ld delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_hal_msp.c delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_it.c delete mode 100644 examples/projects/STM32F4-discovery/inspector_serialcom/src/system_stm32f4xx.c delete mode 100644 examples/projects/l0/inspector_serialcom/Pipe.ioc delete mode 100644 examples/projects/l0/inspector_serialcom/README.md delete mode 100644 examples/projects/l0/inspector_serialcom/boards/l0.json delete mode 100644 examples/projects/l0/inspector_serialcom/include/gpio.h delete mode 100644 examples/projects/l0/inspector_serialcom/include/main.h delete mode 100644 examples/projects/l0/inspector_serialcom/include/stm32_assert.h delete mode 100644 examples/projects/l0/inspector_serialcom/include/stm32f0xx_hal_conf.h delete mode 100644 examples/projects/l0/inspector_serialcom/include/stm32f0xx_it.h delete mode 100644 examples/projects/l0/inspector_serialcom/linker/custom_Luos_bootloader_script.ld delete mode 100644 examples/projects/l0/inspector_serialcom/node_config.h delete mode 100644 examples/projects/l0/inspector_serialcom/platformio.ini delete mode 100644 examples/projects/l0/inspector_serialcom/src/gpio.c delete mode 100644 examples/projects/l0/inspector_serialcom/src/main.c delete mode 100644 examples/projects/l0/inspector_serialcom/src/stm32f0xx_hal_msp.c delete mode 100644 examples/projects/l0/inspector_serialcom/src/stm32f0xx_it.c delete mode 100644 examples/projects/l0/inspector_serialcom/src/system_stm32f0xx.c delete mode 100644 tool_services/inspector/README.md delete mode 100644 tool_services/inspector/data_manager.c delete mode 100644 tool_services/inspector/data_manager.h delete mode 100644 tool_services/inspector/inspector.c delete mode 100644 tool_services/inspector/inspector.h delete mode 100644 tool_services/inspector/library.json delete mode 100644 tool_services/inspector/pipe_link.c delete mode 100644 tool_services/inspector/pipe_link.h diff --git a/.github/workflows/pio_release.yml b/.github/workflows/pio_release.yml index 63d4fea65..ad968f3c0 100644 --- a/.github/workflows/pio_release.yml +++ b/.github/workflows/pio_release.yml @@ -110,76 +110,6 @@ jobs: pio package publish --owner luos --non-interactive cd ../.. - deploy_inspector: - needs: check_valid_tag - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: "3.x" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install platformio - - name: publish inspector tool - env: - PLATFORMIO_AUTH_TOKEN: ${{ secrets.PIO_TOKEN }} - run: | - # ***** Inspector publication ***** - cd tool_services/inspector - mkdir examples - - # Arduino - mkdir examples/Arduino - mkdir examples/Arduino/serial - cp -r ../../examples/projects/Arduino/inspector_serialcom/* examples/Arduino/serial/ - - # l0 - mkdir examples/l0 - mkdir examples/l0/serial - cp -r ../../examples/projects/l0/inspector_serialcom/* examples/l0/serial/ - - # NUCLEO-F072RB - mkdir examples/NUCLEO-F072RB - mkdir examples/NUCLEO-F072RB/serial - cp -r ../../examples/projects/NUCLEO-F072RB/inspector_serialcom/* examples/NUCLEO-F072RB/serial/ - - # NUCLEO-F401RE - mkdir examples/NUCLEO-F401RE - mkdir examples/NUCLEO-F401RE/serial - cp -r ../../examples/projects/NUCLEO-F401RE/inspector_serialcom/* examples/NUCLEO-F401RE/serial/ - - # NUCLEO-F410RB - mkdir examples/NUCLEO-F410RB - mkdir examples/NUCLEO-F410RB/serial - cp -r ../../examples/projects/NUCLEO-F410RB/inspector_serialcom/* examples/NUCLEO-F410RB/serial/ - - # NUCLEO-G431KB - mkdir examples/NUCLEO-G431KB - mkdir examples/NUCLEO-G431KB/serial - cp -r ../../examples/projects/NUCLEO-G431KB/inspector_serialcom/* examples/NUCLEO-G431KB/serial/ - - # NUCLEO-G474RE - mkdir examples/NUCLEO-G474RE - mkdir examples/NUCLEO-G474RE/serial - cp -r ../../examples/projects/NUCLEO-G474RE/inspector_serialcom/* examples/NUCLEO-G474RE/serial/ - - # NUCLEO-L432KC - mkdir examples/NUCLEO-L432KC - mkdir examples/NUCLEO-L432KC/serial - cp -r ../../examples/projects/NUCLEO-L432KC/inspector_serialcom/* examples/NUCLEO-L432KC/serial/ - - # STM32F4-discovery - mkdir examples/STM32F4-discovery - mkdir examples/STM32F4-discovery/serial - cp -r ../../examples/projects/STM32F4-discovery/inspector_serialcom/* examples/STM32F4-discovery/serial/ - - pio package pack - pio package publish --owner luos --non-interactive - cd ../.. - deploy_pipe: needs: check_valid_tag runs-on: ubuntu-latest diff --git a/engine/core/inc/luos_list.h b/engine/core/inc/luos_list.h index 70ecdfd89..a0db8cb9d 100644 --- a/engine/core/inc/luos_list.h +++ b/engine/core/inc/luos_list.h @@ -27,7 +27,6 @@ typedef enum PIPE_TYPE, MOTOR_TYPE, SERVO_MOTOR_TYPE, - INSPECTOR_TYPE, PRESSURE_TYPE, LUOS_LAST_TYPE } luos_type_t; diff --git a/examples/projects/Arduino/inspector_serialcom/node_config.h b/examples/projects/Arduino/inspector_serialcom/node_config.h deleted file mode 100644 index 42567b221..000000000 --- a/examples/projects/Arduino/inspector_serialcom/node_config.h +++ /dev/null @@ -1,109 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 1024 -#define MAX_MSG_NB 30 -// #define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfers for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler - - * FLASH_SECTOR | FLASH page size - * PAGE_SIZE | FLASH page size - * ADDRESS_LAST_PAGE_FLASH | Page to write alias -******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/Arduino/inspector_serialcom/platformio.ini b/examples/projects/Arduino/inspector_serialcom/platformio.ini deleted file mode 100644 index faccca291..000000000 --- a/examples/projects/Arduino/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,59 +0,0 @@ - - -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -; To use Arduino board -; use default_envs = zero -; change your board in field -; [env:zero] -; board = mkrzero #mkrzero, mkr1000USB or any SAMD21 based Arduino board - -; To use seeduino board -; use default_envs = seed -; change your board in field -; [env:seed] -; board = seeed_xiao or any SAMD21 based on seeduino board - -[platformio] -default_envs = zero - -[env] -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../network/ - $PROJECT_DIR/../../../../../ -lib_ldf_mode =off -platform = atmelsam -framework = arduino -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -D GATEFORMAT=TinyJSON - -D LUOSHAL=ATSAMD21_ARDUINO - -D PIPEMODE=SERIAL - -D PIPEHAL=ARDUINO -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe - - -[env:zero] -board = mkrzero -platform_packages = framework-arduino-samd@https://github.com/Luos-io/Arduino_core.git - - -[env:seed] -board = seeed_xiao -platform_packages = framework-arduino-samd-seeed@https://github.com/Luos-io/Arduino_core.git - diff --git a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp b/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp deleted file mode 100644 index 05d9dea4b..000000000 --- a/examples/projects/Arduino/inspector_serialcom/src/Inspector_SerialCom.cpp +++ /dev/null @@ -1,32 +0,0 @@ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include "luos_engine.h" -#include "robus_network.h" - -#ifdef __cplusplus -} -#endif - -void setup() -{ - - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); -} - -void loop() -{ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); -} diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/README.md b/examples/projects/NUCLEO-F072RB/inspector_serialcom/README.md deleted file mode 100644 index 02fddfd8b..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/README.md +++ /dev/null @@ -1,36 +0,0 @@ -
Luos logo - -![](https://github.com/Luos-io/luos_engine/actions/workflows/build.yml/badge.svg) -[![](https://img.shields.io/github/license/Luos-io/Luos)](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) - -[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io) -[![](http://certified.luos.io)](https://www.luos.io) -[![PlatformIO Registry](https://badges.registry.platformio.org/packages/luos/library/luos_engine.svg)](https://registry.platformio.org/libraries/luos_engine/luos_engine) - -[![](https://img.shields.io/discord/902486791658041364?label=Discord&logo=discord&style=social)](https://discord.gg/luos) -[![](https://img.shields.io/reddit/subreddit-subscribers/Luos?style=social)](https://www.reddit.com/r/Luos) -[![](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/Luos_io) -[![](https://img.shields.io/badge/LinkedIn-Share-0077B5?style=social&logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io) - - - -# gate_serialcom project example :bulb: -This project demonstrate how to make and use a simple gate_serialcom through Luos. Feel free to use electronics and code example as you want. - -## How to compile the code :computer: - - 1. Download and install [Platformio](https://platformio.org/platformio-ide) - 2. Open this folder into Platformio - 3. Build (Platformio will do the rest) - -## How to open the electronic design :electric_plug: -You can open [a working example electronic design](https://github.com/Luos-io/luos_engine/tree/main/examples/hardware) with Kicad. This design use Luos_components library for more information to install and use it read [our doc](https://www.luos.io). - -## Linked driver -This project is linked to the [gate_serialcom driver](../../Drivers/gate_serialcom). - -## Don't hesitate to read [our documentation](https://www.luos.io), or to post your questions/issues on the [Luos' community](https://discord.gg/luos). :books: - -[![](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.luos.io&logo=Discourse)](https://discord.gg/luos) -[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io) -[![](https://img.shields.io/badge/LinkedIn-Follow%20us-0077B5?style=flat&logo=linkedin)](https://www.linkedin.com/company/luos) diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/main.h deleted file mode 100644 index 4a040243f..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f0xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define LED_Pin GPIO_PIN_3 -#define LED_GPIO_Port GPIOA -#define BTN_Pin GPIO_PIN_0 -#define BTN_GPIO_Port GPIOB - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32_assert.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32_assert.h deleted file mode 100644 index abe0ef3bd..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32_assert.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - ****************************************************************************** - * @file stm32_assert.h - * @brief STM32 assert file. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32_ASSERT_H -#define __STM32_ASSERT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Includes ------------------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(char *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32_ASSERT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_hal_conf.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_hal_conf.h deleted file mode 100644 index 570433359..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_hal_conf.h +++ /dev/null @@ -1,323 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f0xx_hal_conf.h - * @brief HAL configuration file. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2016 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F0xx_HAL_CONF_H -#define __STM32F0xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED - /*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_CAN_MODULE_ENABLED */ -/*#define HAL_CEC_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_TSC_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_LCD_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -/*#define HAL_TIM_MODULE_ENABLED */ -/*#define HAL_UART_MODULE_ENABLED */ -/*#define HAL_USART_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -//#define HAL_I2C_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -/** - * @brief In the following line adjust the External High Speed oscillator (HSE) Startup - * Timeout value - */ -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)8000000) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup - * Timeout value - */ -#if !defined(HSI_STARTUP_TIMEOUT) -#define HSI_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSI start up */ -#endif /* HSI_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator for ADC (HSI14) value. - */ -#if !defined(HSI14_VALUE) -#define HSI14_VALUE ((uint32_t)14000000) /*!< Value of the Internal High Speed oscillator for ADC in Hz. \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -#endif /* HSI14_VALUE */ - -/** - * @brief Internal High Speed oscillator for USB (HSI48) value. - */ -#if !defined(HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz. \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE ((uint32_t)40000) -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -/** - * @brief External Low Speed oscillator (LSI) value. - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -/** - * @brief Time out for LSE start up value in ms. - */ -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0) /*!< tick interrupt priority (lowest by default) */ - /* Warning: Must be set to higher priority for HAL_Delay() */ - /* and HAL_GetTick() usage under interrupt context */ -#define USE_RTOS 0 -#define PREFETCH_ENABLE 1 -#define INSTRUCTION_CACHE_ENABLE 0 -#define DATA_CACHE_ENABLE 0 -#define USE_SPI_CRC 0U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ -#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_TSC_REGISTER_CALLBACKS 0U /* TSC register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ - - /* ########################## Assert Selection ############################## */ - /** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ - /* #define USE_FULL_ASSERT 1U */ - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32f0xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32f0xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32f0xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32f0xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32f0xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32f0xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32f0xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CEC_MODULE_ENABLED -#include "stm32f0xx_hal_cec.h" -#endif /* HAL_CEC_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED -#include "stm32f0xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32f0xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32f0xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32f0xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32f0xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32f0xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32f0xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32f0xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32f0xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32f0xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32f0xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32f0xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32f0xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32f0xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32f0xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_TSC_MODULE_ENABLED -#include "stm32f0xx_hal_tsc.h" -#endif /* HAL_TSC_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32f0xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32f0xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32f0xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F0xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_it.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_it.h deleted file mode 100644 index bdaccb45e..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/include/stm32f0xx_it.h +++ /dev/null @@ -1,66 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f0xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F0xx_IT_H -#define __STM32F0xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void SVC_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F0xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-F072RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index 117ea9158..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,182 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F072RBTx Device from STM32F0 series - * 128Kbytes FLASH - * 16Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM_RSVD (xrw) : ORIGIN = 0x20000000, LENGTH = 1K - RAM (xrw) : ORIGIN = 0x20000400, LENGTH = 15K - FLASH (rx) : ORIGIN = 0x0800C800, LENGTH = 78K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - .boot_data : - { - *(.rsvd.data) - *(.rsvd.data*) - } > RAM_RSVD - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h deleted file mode 100644 index cbd40e31d..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/node_config.h +++ /dev/null @@ -1,100 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfers for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_BANK1_END=0x0801FFFF | End address of application with bootloader - ******************************************************************************/ - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini deleted file mode 100644 index a41be0c2a..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,58 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[platformio] -default_envs = nucleo_f072rb - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_f072rb -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink -upload_protocol = stlink - - -[env:nucleo_f072rb] -build_unflags = -Os -build_flags = - -include node_config.h - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F0 - -O1 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F0 - -[env:nucleo_f072rb_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -include node_config.h - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F0 - -O1 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F0 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/gpio.c deleted file mode 100644 index da527cbca..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c deleted file mode 100644 index 960d5fb1b..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/main.c +++ /dev/null @@ -1,181 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "pipe.h" -#include "inspector.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; - RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_hal_msp.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_hal_msp.c deleted file mode 100644 index f78d39753..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : stm32f0xx_hal_msp.c - * Description : This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_it.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_it.c deleted file mode 100644 index 15a988d39..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/stm32f0xx_it.c +++ /dev/null @@ -1,149 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f0xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f0xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M0 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVC_IRQn 0 */ - - /* USER CODE END SVC_IRQn 0 */ - /* USER CODE BEGIN SVC_IRQn 1 */ - - /* USER CODE END SVC_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F0xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f0xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI4_15_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8); - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/system_stm32f0xx.c b/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/system_stm32f0xx.c deleted file mode 100644 index 050f79b2b..000000000 --- a/examples/projects/NUCLEO-F072RB/inspector_serialcom/src/system_stm32f0xx.c +++ /dev/null @@ -1,331 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f0xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Source File. - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f0xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (8 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f0xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. This file configures the system clock as follows: - *============================================================================= - * Supported STM32F0xx device - *----------------------------------------------------------------------------- - * System Clock source | HSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 8000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 8000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2016 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f0xx_system - * @{ - */ - -/** @addtogroup STM32F0xx_System_Private_Includes - * @{ - */ - -#include "stm32f0xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Defines - * @{ - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)8000000) /*!< Default value of the External oscillator in Hz. \ - This value can be provided and adapted by the user application. */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)8000000) /*!< Default value of the Internal oscillator in Hz. \ - This value can be provided and adapted by the user application. */ -#endif /* HSI_VALUE */ - -#if !defined(HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000) /*!< Default value of the HSI48 Internal oscillator in Hz. \ - This value can be provided and adapted by the user application. */ -#endif /* HSI48_VALUE */ -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Variables - * @{ - */ -/* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock there is no need to - call the 2 first functions listed above, since SystemCoreClock variable is - updated automatically. - */ -uint32_t SystemCoreClock = 8000000; - -const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * Initialize the default HSI clock source, vector table location and the PLL configuration is reset. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001U; - -#if defined(STM32F051x8) || defined(STM32F058x8) - /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE and MCOSEL[2:0] bits */ - RCC->CFGR &= (uint32_t)0xF8FFB80CU; -#else - /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */ - RCC->CFGR &= (uint32_t)0x08FFB80CU; -#endif /* STM32F051x8 or STM32F058x8 */ - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFFU; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFFU; - - /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */ - RCC->CFGR &= (uint32_t)0xFFC0FFFFU; - - /* Reset PREDIV[3:0] bits */ - RCC->CFGR2 &= (uint32_t)0xFFFFFFF0U; - -#if defined(STM32F072xB) || defined(STM32F078xx) - /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFCFE2CU; -#elif defined(STM32F071xB) - /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFCEACU; -#elif defined(STM32F091xC) || defined(STM32F098xx) - /* Reset USART3SW[1:0], USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFF0FEACU; -#elif defined(STM32F030x6) || defined(STM32F030x8) || defined(STM32F031x6) || defined(STM32F038xx) || defined(STM32F030xC) - /* Reset USART1SW[1:0], I2C1SW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFEECU; -#elif defined(STM32F051x8) || defined(STM32F058xx) - /* Reset USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFEACU; -#elif defined(STM32F042x6) || defined(STM32F048xx) - /* Reset USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFE2CU; -#elif defined(STM32F070x6) || defined(STM32F070xB) - /* Reset USART1SW[1:0], I2C1SW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFE6CU; - /* Set default USB clock to PLLCLK, since there is no HSI48 */ - RCC->CFGR3 |= (uint32_t)0x00000080U; -#else -#warning "No target selected" -#endif - - /* Reset HSI14 bit */ - RCC->CR2 &= (uint32_t)0xFFFFFFFEU; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000U; -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f0xx_hal.h file (default value - * 8 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f0xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllmull = 0, pllsource = 0, predivfactor = 0; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case RCC_CFGR_SWS_HSI: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - case RCC_CFGR_SWS_HSE: /* HSE used as system clock */ - SystemCoreClock = HSE_VALUE; - break; - case RCC_CFGR_SWS_PLL: /* PLL used as system clock */ - /* Get PLL clock source and multiplication factor ----------------------*/ - pllmull = RCC->CFGR & RCC_CFGR_PLLMUL; - pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; - pllmull = (pllmull >> 18) + 2; - predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1; - - if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV) - { - /* HSE used as PLL clock source : SystemCoreClock = HSE/PREDIV * PLLMUL */ - SystemCoreClock = (HSE_VALUE / predivfactor) * pllmull; - } -#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || defined(STM32F098xx) - else if (pllsource == RCC_CFGR_PLLSRC_HSI48_PREDIV) - { - /* HSI48 used as PLL clock source : SystemCoreClock = HSI48/PREDIV * PLLMUL */ - SystemCoreClock = (HSI48_VALUE / predivfactor) * pllmull; - } -#endif /* STM32F042x6 || STM32F048xx || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */ - else - { -#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F070x6) \ - || defined(STM32F078xx) || defined(STM32F071xB) || defined(STM32F072xB) \ - || defined(STM32F070xB) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC) - /* HSI used as PLL clock source : SystemCoreClock = HSI/PREDIV * PLLMUL */ - SystemCoreClock = (HSI_VALUE / predivfactor) * pllmull; -#else - /* HSI used as PLL clock source : SystemCoreClock = HSI/2 * PLLMUL */ - SystemCoreClock = (HSI_VALUE >> 1) * pllmull; -#endif /* STM32F042x6 || STM32F048xx || STM32F070x6 || \ - STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB || \ - STM32F091xC || STM32F098xx || STM32F030xC */ - } - break; - default: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK clock frequency ----------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/Inspector_SerialCom.ioc b/examples/projects/NUCLEO-F401RE/inspector_serialcom/Inspector_SerialCom.ioc deleted file mode 100644 index 172ac950f..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/Inspector_SerialCom.ioc +++ /dev/null @@ -1,100 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -GPIO.groupedBy= -KeepUserPlacement=false -Mcu.Family=STM32F4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32F401R(D-E)Tx -Mcu.Package=LQFP64 -Mcu.Pin0=PC13-ANTI_TAMP -Mcu.Pin1=PA5 -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.PinsNb=3 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F401RETx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA5.GPIOParameters=GPIO_Label -PA5.GPIO_Label=LED -PA5.Locked=true -PA5.Signal=GPIO_Output -PC13-ANTI_TAMP.GPIOParameters=GPIO_Label -PC13-ANTI_TAMP.GPIO_Label=BTN -PC13-ANTI_TAMP.Locked=true -PC13-ANTI_TAMP.Signal=GPIO_Input -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F401RETx -ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.25.2 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x0 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Gate.ioc -ProjectManager.ProjectName=Gate -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=Other Toolchains (GPDSC) -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=2-SystemClock_Config-RCC-false-HAL-false -RCC.48MHZClocksFreq_Value=42000000 -RCC.AHBFreq_Value=84000000 -RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=42000000 -RCC.APB1TimFreq_Value=84000000 -RCC.APB2Freq_Value=84000000 -RCC.APB2TimFreq_Value=84000000 -RCC.CortexFreq_Value=84000000 -RCC.FCLKCortexFreq_Value=84000000 -RCC.HCLKFreq_Value=84000000 -RCC.HSE_VALUE=25000000 -RCC.HSI_VALUE=16000000 -RCC.I2SClocksFreq_Value=192000000 -RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO2PinFreq_Value=84000000 -RCC.PLLCLKFreq_Value=84000000 -RCC.PLLM=8 -RCC.PLLN=84 -RCC.PLLQCLKFreq_Value=42000000 -RCC.RTCFreq_Value=32000 -RCC.RTCHSEDivFreq_Value=12500000 -RCC.SYSCLKFreq_VALUE=84000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.VCOI2SOutputFreq_Value=384000000 -RCC.VCOInputFreq_Value=2000000 -RCC.VCOOutputFreq_Value=168000000 -RCC.VcooutputI2S=192000000 -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/main.h deleted file mode 100644 index 57a236827..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_13 -#define BTN_GPIO_Port GPIOC -#define LED_Pin GPIO_PIN_5 -#define LED_GPIO_Port GPIOA - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_hal_conf.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_hal_conf.h deleted file mode 100644 index ac7527654..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_hal_conf.h +++ /dev/null @@ -1,490 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f4xx_hal_conf_template.h - * @author MCD Application Team - * @brief HAL configuration template file. - * This file should be copied to the application folder and renamed - * to stm32f4xx_hal_conf.h. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_HAL_CONF_H -#define __STM32F4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED - - /* #define HAL_ADC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CRC_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_DAC_MODULE_ENABLED */ -/* #define HAL_DCMI_MODULE_ENABLED */ -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -/* #define HAL_I2C_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_RNG_MODULE_ENABLED */ -/* #define HAL_RTC_MODULE_ENABLED */ -/* #define HAL_SAI_MODULE_ENABLED */ -/* #define HAL_SD_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ -/* #define HAL_SPI_MODULE_ENABLED */ -/* #define HAL_TIM_MODULE_ENABLED */ -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -/* #define HAL_PCD_MODULE_ENABLED */ -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature.*/ -/** - * @brief External Low Speed oscillator (LSE) value. - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S peripheral - * This value is used by the I2S HAL module to compute the I2S clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined(EXTERNAL_CLOCK_VALUE) -#define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the External audio frequency in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 1U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ -#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ -#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ -#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ -#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ -#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ -#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ -#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ -#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ -#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ -#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ -#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* ################## Ethernet peripheral configuration ##################### */ - -/* Section 1 : Ethernet peripheral configuration */ - -/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ -#define MAC_ADDR0 2U -#define MAC_ADDR1 0U -#define MAC_ADDR2 0U -#define MAC_ADDR3 0U -#define MAC_ADDR4 0U -#define MAC_ADDR5 0U - -/* Definition of the Ethernet driver buffers size and count */ -#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ -#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ -#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ -#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ - -/* Section 2: PHY configuration section */ - -/* DP83848_PHY_ADDRESS Address*/ -#define DP83848_PHY_ADDRESS 0x01U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ -#define PHY_RESET_DELAY ((uint32_t)0x000000FFU) -/* PHY Configuration delay */ -#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) - -#define PHY_READ_TO ((uint32_t)0x0000FFFFU) -#define PHY_WRITE_TO ((uint32_t)0x0000FFFFU) - - /* Section 3: Common PHY Registers */ - -#define PHY_BCR ((uint16_t)0x0000U) /*!< Transceiver Basic Control Register */ -#define PHY_BSR ((uint16_t)0x0001U) /*!< Transceiver Basic Status Register */ - -#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ -#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ -#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ -#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ -#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ -#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ -#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ -#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ -#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ -#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ - -#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ -#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ -#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ - -/* Section 4: Extended PHY Registers */ -#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ - -#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ -#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver -* Activated: CRC code is present inside driver -* Deactivated: CRC code cleaned from driver -*/ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32f4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32f4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32f4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32f4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32f4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32f4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32f4xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED -#include "stm32f4xx_hal_can_legacy.h" -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32f4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32f4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DMA2D_MODULE_ENABLED -#include "stm32f4xx_hal_dma2d.h" -#endif /* HAL_DMA2D_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32f4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_DCMI_MODULE_ENABLED -#include "stm32f4xx_hal_dcmi.h" -#endif /* HAL_DCMI_MODULE_ENABLED */ - -#ifdef HAL_ETH_MODULE_ENABLED -#include "stm32f4xx_hal_eth.h" -#endif /* HAL_ETH_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32f4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32f4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32f4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_PCCARD_MODULE_ENABLED -#include "stm32f4xx_hal_pccard.h" -#endif /* HAL_PCCARD_MODULE_ENABLED */ - -#ifdef HAL_SDRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sdram.h" -#endif /* HAL_SDRAM_MODULE_ENABLED */ - -#ifdef HAL_HASH_MODULE_ENABLED -#include "stm32f4xx_hal_hash.h" -#endif /* HAL_HASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32f4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32f4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32f4xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32f4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_LTDC_MODULE_ENABLED -#include "stm32f4xx_hal_ltdc.h" -#endif /* HAL_LTDC_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32f4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32f4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32f4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32f4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SD_MODULE_ENABLED -#include "stm32f4xx_hal_sd.h" -#endif /* HAL_SD_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32f4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32f4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32f4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32f4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32f4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32f4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32f4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32f4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_HCD_MODULE_ENABLED -#include "stm32f4xx_hal_hcd.h" -#endif /* HAL_HCD_MODULE_ENABLED */ - -#ifdef HAL_DSI_MODULE_ENABLED -#include "stm32f4xx_hal_dsi.h" -#endif /* HAL_DSI_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32f4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_CEC_MODULE_ENABLED -#include "stm32f4xx_hal_cec.h" -#endif /* HAL_CEC_MODULE_ENABLED */ - -#ifdef HAL_FMPI2C_MODULE_ENABLED -#include "stm32f4xx_hal_fmpi2c.h" -#endif /* HAL_FMPI2C_MODULE_ENABLED */ - -#ifdef HAL_SPDIFRX_MODULE_ENABLED -#include "stm32f4xx_hal_spdifrx.h" -#endif /* HAL_SPDIFRX_MODULE_ENABLED */ - -#ifdef HAL_DFSDM_MODULE_ENABLED -#include "stm32f4xx_hal_dfsdm.h" -#endif /* HAL_DFSDM_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32f4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_MMC_MODULE_ENABLED -#include "stm32f4xx_hal_mmc.h" -#endif /* HAL_MMC_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_it.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_it.h deleted file mode 100644 index c6fdc0092..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/include/stm32f4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_IT_H -#define __STM32F4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-F401RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index b4cf2a95c..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,175 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F401RETx Device from STM32F4 series - * 512Kbytes FLASH - * 96Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K - FLASH (rw) : ORIGIN = 0x08010000, LENGTH = 448K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h deleted file mode 100644 index 49f211a3d..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/node_config.h +++ /dev/null @@ -1,144 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * MCU CONFIG - ******************************************************************************/ -#define MCUFREQ 84000000 -#define TIMERDIV 1 -/******************************************************************************* - * PINOUT CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM DMA CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM TIMEOUT CONFIG - ******************************************************************************/ -#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE() -#define ROBUS_TIMER TIM3 -#define ROBUS_TIMER_IRQ TIM3_IRQn -#define ROBUS_TIMER_IRQHANDLER() TIM3_IRQHandler() - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * SHARED_MEMORY_SECTOR | FLASH_SECTOR_3 | Start sector of shared memory - * APP_START_ADDRESS | 0x08010000 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - * APP_START_SECTOR | FLASH_SECTOR_4 | Start sector of application with bootloader - * APP_END_SECTOR | FLASH_SECTOR_TOTAL - 1 | last sector of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 -#define NODETECTION - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini deleted file mode 100644 index 650b9b073..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,56 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = nucleo_f401re - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_f401re -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink -upload_protocol = stlink - -[env:nucleo_f401re] -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 - -[env:nucleo_f401re_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/gpio.c deleted file mode 100644 index b7d87119a..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c deleted file mode 100644 index 76048bce7..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/main.c +++ /dev/null @@ -1,191 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - __HAL_RCC_PWR_CLK_ENABLE(); - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 8; - RCC_OscInitStruct.PLL.PLLN = 84; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 4; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_hal_msp.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_hal_msp.c deleted file mode 100644 index a182b75ef..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_it.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_it.c deleted file mode 100644 index 0089a2909..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/stm32f4xx_it.c +++ /dev/null @@ -1,219 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Pre-fetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} - -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI15_10_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10); -} -/* USER CODE END 1 */ -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/system_stm32f4xx.c b/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/system_stm32f4xx.c deleted file mode 100644 index 4bd94b338..000000000 --- a/examples/projects/NUCLEO-F401RE/inspector_serialcom/src/system_stm32f4xx.c +++ /dev/null @@ -1,730 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ - -#include "stm32f4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) -/* #define DATA_IN_ExtSRAM */ -#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx || \ - STM32F412Zx || STM32F412Vx */ - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -/* #define DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || \ - STM32F479xx */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ -/* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = 16000000; -const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the FPU setting, vector table location and External memory - * configuration. - * @param None - * @retval None - */ -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */ -#endif - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value - * depends on the application requirements), user has to ensure that HSE_VALUE - * is same as the real frequency of the crystal used. Otherwise, this function - * may have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> 16) + 1) * 2; - SystemCoreClock = pllvco / pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -#if defined(DATA_IN_ExtSRAM) && defined(DATA_IN_ExtSDRAM) -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; - - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */ - RCC->AHB1ENR |= 0x000001F8; - - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - FMC_Bank5_6->SDCR[0] = 0x000019E4; - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ - FMC_Bank5_6->SDCMR = 0x00000073; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ - FMC_Bank5_6->SDCMR = 0x00046014; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ - - (void)(tmp); -} -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ -#elif defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -#if defined(DATA_IN_ExtSDRAM) - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - -#if defined(STM32F446xx) - /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface - clock */ - RCC->AHB1ENR |= 0x0000007D; -#else - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface - clock */ - RCC->AHB1ENR |= 0x000001F8; -#endif /* STM32F446xx */ - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - -#if defined(STM32F446xx) - /* Connect PAx pins to FMC Alternate function */ - GPIOA->AFR[0] |= 0xC0000000; - GPIOA->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOA->MODER |= 0x00008000; - /* Configure PDx pins speed to 50 MHz */ - GPIOA->OSPEEDR |= 0x00008000; - /* Configure PDx pins Output type to push-pull */ - GPIOA->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOA->PUPDR |= 0x00000000; - - /* Connect PCx pins to FMC Alternate function */ - GPIOC->AFR[0] |= 0x00CC0000; - GPIOC->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOC->MODER |= 0x00000A00; - /* Configure PDx pins speed to 50 MHz */ - GPIOC->OSPEEDR |= 0x00000A00; - /* Configure PDx pins Output type to push-pull */ - GPIOC->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOC->PUPDR |= 0x00000000; -#endif /* STM32F446xx */ - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x000000CC; - GPIOD->AFR[1] = 0xCC000CCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xA02A000A; - /* Configure PDx pins speed to 50 MHz */ - GPIOD->OSPEEDR = 0xA02A000A; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00000CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA800A; - /* Configure PEx pins speed to 50 MHz */ - GPIOE->OSPEEDR = 0xAAAA800A; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - /* Configure and enable SDRAM bank1 */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCR[0] = 0x00001954; -#else - FMC_Bank5_6->SDCR[0] = 0x000019E4; -#endif /* STM32F446xx */ - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x000000F3; -#else - FMC_Bank5_6->SDCMR = 0x00000073; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x00044014; -#else - FMC_Bank5_6->SDCMR = 0x00046014; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; -#if defined(STM32F446xx) - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C << 1)); -#else - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); -#endif /* STM32F446xx */ - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); -#endif /* DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */ - -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) - -#if defined(DATA_IN_ExtSRAM) - /*-- GPIOs Configuration -----------------------------------------------------*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR |= 0x00000078; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0x00CCCCCC; - GPIOF->AFR[1] = 0xCCCC0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA000AAA; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xFF000FFF; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0x00CCCCCC; - GPIOG->AFR[1] = 0x000000C0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00085AAA; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000CAFFF; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /*-- FMC/FSMC Configuration --------------------------------------------------*/ - /* Enable the FMC/FSMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F412Zx) || defined(STM32F412Vx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN); - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001011; - FSMC_Bank1->BTCR[3] = 0x00000201; - FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF; -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */ - -#endif /* DATA_IN_ExtSRAM */ -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || \ - STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ - (void)(tmp); -} -#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */ -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/Inspector_SerialCom.ioc b/examples/projects/NUCLEO-F410RB/inspector_serialcom/Inspector_SerialCom.ioc deleted file mode 100644 index 45fe1a165..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/Inspector_SerialCom.ioc +++ /dev/null @@ -1,103 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -GPIO.groupedBy= -KeepUserPlacement=false -Mcu.Family=STM32F4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32F410R(8-B)Tx -Mcu.Package=LQFP64 -Mcu.Pin0=PC13-ANTI_TAMP -Mcu.Pin1=PA5 -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.PinsNb=3 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F410RBTx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA5.GPIOParameters=GPIO_Label -PA5.GPIO_Label=LED -PA5.Locked=true -PA5.Signal=GPIO_Output -PC13-ANTI_TAMP.GPIOParameters=GPIO_Label -PC13-ANTI_TAMP.GPIO_Label=BTN -PC13-ANTI_TAMP.Locked=true -PC13-ANTI_TAMP.Signal=GPIO_Input -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F410RBTx -ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.25.2 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x0 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Gate.ioc -ProjectManager.ProjectName=Gate -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=EWARM V8.32 -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false -RCC.48MHZClocksFreq_Value=50000000 -RCC.AHBFreq_Value=100000000 -RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=50000000 -RCC.APB1TimFreq_Value=100000000 -RCC.APB2Freq_Value=100000000 -RCC.APB2TimFreq_Value=100000000 -RCC.CortexFreq_Value=100000000 -RCC.EthernetFreq_Value=100000000 -RCC.FCLKCortexFreq_Value=100000000 -RCC.FMPI2C1Freq_Value=50000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=100000000 -RCC.HSE_VALUE=25000000 -RCC.HSI_VALUE=16000000 -RCC.I2SClocksFreq_Value=100000000 -RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FMPI2C1Freq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LPTIM1Freq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOInputFreq_Value,VCOOutputFreq_Value,VCOQOutputFreq_Value,VCOROutputFreq_Value -RCC.LPTIM1Freq_Value=50000000 -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO2PinFreq_Value=100000000 -RCC.PLLCLKFreq_Value=100000000 -RCC.PLLM=8 -RCC.PLLN=100 -RCC.RTCFreq_Value=32000 -RCC.RTCHSEDivFreq_Value=12500000 -RCC.SYSCLKFreq_VALUE=100000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.VCOInputFreq_Value=2000000 -RCC.VCOOutputFreq_Value=200000000 -RCC.VCOQOutputFreq_Value=50000000 -RCC.VCOROutputFreq_Value=100000000 -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/main.h deleted file mode 100644 index 57a236827..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_13 -#define BTN_GPIO_Port GPIOC -#define LED_Pin GPIO_PIN_5 -#define LED_GPIO_Port GPIOA - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_hal_conf.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_hal_conf.h deleted file mode 100644 index ac7527654..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_hal_conf.h +++ /dev/null @@ -1,490 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f4xx_hal_conf_template.h - * @author MCD Application Team - * @brief HAL configuration template file. - * This file should be copied to the application folder and renamed - * to stm32f4xx_hal_conf.h. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_HAL_CONF_H -#define __STM32F4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED - - /* #define HAL_ADC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CRC_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_DAC_MODULE_ENABLED */ -/* #define HAL_DCMI_MODULE_ENABLED */ -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -/* #define HAL_I2C_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_RNG_MODULE_ENABLED */ -/* #define HAL_RTC_MODULE_ENABLED */ -/* #define HAL_SAI_MODULE_ENABLED */ -/* #define HAL_SD_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ -/* #define HAL_SPI_MODULE_ENABLED */ -/* #define HAL_TIM_MODULE_ENABLED */ -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -/* #define HAL_PCD_MODULE_ENABLED */ -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature.*/ -/** - * @brief External Low Speed oscillator (LSE) value. - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S peripheral - * This value is used by the I2S HAL module to compute the I2S clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined(EXTERNAL_CLOCK_VALUE) -#define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the External audio frequency in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 1U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ -#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ -#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ -#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ -#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ -#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ -#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ -#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ -#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ -#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ -#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ -#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* ################## Ethernet peripheral configuration ##################### */ - -/* Section 1 : Ethernet peripheral configuration */ - -/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ -#define MAC_ADDR0 2U -#define MAC_ADDR1 0U -#define MAC_ADDR2 0U -#define MAC_ADDR3 0U -#define MAC_ADDR4 0U -#define MAC_ADDR5 0U - -/* Definition of the Ethernet driver buffers size and count */ -#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ -#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ -#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ -#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ - -/* Section 2: PHY configuration section */ - -/* DP83848_PHY_ADDRESS Address*/ -#define DP83848_PHY_ADDRESS 0x01U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ -#define PHY_RESET_DELAY ((uint32_t)0x000000FFU) -/* PHY Configuration delay */ -#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) - -#define PHY_READ_TO ((uint32_t)0x0000FFFFU) -#define PHY_WRITE_TO ((uint32_t)0x0000FFFFU) - - /* Section 3: Common PHY Registers */ - -#define PHY_BCR ((uint16_t)0x0000U) /*!< Transceiver Basic Control Register */ -#define PHY_BSR ((uint16_t)0x0001U) /*!< Transceiver Basic Status Register */ - -#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ -#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ -#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ -#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ -#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ -#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ -#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ -#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ -#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ -#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ - -#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ -#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ -#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ - -/* Section 4: Extended PHY Registers */ -#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ - -#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ -#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver -* Activated: CRC code is present inside driver -* Deactivated: CRC code cleaned from driver -*/ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32f4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32f4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32f4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32f4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32f4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32f4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32f4xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED -#include "stm32f4xx_hal_can_legacy.h" -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32f4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32f4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DMA2D_MODULE_ENABLED -#include "stm32f4xx_hal_dma2d.h" -#endif /* HAL_DMA2D_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32f4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_DCMI_MODULE_ENABLED -#include "stm32f4xx_hal_dcmi.h" -#endif /* HAL_DCMI_MODULE_ENABLED */ - -#ifdef HAL_ETH_MODULE_ENABLED -#include "stm32f4xx_hal_eth.h" -#endif /* HAL_ETH_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32f4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32f4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32f4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_PCCARD_MODULE_ENABLED -#include "stm32f4xx_hal_pccard.h" -#endif /* HAL_PCCARD_MODULE_ENABLED */ - -#ifdef HAL_SDRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sdram.h" -#endif /* HAL_SDRAM_MODULE_ENABLED */ - -#ifdef HAL_HASH_MODULE_ENABLED -#include "stm32f4xx_hal_hash.h" -#endif /* HAL_HASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32f4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32f4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32f4xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32f4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_LTDC_MODULE_ENABLED -#include "stm32f4xx_hal_ltdc.h" -#endif /* HAL_LTDC_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32f4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32f4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32f4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32f4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SD_MODULE_ENABLED -#include "stm32f4xx_hal_sd.h" -#endif /* HAL_SD_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32f4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32f4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32f4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32f4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32f4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32f4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32f4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32f4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_HCD_MODULE_ENABLED -#include "stm32f4xx_hal_hcd.h" -#endif /* HAL_HCD_MODULE_ENABLED */ - -#ifdef HAL_DSI_MODULE_ENABLED -#include "stm32f4xx_hal_dsi.h" -#endif /* HAL_DSI_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32f4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_CEC_MODULE_ENABLED -#include "stm32f4xx_hal_cec.h" -#endif /* HAL_CEC_MODULE_ENABLED */ - -#ifdef HAL_FMPI2C_MODULE_ENABLED -#include "stm32f4xx_hal_fmpi2c.h" -#endif /* HAL_FMPI2C_MODULE_ENABLED */ - -#ifdef HAL_SPDIFRX_MODULE_ENABLED -#include "stm32f4xx_hal_spdifrx.h" -#endif /* HAL_SPDIFRX_MODULE_ENABLED */ - -#ifdef HAL_DFSDM_MODULE_ENABLED -#include "stm32f4xx_hal_dfsdm.h" -#endif /* HAL_DFSDM_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32f4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_MMC_MODULE_ENABLED -#include "stm32f4xx_hal_mmc.h" -#endif /* HAL_MMC_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_it.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_it.h deleted file mode 100644 index c6fdc0092..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/include/stm32f4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_IT_H -#define __STM32F4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-F410RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index 18f7663f6..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,186 +0,0 @@ -/* -****************************************************************************** -** -** @file : LinkerScript.ld -** -** @author : Auto-generated by STM32CubeIDE -** -** @brief : Linker script for STM32F410RBTx Device from STM32F4 series -** 128Kbytes FLASH -** 32Kbytes RAM -** -** Set heap size, stack size and stack location according -** to application requirements. -** -** Set memory bank area and size if external memory is used -** -** Target : STMicroelectronics STM32 -** -** Distribution: The file is distributed as is, without any warranty -** of any kind. -** -****************************************************************************** -** @attention -** -**

© Copyright (c) 2021 STMicroelectronics. -** All rights reserved.

-** -** This software component is licensed by ST under BSD 3-Clause license, -** the "License"; You may not use this file except in compliance with the -** License. You may obtain a copy of the License at: -** opensource.org/licenses/BSD-3-Clause -** -****************************************************************************** -*/ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K - FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 64K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - *(.RamFunc) /* .RamFunc sections */ - *(.RamFunc*) /* .RamFunc* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h deleted file mode 100644 index dabe2928f..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/node_config.h +++ /dev/null @@ -1,144 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * MCU CONFIG - ******************************************************************************/ -#define MCUFREQ 100000000 -#define TIMERDIV 1 -/******************************************************************************* - * PINOUT CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM DMA CONFIG - ******************************************************************************/ - -/******************************************************************************* - * COM TIMEOUT CONFIG - ******************************************************************************/ -#define ROBUS_TIMER_CLOCK_ENABLE() __HAL_RCC_TIM5_CLK_ENABLE() -#define ROBUS_TIMER TIM5 -#define ROBUS_TIMER_IRQ TIM5_IRQn -#define ROBUS_TIMER_IRQHANDLER() TIM5_IRQHandler() - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * SHARED_MEMORY_SECTOR | FLASH_SECTOR_3 | Start sector of shared memory - * APP_START_ADDRESS | 0x08010000 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - * APP_START_SECTOR | FLASH_SECTOR_4 | Start sector of application with bootloader - * APP_END_SECTOR | FLASH_SECTOR_TOTAL - 1 | last sector of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini deleted file mode 100644 index 895c19f58..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,56 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = nucleo_f410rb - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_f410rb -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink -upload_protocol = stlink - -[env:nucleo_f410rb] -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 - -[env:nucleo_f410rb_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/gpio.c deleted file mode 100644 index b7d87119a..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c deleted file mode 100644 index 117d8e1d8..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/main.c +++ /dev/null @@ -1,192 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - __HAL_RCC_PWR_CLK_ENABLE(); - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 8; - RCC_OscInitStruct.PLL.PLLN = 100; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 4; - RCC_OscInitStruct.PLL.PLLR = 2; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_hal_msp.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_hal_msp.c deleted file mode 100644 index a182b75ef..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_it.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_it.c deleted file mode 100644 index 0089a2909..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/stm32f4xx_it.c +++ /dev/null @@ -1,219 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Pre-fetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} - -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI15_10_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10); -} -/* USER CODE END 1 */ -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/system_stm32f4xx.c b/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/system_stm32f4xx.c deleted file mode 100644 index 4bd94b338..000000000 --- a/examples/projects/NUCLEO-F410RB/inspector_serialcom/src/system_stm32f4xx.c +++ /dev/null @@ -1,730 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ - -#include "stm32f4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) -/* #define DATA_IN_ExtSRAM */ -#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx || \ - STM32F412Zx || STM32F412Vx */ - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -/* #define DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || \ - STM32F479xx */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ -/* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = 16000000; -const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the FPU setting, vector table location and External memory - * configuration. - * @param None - * @retval None - */ -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */ -#endif - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value - * depends on the application requirements), user has to ensure that HSE_VALUE - * is same as the real frequency of the crystal used. Otherwise, this function - * may have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> 16) + 1) * 2; - SystemCoreClock = pllvco / pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -#if defined(DATA_IN_ExtSRAM) && defined(DATA_IN_ExtSDRAM) -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; - - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */ - RCC->AHB1ENR |= 0x000001F8; - - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - FMC_Bank5_6->SDCR[0] = 0x000019E4; - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ - FMC_Bank5_6->SDCMR = 0x00000073; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ - FMC_Bank5_6->SDCMR = 0x00046014; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ - - (void)(tmp); -} -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ -#elif defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -#if defined(DATA_IN_ExtSDRAM) - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - -#if defined(STM32F446xx) - /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface - clock */ - RCC->AHB1ENR |= 0x0000007D; -#else - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface - clock */ - RCC->AHB1ENR |= 0x000001F8; -#endif /* STM32F446xx */ - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - -#if defined(STM32F446xx) - /* Connect PAx pins to FMC Alternate function */ - GPIOA->AFR[0] |= 0xC0000000; - GPIOA->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOA->MODER |= 0x00008000; - /* Configure PDx pins speed to 50 MHz */ - GPIOA->OSPEEDR |= 0x00008000; - /* Configure PDx pins Output type to push-pull */ - GPIOA->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOA->PUPDR |= 0x00000000; - - /* Connect PCx pins to FMC Alternate function */ - GPIOC->AFR[0] |= 0x00CC0000; - GPIOC->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOC->MODER |= 0x00000A00; - /* Configure PDx pins speed to 50 MHz */ - GPIOC->OSPEEDR |= 0x00000A00; - /* Configure PDx pins Output type to push-pull */ - GPIOC->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOC->PUPDR |= 0x00000000; -#endif /* STM32F446xx */ - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x000000CC; - GPIOD->AFR[1] = 0xCC000CCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xA02A000A; - /* Configure PDx pins speed to 50 MHz */ - GPIOD->OSPEEDR = 0xA02A000A; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00000CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA800A; - /* Configure PEx pins speed to 50 MHz */ - GPIOE->OSPEEDR = 0xAAAA800A; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - /* Configure and enable SDRAM bank1 */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCR[0] = 0x00001954; -#else - FMC_Bank5_6->SDCR[0] = 0x000019E4; -#endif /* STM32F446xx */ - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x000000F3; -#else - FMC_Bank5_6->SDCMR = 0x00000073; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x00044014; -#else - FMC_Bank5_6->SDCMR = 0x00046014; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; -#if defined(STM32F446xx) - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C << 1)); -#else - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); -#endif /* STM32F446xx */ - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); -#endif /* DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */ - -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) - -#if defined(DATA_IN_ExtSRAM) - /*-- GPIOs Configuration -----------------------------------------------------*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR |= 0x00000078; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0x00CCCCCC; - GPIOF->AFR[1] = 0xCCCC0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA000AAA; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xFF000FFF; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0x00CCCCCC; - GPIOG->AFR[1] = 0x000000C0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00085AAA; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000CAFFF; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /*-- FMC/FSMC Configuration --------------------------------------------------*/ - /* Enable the FMC/FSMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F412Zx) || defined(STM32F412Vx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN); - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001011; - FSMC_Bank1->BTCR[3] = 0x00000201; - FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF; -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */ - -#endif /* DATA_IN_ExtSRAM */ -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || \ - STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ - (void)(tmp); -} -#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */ -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/Inspector_SerialCom.ioc b/examples/projects/NUCLEO-G431KB/inspector_serialcom/Inspector_SerialCom.ioc deleted file mode 100644 index 7b2192718..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/Inspector_SerialCom.ioc +++ /dev/null @@ -1,119 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -GPIO.groupedBy= -KeepUserPlacement=false -Mcu.Family=STM32G4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32G431K(6-8-B)Tx -Mcu.Package=LQFP32 -Mcu.Pin0=PA11 -Mcu.Pin1=PB8-BOOT0 -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.Pin3=VP_SYS_VS_DBSignals -Mcu.PinsNb=4 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32G431KBTx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA11.GPIOParameters=GPIO_Label -PA11.GPIO_Label=BTN -PA11.Locked=true -PA11.Signal=GPIO_Input -PB8-BOOT0.GPIOParameters=GPIO_PuPd,GPIO_Label -PB8-BOOT0.GPIO_Label=LED -PB8-BOOT0.GPIO_PuPd=GPIO_PULLDOWN -PB8-BOOT0.Locked=true -PB8-BOOT0.Signal=GPIO_Output -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32G431KBTx -ProjectManager.FirmwarePackage=STM32Cube FW_G4 V1.3.0 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x0 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Button.ioc -ProjectManager.ProjectName=Button -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=Other Toolchains (GPDSC) -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false -RCC.ADC12Freq_Value=170000000 -RCC.AHBFreq_Value=170000000 -RCC.APB1Freq_Value=170000000 -RCC.APB1TimFreq_Value=170000000 -RCC.APB2Freq_Value=170000000 -RCC.APB2TimFreq_Value=170000000 -RCC.CRSFreq_Value=48000000 -RCC.CortexFreq_Value=170000000 -RCC.EXTERNAL_CLOCK_VALUE=12288000 -RCC.FCLKCortexFreq_Value=170000000 -RCC.FDCANFreq_Value=170000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=170000000 -RCC.HSE_VALUE=8000000 -RCC.HSI48_VALUE=48000000 -RCC.HSI_VALUE=16000000 -RCC.I2C1Freq_Value=170000000 -RCC.I2C2Freq_Value=170000000 -RCC.I2C3Freq_Value=170000000 -RCC.I2SFreq_Value=170000000 -RCC.IPParameters=ADC12Freq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CRSFreq_Value,CortexFreq_Value,EXTERNAL_CLOCK_VALUE,FCLKCortexFreq_Value,FDCANFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2SFreq_Value,LPTIM1Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,PLLM,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PWRFreq_Value,RNGFreq_Value,SAI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value -RCC.LPTIM1Freq_Value=170000000 -RCC.LPUART1Freq_Value=170000000 -RCC.LSCOPinFreq_Value=32000 -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO1PinFreq_Value=16000000 -RCC.PLLM=RCC_PLLM_DIV4 -RCC.PLLN=85 -RCC.PLLPoutputFreq_Value=170000000 -RCC.PLLQoutputFreq_Value=170000000 -RCC.PLLRCLKFreq_Value=170000000 -RCC.PWRFreq_Value=170000000 -RCC.RNGFreq_Value=170000000 -RCC.SAI1Freq_Value=170000000 -RCC.SYSCLKFreq_VALUE=170000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.UART4Freq_Value=170000000 -RCC.USART1Freq_Value=170000000 -RCC.USART2Freq_Value=170000000 -RCC.USART3Freq_Value=170000000 -RCC.USBFreq_Value=170000000 -RCC.VCOInputFreq_Value=4000000 -RCC.VCOOutputFreq_Value=340000000 -VP_SYS_VS_DBSignals.Mode=DisableDeadBatterySignals -VP_SYS_VS_DBSignals.Signal=SYS_VS_DBSignals -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/main.h deleted file mode 100644 index 07b538b28..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32g4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_11 -#define BTN_GPIO_Port GPIOA -#define LED_Pin GPIO_PIN_8 -#define LED_GPIO_Port GPIOB - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_hal_conf.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_hal_conf.h deleted file mode 100644 index 64c09f021..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_hal_conf.h +++ /dev/null @@ -1,382 +0,0 @@ -/** - ****************************************************************************** - * @file stm32g4xx_hal_conf.h - * @author MCD Application Team - * @brief HAL configuration file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef STM32G4xx_HAL_CONF_H -#define STM32G4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Exported types ------------------------------------------------------------*/ - /* Exported constants --------------------------------------------------------*/ - - /* ########################## Module Selection ############################## */ - /** - * @brief This is the list of modules to be used in the HAL driver - */ - -#define HAL_MODULE_ENABLED - - /*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CORDIC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_FDCAN_MODULE_ENABLED */ -/*#define HAL_FMAC_MODULE_ENABLED */ -/*#define HAL_HRTIM_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_I2C_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_NAND_MODULE_ENABLED */ -/*#define HAL_NOR_MODULE_ENABLED */ -/*#define HAL_OPAMP_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -/*#define HAL_QSPI_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SAI_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -/*#define HAL_SRAM_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED - -/* ########################## Register Callbacks selection ############################## */ -/** - * @brief This is the list of modules where register callback can be used - */ -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U -#define USE_HAL_COMP_REGISTER_CALLBACKS 0U -#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U -#define USE_HAL_EXTI_REGISTER_CALLBACKS 0U -#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U -#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U -#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U -#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U -#define USE_HAL_UART_REGISTER_CALLBACKS 0U -#define USE_HAL_USART_REGISTER_CALLBACKS 0U -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U - -/* ########################## Oscillator Values adaptation ####################*/ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE (8000000UL) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal High Speed oscillator (HSI48) value for USB FS and RNG. - * This internal oscillator is mainly dedicated to provide a high precision clock to - * the USB peripheral by means of a special Clock Recovery System (CRS) circuitry. - * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency - * which is subject to manufacturing process variations. - */ -#if !defined(HSI48_VALUE) -#define HSI48_VALUE (48000000UL) /*!< Value of the Internal High Speed oscillator for USB FS/RNG in Hz. \ - The real value my vary depending on manufacturing process variations.*/ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -/*!< Value of the Internal Low Speed oscillator in Hz -The real value may vary depending on the variations in voltage and temperature.*/ -#define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ -/** - * @brief External Low Speed oscillator (LSE) value. - * This value is used by the UART, RTC HAL module to compute the system frequency - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE (32768UL) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S and SAI peripherals - * This value is used by the I2S and SAI HAL modules to compute the I2S and SAI clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined(EXTERNAL_CLOCK_VALUE) -#define EXTERNAL_CLOCK_VALUE (12288000UL) /*!< Value of the External oscillator in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - - /* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - - /* ########################### System Configuration ######################### */ - /** - * @brief This is the HAL system configuration section - */ - -#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY (0UL) /*!< tick interrupt priority (lowest by default) */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 0U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - - /* ########################## Assert Selection ############################## */ - /** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ - /* #define USE_FULL_ASSERT 1U */ - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver - * Activated: CRC code is present inside driver - * Deactivated: CRC code cleaned from driver - */ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32g4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32g4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32g4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32g4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32g4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED -#include "stm32g4xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CORDIC_MODULE_ENABLED -#include "stm32g4xx_hal_cordic.h" -#endif /* HAL_CORDIC_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32g4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32g4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32g4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32g4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_FDCAN_MODULE_ENABLED -#include "stm32g4xx_hal_fdcan.h" -#endif /* HAL_FDCAN_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32g4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_FMAC_MODULE_ENABLED -#include "stm32g4xx_hal_fmac.h" -#endif /* HAL_FMAC_MODULE_ENABLED */ - -#ifdef HAL_HRTIM_MODULE_ENABLED -#include "stm32g4xx_hal_hrtim.h" -#endif /* HAL_HRTIM_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32g4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32g4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32g4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32g4xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32g4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32g4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32g4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_OPAMP_MODULE_ENABLED -#include "stm32g4xx_hal_opamp.h" -#endif /* HAL_OPAMP_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32g4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32g4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32g4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32g4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32g4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32g4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32g4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32g4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32g4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32g4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32g4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32g4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32g4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32g4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT -/** - * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* STM32G4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_it.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_it.h deleted file mode 100644 index 3e1e449a2..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/include/stm32g4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32G4xx_IT_H -#define __STM32G4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32G4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-G431KB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index fec64429b..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,175 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32G431KBTx Device from STM32G4 series - * 128Kbytes FLASH - * 32Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K - FLASH (rx) : ORIGIN = 0x0800C800, LENGTH = 78K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h deleted file mode 100644 index 528815815..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/node_config.h +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini deleted file mode 100644 index fe5677cd5..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,58 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = nucleo_g431kb - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_g431kb -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink -upload_protocol = stlink - -[env:nucleo_g431kb] -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -D GATEFORMAT=TinyJSON - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32G4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-G431 - -[env:nucleo_g431kb_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DWITH_BOOTLOADER - -D GATEFORMAT=TinyJSON - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32G4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-G431 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/gpio.c deleted file mode 100644 index 0249ee815..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c deleted file mode 100644 index 7f1079a30..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/main.c +++ /dev/null @@ -1,191 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1_BOOST); - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV4; - RCC_OscInitStruct.PLL.PLLN = 85; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; - RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_hal_msp.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_hal_msp.c deleted file mode 100644 index 8d592424b..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_hal_msp.c +++ /dev/null @@ -1,88 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /** Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral - */ - //HAL_PWREx_DisableUCPDDeadBattery(); - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_it.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_it.c deleted file mode 100644 index f4c00b1b7..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/stm32g4xx_it.c +++ /dev/null @@ -1,214 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32g4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Prefetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32G4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32g4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -/* USER CODE BEGIN 1 */ -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/system_stm32g4xx.c b/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/system_stm32g4xx.c deleted file mode 100644 index ff379ee75..000000000 --- a/examples/projects/NUCLEO-G431KB/inspector_serialcom/src/system_stm32g4xx.c +++ /dev/null @@ -1,270 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32g4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32g4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32g4xx.s" file, to - * configure the system clock before to branch to main program. - * - * This file configures the system clock as follows: - *============================================================================= - *----------------------------------------------------------------------------- - * System Clock source | HSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 1 - *----------------------------------------------------------------------------- - * PLL_M | 1 - *----------------------------------------------------------------------------- - * PLL_N | 16 - *----------------------------------------------------------------------------- - * PLL_P | 7 - *----------------------------------------------------------------------------- - * PLL_Q | 2 - *----------------------------------------------------------------------------- - * PLL_R | 2 - *----------------------------------------------------------------------------- - * Require 48MHz for RNG | Disabled - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32g4xx_system - * @{ - */ - -/** @addtogroup STM32G4xx_System_Private_Includes - * @{ - */ - -#include "stm32g4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 -/*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Variables - * @{ - */ -/* The SystemCoreClock variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = HSI_VALUE; - -const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; -const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * @param None - * @retval None - */ - -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << (10 * 2)) | (3UL << (11 * 2))); /* set CP10 and CP11 Full Access */ -#endif - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (**) HSI_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (***) HSE_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp, pllvco, pllr, pllsource, pllm; - - /* Get SYSCLK source -------------------------------------------------------*/ - switch (RCC->CFGR & RCC_CFGR_SWS) - { - case 0x04: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - - case 0x08: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - - case 0x0C: /* PLL used as system clock source */ - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN - SYSCLK = PLL_VCO / PLLR - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); - pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> 4) + 1U; - if (pllsource == 0x02UL) /* HSI used as PLL clock source */ - { - pllvco = (HSI_VALUE / pllm); - } - else /* HSE used as PLL clock source */ - { - pllvco = (HSE_VALUE / pllm); - } - pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 8); - pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> 25) + 1U) * 2U; - SystemCoreClock = pllvco / pllr; - break; - - default: - break; - } - /* Compute HCLK clock frequency --------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/gpio.h deleted file mode 100644 index 1ac88aa6d..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/main.h deleted file mode 100644 index e01c4b85f..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32g4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_11 -#define BTN_GPIO_Port GPIOA -#define LED_Pin GPIO_PIN_8 -#define LED_GPIO_Port GPIOB - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_hal_conf.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_hal_conf.h deleted file mode 100644 index 074b94a0c..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_hal_conf.h +++ /dev/null @@ -1,382 +0,0 @@ -/** - ****************************************************************************** - * @file stm32g4xx_hal_conf.h - * @author MCD Application Team - * @brief HAL configuration file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef STM32G4xx_HAL_CONF_H -#define STM32G4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Exported types ------------------------------------------------------------*/ - /* Exported constants --------------------------------------------------------*/ - - /* ########################## Module Selection ############################## */ - /** - * @brief This is the list of modules to be used in the HAL driver - */ - -#define HAL_MODULE_ENABLED - - /*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CORDIC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_FDCAN_MODULE_ENABLED */ -/*#define HAL_FMAC_MODULE_ENABLED */ -/*#define HAL_HRTIM_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_I2C_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_NAND_MODULE_ENABLED */ -/*#define HAL_NOR_MODULE_ENABLED */ -/*#define HAL_OPAMP_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -/*#define HAL_QSPI_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SAI_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -/*#define HAL_SRAM_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_LPUART_MODULE_ENABLED - -/* ########################## Register Callbacks selection ############################## */ -/** - * @brief This is the list of modules where register callback can be used - */ -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U -#define USE_HAL_COMP_REGISTER_CALLBACKS 0U -#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U -#define USE_HAL_EXTI_REGISTER_CALLBACKS 0U -#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U -#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U -#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U -#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U -#define USE_HAL_UART_REGISTER_CALLBACKS 0U -#define USE_HAL_USART_REGISTER_CALLBACKS 0U -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U - -/* ########################## Oscillator Values adaptation ####################*/ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE (8000000UL) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal High Speed oscillator (HSI48) value for USB FS and RNG. - * This internal oscillator is mainly dedicated to provide a high precision clock to - * the USB peripheral by means of a special Clock Recovery System (CRS) circuitry. - * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency - * which is subject to manufacturing process variations. - */ -#if !defined(HSI48_VALUE) -#define HSI48_VALUE (48000000UL) /*!< Value of the Internal High Speed oscillator for USB FS/RNG in Hz. \ - The real value my vary depending on manufacturing process variations.*/ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -/*!< Value of the Internal Low Speed oscillator in Hz -The real value may vary depending on the variations in voltage and temperature.*/ -#define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ -/** - * @brief External Low Speed oscillator (LSE) value. - * This value is used by the UART, RTC HAL module to compute the system frequency - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE (32768UL) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S and SAI peripherals - * This value is used by the I2S and SAI HAL modules to compute the I2S and SAI clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined(EXTERNAL_CLOCK_VALUE) -#define EXTERNAL_CLOCK_VALUE (12288000UL) /*!< Value of the External oscillator in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - - /* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - - /* ########################### System Configuration ######################### */ - /** - * @brief This is the HAL system configuration section - */ - -#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY (0UL) /*!< tick interrupt priority (lowest by default) */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 0U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - - /* ########################## Assert Selection ############################## */ - /** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ - /* #define USE_FULL_ASSERT 1U */ - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver - * Activated: CRC code is present inside driver - * Deactivated: CRC code cleaned from driver - */ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32g4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32g4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32g4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32g4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32g4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED -#include "stm32g4xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CORDIC_MODULE_ENABLED -#include "stm32g4xx_hal_cordic.h" -#endif /* HAL_CORDIC_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32g4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32g4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32g4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32g4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_FDCAN_MODULE_ENABLED -#include "stm32g4xx_hal_fdcan.h" -#endif /* HAL_FDCAN_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32g4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_FMAC_MODULE_ENABLED -#include "stm32g4xx_hal_fmac.h" -#endif /* HAL_FMAC_MODULE_ENABLED */ - -#ifdef HAL_HRTIM_MODULE_ENABLED -#include "stm32g4xx_hal_hrtim.h" -#endif /* HAL_HRTIM_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32g4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32g4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32g4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32g4xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32g4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32g4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32g4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_OPAMP_MODULE_ENABLED -#include "stm32g4xx_hal_opamp.h" -#endif /* HAL_OPAMP_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32g4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32g4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32g4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32g4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32g4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32g4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32g4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32g4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32g4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32g4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32g4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32g4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32g4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32g4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT -/** - * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* STM32G4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_it.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_it.h deleted file mode 100644 index e72670b44..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/include/stm32g4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32G4xx_IT_H -#define __STM32G4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32G4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-G474RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index fec64429b..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,175 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32G431KBTx Device from STM32G4 series - * 128Kbytes FLASH - * 32Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K - FLASH (rx) : ORIGIN = 0x0800C800, LENGTH = 78K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h deleted file mode 100644 index 528815815..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/node_config.h +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini deleted file mode 100644 index f543507c2..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,57 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = nucleo_g474re - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_g474re -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -upload_protocol = stlink - -[env:nucleo_g474re] -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -D GATEFORMAT=TinyJSON - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32G4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-G474 - -[env:nucleo_g474re_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -D GATEFORMAT=TinyJSON - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32G4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-G474 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/gpio.c deleted file mode 100644 index cefdc6b51..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins - */ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c deleted file mode 100644 index aed1ea40e..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/main.c +++ /dev/null @@ -1,192 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ - -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1_BOOST); - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV4; - RCC_OscInitStruct.PLL.PLLN = 85; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; - RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_hal_msp.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_hal_msp.c deleted file mode 100644 index 0096a09b3..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_hal_msp.c +++ /dev/null @@ -1,88 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /** Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral - */ - // HAL_PWREx_DisableUCPDDeadBattery(); - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_it.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_it.c deleted file mode 100644 index 2e52f9297..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/stm32g4xx_it.c +++ /dev/null @@ -1,214 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32g4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32g4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Prefetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32G4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32g4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -/* USER CODE BEGIN 1 */ -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/system_stm32g4xx.c b/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/system_stm32g4xx.c deleted file mode 100644 index 0c74693cf..000000000 --- a/examples/projects/NUCLEO-G474RE/inspector_serialcom/src/system_stm32g4xx.c +++ /dev/null @@ -1,269 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32g4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32g4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * After each device reset the HSI (16 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32g4xx.s" file, to - * configure the system clock before to branch to main program. - * - * This file configures the system clock as follows: - *============================================================================= - *----------------------------------------------------------------------------- - * System Clock source | HSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 16000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 1 - *----------------------------------------------------------------------------- - * PLL_M | 1 - *----------------------------------------------------------------------------- - * PLL_N | 16 - *----------------------------------------------------------------------------- - * PLL_P | 7 - *----------------------------------------------------------------------------- - * PLL_Q | 2 - *----------------------------------------------------------------------------- - * PLL_R | 2 - *----------------------------------------------------------------------------- - * Require 48MHz for RNG | Disabled - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32g4xx_system - * @{ - */ - -/** @addtogroup STM32G4xx_System_Private_Includes - * @{ - */ - -#include "stm32g4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00UL /*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ - /******************************************************************************/ - /** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Variables - * @{ - */ -/* The SystemCoreClock variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = HSI_VALUE; - -const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; -const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32G4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * @param None - * @retval None - */ - -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << (10 * 2)) | (3UL << (11 * 2))); /* set CP10 and CP11 Full Access */ -#endif - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (**) HSI_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (***) HSE_VALUE is a constant defined in stm32g4xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp, pllvco, pllr, pllsource, pllm; - - /* Get SYSCLK source -------------------------------------------------------*/ - switch (RCC->CFGR & RCC_CFGR_SWS) - { - case 0x04: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - - case 0x08: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - - case 0x0C: /* PLL used as system clock source */ - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN - SYSCLK = PLL_VCO / PLLR - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); - pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> 4) + 1U; - if (pllsource == 0x02UL) /* HSI used as PLL clock source */ - { - pllvco = (HSI_VALUE / pllm); - } - else /* HSE used as PLL clock source */ - { - pllvco = (HSE_VALUE / pllm); - } - pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 8); - pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> 25) + 1U) * 2U; - SystemCoreClock = pllvco / pllr; - break; - - default: - break; - } - /* Compute HCLK clock frequency --------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/Inspector_SerialCom.ioc b/examples/projects/NUCLEO-L432KC/inspector_serialcom/Inspector_SerialCom.ioc deleted file mode 100644 index 685e9e08c..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/Inspector_SerialCom.ioc +++ /dev/null @@ -1,112 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -GPIO.groupedBy= -KeepUserPlacement=false -Mcu.Family=STM32L4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32L432K(B-C)Ux -Mcu.Package=UFQFPN32 -Mcu.Pin0=PA11 -Mcu.Pin1=PB3 (JTDO-TRACESWO) -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.PinsNb=3 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32L432KCUx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA11.GPIOParameters=GPIO_Label -PA11.GPIO_Label=BTN -PA11.Locked=true -PA11.Signal=GPIO_Input -PB3\ (JTDO-TRACESWO).GPIOParameters=GPIO_PuPd,GPIO_Label -PB3\ (JTDO-TRACESWO).GPIO_Label=LED -PB3\ (JTDO-TRACESWO).GPIO_PuPd=GPIO_PULLDOWN -PB3\ (JTDO-TRACESWO).Locked=true -PB3\ (JTDO-TRACESWO).Signal=GPIO_Output -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32L432KCUx -ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.0 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x0 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Gate.ioc -ProjectManager.ProjectName=Gate -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=Other Toolchains (GPDSC) -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false -RCC.AHBFreq_Value=80000000 -RCC.APB1Freq_Value=80000000 -RCC.APB1TimFreq_Value=80000000 -RCC.APB2Freq_Value=80000000 -RCC.APB2TimFreq_Value=80000000 -RCC.CortexFreq_Value=80000000 -RCC.FCLKCortexFreq_Value=80000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=80000000 -RCC.HSE_VALUE=8000000 -RCC.HSI48_VALUE=48000000 -RCC.HSI_VALUE=16000000 -RCC.I2C1Freq_Value=80000000 -RCC.I2C3Freq_Value=80000000 -RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PWRFreq_Value,SAI1Freq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USART1Freq_Value,USART2Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value -RCC.LPTIM1Freq_Value=80000000 -RCC.LPTIM2Freq_Value=80000000 -RCC.LPUART1Freq_Value=80000000 -RCC.LSCOPinFreq_Value=32000 -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO1PinFreq_Value=80000000 -RCC.MSI_VALUE=4000000 -RCC.PLLN=40 -RCC.PLLPoutputFreq_Value=22857142.85714286 -RCC.PLLQoutputFreq_Value=80000000 -RCC.PLLRCLKFreq_Value=80000000 -RCC.PLLSAI1PoutputFreq_Value=4571428.571428572 -RCC.PLLSAI1QoutputFreq_Value=16000000 -RCC.PLLSAI1RoutputFreq_Value=16000000 -RCC.PWRFreq_Value=80000000 -RCC.SAI1Freq_Value=4571428.571428572 -RCC.SWPMI1Freq_Value=80000000 -RCC.SYSCLKFreq_VALUE=80000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.USART1Freq_Value=80000000 -RCC.USART2Freq_Value=80000000 -RCC.VCOInputFreq_Value=4000000 -RCC.VCOOutputFreq_Value=160000000 -RCC.VCOSAI1OutputFreq_Value=32000000 -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/gpio.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/main.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/main.h deleted file mode 100644 index 677d953e4..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_11 -#define BTN_GPIO_Port GPIOA -#define LED_Pin GPIO_PIN_3 -#define LED_GPIO_Port GPIOB - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_hal_conf.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_hal_conf.h deleted file mode 100644 index 55d17eb7b..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_hal_conf.h +++ /dev/null @@ -1,484 +0,0 @@ -/** - ****************************************************************************** - * @file stm32l4xx_hal_conf.h - * @author MCD Application Team - * @brief HAL configuration template file. - * This file should be copied to the application folder and renamed - * to stm32l4xx_hal_conf.h. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef STM32L4xx_HAL_CONF_H -#define STM32L4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED -/*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_CAN_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_DCMI_MODULE_ENABLED */ -/*#define HAL_DMA2D_MODULE_ENABLED */ -/*#define HAL_DFSDM_MODULE_ENABLED */ -/*#define HAL_DSI_MODULE_ENABLED */ -/*#define HAL_FIREWALL_MODULE_ENABLED */ -/*#define HAL_GFXMMU_MODULE_ENABLED */ -/*#define HAL_HCD_MODULE_ENABLED */ -/*#define HAL_HASH_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_LTDC_MODULE_ENABLED */ -/*#define HAL_LCD_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_MMC_MODULE_ENABLED */ -/*#define HAL_NAND_MODULE_ENABLED */ -/*#define HAL_NOR_MODULE_ENABLED */ -/*#define HAL_OPAMP_MODULE_ENABLED */ -/*#define HAL_OSPI_MODULE_ENABLED */ -/*#define HAL_OSPI_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -/*#define HAL_PKA_MODULE_ENABLED */ -/*#define HAL_QSPI_MODULE_ENABLED */ -/*#define HAL_QSPI_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SAI_MODULE_ENABLED */ -/*#define HAL_SD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -/*#define HAL_SRAM_MODULE_ENABLED */ -/*#define HAL_SWPMI_MODULE_ENABLED */ -/*#define HAL_TSC_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -/*#define HAL_EXTI_MODULE_ENABLED */ -/*#define HAL_PSSI_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED - -/* ########################## Oscillator Values adaptation ####################*/ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal Multiple Speed oscillator (MSI) default value. - * This value is the default MSI range value after Reset. - */ -#if !defined(MSI_VALUE) -#define MSI_VALUE ((uint32_t)4000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* MSI_VALUE */ -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal High Speed oscillator (HSI48) value for USB FS, SDMMC and RNG. - * This internal oscillator is mainly dedicated to provide a high precision clock to - * the USB peripheral by means of a special Clock Recovery System (CRS) circuitry. - * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency - * which is subject to manufacturing process variations. - */ -#if !defined(HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz. \ - The real value my vary depending on manufacturing process variations.*/ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature.*/ - -/** - * @brief External Low Speed oscillator (LSE) value. - * This value is used by the UART, RTC HAL module to compute the system frequency - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for SAI1 peripheral - * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source - * frequency. - */ -#if !defined(EXTERNAL_SAI1_CLOCK_VALUE) -#define EXTERNAL_SAI1_CLOCK_VALUE 2097000U /*!< Value of the SAI1 External clock source in Hz*/ -#endif /* EXTERNAL_SAI1_CLOCK_VALUE */ - -/** - * @brief External clock source for SAI2 peripheral - * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source - * frequency. - */ -#if !defined(EXTERNAL_SAI2_CLOCK_VALUE) -#define EXTERNAL_SAI2_CLOCK_VALUE 48000U /*!< Value of the SAI2 External clock source in Hz*/ -#endif /* EXTERNAL_SAI2_CLOCK_VALUE */ - - /* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - - /* ########################### System Configuration ######################### */ - /** - * @brief This is the HAL system configuration section - */ - -#define VDD_VALUE 3300U /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 0U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* ################## Register callback feature configuration ############### */ -/** - * @brief Set below the peripheral configuration to "1U" to add the support - * of HAL callback registration/deregistration feature for the HAL - * driver(s). This allows user application to provide specific callback - * functions thanks to HAL_PPP_RegisterCallback() rather than overwriting - * the default weak callback functions (see each stm32l4xx_hal_ppp.h file - * for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef - * for each PPP peripheral). - */ -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U -#define USE_HAL_COMP_REGISTER_CALLBACKS 0U -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U -#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U -#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U -#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U -#define USE_HAL_DSI_REGISTER_CALLBACKS 0U -#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U -#define USE_HAL_HASH_REGISTER_CALLBACKS 0U -#define USE_HAL_HCD_REGISTER_CALLBACKS 0U -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U -#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U -#define USE_HAL_MMC_REGISTER_CALLBACKS 0U -#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U -#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U -#define USE_HAL_SD_REGISTER_CALLBACKS 0U -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U -#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U -#define USE_HAL_TSC_REGISTER_CALLBACKS 0U -#define USE_HAL_UART_REGISTER_CALLBACKS 0U -#define USE_HAL_USART_REGISTER_CALLBACKS 0U -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver - * Activated: CRC code is present inside driver - * Deactivated: CRC code cleaned from driver - */ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32l4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32l4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32l4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_DFSDM_MODULE_ENABLED -#include "stm32l4xx_hal_dfsdm.h" -#endif /* HAL_DFSDM_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32l4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32l4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32l4xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED -#include "Legacy/stm32l4xx_hal_can_legacy.h" -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED -#include "stm32l4xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32l4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32l4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32l4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_DCMI_MODULE_ENABLED -#include "stm32l4xx_hal_dcmi.h" -#endif /* HAL_DCMI_MODULE_ENABLED */ - -#ifdef HAL_DMA2D_MODULE_ENABLED -#include "stm32l4xx_hal_dma2d.h" -#endif /* HAL_DMA2D_MODULE_ENABLED */ - -#ifdef HAL_DSI_MODULE_ENABLED -#include "stm32l4xx_hal_dsi.h" -#endif /* HAL_DSI_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32l4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_GFXMMU_MODULE_ENABLED -#include "stm32l4xx_hal_gfxmmu.h" -#endif /* HAL_GFXMMU_MODULE_ENABLED */ - -#ifdef HAL_FIREWALL_MODULE_ENABLED -#include "stm32l4xx_hal_firewall.h" -#endif /* HAL_FIREWALL_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32l4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_HASH_MODULE_ENABLED -#include "stm32l4xx_hal_hash.h" -#endif /* HAL_HASH_MODULE_ENABLED */ - -#ifdef HAL_HCD_MODULE_ENABLED -#include "stm32l4xx_hal_hcd.h" -#endif /* HAL_HCD_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32l4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32l4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32l4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_LCD_MODULE_ENABLED -#include "stm32l4xx_hal_lcd.h" -#endif /* HAL_LCD_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32l4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_LTDC_MODULE_ENABLED -#include "stm32l4xx_hal_ltdc.h" -#endif /* HAL_LTDC_MODULE_ENABLED */ - -#ifdef HAL_MMC_MODULE_ENABLED -#include "stm32l4xx_hal_mmc.h" -#endif /* HAL_MMC_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32l4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32l4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_OPAMP_MODULE_ENABLED -#include "stm32l4xx_hal_opamp.h" -#endif /* HAL_OPAMP_MODULE_ENABLED */ - -#ifdef HAL_OSPI_MODULE_ENABLED -#include "stm32l4xx_hal_ospi.h" -#endif /* HAL_OSPI_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32l4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_PKA_MODULE_ENABLED -#include "stm32l4xx_hal_pka.h" -#endif /* HAL_PKA_MODULE_ENABLED */ - -#ifdef HAL_PSSI_MODULE_ENABLED -#include "stm32l4xx_hal_pssi.h" -#endif /* HAL_PSSI_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32l4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32l4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32l4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32l4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32l4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SD_MODULE_ENABLED -#include "stm32l4xx_hal_sd.h" -#endif /* HAL_SD_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32l4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32l4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32l4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32l4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_SWPMI_MODULE_ENABLED -#include "stm32l4xx_hal_swpmi.h" -#endif /* HAL_SWPMI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32l4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_TSC_MODULE_ENABLED -#include "stm32l4xx_hal_tsc.h" -#endif /* HAL_TSC_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32l4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32l4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32l4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* STM32L4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_it.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_it.h deleted file mode 100644 index f57963372..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/include/stm32l4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32l4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32L4xx_IT_H -#define __STM32L4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32L4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/NUCLEO-L432KC/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index dde7bb560..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,175 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32L432KCUx Device from STM32L4 series - * 256Kbytes FLASH - * 64Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K - FLASH (rx) : ORIGIN = 0x800C800, LENGTH = 206K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h b/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h deleted file mode 100644 index 528815815..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/node_config.h +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini b/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini deleted file mode 100644 index 88e341e7c..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,56 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = nucleo_l432kc - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = nucleo_l432kc -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink -upload_protocol = stlink - -[env:nucleo_l432kc] -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32L4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-L4 - -[env:nucleo_l432kc_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32L4 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-L4 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/gpio.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/gpio.c deleted file mode 100644 index 0249ee815..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c deleted file mode 100644 index 810ff43ed..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/main.c +++ /dev/null @@ -1,195 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; - RCC_OscInitStruct.MSIState = RCC_MSI_ON; - RCC_OscInitStruct.MSICalibrationValue = 0; - RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI; - RCC_OscInitStruct.PLL.PLLM = 1; - RCC_OscInitStruct.PLL.PLLN = 40; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7; - RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; - RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) - { - Error_Handler(); - } - /** Configure the main internal regulator output voltage - */ - if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_hal_msp.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_hal_msp.c deleted file mode 100644 index 1caf088bc..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32l4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_it.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_it.c deleted file mode 100644 index b297fd090..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/stm32l4xx_it.c +++ /dev/null @@ -1,213 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32l4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32l4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Prefetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32L4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32l4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/system_stm32l4xx.c b/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/system_stm32l4xx.c deleted file mode 100644 index 3682d36f6..000000000 --- a/examples/projects/NUCLEO-L432KC/inspector_serialcom/src/system_stm32l4xx.c +++ /dev/null @@ -1,336 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32l4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32l4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * After each device reset the MSI (4 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32l4xx.s" file, to - * configure the system clock before to branch to main program. - * - * This file configures the system clock as follows: - *============================================================================= - *----------------------------------------------------------------------------- - * System Clock source | MSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 4000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 4000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - * APB2 Prescaler | 1 - *----------------------------------------------------------------------------- - * PLL_M | 1 - *----------------------------------------------------------------------------- - * PLL_N | 8 - *----------------------------------------------------------------------------- - * PLL_P | 7 - *----------------------------------------------------------------------------- - * PLL_Q | 2 - *----------------------------------------------------------------------------- - * PLL_R | 2 - *----------------------------------------------------------------------------- - * PLLSAI1_P | NA - *----------------------------------------------------------------------------- - * PLLSAI1_Q | NA - *----------------------------------------------------------------------------- - * PLLSAI1_R | NA - *----------------------------------------------------------------------------- - * PLLSAI2_P | NA - *----------------------------------------------------------------------------- - * PLLSAI2_Q | NA - *----------------------------------------------------------------------------- - * PLLSAI2_R | NA - *----------------------------------------------------------------------------- - * Require 48MHz for USB OTG FS, | Disabled - * SDIO and RNG clock | - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under Apache License, Version 2.0, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/Apache-2.0 - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32l4xx_system - * @{ - */ - -/** @addtogroup STM32L4xx_System_Private_Includes - * @{ - */ - -#include "stm32l4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(MSI_VALUE) -#define MSI_VALUE 4000000U /*!< Value of the Internal oscillator in Hz*/ -#endif /* MSI_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_Variables - * @{ - */ -/* The SystemCoreClock variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = 4000000U; - -const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; -const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; -const uint32_t MSIRangeTable[12] = {100000U, 200000U, 400000U, 800000U, 1000000U, 2000000U, - 4000000U, 8000000U, 16000000U, 24000000U, 32000000U, 48000000U}; -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * @param None - * @retval None - */ - -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */ -#endif - - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set MSION bit */ - RCC->CR |= RCC_CR_MSION; - - /* Reset CFGR register */ - RCC->CFGR = 0x00000000U; - - /* Reset HSEON, CSSON , HSION, and PLLON bits */ - RCC->CR &= 0xEAF6FFFFU; - - /* Reset PLLCFGR register */ - RCC->PLLCFGR = 0x00001000U; - - /* Reset HSEBYP bit */ - RCC->CR &= 0xFFFBFFFFU; - - /* Disable all interrupts */ - RCC->CIER = 0x00000000U; - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI_VALUE(*) - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) - * or HSI_VALUE(*) or MSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) MSI_VALUE is a constant defined in stm32l4xx_hal.h file (default value - * 4 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSI_VALUE is a constant defined in stm32l4xx_hal.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (***) HSE_VALUE is a constant defined in stm32l4xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0U, msirange = 0U, pllvco = 0U, pllr = 2U, pllsource = 0U, pllm = 2U; - - /* Get MSI Range frequency--------------------------------------------------*/ - if ((RCC->CR & RCC_CR_MSIRGSEL) == RESET) - { /* MSISRANGE from RCC_CSR applies */ - msirange = (RCC->CSR & RCC_CSR_MSISRANGE) >> 8U; - } - else - { /* MSIRANGE from RCC_CR applies */ - msirange = (RCC->CR & RCC_CR_MSIRANGE) >> 4U; - } - /*MSI frequency range in HZ*/ - msirange = MSIRangeTable[msirange]; - - /* Get SYSCLK source -------------------------------------------------------*/ - switch (RCC->CFGR & RCC_CFGR_SWS) - { - case 0x00: /* MSI used as system clock source */ - SystemCoreClock = msirange; - break; - - case 0x04: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - - case 0x08: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - - case 0x0C: /* PLL used as system clock source */ - /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI_VALUE/ PLLM) * PLLN - SYSCLK = PLL_VCO / PLLR - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); - pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> 4U) + 1U; - - switch (pllsource) - { - case 0x02: /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm); - break; - - case 0x03: /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm); - break; - - default: /* MSI used as PLL clock source */ - pllvco = (msirange / pllm); - break; - } - pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 8U); - pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> 25U) + 1U) * 2U; - SystemCoreClock = pllvco / pllr; - break; - - default: - SystemCoreClock = msirange; - break; - } - /* Compute HCLK clock frequency --------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/Inspector_SerialCom.ioc b/examples/projects/STM32F4-discovery/inspector_serialcom/Inspector_SerialCom.ioc deleted file mode 100644 index b4b45dc4b..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/Inspector_SerialCom.ioc +++ /dev/null @@ -1,104 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -GPIO.groupedBy= -KeepUserPlacement=false -Mcu.Family=STM32F4 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32F407V(E-G)Tx -Mcu.Package=LQFP100 -Mcu.Pin0=PA0-WKUP -Mcu.Pin1=PD12 -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.PinsNb=3 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F407VGTx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA0-WKUP.GPIOParameters=GPIO_PuPd,GPIO_Label -PA0-WKUP.GPIO_Label=BTN -PA0-WKUP.GPIO_PuPd=GPIO_NOPULL -PA0-WKUP.Locked=true -PA0-WKUP.Signal=GPIO_Input -PD12.GPIOParameters=GPIO_Label -PD12.GPIO_Label=LED -PD12.Locked=true -PD12.Signal=GPIO_Output -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F407VGTx -ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.25.2 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x0 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Gate.ioc -ProjectManager.ProjectName=Gate -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=Other Toolchains (GPDSC) -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=2-SystemClock_Config-RCC-false-HAL-false -RCC.48MHZClocksFreq_Value=84000000 -RCC.AHBFreq_Value=168000000 -RCC.APB1CLKDivider=RCC_HCLK_DIV4 -RCC.APB1Freq_Value=42000000 -RCC.APB1TimFreq_Value=84000000 -RCC.APB2CLKDivider=RCC_HCLK_DIV2 -RCC.APB2Freq_Value=84000000 -RCC.APB2TimFreq_Value=168000000 -RCC.CortexFreq_Value=168000000 -RCC.EthernetFreq_Value=168000000 -RCC.FCLKCortexFreq_Value=168000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=168000000 -RCC.HSE_VALUE=25000000 -RCC.HSI_VALUE=16000000 -RCC.I2SClocksFreq_Value=192000000 -RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S -RCC.LSE_VALUE=32768 -RCC.LSI_VALUE=32000 -RCC.MCO2PinFreq_Value=168000000 -RCC.PLLCLKFreq_Value=168000000 -RCC.PLLM=8 -RCC.PLLN=168 -RCC.PLLQCLKFreq_Value=84000000 -RCC.RTCFreq_Value=32000 -RCC.RTCHSEDivFreq_Value=12500000 -RCC.SYSCLKFreq_VALUE=168000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.VCOI2SOutputFreq_Value=384000000 -RCC.VCOInputFreq_Value=2000000 -RCC.VCOOutputFreq_Value=336000000 -RCC.VcooutputI2S=192000000 -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/include/gpio.h b/examples/projects/STM32F4-discovery/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/include/main.h b/examples/projects/STM32F4-discovery/inspector_serialcom/include/main.h deleted file mode 100644 index 08e94c8e9..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f4xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BTN_Pin GPIO_PIN_0 -#define BTN_GPIO_Port GPIOA -#define LED_Pin GPIO_PIN_12 -#define LED_GPIO_Port GPIOD - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_hal_conf.h b/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_hal_conf.h deleted file mode 100644 index ac7527654..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_hal_conf.h +++ /dev/null @@ -1,490 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f4xx_hal_conf_template.h - * @author MCD Application Team - * @brief HAL configuration template file. - * This file should be copied to the application folder and renamed - * to stm32f4xx_hal_conf.h. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_HAL_CONF_H -#define __STM32F4xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED - - /* #define HAL_ADC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CRC_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -/* #define HAL_DAC_MODULE_ENABLED */ -/* #define HAL_DCMI_MODULE_ENABLED */ -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -/* #define HAL_I2C_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_RNG_MODULE_ENABLED */ -/* #define HAL_RTC_MODULE_ENABLED */ -/* #define HAL_SAI_MODULE_ENABLED */ -/* #define HAL_SD_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ -/* #define HAL_SPI_MODULE_ENABLED */ -/* #define HAL_TIM_MODULE_ENABLED */ -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -/* #define HAL_PCD_MODULE_ENABLED */ -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_QSPI_MODULE_ENABLED */ -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature.*/ -/** - * @brief External Low Speed oscillator (LSE) value. - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S peripheral - * This value is used by the I2S HAL module to compute the I2S clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined(EXTERNAL_CLOCK_VALUE) -#define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the External audio frequency in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 1U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ -#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ -#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ -#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ -#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ -#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ -#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ -#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ -#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ -#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ -#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ -#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ -#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* ################## Ethernet peripheral configuration ##################### */ - -/* Section 1 : Ethernet peripheral configuration */ - -/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ -#define MAC_ADDR0 2U -#define MAC_ADDR1 0U -#define MAC_ADDR2 0U -#define MAC_ADDR3 0U -#define MAC_ADDR4 0U -#define MAC_ADDR5 0U - -/* Definition of the Ethernet driver buffers size and count */ -#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ -#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ -#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ -#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ - -/* Section 2: PHY configuration section */ - -/* DP83848_PHY_ADDRESS Address*/ -#define DP83848_PHY_ADDRESS 0x01U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ -#define PHY_RESET_DELAY ((uint32_t)0x000000FFU) -/* PHY Configuration delay */ -#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU) - -#define PHY_READ_TO ((uint32_t)0x0000FFFFU) -#define PHY_WRITE_TO ((uint32_t)0x0000FFFFU) - - /* Section 3: Common PHY Registers */ - -#define PHY_BCR ((uint16_t)0x0000U) /*!< Transceiver Basic Control Register */ -#define PHY_BSR ((uint16_t)0x0001U) /*!< Transceiver Basic Status Register */ - -#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ -#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ -#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ -#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ -#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ -#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ -#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ -#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ -#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ -#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ - -#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ -#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ -#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ - -/* Section 4: Extended PHY Registers */ -#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ - -#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ -#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ - - /* ################## SPI peripheral configuration ########################## */ - - /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver -* Activated: CRC code is present inside driver -* Deactivated: CRC code cleaned from driver -*/ - -#define USE_SPI_CRC 0U - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32f4xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32f4xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32f4xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32f4xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32f4xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32f4xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32f4xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED -#include "stm32f4xx_hal_can_legacy.h" -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32f4xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED -#include "stm32f4xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DMA2D_MODULE_ENABLED -#include "stm32f4xx_hal_dma2d.h" -#endif /* HAL_DMA2D_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32f4xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_DCMI_MODULE_ENABLED -#include "stm32f4xx_hal_dcmi.h" -#endif /* HAL_DCMI_MODULE_ENABLED */ - -#ifdef HAL_ETH_MODULE_ENABLED -#include "stm32f4xx_hal_eth.h" -#endif /* HAL_ETH_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32f4xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED -#include "stm32f4xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED -#include "stm32f4xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_PCCARD_MODULE_ENABLED -#include "stm32f4xx_hal_pccard.h" -#endif /* HAL_PCCARD_MODULE_ENABLED */ - -#ifdef HAL_SDRAM_MODULE_ENABLED -#include "stm32f4xx_hal_sdram.h" -#endif /* HAL_SDRAM_MODULE_ENABLED */ - -#ifdef HAL_HASH_MODULE_ENABLED -#include "stm32f4xx_hal_hash.h" -#endif /* HAL_HASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32f4xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32f4xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32f4xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32f4xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_LTDC_MODULE_ENABLED -#include "stm32f4xx_hal_ltdc.h" -#endif /* HAL_LTDC_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32f4xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED -#include "stm32f4xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32f4xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SAI_MODULE_ENABLED -#include "stm32f4xx_hal_sai.h" -#endif /* HAL_SAI_MODULE_ENABLED */ - -#ifdef HAL_SD_MODULE_ENABLED -#include "stm32f4xx_hal_sd.h" -#endif /* HAL_SD_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32f4xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32f4xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32f4xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32f4xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32f4xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32f4xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32f4xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32f4xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_HCD_MODULE_ENABLED -#include "stm32f4xx_hal_hcd.h" -#endif /* HAL_HCD_MODULE_ENABLED */ - -#ifdef HAL_DSI_MODULE_ENABLED -#include "stm32f4xx_hal_dsi.h" -#endif /* HAL_DSI_MODULE_ENABLED */ - -#ifdef HAL_QSPI_MODULE_ENABLED -#include "stm32f4xx_hal_qspi.h" -#endif /* HAL_QSPI_MODULE_ENABLED */ - -#ifdef HAL_CEC_MODULE_ENABLED -#include "stm32f4xx_hal_cec.h" -#endif /* HAL_CEC_MODULE_ENABLED */ - -#ifdef HAL_FMPI2C_MODULE_ENABLED -#include "stm32f4xx_hal_fmpi2c.h" -#endif /* HAL_FMPI2C_MODULE_ENABLED */ - -#ifdef HAL_SPDIFRX_MODULE_ENABLED -#include "stm32f4xx_hal_spdifrx.h" -#endif /* HAL_SPDIFRX_MODULE_ENABLED */ - -#ifdef HAL_DFSDM_MODULE_ENABLED -#include "stm32f4xx_hal_dfsdm.h" -#endif /* HAL_DFSDM_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32f4xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_MMC_MODULE_ENABLED -#include "stm32f4xx_hal_mmc.h" -#endif /* HAL_MMC_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_it.h b/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_it.h deleted file mode 100644 index c6fdc0092..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/include/stm32f4xx_it.h +++ /dev/null @@ -1,70 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F4xx_IT_H -#define __STM32F4xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void MemManage_Handler(void); - void BusFault_Handler(void); - void UsageFault_Handler(void); - void SVC_Handler(void); - void DebugMon_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F4xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/linker/custom_app_script.ld b/examples/projects/STM32F4-discovery/inspector_serialcom/linker/custom_app_script.ld deleted file mode 100644 index 550179ead..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/linker/custom_app_script.ld +++ /dev/null @@ -1,207 +0,0 @@ -/* -****************************************************************************** -** -** @file : LinkerScript.ld -** -** @author : Auto-generated by STM32CubeIDE -** -** @brief : Linker script for STM32F407VGTx Device from STM32F4 series -** 1024Kbytes FLASH -** 64Kbytes CCMRAM -** 128Kbytes RAM -** -** Set heap size, stack size and stack location according -** to application requirements. -** -** Set memory bank area and size if external memory is used -** -** Target : STMicroelectronics STM32 -** -** Distribution: The file is distributed as is, without any warranty -** of any kind. -** -****************************************************************************** -** @attention -** -**

© Copyright (c) 2021 STMicroelectronics. -** All rights reserved.

-** -** This software component is licensed by ST under BSD 3-Clause license, -** the "License"; You may not use this file except in compliance with the -** License. You may obtain a copy of the License at: -** opensource.org/licenses/BSD-3-Clause -** -****************************************************************************** -*/ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K - FLASH (rw) : ORIGIN = 0x08010000, LENGTH = 960K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - *(.RamFunc) /* .RamFunc sections */ - *(.RamFunc*) /* .RamFunc* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - _siccmram = LOADADDR(.ccmram); - - /* CCM-RAM section - * - * IMPORTANT NOTE! - * If initialized variables will be placed in this section, - * the startup code needs to be modified to copy the init-values. - */ - .ccmram : - { - . = ALIGN(4); - _sccmram = .; /* create a global symbol at ccmram start */ - *(.ccmram) - *(.ccmram*) - - . = ALIGN(4); - _eccmram = .; /* create a global symbol at ccmram end */ - } >CCMRAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h b/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h deleted file mode 100644 index bb0b229f0..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/node_config.h +++ /dev/null @@ -1,119 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfert for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * SHARED_MEMORY_SECTOR | FLASH_SECTOR_3 | Start sector of shared memory - * APP_START_ADDRESS | 0x08010000 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_END | End address of application with bootloader - * APP_START_SECTOR | FLASH_SECTOR_4 | Start sector of application with bootloader - * APP_END_SECTOR | FLASH_SECTOR_TOTAL - 1 | last sector of application with bootloader - ******************************************************************************/ - -/******************************************************************************* - * GATE SERIAL COM DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * GATE_BUFF_SIZE | 1024 | Json receive buffer size - * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size - * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size - ******************************************************************************/ - -#define GATE_BUFF_SIZE 1024 -#define PIPE_TX_BUFFER_SIZE 1024 -#define PIPE_RX_BUFFER_SIZE 2048 - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini b/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini deleted file mode 100644 index 6f1a6a041..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,67 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = STM32F4-discovery - -[env:STM32F4-discovery] -platform = ststm32 -board = disco_f407vg -framework = stm32cube -lib_ldf_mode =off -build_unflags = -Os -build_flags = - -include node_config.h - -D GATEFORMAT=TinyJSON - -O1 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -debug_tool = stlink - -[env:STM32F4_discovery_with_bootloader] -lib_ldf_mode =off -board_build.ldscript = linker/custom_app_script.ld -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = disco_f407vg -framework = stm32cube -build_unflags = -Os -build_flags = - -include node_config.h - -O1 - -D PIPEMODE=SERIAL - -D PIPEHAL=NUCLEO-F4 - -DWITH_BOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F4 -lib_deps = - luos_engine@^3.0.0 - robus_network - Inspector - Pipe -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/gpio.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/gpio.c deleted file mode 100644 index 0cf15e1dd..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,66 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c deleted file mode 100644 index 747208dd3..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/main.c +++ /dev/null @@ -1,192 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "inspector.h" -#include "pipe.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Configure the main internal regulator output voltage - */ - __HAL_RCC_PWR_CLK_ENABLE(); - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 8; - RCC_OscInitStruct.PLL.PLLN = 168; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 4; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_hal_msp.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_hal_msp.c deleted file mode 100644 index a182b75ef..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_it.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_it.c deleted file mode 100644 index d6078c2f2..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/stm32f4xx_it.c +++ /dev/null @@ -1,218 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f4xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f4xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M4 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Pre-fetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F4xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f4xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI4_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_4); -} - -void EXTI9_5_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5); -} - -void EXTI15_10_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/STM32F4-discovery/inspector_serialcom/src/system_stm32f4xx.c b/examples/projects/STM32F4-discovery/inspector_serialcom/src/system_stm32f4xx.c deleted file mode 100644 index 80a5d6644..000000000 --- a/examples/projects/STM32F4-discovery/inspector_serialcom/src/system_stm32f4xx.c +++ /dev/null @@ -1,731 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f4xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f4xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ - -#include "stm32f4xx.h" - -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - -/************************* Miscellaneous Configuration ************************/ -/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) -/* #define DATA_IN_ExtSRAM */ -#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx || \ - STM32F412Zx || STM32F412Vx */ - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -/* #define DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || \ - STM32F479xx */ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. \ - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ -/* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = 16000000; -const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the FPU setting, vector table location and External memory - * configuration. - * @param None - * @retval None - */ -void SystemInit(void) -{ -/* FPU settings ------------------------------------------------------------*/ -#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) - SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */ -#endif - -#if defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) - SystemInit_ExtMemCtl(); -#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value - * depends on the application requirements), user has to ensure that HSE_VALUE - * is same as the real frequency of the crystal used. Otherwise, this function - * may have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate(void) -{ - uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00: /* HSI used as system clock source */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04: /* HSE used as system clock source */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08: /* PLL used as system clock source */ - - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N - SYSCLK = PLL_VCO / PLL_P - */ - pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - - if (pllsource != 0) - { - /* HSE used as PLL clock source */ - pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - else - { - /* HSI used as PLL clock source */ - pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - } - - pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> 16) + 1) * 2; - SystemCoreClock = pllvco / pllp; - break; - default: - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK frequency --------------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK frequency */ - SystemCoreClock >>= tmp; -} - -#if defined(DATA_IN_ExtSRAM) && defined(DATA_IN_ExtSDRAM) -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; - - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */ - RCC->AHB1ENR |= 0x000001F8; - - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - FMC_Bank5_6->SDCR[0] = 0x000019E4; - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ - FMC_Bank5_6->SDCMR = 0x00000073; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ - FMC_Bank5_6->SDCMR = 0x00046014; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ - - (void)(tmp); -} -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ -#elif defined(DATA_IN_ExtSRAM) || defined(DATA_IN_ExtSDRAM) -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f4xx.s before jump to main. - * This function configures the external memories (SRAM/SDRAM) - * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmp = 0x00; -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) -#if defined(DATA_IN_ExtSDRAM) - register uint32_t tmpreg = 0, timeout = 0xFFFF; - register __IO uint32_t index; - -#if defined(STM32F446xx) - /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface - clock */ - RCC->AHB1ENR |= 0x0000007D; -#else - /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface - clock */ - RCC->AHB1ENR |= 0x000001F8; -#endif /* STM32F446xx */ - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN); - -#if defined(STM32F446xx) - /* Connect PAx pins to FMC Alternate function */ - GPIOA->AFR[0] |= 0xC0000000; - GPIOA->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOA->MODER |= 0x00008000; - /* Configure PDx pins speed to 50 MHz */ - GPIOA->OSPEEDR |= 0x00008000; - /* Configure PDx pins Output type to push-pull */ - GPIOA->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOA->PUPDR |= 0x00000000; - - /* Connect PCx pins to FMC Alternate function */ - GPIOC->AFR[0] |= 0x00CC0000; - GPIOC->AFR[1] |= 0x00000000; - /* Configure PDx pins in Alternate function mode */ - GPIOC->MODER |= 0x00000A00; - /* Configure PDx pins speed to 50 MHz */ - GPIOC->OSPEEDR |= 0x00000A00; - /* Configure PDx pins Output type to push-pull */ - GPIOC->OTYPER |= 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOC->PUPDR |= 0x00000000; -#endif /* STM32F446xx */ - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x000000CC; - GPIOD->AFR[1] = 0xCC000CCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xA02A000A; - /* Configure PDx pins speed to 50 MHz */ - GPIOD->OSPEEDR = 0xA02A000A; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00000CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA800A; - /* Configure PEx pins speed to 50 MHz */ - GPIOE->OSPEEDR = 0xAAAA800A; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0xCCCCCCCC; - GPIOF->AFR[1] = 0xCCCCCCCC; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA800AAA; - /* Configure PFx pins speed to 50 MHz */ - GPIOF->OSPEEDR = 0xAA800AAA; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0xCCCCCCCC; - GPIOG->AFR[1] = 0xCCCCCCCC; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0xAAAAAAAA; - /* Configure PGx pins speed to 50 MHz */ - GPIOG->OSPEEDR = 0xAAAAAAAA; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) - /* Connect PHx pins to FMC Alternate function */ - GPIOH->AFR[0] = 0x00C0CC00; - GPIOH->AFR[1] = 0xCCCCCCCC; - /* Configure PHx pins in Alternate function mode */ - GPIOH->MODER = 0xAAAA08A0; - /* Configure PHx pins speed to 50 MHz */ - GPIOH->OSPEEDR = 0xAAAA08A0; - /* Configure PHx pins Output type to push-pull */ - GPIOH->OTYPER = 0x00000000; - /* No pull-up, pull-down for PHx pins */ - GPIOH->PUPDR = 0x00000000; - - /* Connect PIx pins to FMC Alternate function */ - GPIOI->AFR[0] = 0xCCCCCCCC; - GPIOI->AFR[1] = 0x00000CC0; - /* Configure PIx pins in Alternate function mode */ - GPIOI->MODER = 0x0028AAAA; - /* Configure PIx pins speed to 50 MHz */ - GPIOI->OSPEEDR = 0x0028AAAA; - /* Configure PIx pins Output type to push-pull */ - GPIOI->OTYPER = 0x00000000; - /* No pull-up, pull-down for PIx pins */ - GPIOI->PUPDR = 0x00000000; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ - - /*-- FMC Configuration -------------------------------------------------------*/ - /* Enable the FMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - - /* Configure and enable SDRAM bank1 */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCR[0] = 0x00001954; -#else - FMC_Bank5_6->SDCR[0] = 0x000019E4; -#endif /* STM32F446xx */ - FMC_Bank5_6->SDTR[0] = 0x01115351; - - /* SDRAM initialization sequence */ - /* Clock enable command */ - FMC_Bank5_6->SDCMR = 0x00000011; - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Delay */ - for (index = 0; index < 1000; index++) - ; - - /* PALL command */ - FMC_Bank5_6->SDCMR = 0x00000012; - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Auto refresh command */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x000000F3; -#else - FMC_Bank5_6->SDCMR = 0x00000073; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* MRD register program */ -#if defined(STM32F446xx) - FMC_Bank5_6->SDCMR = 0x00044014; -#else - FMC_Bank5_6->SDCMR = 0x00046014; -#endif /* STM32F446xx */ - timeout = 0xFFFF; - while ((tmpreg != 0) && (timeout-- > 0)) - { - tmpreg = FMC_Bank5_6->SDSR & 0x00000020; - } - - /* Set refresh count */ - tmpreg = FMC_Bank5_6->SDRTR; -#if defined(STM32F446xx) - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C << 1)); -#else - FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C << 1)); -#endif /* STM32F446xx */ - - /* Disable write protection */ - tmpreg = FMC_Bank5_6->SDCR[0]; - FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF); -#endif /* DATA_IN_ExtSDRAM */ -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */ - -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) \ - || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) - -#if defined(DATA_IN_ExtSRAM) - /*-- GPIOs Configuration -----------------------------------------------------*/ - /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */ - RCC->AHB1ENR |= 0x00000078; - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN); - - /* Connect PDx pins to FMC Alternate function */ - GPIOD->AFR[0] = 0x00CCC0CC; - GPIOD->AFR[1] = 0xCCCCCCCC; - /* Configure PDx pins in Alternate function mode */ - GPIOD->MODER = 0xAAAA0A8A; - /* Configure PDx pins speed to 100 MHz */ - GPIOD->OSPEEDR = 0xFFFF0FCF; - /* Configure PDx pins Output type to push-pull */ - GPIOD->OTYPER = 0x00000000; - /* No pull-up, pull-down for PDx pins */ - GPIOD->PUPDR = 0x00000000; - - /* Connect PEx pins to FMC Alternate function */ - GPIOE->AFR[0] = 0xC00CC0CC; - GPIOE->AFR[1] = 0xCCCCCCCC; - /* Configure PEx pins in Alternate function mode */ - GPIOE->MODER = 0xAAAA828A; - /* Configure PEx pins speed to 100 MHz */ - GPIOE->OSPEEDR = 0xFFFFC3CF; - /* Configure PEx pins Output type to push-pull */ - GPIOE->OTYPER = 0x00000000; - /* No pull-up, pull-down for PEx pins */ - GPIOE->PUPDR = 0x00000000; - - /* Connect PFx pins to FMC Alternate function */ - GPIOF->AFR[0] = 0x00CCCCCC; - GPIOF->AFR[1] = 0xCCCC0000; - /* Configure PFx pins in Alternate function mode */ - GPIOF->MODER = 0xAA000AAA; - /* Configure PFx pins speed to 100 MHz */ - GPIOF->OSPEEDR = 0xFF000FFF; - /* Configure PFx pins Output type to push-pull */ - GPIOF->OTYPER = 0x00000000; - /* No pull-up, pull-down for PFx pins */ - GPIOF->PUPDR = 0x00000000; - - /* Connect PGx pins to FMC Alternate function */ - GPIOG->AFR[0] = 0x00CCCCCC; - GPIOG->AFR[1] = 0x000000C0; - /* Configure PGx pins in Alternate function mode */ - GPIOG->MODER = 0x00085AAA; - /* Configure PGx pins speed to 100 MHz */ - GPIOG->OSPEEDR = 0x000CAFFF; - /* Configure PGx pins Output type to push-pull */ - GPIOG->OTYPER = 0x00000000; - /* No pull-up, pull-down for PGx pins */ - GPIOG->PUPDR = 0x00000000; - - /*-- FMC/FSMC Configuration --------------------------------------------------*/ - /* Enable the FMC/FSMC interface clock */ - RCC->AHB3ENR |= 0x00000001; - -#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001011; - FMC_Bank1->BTCR[3] = 0x00000201; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ -#if defined(STM32F469xx) || defined(STM32F479xx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN); - /* Configure and enable Bank1_SRAM2 */ - FMC_Bank1->BTCR[2] = 0x00001091; - FMC_Bank1->BTCR[3] = 0x00110212; - FMC_Bank1E->BWTR[2] = 0x0fffffff; -#endif /* STM32F469xx || STM32F479xx */ -#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) \ - || defined(STM32F412Zx) || defined(STM32F412Vx) - /* Delay after an RCC peripheral clock enabling */ - tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN); - /* Configure and enable Bank1_SRAM2 */ - FSMC_Bank1->BTCR[2] = 0x00001011; - FSMC_Bank1->BTCR[3] = 0x00000201; - FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF; -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */ - -#endif /* DATA_IN_ExtSRAM */ -#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || \ - STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx */ - (void)(tmp); -} -#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */ -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/Pipe.ioc b/examples/projects/l0/inspector_serialcom/Pipe.ioc deleted file mode 100644 index e33f09ab5..000000000 --- a/examples/projects/l0/inspector_serialcom/Pipe.ioc +++ /dev/null @@ -1,87 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -File.Version=6 -KeepUserPlacement=false -Mcu.Family=STM32F0 -Mcu.IP0=NVIC -Mcu.IP1=RCC -Mcu.IP2=SYS -Mcu.IPNb=3 -Mcu.Name=STM32F072C(8-B)Ux -Mcu.Package=UFQFPN48 -Mcu.Pin0=PA3 -Mcu.Pin1=PB0 -Mcu.Pin2=VP_SYS_VS_Systick -Mcu.PinsNb=3 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F072CBUx -MxCube.Version=6.1.1 -MxDb.Version=DB.6.0.10 -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -PA3.GPIOParameters=PinState,GPIO_Label -PA3.GPIO_Label=LED -PA3.Locked=true -PA3.PinState=GPIO_PIN_SET -PA3.Signal=GPIO_Output -PB0.GPIOParameters=GPIO_PuPd,GPIO_Label -PB0.GPIO_Label=BTN -PB0.GPIO_PuPd=GPIO_PULLDOWN -PB0.Locked=true -PB0.Signal=GPIO_Input -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=3 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=true -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F072CBUx -ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.2 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x200 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain=SW4STM32 -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=Pipe.ioc -ProjectManager.ProjectName=Pipe -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=SW4STM32 -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false -RCC.AHBFreq_Value=48000000 -RCC.APB1Freq_Value=48000000 -RCC.APB1TimFreq_Value=48000000 -RCC.CECFreq_Value=32786.88524590164 -RCC.FCLKCortexFreq_Value=48000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=48000000 -RCC.HSICECFreq_Value=32786.88524590164 -RCC.I2SFreq_Value=48000000 -RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,CECFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSICECFreq_Value,I2SFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USART1Freq_Value,USART2Freq_Value,VCOOutput2Freq_Value -RCC.MCOFreq_Value=48000000 -RCC.PLLCLKFreq_Value=48000000 -RCC.PLLMCOFreq_Value=48000000 -RCC.PLLMUL=RCC_PLL_MUL6 -RCC.SYSCLKFreq_VALUE=48000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=48000000 -RCC.USART1Freq_Value=48000000 -RCC.USART2Freq_Value=48000000 -RCC.VCOOutput2Freq_Value=8000000 -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -board=custom diff --git a/examples/projects/l0/inspector_serialcom/README.md b/examples/projects/l0/inspector_serialcom/README.md deleted file mode 100644 index 960259c87..000000000 --- a/examples/projects/l0/inspector_serialcom/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Luos logo - -![](https://github.com/Luos-io/luos_engine/actions/workflows/build.yml/badge.svg) -[![](https://img.shields.io/github/license/Luos-io/Luos)](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) - -[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io) -[![](http://certified.luos.io)](https://luos.io) -[![PlatformIO Registry](https://badges.registry.platformio.org/packages/luos/library/luos_engine.svg)](https://registry.platformio.org/libraries/luos_engine/luos_engine) - -[![](https://img.shields.io/discord/902486791658041364?label=Discord&logo=discord&style=social)](https://discord.gg/luos) -[![](https://img.shields.io/reddit/subreddit-subscribers/Luos?style=social)](https://www.reddit.com/r/Luos) -[![](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/Luos_io) -[![](https://img.shields.io/badge/LinkedIn-Share-0077B5?style=social&logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io) - - - -# gate_serialcom project example :bulb: -This project demonstrate how to make and use a simple gate_serialcom through Luos. Feel free to use electronics and code example as you want. - -## How to compile the code :computer: - - 1. Download and install [Platformio](https://platformio.org/platformio-ide) - 2. Open this folder into Platformio - 3. Build (Platformio will do the rest) - -## How to open the electronic design :electric_plug: -You can open [a working example electronic design](https://github.com/Luos-io/luos_engine/tree/main/examples/hardware) with Kicad. This design use Luos_components library for more information to install and use it read [our doc](https://www.luos.io/docs/luos-technology). - -## Linked driver -This project is linked to the [gate_serialcom driver](../../Drivers/gate_serialcom). - -## Don't hesitate to read [our documentation](https://www.luos.io/docs/luos-technology), or to post your questions/issues on the [Luos' community](https://discord.gg/luos). :books: - -[![](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.luos.io&logo=Discourse)](https://discord.gg/luos) -[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io) -[![](https://img.shields.io/badge/LinkedIn-Follow%20us-0077B5?style=flat&logo=linkedin)](https://www.linkedin.com/company/luos) diff --git a/examples/projects/l0/inspector_serialcom/boards/l0.json b/examples/projects/l0/inspector_serialcom/boards/l0.json deleted file mode 100644 index 49082858c..000000000 --- a/examples/projects/l0/inspector_serialcom/boards/l0.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "build": { - "cpu": "cortex-m0", - "extra_flags": [ - "-DSTM32F072xB", - "-DUSE_HAL_DRIVER", - "-DUSE_FULL_LL_DRIVER", - "-DLUOSHAL=STM32F0 " - ], - "f_cpu": "48000000L", - "mcu": "stm32f072vbt6", - "product_line": "STM32F072XB" - }, - "connectivity": [ - "can" - ], - "debug": { - "jlink_device": "STM32F072VB", - "openocd_target": "stm32f0x", - "svd_path": "STM32F072x.svd" - }, - "frameworks": [ - "stm32cube" - ], - "name": "L0", - "upload": { - "maximum_ram_size": 16384, - "maximum_size": 131072, - "protocol": "dfu", - "protocols": [ - "stlink", - "dfu" - ] - }, - "url": "https://luos.io", - "vendor": "Luos" -} \ No newline at end of file diff --git a/examples/projects/l0/inspector_serialcom/include/gpio.h b/examples/projects/l0/inspector_serialcom/include/gpio.h deleted file mode 100644 index f57136410..000000000 --- a/examples/projects/l0/inspector_serialcom/include/gpio.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.h - * @brief This file contains all the function prototypes for - * the gpio.c file - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __GPIO_H__ -#define __GPIO_H__ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - - void MX_GPIO_Init(void); - - /* USER CODE BEGIN Prototypes */ - - /* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ GPIO_H__ */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/include/main.h b/examples/projects/l0/inspector_serialcom/include/main.h deleted file mode 100644 index 4a040243f..000000000 --- a/examples/projects/l0/inspector_serialcom/include/main.h +++ /dev/null @@ -1,76 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f0xx_hal.h" - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define LED_Pin GPIO_PIN_3 -#define LED_GPIO_Port GPIOA -#define BTN_Pin GPIO_PIN_0 -#define BTN_GPIO_Port GPIOB - /* USER CODE BEGIN Private defines */ - - /* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/include/stm32_assert.h b/examples/projects/l0/inspector_serialcom/include/stm32_assert.h deleted file mode 100644 index abe0ef3bd..000000000 --- a/examples/projects/l0/inspector_serialcom/include/stm32_assert.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - ****************************************************************************** - * @file stm32_assert.h - * @brief STM32 assert file. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32_ASSERT_H -#define __STM32_ASSERT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Includes ------------------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(char *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32_ASSERT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/include/stm32f0xx_hal_conf.h b/examples/projects/l0/inspector_serialcom/include/stm32f0xx_hal_conf.h deleted file mode 100644 index 570433359..000000000 --- a/examples/projects/l0/inspector_serialcom/include/stm32f0xx_hal_conf.h +++ /dev/null @@ -1,323 +0,0 @@ -/** - ****************************************************************************** - * @file stm32f0xx_hal_conf.h - * @brief HAL configuration file. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2016 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F0xx_HAL_CONF_H -#define __STM32F0xx_HAL_CONF_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ -#define HAL_MODULE_ENABLED - /*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_CAN_MODULE_ENABLED */ -/*#define HAL_CEC_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_TSC_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_LCD_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -/*#define HAL_TIM_MODULE_ENABLED */ -/*#define HAL_UART_MODULE_ENABLED */ -/*#define HAL_USART_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -//#define HAL_I2C_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined(HSE_VALUE) -#define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -/** - * @brief In the following line adjust the External High Speed oscillator (HSE) Startup - * Timeout value - */ -#if !defined(HSE_STARTUP_TIMEOUT) -#define HSE_STARTUP_TIMEOUT ((uint32_t)100) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined(HSI_VALUE) -#define HSI_VALUE ((uint32_t)8000000) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup - * Timeout value - */ -#if !defined(HSI_STARTUP_TIMEOUT) -#define HSI_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSI start up */ -#endif /* HSI_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator for ADC (HSI14) value. - */ -#if !defined(HSI14_VALUE) -#define HSI14_VALUE ((uint32_t)14000000) /*!< Value of the Internal High Speed oscillator for ADC in Hz. \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -#endif /* HSI14_VALUE */ - -/** - * @brief Internal High Speed oscillator for USB (HSI48) value. - */ -#if !defined(HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz. \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined(LSI_VALUE) -#define LSI_VALUE ((uint32_t)40000) -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz \ - The real value may vary depending on the variations \ - in voltage and temperature. */ -/** - * @brief External Low Speed oscillator (LSI) value. - */ -#if !defined(LSE_VALUE) -#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ -#endif /* LSE_VALUE */ - -/** - * @brief Time out for LSE start up value in ms. - */ -#if !defined(LSE_STARTUP_TIMEOUT) -#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0) /*!< tick interrupt priority (lowest by default) */ - /* Warning: Must be set to higher priority for HAL_Delay() */ - /* and HAL_GetTick() usage under interrupt context */ -#define USE_RTOS 0 -#define PREFETCH_ENABLE 1 -#define INSTRUCTION_CACHE_ENABLE 0 -#define DATA_CACHE_ENABLE 0 -#define USE_SPI_CRC 0U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ -#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_TSC_REGISTER_CALLBACKS 0U /* TSC register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ - - /* ########################## Assert Selection ############################## */ - /** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ - /* #define USE_FULL_ASSERT 1U */ - - /* Includes ------------------------------------------------------------------*/ - /** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED -#include "stm32f0xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED -#include "stm32f0xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED -#include "stm32f0xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED -#include "stm32f0xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED -#include "stm32f0xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED -#include "stm32f0xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED -#include "stm32f0xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CEC_MODULE_ENABLED -#include "stm32f0xx_hal_cec.h" -#endif /* HAL_CEC_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED -#include "stm32f0xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED -#include "stm32f0xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED -#include "stm32f0xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED -#include "stm32f0xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED -#include "stm32f0xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED -#include "stm32f0xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED -#include "stm32f0xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED -#include "stm32f0xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED -#include "stm32f0xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED -#include "stm32f0xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED -#include "stm32f0xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED -#include "stm32f0xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED -#include "stm32f0xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED -#include "stm32f0xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED -#include "stm32f0xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_TSC_MODULE_ENABLED -#include "stm32f0xx_hal_tsc.h" -#endif /* HAL_TSC_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED -#include "stm32f0xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED -#include "stm32f0xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED -#include "stm32f0xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT - /** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ -#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) - /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t *file, uint32_t line); -#else -#define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F0xx_HAL_CONF_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/include/stm32f0xx_it.h b/examples/projects/l0/inspector_serialcom/include/stm32f0xx_it.h deleted file mode 100644 index bdaccb45e..000000000 --- a/examples/projects/l0/inspector_serialcom/include/stm32f0xx_it.h +++ /dev/null @@ -1,66 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f0xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F0xx_IT_H -#define __STM32F0xx_IT_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - /* Private includes ----------------------------------------------------------*/ - /* USER CODE BEGIN Includes */ - - /* USER CODE END Includes */ - - /* Exported types ------------------------------------------------------------*/ - /* USER CODE BEGIN ET */ - - /* USER CODE END ET */ - - /* Exported constants --------------------------------------------------------*/ - /* USER CODE BEGIN EC */ - - /* USER CODE END EC */ - - /* Exported macro ------------------------------------------------------------*/ - /* USER CODE BEGIN EM */ - - /* USER CODE END EM */ - - /* Exported functions prototypes ---------------------------------------------*/ - void NMI_Handler(void); - void HardFault_Handler(void); - void SVC_Handler(void); - void PendSV_Handler(void); - void SysTick_Handler(void); - /* USER CODE BEGIN EFP */ - - /* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F0xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/linker/custom_Luos_bootloader_script.ld b/examples/projects/l0/inspector_serialcom/linker/custom_Luos_bootloader_script.ld deleted file mode 100644 index 117ea9158..000000000 --- a/examples/projects/l0/inspector_serialcom/linker/custom_Luos_bootloader_script.ld +++ /dev/null @@ -1,182 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F072RBTx Device from STM32F0 series - * 128Kbytes FLASH - * 16Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM_RSVD (xrw) : ORIGIN = 0x20000000, LENGTH = 1K - RAM (xrw) : ORIGIN = 0x20000400, LENGTH = 15K - FLASH (rx) : ORIGIN = 0x0800C800, LENGTH = 78K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - .boot_data : - { - *(.rsvd.data) - *(.rsvd.data*) - } > RAM_RSVD - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/l0/inspector_serialcom/node_config.h b/examples/projects/l0/inspector_serialcom/node_config.h deleted file mode 100644 index cbd40e31d..000000000 --- a/examples/projects/l0/inspector_serialcom/node_config.h +++ /dev/null @@ -1,100 +0,0 @@ -/****************************************************************************** - * @file node_config.h - * @brief This file allow you to use standard preprocessor definitions to - * configure your project, Luos and Luos HAL libraries - * - * # Introduction - * This file is for the luos user. You may here configure your project and - * define your custom Luos service and custom Luos command for your product - * - * Luos libraries offer a minimal standard configuration to optimize - * memory usage. In some case you have to modify standard value to fit - * with your need concerning among of data transiting through the network - * or network speed for example - * - * Luos libraries can be use with a lot a MCU family. Luos compagny give you - * a default configuration, for specific MCU family, in robus_hal_config.h. - * This configuration can be modify here to fit with you design by - * preprocessor definitions of MCU Hardware needs - * - * # Usage - * This file should be place a the root folder of your project and include - * where build flag preprocessor definitions are define in your IDE - * -include node_config.h - * - * @author Luos - * @version 0.0.0 - ******************************************************************************/ -#ifndef _NODE_CONFIG_H_ -#define _NODE_CONFIG_H_ - -/******************************************************************************* - * PROJECT DEFINITION - *******************************************************************************/ - -/******************************************************************************* - * LUOS LIBRARY DEFINITION - ******************************************************************************* - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device - * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX - * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device - * NBR_PORT | 2 | PTP Branch number Max 8 - * NBR_RETRY | 10 | Send Retry number in case of NACK or collision - ******************************************************************************/ - -#define MAX_LOCAL_SERVICE_NUMBER 2 -#define MSG_BUFFER_SIZE 2048 -#define MAX_MSG_NB 40 -#define NODETECTION - -/******************************************************************************* - * LUOS HAL LIBRARY DEFINITION -******************************************************************************* - * Define | Description - * :-----------------------|----------------------------------------------- - * MCUFREQ | Put your the MCU frequency (value in Hz) - * TIMERDIV | Timer divider clock (see your clock configuration) - * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU - * USE_TX_IT | define to 1 to not use DMA transfers for Luos Tx - * - * PORT_CLOCK_ENABLE | Enable clock for port - * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ - * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ - * RX_EN | Rx enable for driver RS485 always on Pin/Port - * TX_EN | Tx enable for driver RS485 Pin/Port - * COM_TX | Tx USART Com Pin/Port/Alternate - * COM_RX | Rx USART Com Pin/Port/Alternate - * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler - - * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART - * ROBUS_COM | USART number - * ROBUS_COM_IRQ | USART IRQ number - * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler - - * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA - * ROBUS_DMA | DMA number - * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) - - * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer - * ROBUS_TIMER | Timer number - * ROBUS_TIMER_IRQ | Timer IRQ number - * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler -******************************************************************************/ - -/******************************************************************************* - * FLASH CONFIGURATION FOR APP WITH BOOTLOADER - ******************************************************************************** - * Define | Default Value | Description - * :---------------------|------------------------------------------------------ - * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash - * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag - * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader - * APP_END_ADDRESS | FLASH_BANK1_END=0x0801FFFF | End address of application with bootloader - ******************************************************************************/ - -#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/l0/inspector_serialcom/platformio.ini b/examples/projects/l0/inspector_serialcom/platformio.ini deleted file mode 100644 index 776b3eb22..000000000 --- a/examples/projects/l0/inspector_serialcom/platformio.ini +++ /dev/null @@ -1,45 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html -[platformio] -default_envs = l0 - -[env] -lib_ldf_mode =off -lib_extra_dirs = - $PROJECT_DIR/../../../../tool_services/ - $PROJECT_DIR/../../../../../ - $PROJECT_DIR/../../../../network/ -platform = ststm32 -board = l0 -framework = stm32cube -lib_deps = - luos_engine@^3.0.0 - robus_network - Pipe - Inspector -debug_tool = stlink - -[env:l0] -build_flags = - -include node_config.h - -D PIPEMODE=SERIAL - -D PIPEHAL=l0 - -[env:l0_with_bootloader] -board_build.ldscript = linker/custom_Luos_bootloader_script.ld -build_flags = - -include node_config.h - -D PIPEMODE=SERIAL - -D PIPEHAL=l0 - -DWITH_BOOTLOADER -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/l0/inspector_serialcom/src/gpio.c b/examples/projects/l0/inspector_serialcom/src/gpio.c deleted file mode 100644 index ee8efe088..000000000 --- a/examples/projects/l0/inspector_serialcom/src/gpio.c +++ /dev/null @@ -1,67 +0,0 @@ -/** - ****************************************************************************** - * @file gpio.c - * @brief This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = BTN_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLDOWN; - HAL_GPIO_Init(BTN_GPIO_Port, &GPIO_InitStruct); - -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/src/main.c b/examples/projects/l0/inspector_serialcom/src/main.c deleted file mode 100644 index 5e840ac2a..000000000 --- a/examples/projects/l0/inspector_serialcom/src/main.c +++ /dev/null @@ -1,184 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "gpio.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "luos_engine.h" -#include "robus_network.h" -#include "pipe.h" -#include "inspector.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ - -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - /* USER CODE BEGIN 2 */ - Luos_Init(); - Robus_Init(); - Inspector_Init(); - Pipe_Init(); - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - Luos_Loop(); - Inspector_Loop(); - Pipe_Loop(); - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; - RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK - | RCC_CLOCKTYPE_PCLK1; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) - { - Error_Handler(); - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/src/stm32f0xx_hal_msp.c b/examples/projects/l0/inspector_serialcom/src/stm32f0xx_hal_msp.c deleted file mode 100644 index 93b975e90..000000000 --- a/examples/projects/l0/inspector_serialcom/src/stm32f0xx_hal_msp.c +++ /dev/null @@ -1,84 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : stm32f0xx_hal_msp.c - * Description : This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/src/stm32f0xx_it.c b/examples/projects/l0/inspector_serialcom/src/stm32f0xx_it.c deleted file mode 100644 index cc61c7c17..000000000 --- a/examples/projects/l0/inspector_serialcom/src/stm32f0xx_it.c +++ /dev/null @@ -1,149 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f0xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f0xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M0 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVC_IRQn 0 */ - - /* USER CODE END SVC_IRQn 0 */ - /* USER CODE BEGIN SVC_IRQn 1 */ - - /* USER CODE END SVC_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F0xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f0xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ -void EXTI4_15_IRQHandler(void) -{ - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8); - HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13); -} -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/examples/projects/l0/inspector_serialcom/src/system_stm32f0xx.c b/examples/projects/l0/inspector_serialcom/src/system_stm32f0xx.c deleted file mode 100644 index 410809c2b..000000000 --- a/examples/projects/l0/inspector_serialcom/src/system_stm32f0xx.c +++ /dev/null @@ -1,333 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f0xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M0 Device Peripheral Access Layer System Source File. - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f0xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (8 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f0xx.s" file, to - * configure the system clock before to branch to main program. - * - * 3. This file configures the system clock as follows: - *============================================================================= - * Supported STM32F0xx device - *----------------------------------------------------------------------------- - * System Clock source | HSI - *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 8000000 - *----------------------------------------------------------------------------- - * HCLK(Hz) | 8000000 - *----------------------------------------------------------------------------- - * AHB Prescaler | 1 - *----------------------------------------------------------------------------- - * APB1 Prescaler | 1 - *----------------------------------------------------------------------------- - *============================================================================= - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2016 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f0xx_system - * @{ - */ - -/** @addtogroup STM32F0xx_System_Private_Includes - * @{ - */ - -#include "stm32f0xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Defines - * @{ - */ -#if !defined (HSE_VALUE) - #define HSE_VALUE ((uint32_t)8000000) /*!< Default value of the External oscillator in Hz. - This value can be provided and adapted by the user application. */ -#endif /* HSE_VALUE */ - -#if !defined (HSI_VALUE) - #define HSI_VALUE ((uint32_t)8000000) /*!< Default value of the Internal oscillator in Hz. - This value can be provided and adapted by the user application. */ -#endif /* HSI_VALUE */ - -#if !defined (HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000) /*!< Default value of the HSI48 Internal oscillator in Hz. - This value can be provided and adapted by the user application. */ -#endif /* HSI48_VALUE */ -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Variables - * @{ - */ - /* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock there is no need to - call the 2 first functions listed above, since SystemCoreClock variable is - updated automatically. - */ -uint32_t SystemCoreClock = 8000000; - -const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F0xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * Initialize the default HSI clock source, vector table location and the PLL configuration is reset. - * @param None - * @retval None - */ -void SystemInit(void) -{ - /* Reset the RCC clock configuration to the default reset state ------------*/ - /* Set HSION bit */ - RCC->CR |= (uint32_t)0x00000001U; - -#if defined (STM32F051x8) || defined (STM32F058x8) - /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE and MCOSEL[2:0] bits */ - RCC->CFGR &= (uint32_t)0xF8FFB80CU; -#else - /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */ - RCC->CFGR &= (uint32_t)0x08FFB80CU; -#endif /* STM32F051x8 or STM32F058x8 */ - - /* Reset HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFFFU; - - /* Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFFU; - - /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */ - RCC->CFGR &= (uint32_t)0xFFC0FFFFU; - - /* Reset PREDIV[3:0] bits */ - RCC->CFGR2 &= (uint32_t)0xFFFFFFF0U; - -#if defined (STM32F072xB) || defined (STM32F078xx) - /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFCFE2CU; -#elif defined (STM32F071xB) - /* Reset USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFCEACU; -#elif defined (STM32F091xC) || defined (STM32F098xx) - /* Reset USART3SW[1:0], USART2SW[1:0], USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFF0FEACU; -#elif defined (STM32F030x6) || defined (STM32F030x8) || defined (STM32F031x6) || defined (STM32F038xx) || defined (STM32F030xC) - /* Reset USART1SW[1:0], I2C1SW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFEECU; -#elif defined (STM32F051x8) || defined (STM32F058xx) - /* Reset USART1SW[1:0], I2C1SW, CECSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFEACU; -#elif defined (STM32F042x6) || defined (STM32F048xx) - /* Reset USART1SW[1:0], I2C1SW, CECSW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFE2CU; -#elif defined (STM32F070x6) || defined (STM32F070xB) - /* Reset USART1SW[1:0], I2C1SW, USBSW and ADCSW bits */ - RCC->CFGR3 &= (uint32_t)0xFFFFFE6CU; - /* Set default USB clock to PLLCLK, since there is no HSI48 */ - RCC->CFGR3 |= (uint32_t)0x00000080U; -#else - #warning "No target selected" -#endif - - /* Reset HSI14 bit */ - RCC->CR2 &= (uint32_t)0xFFFFFFFEU; - - /* Disable all interrupts */ - RCC->CIR = 0x00000000U; - -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f0xx_hal.h file (default value - * 8 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f0xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * - * @param None - * @retval None - */ -void SystemCoreClockUpdate (void) -{ - uint32_t tmp = 0, pllmull = 0, pllsource = 0, predivfactor = 0; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case RCC_CFGR_SWS_HSI: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - case RCC_CFGR_SWS_HSE: /* HSE used as system clock */ - SystemCoreClock = HSE_VALUE; - break; - case RCC_CFGR_SWS_PLL: /* PLL used as system clock */ - /* Get PLL clock source and multiplication factor ----------------------*/ - pllmull = RCC->CFGR & RCC_CFGR_PLLMUL; - pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; - pllmull = ( pllmull >> 18) + 2; - predivfactor = (RCC->CFGR2 & RCC_CFGR2_PREDIV) + 1; - - if (pllsource == RCC_CFGR_PLLSRC_HSE_PREDIV) - { - /* HSE used as PLL clock source : SystemCoreClock = HSE/PREDIV * PLLMUL */ - SystemCoreClock = (HSE_VALUE/predivfactor) * pllmull; - } -#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || defined(STM32F098xx) - else if (pllsource == RCC_CFGR_PLLSRC_HSI48_PREDIV) - { - /* HSI48 used as PLL clock source : SystemCoreClock = HSI48/PREDIV * PLLMUL */ - SystemCoreClock = (HSI48_VALUE/predivfactor) * pllmull; - } -#endif /* STM32F042x6 || STM32F048xx || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */ - else - { -#if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F070x6) \ - || defined(STM32F078xx) || defined(STM32F071xB) || defined(STM32F072xB) \ - || defined(STM32F070xB) || defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F030xC) - /* HSI used as PLL clock source : SystemCoreClock = HSI/PREDIV * PLLMUL */ - SystemCoreClock = (HSI_VALUE/predivfactor) * pllmull; -#else - /* HSI used as PLL clock source : SystemCoreClock = HSI/2 * PLLMUL */ - SystemCoreClock = (HSI_VALUE >> 1) * pllmull; -#endif /* STM32F042x6 || STM32F048xx || STM32F070x6 || - STM32F071xB || STM32F072xB || STM32F078xx || STM32F070xB || - STM32F091xC || STM32F098xx || STM32F030xC */ - } - break; - default: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - } - /* Compute HCLK clock frequency ----------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/tool_services/inspector/README.md b/tool_services/inspector/README.md deleted file mode 100644 index 564fbcf79..000000000 --- a/tool_services/inspector/README.md +++ /dev/null @@ -1,29 +0,0 @@ -Luos logo - -[![](https://img.shields.io/github/license/Luos-io/Luos)](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) - - -[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io) -[![](http://certified.luos.io)](https://luos.io) -[![PlatformIO Registry](https://badges.registry.platformio.org/packages/luos/library/Inspector.svg)](https://registry.platformio.org/libraries/luos_engine/Inspector) - - -[![](https://img.shields.io/discord/902486791658041364?label=Discord&logo=discord&style=social)](http://bit.ly/JoinLuosDiscord) -[![](https://img.shields.io/reddit/subreddit-subscribers/Luos?style=social)](https://www.reddit.com/r/Luos) -[![](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Unleash%20electronic%20devices%20as%20microservices%20thanks%20to%20Luos&https://luos.io&via=Luos_io&hashtags=embeddedsystems,electronics,microservices,api) -[![](https://img.shields.io/badge/LinkedIn-Share-0077B5?style=social&logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io) - - -# Inspector app -A Luos service application allowing a computer to inspect a product. - - -## To learn more -This section details the features of Luos technology as an embedded development platform, following these subjects: - -* Let's test through the [Luos get started](https://www.luos.io/tutorials/get-started), to build, flash, run, and control your very first Luos code. -* The [Basics of Luos](https://www.luos.io/docs/luos-technology/basics), explaining the general concepts. -* Definition of [Nodes](https://www.luos.io/docs/luos-technology/node), and the relation between Luos and the physical world. -* Definition of [Packages](https://www.luos.io/docs/luos-technology/package), and how to make a portable and reusable development. -* Definition of [Services](https://www.luos.io/docs/luos-technology/services), how to create and declare features in your product. -* Definition of [Messages](https://www.luos.io/docs/luos-technology/message), when, why, and how to handle them, explaining the more advanced features of Luos. diff --git a/tool_services/inspector/data_manager.c b/tool_services/inspector/data_manager.c deleted file mode 100644 index 97d610cea..000000000 --- a/tool_services/inspector/data_manager.c +++ /dev/null @@ -1,225 +0,0 @@ -/****************************************************************************** - * @file data manager - * @brief data manager for inspector - * @author Luos - ******************************************************************************/ -#include "pipe_link.h" -#include "data_manager.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#define MAX_ASSERT_NUMBER 3 -#define MAX_TOTAL_MSG_SIZE 135 -/******************************************************************************* - * Variables - ******************************************************************************/ -uint8_t inspector_state = STARTED; -// assert messages counter -uint8_t assert_num = 0; -// assert buffer for storing the messages -uint8_t assert_buf[MAX_ASSERT_NUMBER][MAX_TOTAL_MSG_SIZE]; -// table with all the complete sizes of the assert messages -uint8_t assert_buf_size[MAX_ASSERT_NUMBER] = {0}; -/******************************************************************************* - * Function - ******************************************************************************/ -/****************************************************************************** - * @brief function to send the full routing table - * @param service pointer - * @return None - ******************************************************************************/ -void DataManager_SendRoutingTB(service_t *service) -{ - search_result_t result; - uint8_t data[MAX_RTB_ENTRY * sizeof(routing_table_t)] = {0}; - - RTFilter_Service(RTFilter_Reset(&result), service); - // store the address of the RoutingTB - routing_table_t *routing_table = RoutingTB_Get(); - msg_t msg; - msg.header.config = BASE_PROTOCOL; - msg.header.target = DEFAULTID; - msg.header.target_mode = SERVICEID; - msg.header.source = result.result_table[0]->id; - msg.header.cmd = RTB; - msg.header.size = RoutingTB_GetLastEntry() * sizeof(routing_table_t); - - memcpy(data, msg.stream, sizeof(header_t)); - memcpy(&data[sizeof(header_t)], routing_table, msg.header.size); - - PipeLink_Send(service, data, msg.header.size + sizeof(header_t)); -} -/****************************************************************************** - * @brief extract the command value for the pipe messages - * @param service pointer - * @return None - ******************************************************************************/ -uint8_t DataManager_ExtractCommand(msg_t *msg) -{ - return msg->data[4]; -} -/****************************************************************************** - * @brief function to pull the external messages from the pipe - * @param service pointer - * @return None - ******************************************************************************/ -void DataManager_GetPipeMsg(service_t *service, msg_t *data_msg) -{ - int *pointer; - msg_t msg; - uint8_t cmd; - // pipe sent the streaming channel - if (data_msg->header.cmd == PARAMETERS) - { - // link the address of the streaming channel L2P - memcpy(&pointer, data_msg->data, sizeof(void *)); - PipeLink_SetDirectPipeSend((void *)pointer); - return; - } - - cmd = DataManager_ExtractCommand(data_msg); - // This message is a command from pipe - switch (cmd) - { - case ASK_DETECTION: - Luos_Detect(service); - break; - case RTB: - // first message for the inspector - // send the routing table using pipe - DataManager_SendRoutingTB(service); - break; - case CONTROL: - // if we receive a CONTROL we should desactivate or activate the filtering - if (data_msg->data[7] == true) - { - // check if data is true so that the inspector needs to start - // Luos_SetFilterState(false, service); - inspector_state = STARTED; - } - else - { - // if we receive a false we should reactivate the filtering - inspector stopped - // Luos_SetFilterState(true, service); - inspector_state = STOPPED; - } - break; - case LUOS_STATISTICS: - // extract service that we want the stats - msg.header.target = (data_msg->data[8] << 8) + data_msg->data[7]; - msg.header.target_mode = SERVICEID; - msg.header.cmd = LUOS_STATISTICS; - msg.header.size = 0; - Luos_SendMsg(service, &msg); - break; - case LUOS_REVISION: - // extract service that we want the luos revision - msg.header.target = (data_msg->data[8] << 8) + data_msg->data[7]; - msg.header.target_mode = SERVICEID; - msg.header.cmd = LUOS_REVISION; - msg.header.size = 0; - Luos_SendMsg(service, &msg); - break; - case REVISION: - // extract service that we want the firmware revision - msg.header.target = (data_msg->data[8] << 8) + data_msg->data[7]; - msg.header.target_mode = SERVICEID; - msg.header.cmd = REVISION; - msg.header.size = 0; - Luos_SendMsg(service, &msg); - break; - case ASSERT: - if (((data_msg->data[6] << 8) + data_msg->data[5]) == 0) - { - for (uint8_t i = 0; i < assert_num; i++) - { - // send all the existing assert messages - PipeLink_Send(service, &assert_buf[i][0], assert_buf_size[i]); - } - assert_num = 0; - } - // empty the assert messages buffer by turning the counter to 0 - break; - default: - break; - } -} -/****************************************************************************** - * @brief function to pull the messages from services - * @param service pointer - * @return None - ******************************************************************************/ -void DataManager_GetServiceMsg(service_t *service) -{ - // loop into services. - msg_t data_msg; - search_result_t result; - uint8_t i = 0; - - RTFilter_Reset(&result); - while (i < result.result_nbr) - { - // pull available messages - if (Luos_ReadFromService(service, result.result_table[i]->id, &data_msg) == SUCCEED) - { - // drop the messages that are destined to pipe - if (data_msg.header.target == PipeLink_GetId()) - { - i++; - continue; - } - // Check if this is a message from pipe - if (data_msg.header.source == PipeLink_GetId()) - { - // treat message from pipe - DataManager_GetPipeMsg(service, &data_msg); - i++; - continue; - } - // check if this is an assert - if ((data_msg.header.cmd == ASSERT) && (data_msg.header.size > 0)) - { - if (assert_num >= MAX_ASSERT_NUMBER) - { - // if we reached the maximum number of asserts delete the older and keep the newer - for (uint8_t j = 1; j < MAX_ASSERT_NUMBER; j++) - { - memcpy(&assert_buf[j - 1][0], &assert_buf[j][0], assert_buf_size[j]); - assert_buf_size[j - 1] = assert_buf_size[j]; - } - assert_num--; - } - // save the assert message to the assert messages buffer - memcpy(&assert_buf[assert_num][0], data_msg.stream, sizeof(header_t) + data_msg.header.size); - // store the size of this message - assert_buf_size[assert_num] = sizeof(header_t) + data_msg.header.size; - assert_num++; - i++; - continue; - } - if (data_msg.header.cmd == END_DETECTION) - { - PipeLink_Find(service); - i++; - continue; - } - if (data_msg.header.cmd == ASK_DETECTION) - { - i++; - continue; - } - // send any other message to pipe - PipeLink_Send(service, data_msg.stream, (sizeof(uint8_t) * data_msg.header.size) + sizeof(header_t)); - } - i++; - } -} -/****************************************************************************** - * @brief get if the inspector is started or stopped - * @param service pointer - * @return None - ******************************************************************************/ -uint8_t DataManager_GetInspectorState(void) -{ - return inspector_state; -} diff --git a/tool_services/inspector/data_manager.h b/tool_services/inspector/data_manager.h deleted file mode 100644 index f4ccb063c..000000000 --- a/tool_services/inspector/data_manager.h +++ /dev/null @@ -1,25 +0,0 @@ -/****************************************************************************** - * @file data manager - * @brief data manager for inspector - * @author Luos - ******************************************************************************/ -#include "inspector.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -typedef enum -{ - STOPPED, - STARTED -} insp_state_t; -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ -void DataManager_GetPipeMsg(service_t *service, msg_t *data_msg); -uint8_t DataManager_GetInspectorState(void); -void DataManager_SendRoutingTB(service_t *service); -void DataManager_GetServiceMsg(service_t *service); \ No newline at end of file diff --git a/tool_services/inspector/inspector.c b/tool_services/inspector/inspector.c deleted file mode 100644 index 4b5edaff2..000000000 --- a/tool_services/inspector/inspector.c +++ /dev/null @@ -1,61 +0,0 @@ -/****************************************************************************** - * @file gate - * @brief Service gate - * @author Luos - ******************************************************************************/ -#include -#include -#include "inspector.h" -#include "pipe_link.h" -#include "data_manager.h" -#include "luos_list.h" - -/******************************************************************************* - * Definitions - ******************************************************************************/ -/******************************************************************************* - * Variables - ******************************************************************************/ -service_t *inspector; -static uint16_t pipe_id = 0; -/******************************************************************************* - * Function - ******************************************************************************/ -/****************************************************************************** - * @brief init must be call in project init - * @param None - * @return None - ******************************************************************************/ -void Inspector_Init(void) -{ - revision_t revision = {.major = 1, .minor = 0, .build = 0}; - // inspector service creation - inspector = Luos_CreateService(0, INSPECTOR_TYPE, "inspector", revision); -#ifndef NODETECTION - Luos_Detect(inspector); -#endif -} - -/****************************************************************************** - * @brief loop must be call in project loop - * @param None - * @return None - ******************************************************************************/ -void Inspector_Loop(void) -{ - // check if the network is detected - if (Luos_IsDetected()) - { - if (Luos_NbrAvailableMsg() > 0) - { - DataManager_GetServiceMsg(inspector); - } - } - else - { - // if the network is not yet detected reset the pipe id - pipe_id = 0; - // send to Luos a flag in order to filter the messages - // Luos_SetFilterState(true, inspector); - } -} diff --git a/tool_services/inspector/inspector.h b/tool_services/inspector/inspector.h deleted file mode 100644 index 11ee3ca60..000000000 --- a/tool_services/inspector/inspector.h +++ /dev/null @@ -1,22 +0,0 @@ -/****************************************************************************** - * @file inspector - * @brief Service inspector - * @author Luos - ******************************************************************************/ -#ifndef INSPECTOR_H -#define INSPECTOR_H - -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ -void Inspector_Init(void); -void Inspector_Loop(void); -#endif /* INSPECTOR_H */ diff --git a/tool_services/inspector/library.json b/tool_services/inspector/library.json deleted file mode 100644 index f61744ca9..000000000 --- a/tool_services/inspector/library.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "Inspector", - "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST,cJSON", - "description": "A Luos service application allowing a computer to inspect a product.", - "version": "2.0.0", - "authors": { - "name": "Luos", - "url": "https://luos.io" - }, - "homepage": "https://luos.io", - "licence": "MIT", - "headers": "inspector.h", - "dependencies": { - "luos_engine": "^3.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/Luos-io/luos_engine" - } -} \ No newline at end of file diff --git a/tool_services/inspector/pipe_link.c b/tool_services/inspector/pipe_link.c deleted file mode 100644 index 4e646a900..000000000 --- a/tool_services/inspector/pipe_link.c +++ /dev/null @@ -1,134 +0,0 @@ -/****************************************************************************** - * @file pipe_link - * @brief Manage the communication with a pipe. - * @author Luos - ******************************************************************************/ -#include "pipe_link.h" -#include "streaming.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ -uint16_t pipe_id = 0; -streaming_channel_t *PipeDirectPutSample = NULL; - -/******************************************************************************* - * Function - ******************************************************************************/ - -/****************************************************************************** - * @brief send message to the connected pipe - * @param service pointer, data to send, size of data to send - * @return None - ******************************************************************************/ -void PipeLink_Send(service_t *service, void *data, uint32_t size) -{ - LUOS_ASSERT(pipe_id > 0); - msg_t msg; - msg.header.target = pipe_id; - msg.header.cmd = SET_CMD; - msg.header.target_mode = SERVICEIDACK; - if (PipeDirectPutSample == 0) - { - // We are not using localhost send the entire data trough the Luos network - Luos_SendData(service, &msg, data, size); - } - else - { - msg.header.config = BASE_PROTOCOL; - // We have a localhost pipe - // Copy the data directly into the local streaming channel without passing by Luos. - Streaming_PutSample(PipeDirectPutSample, data, size); - // Send a void set_cmd to strat data transmission on pipe. - msg.header.size = 0; - Luos_SendMsg(service, &msg); - } -} -/****************************************************************************** - * @brief find a pipe and get its id - * @param service pointer - * @return pipe_id - ******************************************************************************/ -uint16_t PipeLink_Find(service_t *service) -{ - search_result_t result; - uint8_t localhost = false; - // search a pipe type in localhost - RTFilter_Node(RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE), RoutingTB_NodeIDFromID(service->id)); - - if (result.result_nbr > 0) - { - // we found a pipe in the same node - localhost = true; - } - else - { - // pipe is not in the same node - RTFilter_Type(RTFilter_Reset(&result), PIPE_TYPE); - } - // keep pipe_id - pipe_id = result.result_table[0]->id; - - if (pipe_id > 0) - { - // We find one, ask it to auto-update at 1000Hz - msg_t msg; - msg.header.target = pipe_id; - msg.header.target_mode = SERVICEIDACK; - time_luos_t time = TimeOD_TimeFrom_s(0.001f); - TimeOD_TimeToMsg(&time, &msg); - msg.header.cmd = UPDATE_PUB; - while (Luos_SendMsg(service, &msg) != SUCCEED) - ; - - if (localhost) - { - // This is a localhost pipe - // Ask for a Streaming channel - msg_t msg; - msg.header.target = pipe_id; - msg.header.target_mode = SERVICEIDACK; - msg.header.cmd = PARAMETERS; - msg.header.size = 0; - while (Luos_SendMsg(service, &msg) != SUCCEED) - ; - } - } - return pipe_id; -} -/****************************************************************************** - * @brief reset the connection of pipe - * @param service pointer, msg received - * @return None - ******************************************************************************/ -void PipeLink_Reset(service_t *service) -{ - LUOS_ASSERT(pipe_id > 0); - msg_t msg; - msg.header.target = pipe_id; - msg.header.cmd = REINIT; - msg.header.target_mode = SERVICEIDACK; - msg.header.size = 0; - Luos_SendMsg(service, &msg); -} -/****************************************************************************** - * @brief set fonction to direct send in buffer if pipe is in localhost - * @param streaming channel of pipe - * @return None - ******************************************************************************/ -void PipeLink_SetDirectPipeSend(void *PipeSend) -{ - PipeDirectPutSample = PipeSend; -} -/****************************************************************************** - * @brief get id from pipe - * @param None - * @return pipe_id - ******************************************************************************/ -uint16_t PipeLink_GetId(void) -{ - return pipe_id; -} diff --git a/tool_services/inspector/pipe_link.h b/tool_services/inspector/pipe_link.h deleted file mode 100644 index 7b13a6e2f..000000000 --- a/tool_services/inspector/pipe_link.h +++ /dev/null @@ -1,27 +0,0 @@ -/****************************************************************************** - * @file pipe_link - * @brief Manage the communication with a pipe. - * @author Luos - ******************************************************************************/ -#ifndef PIPE_LINK_H -#define PIPE_LINK_H - -#include "luos_engine.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ - -/******************************************************************************* - * Variables - ******************************************************************************/ - -/******************************************************************************* - * Function - ******************************************************************************/ -void PipeLink_Send(service_t *service, void *data, uint32_t size); -uint16_t PipeLink_Find(service_t *service); -void PipeLink_Reset(service_t *service); -uint16_t PipeLink_GetId(void); -void PipeLink_SetDirectPipeSend(void *PipeSend); - -#endif /* PIPE_LINK_H */ From 9bac6bfb45f93238fd95279d1d036cfaae92b17c Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 14:59:57 +0200 Subject: [PATCH 119/198] Make a clean BAUDRATE configuration for networks --- .../projects/Arduino/button/platformio.ini | 2 +- examples/projects/ESP32/button/node_config.h | 2 +- .../ESP32/button_arduino/node_config.h | 4 ++-- .../ESP32/gate_serialcom/node_config.h | 6 ++--- .../gate_serialcom_arduino/node_config.h | 6 ++--- .../projects/ESP32/gate_wscom/node_config.h | 4 ++-- .../ESP32/gate_wscom_arduino/node_config.h | 2 +- examples/projects/ESP32/led/node_config.h | 4 ++-- .../NUCLEO-F072RB/barometer/node_config.h | 2 +- .../NUCLEO-L073RZ/bootloader/node_config.h | 4 ++-- .../NUCLEO-L073RZ/button/node_config.h | 4 ++-- .../gate_serialcom/node_config.h | 2 +- .../robus_network/HAL/ATSAMD21/robus_hal.c | 2 +- .../HAL/ATSAMD21_ARDUINO/robus_hal.c | 2 +- .../HAL/ATSAMD21_MBED/robus_hal.c | 2 +- network/robus_network/HAL/ESP32/robus_hal.c | 4 ++-- network/robus_network/HAL/NATIVE/robus_hal.c | 2 +- network/robus_network/HAL/STM32F0/robus_hal.c | 4 ++-- network/robus_network/HAL/STM32F4/robus_hal.c | 4 ++-- network/robus_network/HAL/STM32G4/robus_hal.c | 4 ++-- network/robus_network/HAL/STM32L0/robus_hal.c | 4 ++-- network/robus_network/HAL/STM32L4/robus_hal.c | 4 ++-- network/robus_network/HAL/STUB/robus_hal.c | 2 +- .../robus_network/HAL/template/robus_hal.c | 6 ++--- network/robus_network/robus_config.h | 7 ++++-- .../HAL/ARDUINO/serial_network_hal.cpp | 8 +------ .../HAL/NATIVE/serial_network_hal.c | 12 ++-------- .../HAL/STM32F0/serial_network_hal.c | 9 ++------ .../HAL/STM32F4/serial_network_hal.c | 9 ++------ .../HAL/STM32G431/serial_network_hal.c | 9 ++------ .../HAL/STM32G474/serial_network_hal.c | 9 ++------ .../HAL/STM32L4/serial_network_hal.c | 9 ++------ .../HAL/template/serial_network_hal.c | 9 ++------ network/serial_network/inc/_serial_network.h | 1 + network/serial_network/inc/serial_network.h | 9 +++----- network/serial_network/serial_config.h | 22 +++++++++++++++++++ .../serial_select_hal_script.py | 2 ++ 37 files changed, 89 insertions(+), 108 deletions(-) create mode 100644 network/serial_network/serial_config.h diff --git a/examples/projects/Arduino/button/platformio.ini b/examples/projects/Arduino/button/platformio.ini index 64af7d27f..c3e593e05 100644 --- a/examples/projects/Arduino/button/platformio.ini +++ b/examples/projects/Arduino/button/platformio.ini @@ -35,7 +35,7 @@ build_flags = -O1 -include node_config.h -D LUOSHAL=ARDUINO - -D SERIAL_COM_DEFAULTBAUDRATE=115200 + -D ROBUS_NETWORK_BAUDRATE=115200 lib_deps = luos_engine@^3.0.0 serial_network diff --git a/examples/projects/ESP32/button/node_config.h b/examples/projects/ESP32/button/node_config.h index cb3e1a007..6d0d72f71 100644 --- a/examples/projects/ESP32/button/node_config.h +++ b/examples/projects/ESP32/button/node_config.h @@ -46,7 +46,7 @@ ******************************************************************************/ #define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/button_arduino/node_config.h b/examples/projects/ESP32/button_arduino/node_config.h index cb3e1a007..0f0d5d4a8 100644 --- a/examples/projects/ESP32/button_arduino/node_config.h +++ b/examples/projects/ESP32/button_arduino/node_config.h @@ -45,8 +45,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define MSG_BUFFER_SIZE 1024 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/gate_serialcom/node_config.h b/examples/projects/ESP32/gate_serialcom/node_config.h index 8bdeb7443..1308c84be 100644 --- a/examples/projects/ESP32/gate_serialcom/node_config.h +++ b/examples/projects/ESP32/gate_serialcom/node_config.h @@ -45,9 +45,9 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 -#define PIPE_SERIAL_BAUDRATE 115200 -#define DEFAULTBAUDRATE 500000 +#define MSG_BUFFER_SIZE 1024 +#define PIPE_SERIAL_BAUDRATE 115200 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h index f52aa9d51..c0e0edf11 100644 --- a/examples/projects/ESP32/gate_serialcom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_serialcom_arduino/node_config.h @@ -45,9 +45,9 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 -#define PIPE_SERIAL_BAUDRATE 500000 -#define DEFAULTBAUDRATE 500000 +#define MSG_BUFFER_SIZE 1024 +#define PIPE_SERIAL_BAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/gate_wscom/node_config.h b/examples/projects/ESP32/gate_wscom/node_config.h index a0cc2e465..f199b6ef9 100644 --- a/examples/projects/ESP32/gate_wscom/node_config.h +++ b/examples/projects/ESP32/gate_wscom/node_config.h @@ -45,8 +45,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define MSG_BUFFER_SIZE 1024 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/gate_wscom_arduino/node_config.h b/examples/projects/ESP32/gate_wscom_arduino/node_config.h index 0e035363b..887799b15 100644 --- a/examples/projects/ESP32/gate_wscom_arduino/node_config.h +++ b/examples/projects/ESP32/gate_wscom_arduino/node_config.h @@ -48,7 +48,7 @@ #define MAX_LOCAL_SERVICE_NUMBER 2 #define MAX_MSG_NB 20 #define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/ESP32/led/node_config.h b/examples/projects/ESP32/led/node_config.h index cb3e1a007..0f0d5d4a8 100644 --- a/examples/projects/ESP32/led/node_config.h +++ b/examples/projects/ESP32/led/node_config.h @@ -45,8 +45,8 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 -#define DEFAULTBAUDRATE 500000 +#define MSG_BUFFER_SIZE 1024 +#define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F072RB/barometer/node_config.h b/examples/projects/NUCLEO-F072RB/barometer/node_config.h index bb12fbb4d..e5a271083 100644 --- a/examples/projects/NUCLEO-F072RB/barometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/barometer/node_config.h @@ -91,6 +91,6 @@ * INIT_TIME | 150 | Wait init time before first detection * ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 #endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index e76188fac..f8c9f6ab0 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -37,7 +37,7 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s + * ROBUS_NETWORK_BAUDRATE | 1000000 | Robus Network Baudrate b/s * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX @@ -47,7 +47,7 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index 3f899fc25..4de9ad22e 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -37,7 +37,7 @@ ******************************************************************************* * Define | Default Value | Description * :---------------------|------------------------------------------------------ - * DEFAULTBAUDRATE | 1000000 | Robus Network Baudrate b/s + * ROBUS_NETWORK_BAUDRATE | 1000000 | Robus Network Baudrate b/s * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX @@ -47,7 +47,7 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 5 diff --git a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h index f6624b543..328eb57b5 100644 --- a/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/gate_serialcom/node_config.h @@ -46,7 +46,7 @@ * NBR_PORT | 2 | PTP Branch number Max 8 * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define DEFAULTBAUDRATE 500000 +#define ROBUS_NETWORK_BAUDRATE 500000 #define MAX_LOCAL_SERVICE_NUMBER 2 #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 40 diff --git a/network/robus_network/HAL/ATSAMD21/robus_hal.c b/network/robus_network/HAL/ATSAMD21/robus_hal.c index d83631384..ef9cd21f4 100644 --- a/network/robus_network/HAL/ATSAMD21/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21/robus_hal.c @@ -65,7 +65,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c index ec5944d38..2cae033b6 100644 --- a/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_ARDUINO/robus_hal.c @@ -69,7 +69,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c index 016a79224..f629f9edc 100644 --- a/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c +++ b/network/robus_network/HAL/ATSAMD21_MBED/robus_hal.c @@ -66,7 +66,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/ESP32/robus_hal.c b/network/robus_network/HAL/ESP32/robus_hal.c index 39689fb07..9dde9711f 100644 --- a/network/robus_network/HAL/ESP32/robus_hal.c +++ b/network/robus_network/HAL/ESP32/robus_hal.c @@ -42,7 +42,7 @@ /******************************************************************************* * Variables ******************************************************************************/ -uint32_t Timer_Prescaler = (uint32_t)(MCUFREQ / DEFAULTBAUDRATE); //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (uint32_t)(MCUFREQ / ROBUS_NETWORK_BAUDRATE); //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -103,7 +103,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); // Reference the IRQ manafement function of Robus Phy_SetIrqStateFunciton(RobusHAL_SetIrqState); diff --git a/network/robus_network/HAL/NATIVE/robus_hal.c b/network/robus_network/HAL/NATIVE/robus_hal.c index 096981441..7a41bd915 100644 --- a/network/robus_network/HAL/NATIVE/robus_hal.c +++ b/network/robus_network/HAL/NATIVE/robus_hal.c @@ -103,7 +103,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STM32F0/robus_hal.c b/network/robus_network/HAL/STM32F0/robus_hal.c index 5369c211b..61be2e095 100644 --- a/network/robus_network/HAL/STM32F0/robus_hal.c +++ b/network/robus_network/HAL/STM32F0/robus_hal.c @@ -34,7 +34,7 @@ CRC_HandleTypeDef hcrc; #endif GPIO_InitTypeDef GPIO_InitStruct = {0}; -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -71,7 +71,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STM32F4/robus_hal.c b/network/robus_network/HAL/STM32F4/robus_hal.c index a8bd26306..2846c5671 100644 --- a/network/robus_network/HAL/STM32F4/robus_hal.c +++ b/network/robus_network/HAL/STM32F4/robus_hal.c @@ -34,7 +34,7 @@ CRC_HandleTypeDef hcrc; #endif GPIO_InitTypeDef GPIO_InitStruct = {0}; -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -72,7 +72,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STM32G4/robus_hal.c b/network/robus_network/HAL/STM32G4/robus_hal.c index 75d22fd84..448dc0287 100644 --- a/network/robus_network/HAL/STM32G4/robus_hal.c +++ b/network/robus_network/HAL/STM32G4/robus_hal.c @@ -35,7 +35,7 @@ CRC_HandleTypeDef hcrc; #endif GPIO_InitTypeDef GPIO_InitStruct = {0}; -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -73,7 +73,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STM32L0/robus_hal.c b/network/robus_network/HAL/STM32L0/robus_hal.c index c08b6d6e9..f03c2bcf7 100644 --- a/network/robus_network/HAL/STM32L0/robus_hal.c +++ b/network/robus_network/HAL/STM32L0/robus_hal.c @@ -34,7 +34,7 @@ CRC_HandleTypeDef hcrc; #endif GPIO_InitTypeDef GPIO_InitStruct = {0}; -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -71,7 +71,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STM32L4/robus_hal.c b/network/robus_network/HAL/STM32L4/robus_hal.c index 12c95af2b..b9c9910e3 100644 --- a/network/robus_network/HAL/STM32L4/robus_hal.c +++ b/network/robus_network/HAL/STM32L4/robus_hal.c @@ -35,7 +35,7 @@ CRC_HandleTypeDef hcrc; #endif GPIO_InitTypeDef GPIO_InitStruct = {0}; -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; //(freq MCU/freq timer)/divider timer clock source typedef struct { @@ -72,7 +72,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/STUB/robus_hal.c b/network/robus_network/HAL/STUB/robus_hal.c index b6cbdd824..cd1389370 100644 --- a/network/robus_network/HAL/STUB/robus_hal.c +++ b/network/robus_network/HAL/STUB/robus_hal.c @@ -59,7 +59,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/robus_network/HAL/template/robus_hal.c b/network/robus_network/HAL/template/robus_hal.c index db006031f..6a0aadb07 100644 --- a/network/robus_network/HAL/template/robus_hal.c +++ b/network/robus_network/HAL/template/robus_hal.c @@ -27,7 +27,7 @@ * Variables ******************************************************************************/ //(freq MCU/freq timer)/divider timer clock source -uint32_t Timer_Prescaler = (MCUFREQ / DEFAULTBAUDRATE) / TIMERDIV; +uint32_t Timer_Prescaler = (MCUFREQ / ROBUS_NETWORK_BAUDRATE) / TIMERDIV; typedef struct { @@ -62,7 +62,7 @@ void RobusHAL_Init(void) RobusHAL_CRCInit(); // Com Initialization - RobusHAL_ComInit(DEFAULTBAUDRATE); + RobusHAL_ComInit(ROBUS_NETWORK_BAUDRATE); } /****************************************************************************** @@ -97,7 +97,7 @@ void RobusHAL_ComInit(uint32_t Baudrate) * datawith : 8 bits * stopbit : 1 bits * parity : none - * Bauderate : DEFAULTBAUDRATE + * Bauderate : ROBUS_NETWORK_BAUDRATE * * Don't forget to : * enable clock for USART diff --git a/network/robus_network/robus_config.h b/network/robus_network/robus_config.h index b4e0a1003..1d76971ad 100644 --- a/network/robus_network/robus_config.h +++ b/network/robus_network/robus_config.h @@ -13,8 +13,11 @@ #define TIMEOUT_VAL 2 -#ifndef DEFAULTBAUDRATE - #define DEFAULTBAUDRATE 1000000 +#ifdef DEFAULTBAUDRATE + #error 'DEFAULTBAUDRATE' configuration is deprecated and have been replaced by ROBUS_NETWORK_BAUDRATE. +#endif +#ifndef ROBUS_NETWORK_BAUDRATE + #define ROBUS_NETWORK_BAUDRATE 1000000 #endif #ifndef NBR_RETRY diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp index cc73d2507..fce11b2a1 100644 --- a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp @@ -15,12 +15,6 @@ extern "C" #ifdef __cplusplus } #endif -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif /******************************************************************************* * Function @@ -33,7 +27,7 @@ extern "C" * ****************************************************************************/ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) { - Serial.begin(SERIAL_COM_DEFAULTBAUDRATE); + Serial.begin(SERIAL_NETWORK_BAUDRATE); } /****************************************************************************** diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index 821b55e56..106417977 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -22,14 +22,6 @@ #include #endif -/******************************************************************************* - * Definitions - ******************************************************************************/ - -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif - /******************************************************************************* * Variables ******************************************************************************/ @@ -193,7 +185,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) memcpy(portname, SERIAL_PORT, strlen(SERIAL_PORT)); #endif stripStr(portname); - printf("Connection on serial port %s at %d baud\n", portname, SERIAL_COM_DEFAULTBAUDRATE); + printf("Connection on serial port %s at %d baud\n", portname, SERIAL_NETWORK_BAUDRATE); // Open the serial port #ifdef _WIN32 @@ -271,7 +263,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) // Bypass baudrate speed limitations of termios by using ioctl #define IOSSIOSPEED 0x80045402 - speed_t speed = SERIAL_COM_DEFAULTBAUDRATE; + speed_t speed = SERIAL_NETWORK_BAUDRATE; if (ioctl(serial_port, IOSSIOSPEED, &speed) < 0) { printf("Error setting baudrate attributes\n"); diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.c b/network/serial_network/HAL/STM32F0/serial_network_hal.c index f0b721fe8..2d6f0832d 100644 --- a/network/serial_network/HAL/STM32F0/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.c @@ -14,12 +14,7 @@ #include "stm32f0xx_ll_dma.h" #include "stm32f0xx_ll_system.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -73,7 +68,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LL_USART_InitTypeDef USART_InitStruct; // Initialise USART3 LL_USART_Disable(SERIAL_COM); - USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.BaudRate = SERIAL_NETWORK_BAUDRATE; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; USART_InitStruct.Parity = LL_USART_PARITY_NONE; diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.c b/network/serial_network/HAL/STM32F4/serial_network_hal.c index 52dcd9ec6..287710208 100644 --- a/network/serial_network/HAL/STM32F4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.c @@ -15,12 +15,7 @@ #include "stm32f4xx_ll_system.h" #include "stm32f4xx_hal.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -74,7 +69,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LL_USART_InitTypeDef USART_InitStruct; // Initialise USART3 LL_USART_Disable(SERIAL_COM); - USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.BaudRate = SERIAL_NETWORK_BAUDRATE; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; USART_InitStruct.Parity = LL_USART_PARITY_NONE; diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.c b/network/serial_network/HAL/STM32G431/serial_network_hal.c index 5ef7ad973..f296216d4 100644 --- a/network/serial_network/HAL/STM32G431/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.c @@ -16,12 +16,7 @@ #include "stm32g4xx_ll_system.h" #include "stm32g4xx_hal.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -76,7 +71,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LL_USART_InitTypeDef USART_InitStruct; // Initialise USART3 LL_USART_Disable(SERIAL_COM); - USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.BaudRate = SERIAL_NETWORK_BAUDRATE; USART_InitStruct.PrescalerValue = LL_USART_PRESCALER_DIV1; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.c b/network/serial_network/HAL/STM32G474/serial_network_hal.c index 74d4863da..2415e8111 100644 --- a/network/serial_network/HAL/STM32G474/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.c @@ -16,12 +16,7 @@ #include "stm32g4xx_ll_system.h" #include "stm32g4xx_hal.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -76,7 +71,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LL_LPUART_InitTypeDef LPUART_InitStruct; // Initialise USART3 LL_LPUART_Disable(SERIAL_COM); - LPUART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + LPUART_InitStruct.BaudRate = SERIAL_NETWORK_BAUDRATE; LPUART_InitStruct.PrescalerValue = LL_LPUART_PRESCALER_DIV1; LPUART_InitStruct.DataWidth = LL_LPUART_DATAWIDTH_8B; LPUART_InitStruct.StopBits = LL_LPUART_STOPBITS_1; diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.c b/network/serial_network/HAL/STM32L4/serial_network_hal.c index b496ca016..f03f0c990 100644 --- a/network/serial_network/HAL/STM32L4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.c @@ -15,12 +15,7 @@ #include "stm32l4xx_ll_system.h" #include "stm32l4xx_hal.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -74,7 +69,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) LL_USART_InitTypeDef USART_InitStruct; // Initialise USART3 LL_USART_Disable(SERIAL_COM); - USART_InitStruct.BaudRate = SERIAL_COM_DEFAULTBAUDRATE; + USART_InitStruct.BaudRate = SERIAL_NETWORK_BAUDRATE; USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B; USART_InitStruct.StopBits = LL_USART_STOPBITS_1; USART_InitStruct.Parity = LL_USART_PARITY_NONE; diff --git a/network/serial_network/HAL/template/serial_network_hal.c b/network/serial_network/HAL/template/serial_network_hal.c index 7997b0214..52ec051e7 100644 --- a/network/serial_network/HAL/template/serial_network_hal.c +++ b/network/serial_network/HAL/template/serial_network_hal.c @@ -9,12 +9,7 @@ #include "_serial_network.h" // TODO: Include the needed files -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_COM_DEFAULTBAUDRATE - #define SERIAL_COM_DEFAULTBAUDRATE 1000000 -#endif + /******************************************************************************* * Variables @@ -35,7 +30,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) { rx_buffer_size = buffer_size; // Init the serial peripheral - // TODO: Init the used usart peripheral using the SERIAL_COM_DEFAULTBAUDRATE baudrate. + // TODO: Init the used usart peripheral using the SERIAL_NETWORK_BAUDRATE baudrate. // TODO: Init TX pin with the given pin and port and set it as tx for the usart. Select the appropriate alternate function. // TODO: Init the Serial TX DMA interface, use it in normal mode and make it raise an IRQ when finished. diff --git a/network/serial_network/inc/_serial_network.h b/network/serial_network/inc/_serial_network.h index e2dde95d7..118b9fbe6 100644 --- a/network/serial_network/inc/_serial_network.h +++ b/network/serial_network/inc/_serial_network.h @@ -9,6 +9,7 @@ #define __SERIAL_H_ #include +#include "serial_config.h" void Serial_TransmissionEnd(void); void Serial_ReceptionAdd(uint8_t *data, uint32_t size); diff --git a/network/serial_network/inc/serial_network.h b/network/serial_network/inc/serial_network.h index c323fd9a1..f916f0c4d 100644 --- a/network/serial_network/inc/serial_network.h +++ b/network/serial_network/inc/serial_network.h @@ -13,12 +13,9 @@ extern "C" #endif #include "luos_phy.h" -/******************************************************************************* - * Definitions - ******************************************************************************/ -#ifndef SERIAL_TX_BUFFER_SIZE - #define SERIAL_RX_BUFFER_SIZE 512 -#endif + /******************************************************************************* + * Definitions + ******************************************************************************/ /******************************************************************************* * Function diff --git a/network/serial_network/serial_config.h b/network/serial_network/serial_config.h new file mode 100644 index 000000000..90a1ace81 --- /dev/null +++ b/network/serial_network/serial_config.h @@ -0,0 +1,22 @@ +/****************************************************************************** + * @file serial_config config + * @brief config of the Luos Serial protocol + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _SERIAL_CONFIG_H_ +#define _SERIAL_CONFIG_H_ + +/******************************************************************************* + * Definitions + ******************************************************************************/ + +#ifndef SERIAL_NETWORK_BAUDRATE + #define SERIAL_NETWORK_BAUDRATE 1000000 +#endif + +#ifndef SERIAL_RX_BUFFER_SIZE + #define SERIAL_RX_BUFFER_SIZE 512 +#endif + +#endif /* _ROBUS_CONFIG_H_ */ diff --git a/network/serial_network/serial_select_hal_script.py b/network/serial_network/serial_select_hal_script.py index efd6ea182..205f44fe8 100644 --- a/network/serial_network/serial_select_hal_script.py +++ b/network/serial_network/serial_select_hal_script.py @@ -28,6 +28,7 @@ env.Append(CPPPATH=[realpath("HAL/" + item[1])]) env.Append(CPPPATH=[realpath("inc/")]) + env.Append(CPPPATH=[realpath(".")]) env.Append( SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) @@ -52,5 +53,6 @@ env.Append(CPPPATH=[realpath("HAL/" + item[1])]) env.Append(CPPPATH=[realpath("inc/")]) + env.Append(CPPPATH=[realpath(".")]) env.Append( SRC_FILTER=["+<*.c>, +<../HAL/%s/*.c>, ++<../HAL/%s/*.cpp>" % (item[1], item[1])]) From 8d2b30e5bda714f6659266828a7f6f21b2b09909 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 4 Aug 2023 17:13:11 +0200 Subject: [PATCH 120/198] Improve native timestamping precision --- engine/HAL/NATIVE/luos_hal.c | 3 ++- engine/core/inc/luos_engine.h | 2 +- engine/core/src/timestamp.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/HAL/NATIVE/luos_hal.c b/engine/HAL/NATIVE/luos_hal.c index d4e4f3815..3771e3873 100644 --- a/engine/HAL/NATIVE/luos_hal.c +++ b/engine/HAL/NATIVE/luos_hal.c @@ -101,7 +101,8 @@ uint64_t LuosHAL_GetTimestamp(void) #else clock_gettime(CLOCK_MONOTONIC, &time); #endif - return time.tv_nsec; + volatile uint64_t timestamp = time.tv_nsec + time.tv_sec * 1000000000; + return timestamp; } /****************************************************************************** diff --git a/engine/core/inc/luos_engine.h b/engine/core/inc/luos_engine.h index 771af4739..e9460055c 100644 --- a/engine/core/inc/luos_engine.h +++ b/engine/core/inc/luos_engine.h @@ -62,7 +62,7 @@ extern "C" // *** Timestamping management (in file `timestamp.c`)*** time_luos_t Luos_Timestamp(void); bool Luos_IsMsgTimstamped(const msg_t *msg); - time_luos_t Luos_GetMsgTimestamp(msg_t *msg); + time_luos_t Luos_GetMsgTimestamp(const msg_t *msg); error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t timestamp); // *** Pub/Sub management (in file `pub_sub.c`)*** diff --git a/engine/core/src/timestamp.c b/engine/core/src/timestamp.c index 6407a3d3b..9edd0ca84 100644 --- a/engine/core/src/timestamp.c +++ b/engine/core/src/timestamp.c @@ -79,7 +79,7 @@ _CRITICAL inline bool Luos_IsMsgTimstamped(const msg_t *msg) * @param msg : Message to get the timestamp from * @return time_luos_t ******************************************************************************/ -time_luos_t Luos_GetMsgTimestamp(msg_t *msg) +time_luos_t Luos_GetMsgTimestamp(const msg_t *msg) { LUOS_ASSERT(msg != NULL); time_luos_t timestamp = {0.0f}; From c641f20ca211919a711fec74dfbedc1bbc3dbab9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 11 Aug 2023 11:55:25 +0200 Subject: [PATCH 121/198] Enable multi-phy capabilities --- engine/IO/inc/_luos_phy.h | 7 + engine/IO/inc/filter.h | 5 - engine/IO/inc/struct_phy.h | 11 +- engine/IO/src/filter.c | 157 -------- engine/IO/src/luos_io.c | 56 ++- engine/IO/src/luos_phy.c | 336 ++++++++++++++++-- engine/IO/src/msg_alloc.c | 6 + engine/core/inc/struct_luos.h | 3 + engine/core/src/luos_engine.c | 6 +- engine/core/src/luos_utils.c | 5 +- engine/core/src/routing_table.c | 297 +++++++++++++++- engine/core/src/service.c | 4 +- engine/engine_config.h | 6 + .../Arduino/bldc_simple_foc/node_config.h | 2 +- .../projects/Arduino/button/node_config.h | 2 +- .../Arduino/fingerprint/node_config.h | 2 +- examples/projects/Arduino/lcd/node_config.h | 2 +- examples/projects/Arduino/led/node_config.h | 2 +- .../Arduino/servo_motor/node_config.h | 2 +- .../Arduino/stepper_simple_foc/node_config.h | 2 +- .../NUCLEO-F072RB/button/node_config.h | 2 +- .../NUCLEO-F072RB/dc_motor/node_config.h | 2 +- .../NUCLEO-F072RB/potentiometer/node_config.h | 2 +- .../NUCLEO-F401RE/button/node_config.h | 2 +- .../NUCLEO-F401RE/dc_motor/node_config.h | 2 +- .../projects/NUCLEO-F401RE/led/node_config.h | 2 +- .../NUCLEO-F401RE/potentiometer/node_config.h | 2 +- .../NUCLEO-F410RB/button/node_config.h | 2 +- .../NUCLEO-F410RB/dc_motor/node_config.h | 2 +- .../projects/NUCLEO-F410RB/led/node_config.h | 2 +- .../NUCLEO-F410RB/potentiometer/node_config.h | 2 +- .../NUCLEO-G431KB/button/node_config.h | 2 +- .../NUCLEO-G431KB/dc_motor/node_config.h | 2 +- .../NUCLEO-G431KB/potentiometer/node_config.h | 2 +- .../NUCLEO-L073RZ/button/node_config.h | 2 +- .../NUCLEO-L432KC/button/node_config.h | 2 +- .../NUCLEO-L432KC/dc_motor/node_config.h | 2 +- .../NUCLEO-L432KC/fingerprint/node_config.h | 2 +- .../projects/NUCLEO-L432KC/lcd/node_config.h | 2 +- .../projects/NUCLEO-L432KC/led/node_config.h | 2 +- .../NUCLEO-L432KC/potentiometer/node_config.h | 2 +- .../NUCLEO-L432KC/servo/node_config.h | 2 +- .../SAMD21XPLAINED/button/node_config.h | 2 +- .../STM32F4-discovery/button/node_config.h | 2 +- .../bootloader/node_config.h | 2 +- .../STM32L4S5_discovery/button/node_config.h | 2 +- examples/projects/l0/button/node_config.h | 2 +- examples/projects/l0/button/platformio.ini | 1 + examples/projects/l0/button/src/main.c | 3 + .../projects/l0/button_freertos/node_config.h | 2 +- examples/projects/l0/dc_motor/node_config.h | 2 +- examples/projects/l0/distance/node_config.h | 2 +- .../projects/l0/fingerprint/node_config.h | 2 +- examples/projects/l0/lcd/node_config.h | 2 +- examples/projects/l0/led/node_config.h | 2 +- examples/projects/l0/led_fader/node_config.h | 2 +- .../projects/l0/light_sensor/node_config.h | 2 +- examples/projects/l0/load/node_config.h | 2 +- .../projects/l0/potentiometer/node_config.h | 2 +- .../projects/l0/power_switch/node_config.h | 2 +- examples/projects/l0/stepper/node_config.h | 2 +- examples/projects/native/button/node_config.h | 2 +- examples/projects/native/led/node_config.h | 2 +- .../projects/native/ping_pong/node_config.h | 2 +- test/tests_io/test_filter/main.c | 134 +++---- test/tests_io/test_phy/main.c | 12 +- 66 files changed, 815 insertions(+), 332 deletions(-) diff --git a/engine/IO/inc/_luos_phy.h b/engine/IO/inc/_luos_phy.h index 9e80860c0..71566a0dd 100644 --- a/engine/IO/inc/_luos_phy.h +++ b/engine/IO/inc/_luos_phy.h @@ -19,7 +19,14 @@ void Phy_ResetAll(void); bool Phy_Busy(void); void Phy_Loop(void); luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); +luos_phy_t *Phy_GetPhyFromId(uint8_t phy_id); error_return_t Phy_FindNextNode(void); // Use it to find the next node as a master. phy_job_t *Phy_GetNextJob(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to get the next job to send. +// Filtering initialization +void Phy_FiltersInit(void); +void Phy_AddLocalServices(uint16_t service_id, uint16_t service_number); +bool Phy_FilterType(uint16_t type_id); +void Phy_IndexSet(uint8_t *index, uint16_t id); +void Phy_ResetAllNeeded(void); #endif /* _PRIVATE_LUOS_PHY_H_ */ diff --git a/engine/IO/inc/filter.h b/engine/IO/inc/filter.h index 016faa4e4..7e4cba6f2 100644 --- a/engine/IO/inc/filter.h +++ b/engine/IO/inc/filter.h @@ -24,14 +24,9 @@ ******************************************************************************/ // generic functions -void Filter_IdInit(void); void Filter_TopicInit(void); -void Filter_AddServiceId(uint16_t service_id, uint16_t service_number); void Filter_AddTopic(uint16_t topic_id); void Filter_RmTopic(uint16_t topic_id); -bool Filter_ServiceID(uint16_t service_id); bool Filter_Topic(uint16_t topic_id); -bool Filter_Type(uint16_t type_id); -uint8_t Filter_GetPhyTarget(header_t *header); #endif /* _FILTER_H_ */ diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h index f390b85aa..a11226a72 100644 --- a/engine/IO/inc/struct_phy.h +++ b/engine/IO/inc/struct_phy.h @@ -63,8 +63,11 @@ typedef struct luos_phy_t volatile uint8_t rx_ack : 1; // True if we need to generate an acknoledgement for this message. }; - // RX Private data - phy_target_t rx_phy_filter; // The phy concerned by this message. + // *** RX Private data *** + // Filters + phy_target_t rx_phy_filter; // The phy concerned by this message. Each bit represent a phy. + uint8_t services[MAX_SERVICE_NUMBER / 8 + 1]; // Store the indexation data of the phy. This is allowing to filter message based on service index. + uint8_t nodes[MAX_NODE_NUMBER / 8 + 1]; // Store the indexation data of the phy. This is allowing to filter message based on node index. // *************** TX informations *************** // Jobs are used to send messages. during the message send phy may save a job pointer so we cann't move any job in the job list. @@ -74,10 +77,12 @@ typedef struct luos_phy_t uint16_t oldest_job_index; // Index of the oldest job. uint16_t available_job_index; // Index of the next available job. + // *************** Phy filters *************** + + // *************** Phy callbacks *************** void (*job_cb)(struct luos_phy_t *phy_ptr, phy_job_t *job); // Callback error_return_t (*run_topo)(struct luos_phy_t *phy_ptr, uint8_t *portId); // try to find another node on branches, return success if a node is found and the id of the port were we detect this node. void (*reset_phy)(struct luos_phy_t *phy_ptr); // Reset the phy transmission reception and topology. - } luos_phy_t; typedef struct __attribute__((__packed__)) diff --git a/engine/IO/src/filter.c b/engine/IO/src/filter.c index db34aaf6a..36c55e9b2 100644 --- a/engine/IO/src/filter.c +++ b/engine/IO/src/filter.c @@ -7,7 +7,6 @@ #include "filter.h" #include "luos_utils.h" #include "luos_hal.h" -#include "service.h" #include "node.h" /******************************************************************************* @@ -15,8 +14,6 @@ ******************************************************************************/ typedef struct { - uint8_t IDMask[ID_MASK_SIZE]; - uint16_t IDShiftMask; uint8_t TopicMask[TOPIC_MASK_SIZE]; /*!< multicast target bank. */ } filter_ctx_t; @@ -29,21 +26,6 @@ filter_ctx_t filter_ctx; * Functions ******************************************************************************/ -/****************************************************************************** - * @brief Reset Masks - * @param None - * @return None - ******************************************************************************/ -void Filter_IdInit(void) -{ - // Id mask init - filter_ctx.IDShiftMask = 0; - for (uint16_t i = 0; i < ID_MASK_SIZE; i++) - { - filter_ctx.IDMask[i] = 0; - } -} - void Filter_TopicInit(void) { // Multicast mask init @@ -53,34 +35,6 @@ void Filter_TopicInit(void) } } -/****************************************************************************** - * @brief ID Mask calculation - * @param service_id ID of the first service - * @param service_number Number of the services on the node - * @return None - ******************************************************************************/ -void Filter_AddServiceId(uint16_t service_id, uint16_t service_number) -{ - // 4096 bit address 512 byte possible - // Create a mask of only possibility in the node - //--------------------------->|__________| - // Shift byte byte Mask of bit address - - LUOS_ASSERT((service_id > 0) - && (service_id <= 4096 - MAX_LOCAL_SERVICE_NUMBER) - && (service_number <= MAX_LOCAL_SERVICE_NUMBER)); - Filter_IdInit(); - uint16_t tempo = 0; - filter_ctx.IDShiftMask = (service_id - 1) / 8; // aligned to byte - - // Create a mask of bit corresponding to ID number in the node - for (uint16_t i = 0; i < service_number; i++) - { - tempo = (((service_id - 1) + i) - (8 * filter_ctx.IDShiftMask)); - filter_ctx.IDMask[tempo / 8] |= 1 << ((tempo) % 8); - } -} - /****************************************************************************** * @brief Add a Topic on the Mask * @param topic_id @@ -105,35 +59,6 @@ void Filter_RmTopic(uint16_t topic_id) filter_ctx.TopicMask[(topic_id / 8)] &= ~(1 << (topic_id - ((int)(topic_id / 8)) * 8)); } -/****************************************************************************** - * @brief Parse msg to find a service concerne - * @param header of message - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL bool Filter_ServiceID(uint16_t service_id) -{ - //--------------------------->|__________| - // Shift byte byte Mask of bit address - // In an node, service ID are consecutive - // MaskID is byte field wich have the size of MAX_LOCAL_SERVICE_NUMBER - // Shift depend od ID of first service in Node (shift = NodeID/8) - LUOS_ASSERT(service_id <= 4096); - uint16_t compare = 0; - - if ((service_id > (8 * filter_ctx.IDShiftMask))) // IDMask aligned byte - { - // Calcul ID mask for ID received - compare = ((service_id - 1) - ((8 * filter_ctx.IDShiftMask))); - // Check if compare and internal mask match - if ((filter_ctx.IDMask[compare / 8] & (1 << (compare % 8))) != 0) - { - return true; - } - } - return false; -} - /****************************************************************************** * @brief Parse multicast mask to find if target exists * @param topic_id of message @@ -155,85 +80,3 @@ _CRITICAL bool Filter_Topic(uint16_t topic_id) } return false; } - -/****************************************************************************** - * @brief Parse all services type to find if target exists - * @param type_id of message - * @return bool true if there is one false if not - * We can't do this the same way other are done because identifiers don't have any continuity - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL bool Filter_Type(uint16_t type_id) -{ - LUOS_ASSERT(type_id <= 4096); - // Check all service type - for (int i = 0; i < Service_GetNumber(); i++) - { - if (type_id == Service_GetTable()[i].type) - { - return true; - } - } - return false; -} - -/****************************************************************************** - * @brief Parse msg to find a service concerne - * @param header of message - * @return None - * _CRITICAL function call in IRQ - ******************************************************************************/ -_CRITICAL uint8_t Filter_GetPhyTarget(header_t *header) -{ - // Find if we are concerned by this message. - // check if we need to filter all the messages - - switch (header->target_mode) - { - case SERVICEIDACK: - case SERVICEID: - // Check all service id - if (Filter_ServiceID(header->target)) - { - // This concerns Luos phy only - return 0x01; - } - break; - case TYPE: - - if (Filter_Type(header->target)) - { - // This concerns Luos phy and external phy - return 0x01 | (0x01 << 1); - } - break; - case BROADCAST: - // This concerns Luos phy and external phy - return 0x01 | (0x01 << 1); - break; - case NODEIDACK: - case NODEID: - // If the target is our node and our node have a node_id or if we don't have a node_id and we are waiting for one. - if (((header->target == Node_Get()->node_id) && (header->target != 0)) - || ((header->target == 0) && (Node_WaitId() == true))) - { - // This concerns Luos phy only - return 0x01; - } - break; - case TOPIC: - if (Filter_Topic(header->target)) - { - // This concerns Luos phy and external phy - return 0x01 | (0x01 << 1); - } - break; - default: - // We can be here in case of corrupted message. - // In this case nobody is concerned by this message. - return 0x00; - break; - } - // This concerns external phy only by default - return 0x01 << 1; -} diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index f407b74b5..39860b09b 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -69,7 +69,7 @@ void LuosIO_Reset(luos_phy_t *phy_ptr) void LuosIO_Init(void) { // Init filter - Filter_IdInit(); + Phy_FiltersInit(); Filter_TopicInit(); Stats_Init(); memory_stats_t *memory_stats = Stats_GetMemory(); @@ -233,7 +233,10 @@ int LuosIO_TopologyDetection(service_t *service, connection_t *connection_table) } // Setup local node Node_Get()->node_id = 1; - last_node = 1; + // Add this node id in the Luos phy filter allowing us to receive node messages + memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); + Phy_IndexSet(luos_phy->nodes, 1); + last_node = 1; // Setup sending service id service->id = 1; // Consider this node as ready @@ -344,6 +347,7 @@ static int LuosIO_StartTopologyDetection(service_t *service) // Reinit our node id Node_Get()->node_id = 0; + memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); Node_SetState(LOCAL_DETECTION); detect_state_machine = 0; return 1; @@ -368,6 +372,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) dead_target_t *dead_target = (dead_target_t *)input->data; uint16_t base_id = 0; routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()]; + static luos_phy_t *phy_ptr = NULL; switch (input->header.cmd) { @@ -383,7 +388,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) // Now send the new generated node_id output_msg.header.cmd = NODE_ID; output_msg.header.size = sizeof(uint16_t); - output_msg.header.target = 0; // We target the node_id 0 becanse the node receiving this message don't have a node_id yet. This node need to be the only one to receive it. + output_msg.header.target = 0; // We target the node_id 0 because the node receiving this message don't have a node_id yet. This node need to be the only one to receive it. output_msg.header.target_mode = NODEIDACK; memcpy(output_msg.data, (void *)&last_node, sizeof(uint16_t)); Luos_SendMsg(service, &output_msg); @@ -422,6 +427,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) // We didn't received the start detection message // Reinit our node id Node_Get()->node_id = 0; + memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); // A phy have already been detected, so we can't reset everything // Just reset LuosIO and Phy jobs. LuosIO_Reset(luos_phy); @@ -433,6 +439,9 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) uint16_t node_id; memcpy(&node_id, input->data, sizeof(uint16_t)); Node_Get()->node_id = node_id; + // Add this node id in the Luos phy filter allowing us to receive node messages + memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); + Phy_IndexSet(luos_phy->nodes, node_id); // Now we need to send back the input part of the connection data. port_t *input_port = Phy_GetTopologysource(); input_port->node_id = Node_Get()->node_id; @@ -464,7 +473,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) case 0: // send back a local routing table output_msg.header.cmd = RTB; - output_msg.header.target_mode = SERVICEIDACK; + output_msg.header.target_mode = NODEIDACK; output_msg.header.target = input->header.source; LuosIO_TransmitLocalRoutingTable(0, &output_msg); break; @@ -488,9 +497,46 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) return SUCCEED; break; + case PHY_ID: + // We receive a phy id. We have to save it, because we will need it to save the indexes in the good phy. + base_id = 0; + memcpy(&base_id, input->data, sizeof(uint8_t)); + phy_ptr = Phy_GetPhyFromId((uint8_t)base_id); + // This message have been consumed + return SUCCEED; + break; + + case NODE_INDEXES: + // We are receiving a node index table + LUOS_ASSERT(phy_ptr != NULL); + base_id = Luos_ReceiveData(service, input, (void *)phy_ptr->nodes); + if (base_id > 0) + { + LUOS_ASSERT(base_id <= sizeof(phy_ptr->nodes)); // The MAX_NODE_NUMBER of the detecting node is bigger than the one we have + // We finished to receive the phy indexes + phy_ptr = NULL; + } + // This message have been consumed + return SUCCEED; + break; + + case SERVICE_INDEXES: + // We are receiving a service index table + LUOS_ASSERT(phy_ptr != NULL); + base_id = Luos_ReceiveData(service, input, (void *)phy_ptr->services); + if (base_id > 0) + { + LUOS_ASSERT(base_id <= sizeof(phy_ptr->services)); // The MAX_SERVICE_NUMBER of the detecting node is bigger than the one we have + // We finished to receive the phy indexes + phy_ptr = NULL; + } + // This message have been consumed + return SUCCEED; + break; + case START_DETECTION: // Reset All phy - Phy_ResetAll(); + Phy_ResetAllNeeded(); // This message have been consumed return SUCCEED; break; diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index e90f71e66..86d76afef 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -47,17 +47,16 @@ #include #include "luos_phy.h" #include "_luos_phy.h" -#include "filter.h" #include "msg_alloc.h" #include "luos_hal.h" #include "_timestamp.h" #include "luos_io.h" -// #include "service.h" +#include "service.h" +#include "filter.h" /******************************************************************************* * Definitions ******************************************************************************/ -#define PHY_NB 2 typedef struct __attribute__((__packed__)) { @@ -75,10 +74,11 @@ typedef struct IRQ_STATE phy_irq_states[PHY_NB]; // Store the irq state functions of phys aving one. // ******************** Topology management ******************** - port_t topology_source; // The source port. Where we receive the topological detection signal from. - uint32_t topology_done; // We put bits to 1 when a phy ended the topology detection. - bool topology_running; // We put bits to 1 when a phy is running the topology detection. - bool find_next_node_job; + port_t topology_source; // The source port. Where we receive the topological detection signal from. + uint32_t topology_done; // We put this bits to 1 when a phy ended the topology detection. + bool topology_running; // We put this bits to 1 when a phy is running the topology detection. + bool find_next_node_job; // We put this bits to 1 to indicate that we will need to find another node. + bool resetAllNeed; // We put this bits to 1 to indicate that we will need to reset all the nodes. We need it to avoid to reset all phy at reset message reception, allowing the phy's to send their reset message. // ******************** Job management ******************** // io_jobs are stores from the newest to the oldest. @@ -95,6 +95,10 @@ static void Phy_ManageFailedJob(void); static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job); static int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job); static int Phy_GetPhyId(luos_phy_t *phy_ptr); +// Filtering functions +static bool Phy_IndexFilter(uint8_t *index, uint16_t id); +static bool Phy_Need(luos_phy_t *phy_ptr, header_t *header); +static phy_target_t Phy_ComputeTargets(luos_phy_t *phy_ptr, header_t *header); /******************************************************************************* * Variables @@ -113,7 +117,8 @@ luos_phy_ctx_t phy_ctx; void Phy_Init(void) { Phy_Reset(); - phy_ctx.phy_nb = 1; + phy_ctx.phy_nb = 1; // Only Luos_engine can have the first place in the phy table. To be sure to have it we consider that we have it already, when it will be initialized it will take the first place. If other phy start before they will get the second slots. + // Reset all IRQ pointers memset(phy_ctx.phy_irq_states, 0, sizeof(phy_ctx.phy_irq_states)); } @@ -129,12 +134,17 @@ void Phy_Reset(void) phy_ctx.io_job_nb = 0; memset((void *)phy_ctx.failed_job, 0, sizeof(phy_ctx.failed_job)); phy_ctx.failed_job_nb = 0; - for (uint8_t i = 0; i < phy_ctx.phy_nb; i++) + phy_ctx.resetAllNeed = false; + for (uint8_t i = 0; i < PHY_NB; i++) { + Luos_SetIrqState(false); memset((void *)&phy_ctx.phy[i].job, 0, sizeof(phy_ctx.phy[0].job)); - phy_ctx.phy[i].job_nb = 0; + phy_ctx.phy[i].job_nb = 0; + Luos_SetIrqState(true); phy_ctx.phy[i].oldest_job_index = 0; phy_ctx.phy[i].available_job_index = 0; + memset((void *)&phy_ctx.phy[i].services, 0, sizeof(phy_ctx.phy[0].services)); + memset((void *)&phy_ctx.phy[i].nodes, 0, sizeof(phy_ctx.phy[0].nodes)); } memset((void *)&phy_ctx.topology_source, 0xFFFF, sizeof(phy_ctx.topology_source)); phy_ctx.topology_done = 0; @@ -142,6 +152,11 @@ void Phy_Reset(void) phy_ctx.find_next_node_job = false; } +void Phy_ResetAllNeeded(void) +{ + phy_ctx.resetAllNeed = true; +} + /****************************************************************************** * @brief Reset the phy context and all the phy instances * @param None @@ -174,12 +189,25 @@ bool Phy_Busy(void) ******************************************************************************/ void Phy_Loop(void) { + if (phy_ctx.resetAllNeed == true) + { + if (Phy_TxAllComplete() == SUCCEED) + { + Phy_ResetAll(); + phy_ctx.resetAllNeed = false; + } + else + { + // We don't do anything else, avoiding any other transmission or reception. + return; + } + } // Manage received data allocation - // This is only needed for external phy for now. if (phy_ctx.phy[1].rx_alloc_job) { Phy_alloc(&phy_ctx.phy[1]); } + // Manage failed job Phy_ManageFailedJob(); // Manage complete message received dispatching Phy_Dispatch(); @@ -210,6 +238,7 @@ void Phy_Loop(void) ******************************************************************************/ luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) { + LUOS_ASSERT(phy_ctx.phy_nb < PHY_NB); return Phy_Get(phy_ctx.phy_nb++, job_cb, run_topo, reset_phy); } @@ -265,6 +294,7 @@ _CRITICAL void Phy_TopologyNext(void) { phy_ctx.find_next_node_job = true; } + /****************************************************************************** * @brief Try to find the next node connected a phy port * @return SUCCESS if a node is found, FAILED if not @@ -355,8 +385,18 @@ void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id) // We don't have the node id yet, we will fill it out when we will receive it from the master. // Put a flag to indicate that we are waiting for a node id. Node_WillGetId(); + + // We also know that this phy is liked to the detecting node. + // To enable any communication with it we have to set the nodes and services filter of this phy allowing us to communicate with it. + Phy_IndexSet(phy_ptr->nodes, 0x01); + Phy_IndexSet(phy_ptr->services, 0x01); } +/****************************************************************************** + * @brief A phy port detection is finished + * @param phy_ptr pointer on the phy that have finished its detection + * @return None + ******************************************************************************/ void Phy_TopologyDone(luos_phy_t *phy_ptr) { LUOS_ASSERT(phy_ptr != NULL); @@ -365,7 +405,7 @@ void Phy_TopologyDone(luos_phy_t *phy_ptr) } /****************************************************************************** - * @brief A phy port have been detected + * @brief return the source port that raise the topology detection * @return pointer on the input port ******************************************************************************/ port_t *Phy_GetTopologysource(void) @@ -390,10 +430,22 @@ luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY rese phy_ctx.phy[id].job_cb = job_cb; phy_ctx.phy[id].run_topo = run_topo; phy_ctx.phy[id].reset_phy = reset_phy; + phy_ctx.phy[id].job_nb = 0; // Return the phy pointer return &phy_ctx.phy[id]; } +/****************************************************************************** + * @brief return a local physical layer pointer (only used by LuosIO, this function is private) + * @param id of the phy we want + * @return luos_phy_t pointer on the phy + ******************************************************************************/ +luos_phy_t *Phy_GetPhyFromId(uint8_t phy_id) +{ + LUOS_ASSERT(phy_id <= PHY_NB); + return &phy_ctx.phy[phy_id]; +} + /****************************************************************************** * @brief Compute the size of the message * @param phy_ptr Pointer to the phy concerned by this message @@ -417,17 +469,8 @@ _CRITICAL void Phy_ComputeHeader(luos_phy_t *phy_ptr) { phy_ptr->rx_size += sizeof(time_luos_t); } - - // Compute the phy concerned by this message - phy_ptr->rx_phy_filter = Filter_GetPhyTarget((header_t *)phy_ptr->rx_buffer_base); - // Remove the phy asking to compute the header to avoid to retransmit it, except for Luos because Luos can do localhost. - uint32_t index = Phy_GetPhyId(phy_ptr); - if (index != 0) - { - // remove the phy asking to compute the header, except if it is Luos because Luos can do localhost. - phy_ptr->rx_phy_filter &= ~(0x01 << index); - } - if (phy_ptr->rx_phy_filter != 0) + // Compute if we need to keep this message + if (Phy_Need(phy_ptr, (header_t *)phy_ptr->rx_buffer_base)) { // Someone need to receive this message phy_ptr->rx_keep = true; @@ -444,6 +487,157 @@ _CRITICAL void Phy_ComputeHeader(luos_phy_t *phy_ptr) } } +/****************************************************************************** + * @brief Compute if some of our phy is concerned by this message + * @param phy_ptr Pointer to the phy receiving this message + * @param header Pointer to the header of the message + * @return true if we need to keep this message, false if not + ******************************************************************************/ +bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) +{ + // This function just check if we need to keep this message or not + // To avoid to spend precious computing time, instead of checking all the phy we will only check if this concern only the receiving phy. + // We need to keep this message only if the message target is not only for the phy_ptr, except if it is Luos because Luos can do localhost. + + // If this phy is Luos phy, we need to keep all the messages + if (Phy_GetPhyId(phy_ptr) == 0) + { + return true; + } + // Message is not comming from Luos phy, we need to check if the receiving phy is the only one concerned by this message. + switch (header->target_mode) + { + case BROADCAST: + case TOPIC: + case TYPE: + // This concerns Luos phy and all external phy + return true; + break; + case SERVICEIDACK: + case SERVICEID: + // If the target is not the phy_ptr, we need to keep this message + return !Phy_IndexFilter(phy_ptr->services, header->target); + break; + case NODEIDACK: + case NODEID: + // If the target is not the phy_ptr, we need to keep this message + return !Phy_IndexFilter(phy_ptr->nodes, header->target); + break; + default: + // This message is wrong, trash it. + return false; + break; + } +} + +/****************************************************************************** + * @brief Parse msg to find the targetted phy + * @param header of message + * @return None + ******************************************************************************/ +inline phy_target_t Phy_ComputeTargets(luos_phy_t *phy_ptr, header_t *header) +{ + // Find if we are concerned by this message. + // check if we need to filter all the messages + volatile phy_target_t target = 0x00; + + switch (header->target_mode) + { + case SERVICEIDACK: + case SERVICEID: + // Check all phy service id + for (int i = 0; i < phy_ctx.phy_nb; i++) + { + if (Phy_IndexFilter(phy_ctx.phy[i].services, header->target)) + { + target |= (0x01 << i); + break; + } + } + break; + case NODEIDACK: + case NODEID: + // If the target is our node and our node have a node_id or if we don't have a node_id and we are waiting for one. + if (((header->target == Node_Get()->node_id) && (header->target != 0)) + || ((header->target == 0) && (Node_WaitId() == true))) + { + // This concerns Luos phy only + if ((phy_ctx.topology_running == true) && (header->source != 1)) + { + // We are performing a topology and this message is for us. + // We need to store the node that send us this in our index allowing us to communicate with it later. + Phy_IndexSet(phy_ptr->nodes, header->source); + } + target = 0x01; + } + else + { + if (header->target == 0) + { + // This concerns all phy except Luos + for (int i = 1; i < phy_ctx.phy_nb; i++) + { + target |= (0x01 << i); + } + break; + } + else + { + // Find the concerned phy + for (int i = 1; i < phy_ctx.phy_nb; i++) + { + if (Phy_IndexFilter(phy_ctx.phy[i].nodes, header->target)) + { + target |= (0x01 << i); + break; + } + } + } + } + break; + case TYPE: + // Check if Luos_engine is concerned by this type + target = Phy_FilterType(header->target); + // We also add all the external phy + for (int i = 1; i < phy_ctx.phy_nb; i++) + { + target |= (0x01 << i); + } + break; + case BROADCAST: + // This concerns Luos phy and all external phy + for (int i = 0; i < phy_ctx.phy_nb; i++) + { + target |= (0x01 << i); + } + break; + case TOPIC: + if (Filter_Topic(header->target)) + { + // This concerns Luos + target = 0x01; + } + // We also have to add all the external phy + for (int i = 1; i < phy_ctx.phy_nb; i++) + { + target |= (0x01 << i); + } + break; + default: + // We can be here in case of corrupted message. + // In this case nobody is concerned by this message. + return 0x00; + break; + } + // Remove the phy asking to compute the header to avoid to retransmit it in the line, except for Luos because Luos can do localhost. + uint32_t index = Phy_GetPhyId(phy_ptr); + if (index != 0) + { + target &= ~(0x01 << index); + } + return target; +} + /****************************************************************************** * @brief Consider the message as valid * @param phy_ptr Pointer to the phy concerned by the allocation @@ -553,6 +747,15 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now we can check if we need to store the received data if (phy_ptr->rx_keep) { + // Compute the rx_phy_filter + phy_ptr->rx_phy_filter = Phy_ComputeTargets(phy_ptr, (header_t *)phy_ptr->rx_buffer_base); + if (phy_ptr->rx_phy_filter == 0) + { + // We probably have been reseted in the meantime. Just drop the message. + phy_ptr->rx_alloc_job = false; + return; + } + // We need to store the received data. // Update the informations allowing reception to continue and directly copy the data into the allocated buffer Phy_SetIrqState(false); @@ -897,3 +1100,90 @@ error_return_t Phy_TxAllComplete(void) } return SUCCEED; } + +/******************************************************************************* + * Filtering functions + ******************************************************************************/ + +/****************************************************************************** + * @brief Reset Masks + * @param None + * @return None + ******************************************************************************/ +void Phy_FiltersInit(void) +{ + for (int i = 0; i < PHY_NB; i++) + { + // Service ID init + memset(phy_ctx.phy[i].services, 0, sizeof(phy_ctx.phy[i].services)); + // Node ID init + memset(phy_ctx.phy[i].nodes, 0, sizeof(phy_ctx.phy[i].nodes)); + } +} + +/****************************************************************************** + * @brief luos phy service ID index calculation + * @param service_id ID of the first service + * @param service_number Number of the services on the node + * @return None + ******************************************************************************/ +void Phy_AddLocalServices(uint16_t service_id, uint16_t service_number) +{ + LUOS_ASSERT((service_id > 0) + && (service_id <= 4096 - MAX_LOCAL_SERVICE_NUMBER) + && (service_number <= MAX_LOCAL_SERVICE_NUMBER)); + + // Reset Luos services filter + memset(phy_ctx.phy[0].services, 0, sizeof(phy_ctx.phy[0].services)); + // Create the bit field corresponding to ID number in the phy.services + for (uint16_t i = 0; i < service_number; i++) + { + Phy_IndexSet(phy_ctx.phy[0].services, service_id + i); + } +} + +/****************************************************************************** + * @brief check if the given id value concern this phy index + * @param index Pointer to the index of the node + * @param id id of the service concerned by this message + * @return phy concerned by this message + ******************************************************************************/ +inline bool Phy_IndexFilter(uint8_t *index, uint16_t id) +{ + LUOS_ASSERT((index != NULL) && (id <= 0x0FFF)); + uint8_t bit_index = id - 1; // Because 1 represent bit index 0. + return (index[bit_index / 8] & (1 << (bit_index % 8))); +} + +/****************************************************************************** + * @brief Set a given id value in the index + * @param index Pointer to the index of the node + * @param id id of the service concerned by this message + * @return phy concerned by this message + ******************************************************************************/ +inline void Phy_IndexSet(uint8_t *index, uint16_t id) +{ + LUOS_ASSERT((index != NULL) && (id <= 0x0FFF)); + uint8_t bit_index = id - 1; // Because 1 represent bit index 0. + index[bit_index / 8] |= 1 << (bit_index % 8); +} + +/****************************************************************************** + * @brief Parse all services type to find if target exists + * @param type_id of message + * @return bool true if there is one false if not + * We can't do this the same way others are done because identifiers don't have any continuity + ******************************************************************************/ +inline bool Phy_FilterType(uint16_t type_id) +{ + LUOS_ASSERT(type_id <= 4096); + // Check all service type + for (int i = 0; i < Service_GetNumber(); i++) + { + if (type_id == Service_GetTable()[i].type) + { + return true; + } + } + return false; +} diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 60e1cbf33..72c0661d0 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -281,6 +281,12 @@ _CRITICAL uint8_t *MsgAlloc_Alloc(uint16_t data_size, uint8_t phy_filter) return returned_ptr; } +/****************************************************************************** + * @brief Reference a message + * @param uint8_t *rx_data + * @param phy_target_t phy_filter + * _CRITICAL function call in IRQ + ******************************************************************************/ _CRITICAL void MsgAlloc_Reference(uint8_t *rx_data, uint8_t phy_filter) { LUOS_ASSERT((rx_data < &msg_buffer[MSG_BUFFER_SIZE]) && (rx_data >= &msg_buffer[0]) && (phy_filter != 0)); diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index 4fd734858..ddb5ea08c 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -36,6 +36,9 @@ typedef enum END_DETECTION, // Detect the end of a detection LOCAL_RTB, // Ask(size == 0), generate(size == 2) a local routing_table. RTB, // Receive a routing_table. + PHY_ID, // indicate a phy id. This is used to indicate for witch phy the indexes are. + NODE_INDEXES, // Send the node indexes of a specific phy allowing us to compute the message switching (the route of the messages). + SERVICE_INDEXES, // Send the service indexes of a specific phy allowing us to compute the message switching (the route of the messages). WRITE_ALIAS, // Get and save a new given alias. UPDATE_PUB, // Ask to update a sensor value each time duration to the sender ASK_DETECTION, // Ask Luos to launch a detection diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index c61658836..b38473d13 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -12,7 +12,7 @@ #include "service.h" #include "struct_engine.h" #include "luos_io.h" -#include "luos_phy.h" +#include "_luos_phy.h" #include "stats.h" /******************************************************************************* @@ -524,12 +524,10 @@ void Luos_Detect(service_t *service) if (service->id == 0) { // We don't have any ID yet, let's create one at least for the detector - // Reset filters - Filter_IdInit(); // Set the detection launcher id to 1 service->id = 1; // Update the filter just to accept our detector id - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); } // Send ask detection message diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 31ffd4281..02616780c 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -10,8 +10,7 @@ #include "string.h" #include "luos_hal.h" #include "msg_alloc.h" -#include "filter.h" -#include "luos_phy.h" +#include "_luos_phy.h" /******************************************************************************* * Function @@ -60,7 +59,7 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) Luos_Init(); // completely reinit the allocator MsgAlloc_Init(NULL); - Filter_IdInit(); // Mask filter for service ID + Phy_FiltersInit(); // Mask filter for service ID msg_t msg; msg.header.target_mode = BROADCAST; msg.header.target = BROADCAST_VAL; diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index be3e42636..98ed59d22 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -33,8 +33,12 @@ static uint16_t RoutingTB_BigestNodeID(void); uint16_t RoutingTB_GetServiceIndex(uint16_t id); static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t *connection_table); -static void RoutingTB_Share(service_t *service, uint16_t nb_node); +static bool RoutingTB_Share(service_t *service, uint16_t nb_node); static void RoutingTB_SendEndDetection(service_t *service); +static void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint16_t nb_node, connection_t *connection_table); +static void RoutingTB_SendNodeIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *node_indexes); +static void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index); +static void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *service_indexes); // ************************ routing_table search tools *************************** @@ -234,6 +238,8 @@ static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t detect_state_machine = 2; return 0; } + // First compute the node indexes for this node and send it to it. + RoutingTB_ComputeNodeIndexes(service, last_node_id, nb_node, connection_table); try_nb++; intro_msg.header.cmd = LOCAL_RTB; intro_msg.header.target_mode = NODEIDACK; @@ -313,30 +319,38 @@ static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t } /****************************************************************************** - * @brief Send the complete route table to each node on the network + * @brief Send the complete route table and all indexes to each node on the network * @param service : Service who send * @param nb_node : number of nodes on network * @return None ******************************************************************************/ -static void RoutingTB_Share(service_t *service, uint16_t nb_node) +static bool RoutingTB_Share(service_t *service, uint16_t nb_node) { + static uint8_t detect_state_machine = 0; LUOS_ASSERT(service); // Make sure that the detection is not interrupted if (Node_GetState() == EXTERNAL_DETECTION) { - return; + return true; } + + if (detect_state_machine == 0) + { + // Compute local indexes + RoutingTB_ComputeServiceIndexes(service, 0); + detect_state_machine++; + return false; + } + // send route table to each nodes. Routing tables are commonly usable for each services of a node. msg_t intro_msg; intro_msg.header.cmd = RTB; intro_msg.header.target_mode = NODEIDACK; - for (uint16_t i = 2; i <= nb_node; i++) // don't send to ourself { intro_msg.header.target = i; - + // Check if this node need to get the routing table. uint16_t node_idx; - for (node_idx = i; node_idx < last_routing_table_entry; node_idx++) { if ((routing_table[node_idx].mode == NODE) && (routing_table[node_idx].node_id == i)) @@ -344,11 +358,270 @@ static void RoutingTB_Share(service_t *service, uint16_t nb_node) break; } } + RoutingTB_ComputeServiceIndexes(service, node_idx); if ((routing_table[node_idx].node_info & (1 << 0)) == 0) { Luos_SendData(service, &intro_msg, routing_table, (last_routing_table_entry * sizeof(routing_table_t))); } } + detect_state_machine = 0; + return true; +} + +/****************************************************************************** + * @brief Send the completed node indexes to a specific node + * @param service : Service who send + * @param node_id : node to send indexes + * @param phy_index : phy index in the node concerned by these indexes + * @param node_indexes : node indexes to send + * @return None + ******************************************************************************/ +void RoutingTB_SendNodeIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *node_indexes) +{ + msg_t index_msg; + index_msg.header.target_mode = NODEIDACK; + index_msg.header.target = node_id; + LUOS_ASSERT(phy_index != 0xFF); + uint8_t data[MAX_NODE_NUMBER / 8 + 1]; + + // First we send the phy index allowing the target to know where to store the indexes + index_msg.header.cmd = PHY_ID; + Luos_SendData(service, &index_msg, &phy_index, sizeof(uint8_t)); + // Then we evaluate how many bytes we need to send the node indexes + volatile uint16_t i = 0; + for (i = (MAX_NODE_NUMBER / 8) + 1; i > 0; i--) + { + if (node_indexes[i - 1] != 0) + { + break; + } + } + // Send the node indexes + index_msg.header.cmd = NODE_INDEXES; + memcpy(data, node_indexes, i); + Luos_SendData(service, &index_msg, data, i); +} + +/****************************************************************************** + * @brief Compute indexes of nodes on the network and send it to them + * @param node_id : node id to compute indexes + * @return None + ******************************************************************************/ +void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint16_t nb_node, connection_t *connection_table) +{ + /* + * To get all the nodes indexes of the provided node ID, we have to parse the routing table and use the connection informations to know how to dispatch all the nodes. + * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. + * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it phy 1. + * Then we will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider taht they are accessible trough phy 1. + * We we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + * When we reach the end of the routing table, we have 2 options: + * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. + * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. + */ + uint16_t node_idx; + uint8_t nodes_indexes[MAX_NODE_NUMBER / 8 + 1] = {0}; + int node_phy = -1; + // Start from the provided node index and parse the connection table until the end. + for (node_idx = node_index + 1; node_idx < nb_node; node_idx++) + { + // Check if the connection informations involve our node. + if (connection_table[node_idx].parent.node_id == node_index + 1) + { + // This node consider our node as its parent! + // This means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + } + + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(nodes_indexes, 0, sizeof(nodes_indexes)); + node_phy = connection_table[node_idx].parent.phy_id; + } + LUOS_ASSERT(node_phy != -1); + // Add the node index to the nodes_indexes table. + uint8_t bit_index = node_idx; + nodes_indexes[bit_index / 8] |= 1 << (bit_index % 8); + } + + // We reached the end of the routing table! + // Check if the node index if the root of the routing table. If it is we just have to send the indexes and we are done. + if (node_index == 0) + { + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + } + return; + } + // Compare the current node_phy to the current node index connection informations. + if (node_phy != connection_table[node_index].child.phy_id) + { + if (node_phy != -1) + { + // We were indexing another phy, we can consider it as done and send it. Then we have to start a new for connection_table[node_index].child.phy_id. + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + } + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(nodes_indexes, 0, sizeof(nodes_indexes)); + node_phy = connection_table[node_index].child.phy_id; + } + + // Now we can put all the parent slots in the current indexes table. + for (node_idx = 0; node_idx < node_index; node_idx++) + { + // Add the node index to the nodes_indexes table. + uint8_t bit_index = node_idx; + nodes_indexes[bit_index / 8] |= 1 << (bit_index % 8); + } + + if (node_phy != -1) + { + // Send the last phy indexes. + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + } +} + +/****************************************************************************** + * @brief Send the completed service indexes to a specific node + * @param service : Service who send + * @param node_id : node to send indexes + * @param phy_index : phy index in the node concerned by these indexes + * @param node_indexes : node indexes to send + * @param service_indexes : service indexes to send + * @return None + ******************************************************************************/ +void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *service_indexes) +{ + msg_t index_msg; + index_msg.header.target_mode = NODEIDACK; + index_msg.header.target = node_id; + LUOS_ASSERT(phy_index != 0xFF); + uint8_t data[MAX_SERVICE_NUMBER / 8 + 1]; + + // First we send the phy index allowing the target to know where to store the indexes + index_msg.header.cmd = PHY_ID; + Luos_SendData(service, &index_msg, &phy_index, sizeof(uint8_t)); + // Then we evaluate how many bytes we need to send the node indexes + volatile uint16_t i = 0; + for (i = (MAX_SERVICE_NUMBER / 8) + 1; i > 0; i--) + { + if (service_indexes[i - 1] != 0) + { + break; + } + } + // Send the service indexes + index_msg.header.cmd = SERVICE_INDEXES; + memcpy(data, service_indexes, i); + Luos_SendData(service, &index_msg, data, i); +} + +/****************************************************************************** + * @brief Compute indexes of nodes on the network and send it to them + * @param node_id : node id to compute indexes + * @return None + ******************************************************************************/ +void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) +{ + /* + * To get all the nodes indexes of the provided node ID, we have to parse the routing table and use the connection informations to know how to dispatch all the nodes. + * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. + * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it phy 1. + * Then we will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider taht they are accessible trough phy 1. + * We we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + * When we reach the end of the routing table, we have 2 options: + * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. + * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. + */ + LUOS_ASSERT((node_index < last_routing_table_entry) && (routing_table[node_index].mode == NODE)); + uint16_t node_idx; + uint8_t services_indexes[MAX_SERVICE_NUMBER / 8 + 1] = {0}; + int node_phy = -1; + // Start from the provided node index and parse the routing table until the end. + for (node_idx = node_index + 1; node_idx < last_routing_table_entry; node_idx++) + { + switch (routing_table[node_idx].mode) + { + case NODE: + // This is a node slot, check if the connection informations involve our node. + if (routing_table[node_idx].connection.parent.node_id == routing_table[node_index].node_id) + { + // This node consider our node as its parent! + // This means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + } + + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(services_indexes, 0, sizeof(services_indexes)); + node_phy = routing_table[node_idx].connection.parent.phy_id; + } + LUOS_ASSERT(node_phy != -1); + break; + case SERVICE: + // This is a service slot. + // if a node phy is set, this service is accessible trough this phy, we have to add it to the services_indexes table. + // else this service is a local one (already referenced by Luos_engine phy), we don't care. + if (node_phy != -1) + { + // Add the service index to the services_indexes table. + uint8_t bit_index = routing_table[node_idx].id - 1; // Because 1 represent bit index 0. + services_indexes[bit_index / 8] |= 1 << (bit_index % 8); + } + break; + case CLEAR: + default: + LUOS_ASSERT(0); + break; + } + } + + // We reached the end of the routing table! + // Check if the node index is the root of the routing table. If it is we just have to send the indexes and we are done. + if (node_index == 0) + { + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + } + return; + } + // Compare the current node_phy to the current node index connection informations. + if (node_phy != routing_table[node_index].connection.child.phy_id) + { + if (node_phy != -1) + { + // We were indexing another phy, we can consider it as done and send it. Then we have to start a new one for routing_table[node_index].connection.child.phy_id. + RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + } + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(services_indexes, 0, sizeof(services_indexes)); + node_phy = routing_table[node_index].connection.child.phy_id; + } + + // Now we can put all the parent slots in the current indexes table. + for (node_idx = 0; node_idx < node_index; node_idx++) + { + if (routing_table[node_idx].mode == SERVICE) + { + // Add the service index to the services_indexes table. + uint8_t bit_index = routing_table[node_idx].id - 1; // Because 1 represent bit index 0. + services_indexes[bit_index / 8] |= 1 << (bit_index % 8); + } + } + + if (node_phy != -1) + { + // Send the last phy indexes. + RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + } } /****************************************************************************** @@ -427,8 +700,16 @@ bool RoutingTB_DetectServices(service_t *service) detect_state_machine = 0; return true; } + detect_state_machine++; + case 3: // We have a complete routing table now share it with others. - RoutingTB_Share(service, nb_node); + if (RoutingTB_Share(service, nb_node)) + { + detect_state_machine++; + } + return false; + break; + case 4: // Send a message to indicate the end of the detection RoutingTB_SendEndDetection(service); // Clear statistic of node who start the detction diff --git a/engine/core/src/service.c b/engine/core/src/service.c index 6496d3d35..5bec431e6 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -6,7 +6,7 @@ ******************************************************************************/ #include #include "service.h" -#include "filter.h" +#include "_luos_phy.h" #include "node.h" #include "luos_utils.h" #include "luos_hal.h" @@ -82,7 +82,7 @@ void Service_ResetStatistics(void) void Service_GenerateId(uint16_t base_id) { LUOS_ASSERT(base_id > 0); - Filter_AddServiceId(base_id, service_ctx.number); + Phy_AddLocalServices(base_id, service_ctx.number); if (base_id == 1) { // If base_id is 1, it means that the node is a detector. diff --git a/engine/engine_config.h b/engine/engine_config.h index 3127461e9..483b45ddc 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -30,6 +30,12 @@ #define MAX_NODE_NUMBER 20 // The maximum number of nodes in the complete architecture #endif +#ifndef LOCAL_PHY_NB + #define LOCAL_PHY_NB 1 // The number of phy layer in the node, by default we have only Luos engine + 1 phy layer +#endif + +#define PHY_NB (LOCAL_PHY_NB + 1) // The total number of phy layer in the node including Luos engine + #ifdef MAX_RTB_ENTRY #error 'MAX_RTB_ENTRY' configuration is deprecated and have been replaced by MAX_NODE_NUMBER and MAX_SERVICE_NUMBER. MAX_RTB_ENTRY is now automatically calculated by the engine based on these values. #endif diff --git a/examples/projects/Arduino/bldc_simple_foc/node_config.h b/examples/projects/Arduino/bldc_simple_foc/node_config.h index 1cd23bf71..9d348c1f0 100644 --- a/examples/projects/Arduino/bldc_simple_foc/node_config.h +++ b/examples/projects/Arduino/bldc_simple_foc/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define ARDUINO_PTPA_PIN 19 #define ARDUINO_PTPB_PIN 7 diff --git a/examples/projects/Arduino/button/node_config.h b/examples/projects/Arduino/button/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/Arduino/button/node_config.h +++ b/examples/projects/Arduino/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/Arduino/fingerprint/node_config.h b/examples/projects/Arduino/fingerprint/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/Arduino/fingerprint/node_config.h +++ b/examples/projects/Arduino/fingerprint/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/Arduino/lcd/node_config.h b/examples/projects/Arduino/lcd/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/Arduino/lcd/node_config.h +++ b/examples/projects/Arduino/lcd/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/Arduino/led/node_config.h b/examples/projects/Arduino/led/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/Arduino/led/node_config.h +++ b/examples/projects/Arduino/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/Arduino/servo_motor/node_config.h b/examples/projects/Arduino/servo_motor/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/Arduino/servo_motor/node_config.h +++ b/examples/projects/Arduino/servo_motor/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/Arduino/stepper_simple_foc/node_config.h b/examples/projects/Arduino/stepper_simple_foc/node_config.h index 9d6b1d679..a894818d2 100644 --- a/examples/projects/Arduino/stepper_simple_foc/node_config.h +++ b/examples/projects/Arduino/stepper_simple_foc/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define ARDUINO_PTPA_PIN 19 #define ARDUINO_PTPB_PIN 7 diff --git a/examples/projects/NUCLEO-F072RB/button/node_config.h b/examples/projects/NUCLEO-F072RB/button/node_config.h index 52cb97eab..099378211 100644 --- a/examples/projects/NUCLEO-F072RB/button/node_config.h +++ b/examples/projects/NUCLEO-F072RB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h index 2d45ceb93..29161ee80 100644 --- a/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F072RB/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F072RB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F401RE/button/node_config.h b/examples/projects/NUCLEO-F401RE/button/node_config.h index b36051575..0f83f737f 100644 --- a/examples/projects/NUCLEO-F401RE/button/node_config.h +++ b/examples/projects/NUCLEO-F401RE/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h index d0c06e415..f1b94d7a4 100644 --- a/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F401RE/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F401RE/led/node_config.h b/examples/projects/NUCLEO-F401RE/led/node_config.h index b36051575..0f83f737f 100644 --- a/examples/projects/NUCLEO-F401RE/led/node_config.h +++ b/examples/projects/NUCLEO-F401RE/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h index cb4b3a6eb..c4965c1b5 100644 --- a/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F401RE/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F410RB/button/node_config.h b/examples/projects/NUCLEO-F410RB/button/node_config.h index 5c758889b..dad4d3202 100644 --- a/examples/projects/NUCLEO-F410RB/button/node_config.h +++ b/examples/projects/NUCLEO-F410RB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h index d0c06e415..f1b94d7a4 100644 --- a/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-F410RB/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/led/node_config.h b/examples/projects/NUCLEO-F410RB/led/node_config.h index 8ffbb4fd2..5fb708a14 100644 --- a/examples/projects/NUCLEO-F410RB/led/node_config.h +++ b/examples/projects/NUCLEO-F410RB/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h index cb4b3a6eb..c4965c1b5 100644 --- a/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-F410RB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G431KB/button/node_config.h b/examples/projects/NUCLEO-G431KB/button/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-G431KB/button/node_config.h +++ b/examples/projects/NUCLEO-G431KB/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h index 2135215e6..97cea87da 100644 --- a/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-G431KB/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h index 2135215e6..97cea87da 100644 --- a/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-G431KB/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L073RZ/button/node_config.h b/examples/projects/NUCLEO-L073RZ/button/node_config.h index 4de9ad22e..e35b8cb83 100644 --- a/examples/projects/NUCLEO-L073RZ/button/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/button/node_config.h @@ -50,7 +50,7 @@ #define ROBUS_NETWORK_BAUDRATE 500000 #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/button/node_config.h b/examples/projects/NUCLEO-L432KC/button/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/button/node_config.h +++ b/examples/projects/NUCLEO-L432KC/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h +++ b/examples/projects/NUCLEO-L432KC/dc_motor/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h +++ b/examples/projects/NUCLEO-L432KC/fingerprint/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/lcd/node_config.h b/examples/projects/NUCLEO-L432KC/lcd/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/lcd/node_config.h +++ b/examples/projects/NUCLEO-L432KC/lcd/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/led/node_config.h b/examples/projects/NUCLEO-L432KC/led/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/led/node_config.h +++ b/examples/projects/NUCLEO-L432KC/led/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h +++ b/examples/projects/NUCLEO-L432KC/potentiometer/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/servo/node_config.h b/examples/projects/NUCLEO-L432KC/servo/node_config.h index 1fc4cdf75..7dee8b88a 100644 --- a/examples/projects/NUCLEO-L432KC/servo/node_config.h +++ b/examples/projects/NUCLEO-L432KC/servo/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/SAMD21XPLAINED/button/node_config.h b/examples/projects/SAMD21XPLAINED/button/node_config.h index 961af2512..aeab338b2 100644 --- a/examples/projects/SAMD21XPLAINED/button/node_config.h +++ b/examples/projects/SAMD21XPLAINED/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32F4-discovery/button/node_config.h b/examples/projects/STM32F4-discovery/button/node_config.h index 029832089..f085a0a56 100644 --- a/examples/projects/STM32F4-discovery/button/node_config.h +++ b/examples/projects/STM32F4-discovery/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h index b08e09cb1..9621e9fb8 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h +++ b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32L4S5_discovery/button/node_config.h b/examples/projects/STM32L4S5_discovery/button/node_config.h index b80c9ab38..e6c1d616e 100644 --- a/examples/projects/STM32L4S5_discovery/button/node_config.h +++ b/examples/projects/STM32L4S5_discovery/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index 52cb97eab..099378211 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/button/platformio.ini b/examples/projects/l0/button/platformio.ini index 421c5d9c1..47b814210 100644 --- a/examples/projects/l0/button/platformio.ini +++ b/examples/projects/l0/button/platformio.ini @@ -22,6 +22,7 @@ lib_deps = luos_engine@^3.0.0 Button serial_network + robus_network debug_tool = stlink [env:l0] diff --git a/examples/projects/l0/button/src/main.c b/examples/projects/l0/button/src/main.c index e1cdc439c..6a9f89f84 100644 --- a/examples/projects/l0/button/src/main.c +++ b/examples/projects/l0/button/src/main.c @@ -27,6 +27,7 @@ /* USER CODE BEGIN Includes */ #include "luos_engine.h" #include "serial_network.h" +#include "robus_network.h" #include "button.h" /* USER CODE END Includes */ @@ -92,6 +93,7 @@ int main(void) /* USER CODE BEGIN 2 */ Luos_Init(); Serial_Init(); + Robus_Init(); Button_Init(); /* USER CODE END 2 */ @@ -101,6 +103,7 @@ int main(void) { Luos_Loop(); Serial_Loop(); + Robus_Loop(); Button_Loop(); /* USER CODE END WHILE */ diff --git a/examples/projects/l0/button_freertos/node_config.h b/examples/projects/l0/button_freertos/node_config.h index 52cb97eab..099378211 100644 --- a/examples/projects/l0/button_freertos/node_config.h +++ b/examples/projects/l0/button_freertos/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/dc_motor/node_config.h b/examples/projects/l0/dc_motor/node_config.h index 2d45ceb93..29161ee80 100644 --- a/examples/projects/l0/dc_motor/node_config.h +++ b/examples/projects/l0/dc_motor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 2 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define MSG_BUFFER_SIZE 512 /******************************************************************************* diff --git a/examples/projects/l0/distance/node_config.h b/examples/projects/l0/distance/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/distance/node_config.h +++ b/examples/projects/l0/distance/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/fingerprint/node_config.h b/examples/projects/l0/fingerprint/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/fingerprint/node_config.h +++ b/examples/projects/l0/fingerprint/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/lcd/node_config.h b/examples/projects/l0/lcd/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/lcd/node_config.h +++ b/examples/projects/l0/lcd/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/led/node_config.h b/examples/projects/l0/led/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/led/node_config.h +++ b/examples/projects/l0/led/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/led_fader/node_config.h b/examples/projects/l0/led_fader/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/led_fader/node_config.h +++ b/examples/projects/l0/led_fader/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/light_sensor/node_config.h b/examples/projects/l0/light_sensor/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/light_sensor/node_config.h +++ b/examples/projects/l0/light_sensor/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/load/node_config.h b/examples/projects/l0/load/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/load/node_config.h +++ b/examples/projects/l0/load/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/potentiometer/node_config.h b/examples/projects/l0/potentiometer/node_config.h index 591039463..fde33ebd6 100644 --- a/examples/projects/l0/potentiometer/node_config.h +++ b/examples/projects/l0/potentiometer/node_config.h @@ -47,7 +47,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/power_switch/node_config.h b/examples/projects/l0/power_switch/node_config.h index 52cb97eab..099378211 100644 --- a/examples/projects/l0/power_switch/node_config.h +++ b/examples/projects/l0/power_switch/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/stepper/node_config.h b/examples/projects/l0/stepper/node_config.h index 52cb97eab..099378211 100644 --- a/examples/projects/l0/stepper/node_config.h +++ b/examples/projects/l0/stepper/node_config.h @@ -48,7 +48,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/native/button/node_config.h b/examples/projects/native/button/node_config.h index 2b7a9f49e..721108be8 100644 --- a/examples/projects/native/button/node_config.h +++ b/examples/projects/native/button/node_config.h @@ -46,7 +46,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/native/led/node_config.h b/examples/projects/native/led/node_config.h index 2b7a9f49e..721108be8 100644 --- a/examples/projects/native/led/node_config.h +++ b/examples/projects/native/led/node_config.h @@ -46,7 +46,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/native/ping_pong/node_config.h b/examples/projects/native/ping_pong/node_config.h index 7ee6b3d71..2fe8822c3 100644 --- a/examples/projects/native/ping_pong/node_config.h +++ b/examples/projects/native/ping_pong/node_config.h @@ -47,7 +47,7 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 -#define MAX_MSG_NB 5 +#define MAX_MSG_NB 10 #define MAX_NODE_NB 50 #define MAX_SERVICE_NUMBER 50 diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index a17091bd0..7b2c7884c 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -7,10 +7,10 @@ void unittest_Filter_ServiceId() uint16_t service_number = 10; NEW_TEST_CASE("Basic Service ID mask test"); { - Filter_IdInit(); + Phy_FiltersInit(); TRY { - Filter_AddServiceId(7, service_number); + Phy_AddLocalServices(7, service_number); TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); } @@ -21,7 +21,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(8, service_number); + Phy_AddLocalServices(8, service_number); TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); @@ -33,7 +33,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(9, service_number); + Phy_AddLocalServices(9, service_number); TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); @@ -45,7 +45,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(9, 0); + Phy_AddLocalServices(9, 0); TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); @@ -59,11 +59,11 @@ void unittest_Filter_ServiceId() service_number = MAX_LOCAL_SERVICE_NUMBER; NEW_TEST_CASE("Service ID mask test with max services"); { - Filter_IdInit(); + Phy_FiltersInit(); TRY { - Filter_AddServiceId(7, service_number); + Phy_AddLocalServices(7, service_number); TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); } @@ -74,7 +74,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(8, service_number); + Phy_AddLocalServices(8, service_number); TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); @@ -86,7 +86,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(9, service_number); + Phy_AddLocalServices(9, service_number); TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); @@ -98,7 +98,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(9, 0); + Phy_AddLocalServices(9, 0); TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); @@ -111,10 +111,10 @@ void unittest_Filter_ServiceId() NEW_TEST_CASE("Overlap the MAX_LOCAL_SERVICE_NUMBER"); { - Filter_IdInit(); + Phy_FiltersInit(); TRY { - Filter_AddServiceId(1, MAX_LOCAL_SERVICE_NUMBER + 1); + Phy_AddLocalServices(1, MAX_LOCAL_SERVICE_NUMBER + 1); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -122,10 +122,10 @@ void unittest_Filter_ServiceId() NEW_TEST_CASE("Test the id 4096 Limit"); { - Filter_IdInit(); + Phy_FiltersInit(); TRY { - Filter_AddServiceId(4096 - MAX_LOCAL_SERVICE_NUMBER, service_number); + Phy_AddLocalServices(4096 - MAX_LOCAL_SERVICE_NUMBER, service_number); TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_LOCAL_SERVICE_NUMBER)); } CATCH @@ -135,7 +135,7 @@ void unittest_Filter_ServiceId() TRY { - Filter_AddServiceId(4096 - MAX_LOCAL_SERVICE_NUMBER + 1, service_number); + Phy_AddLocalServices(4096 - MAX_LOCAL_SERVICE_NUMBER + 1, service_number); } TEST_ASSERT_TRUE(IS_ASSERT()); @@ -149,10 +149,10 @@ void unittest_Filter_ServiceId() NEW_TEST_CASE("Test the id 0 Limit"); { - Filter_IdInit(); + Phy_FiltersInit(); TRY { - Filter_AddServiceId(0, service_number); + Phy_AddLocalServices(0, service_number); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -366,7 +366,7 @@ void unittest_Filter_Type() { TRY { - Filter_Type(4096 + 1); + Phy_FilterType(4096 + 1); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -377,10 +377,10 @@ void unittest_Filter_Type() TRY { service_ctx.number = 0; - TEST_ASSERT_EQUAL(false, Filter_Type(0)); - TEST_ASSERT_EQUAL(false, Filter_Type(1)); - TEST_ASSERT_EQUAL(false, Filter_Type(2)); - TEST_ASSERT_EQUAL(false, Filter_Type(12)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(0)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(1)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(2)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(12)); } CATCH { @@ -394,10 +394,10 @@ void unittest_Filter_Type() { service_ctx.number = 1; service_ctx.list[0].type = 0; - TEST_ASSERT_EQUAL(true, Filter_Type(0)); - TEST_ASSERT_EQUAL(false, Filter_Type(1)); - TEST_ASSERT_EQUAL(false, Filter_Type(2)); - TEST_ASSERT_EQUAL(false, Filter_Type(12)); + TEST_ASSERT_EQUAL(true, Phy_FilterType(0)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(1)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(2)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(12)); } CATCH { @@ -408,10 +408,10 @@ void unittest_Filter_Type() { service_ctx.number = 1; service_ctx.list[0].type = 1; - TEST_ASSERT_EQUAL(false, Filter_Type(0)); - TEST_ASSERT_EQUAL(true, Filter_Type(1)); - TEST_ASSERT_EQUAL(false, Filter_Type(2)); - TEST_ASSERT_EQUAL(false, Filter_Type(12)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(0)); + TEST_ASSERT_EQUAL(true, Phy_FilterType(1)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(2)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(12)); } CATCH { @@ -422,10 +422,10 @@ void unittest_Filter_Type() { service_ctx.number = 1; service_ctx.list[0].type = 12; - TEST_ASSERT_EQUAL(false, Filter_Type(0)); - TEST_ASSERT_EQUAL(false, Filter_Type(1)); - TEST_ASSERT_EQUAL(false, Filter_Type(2)); - TEST_ASSERT_EQUAL(true, Filter_Type(12)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(0)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(1)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(2)); + TEST_ASSERT_EQUAL(true, Phy_FilterType(12)); } CATCH { @@ -437,10 +437,10 @@ void unittest_Filter_Type() service_ctx.number = 2; service_ctx.list[0].type = 1; service_ctx.list[1].type = 12; - TEST_ASSERT_EQUAL(false, Filter_Type(0)); - TEST_ASSERT_EQUAL(true, Filter_Type(1)); - TEST_ASSERT_EQUAL(false, Filter_Type(2)); - TEST_ASSERT_EQUAL(true, Filter_Type(12)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(0)); + TEST_ASSERT_EQUAL(true, Phy_FilterType(1)); + TEST_ASSERT_EQUAL(false, Phy_FilterType(2)); + TEST_ASSERT_EQUAL(true, Phy_FilterType(12)); } CATCH { @@ -449,7 +449,7 @@ void unittest_Filter_Type() } } -void unittest_Filter_GetPhyTarget() +void unittest_Phy_ComputeTargets() { header_t header; NEW_TEST_CASE("Test a wrong header target_mode"); @@ -457,7 +457,7 @@ void unittest_Filter_GetPhyTarget() TRY { header.target_mode = 0x0f; - Filter_GetPhyTarget(&header); + Phy_ComputeTargets(&header); } TEST_ASSERT_TRUE(!IS_ASSERT()); END_TRY; @@ -467,11 +467,11 @@ void unittest_Filter_GetPhyTarget() { TRY { - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); header.target_mode = SERVICEIDACK; header.target = 1; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -480,11 +480,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); header.target_mode = SERVICEIDACK; header.target = 2; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -493,11 +493,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); header.target_mode = SERVICEID; header.target = 1; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -506,11 +506,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); header.target_mode = SERVICEID; header.target = 2; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -519,11 +519,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 2); + Phy_AddLocalServices(1, 2); header.target_mode = SERVICEIDACK; header.target = 2; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -532,11 +532,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 2); + Phy_AddLocalServices(1, 2); header.target_mode = SERVICEIDACK; header.target = 3; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -545,11 +545,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 2); + Phy_AddLocalServices(1, 2); header.target_mode = SERVICEID; header.target = 2; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -558,11 +558,11 @@ void unittest_Filter_GetPhyTarget() TRY { - Filter_AddServiceId(1, 2); + Phy_AddLocalServices(1, 2); header.target_mode = SERVICEID; header.target = 3; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -579,7 +579,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = TYPE; header.target = 0; // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); } CATCH { @@ -593,7 +593,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = TYPE; header.target = 1; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -608,7 +608,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = BROADCAST; header.target = BROADCAST_VAL; // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); } CATCH { @@ -620,7 +620,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = BROADCAST; header.target = 1; // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); } CATCH { @@ -636,7 +636,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = NODEIDACK; header.target = 1; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -649,7 +649,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = NODEIDACK; header.target = 2; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -662,7 +662,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = NODEID; header.target = 1; // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); } CATCH { @@ -675,7 +675,7 @@ void unittest_Filter_GetPhyTarget() header.target_mode = NODEID; header.target = 2; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -692,10 +692,10 @@ void unittest_Filter_GetPhyTarget() header.target_mode = TOPIC; header.target = 3; // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); header.target = 2; // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Filter_GetPhyTarget(&header)); + TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); } CATCH { @@ -711,7 +711,7 @@ int main(int argc, char **argv) RUN_TEST(unittest_Filter_ServiceId); RUN_TEST(unittest_Filter_Topic); RUN_TEST(unittest_Filter_Type); - RUN_TEST(unittest_Filter_GetPhyTarget); + RUN_TEST(unittest_Phy_ComputeTargets); UNITY_END(); } diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index c94eecf0d..2305e40a2 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -699,7 +699,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -740,7 +740,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -781,7 +781,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -822,7 +822,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -863,7 +863,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -903,7 +903,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Filter_AddServiceId(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; From 45d11d17b8f70ad151c25d74228a2850ee0c5206 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 11:19:04 +0200 Subject: [PATCH 122/198] Add a print for native assert --- engine/core/src/luos_utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 02616780c..01958e2d9 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -11,6 +11,9 @@ #include "luos_hal.h" #include "msg_alloc.h" #include "_luos_phy.h" +#if (defined _WIN32) || (defined _WIN64) || (defined __linux__) || (defined __APPLE__) || (defined __unix__) || (defined __CYGWIN__) || (defined __MINGW32__) || (defined __MINGW64__) + #include +#endif /******************************************************************************* * Function @@ -56,6 +59,10 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) { // prepare a message as a node. // To do that we have to reset the service ID and clear PTP states to unlock others. + + #if (defined _WIN32) || (defined _WIN64) || (defined __linux__) || (defined __APPLE__) || (defined __unix__) || (defined __CYGWIN__) || (defined __MINGW32__) || (defined __MINGW64__) + printf("ASSERT: %s:%d\n", file, line); + #endif Luos_Init(); // completely reinit the allocator MsgAlloc_Init(NULL); From 288875b0f2168fb7d2f2c55d965b592ac735a8a0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 12:50:21 +0200 Subject: [PATCH 123/198] Add a trace print on Gate segfault to catch it one day perhaps. --- .../projects/native/gate_wscom/src/main.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/examples/projects/native/gate_wscom/src/main.c b/examples/projects/native/gate_wscom/src/main.c index 161e248b1..f6e5953fe 100644 --- a/examples/projects/native/gate_wscom/src/main.c +++ b/examples/projects/native/gate_wscom/src/main.c @@ -4,6 +4,12 @@ #include "gate.h" #include +#include +#include +#include +#include +#include + void *Gate_Pipe_LoopThread(void *vargp) { while (1) @@ -14,8 +20,23 @@ void *Gate_Pipe_LoopThread(void *vargp) return NULL; } +void handler(int sig) +{ + void *array[10]; + size_t size; + + // get void*'s for all entries on the stack + size = backtrace(array, 10); + + // print out all the frames to stderr + fprintf(stderr, "Error: signal %d:\n", sig); + backtrace_symbols_fd(array, size, STDERR_FILENO); + exit(1); +} + int main(void) { + signal(SIGSEGV, handler); // install our handler Luos_Init(); Serial_Init(); Pipe_Init(); From b4034baa87b999bbda8fe855f55b06195212ffe2 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 11:22:38 +0200 Subject: [PATCH 124/198] Improve ST Serial reception by removing RX IRQ and improve function naming --- .../HAL/ARDUINO/serial_hal_config.h | 6 -- .../HAL/ARDUINO/serial_network_hal.cpp | 2 +- .../HAL/NATIVE/serial_network_hal.c | 2 +- .../HAL/STM32F0/serial_hal_config.h | 6 -- .../HAL/STM32F0/serial_network_hal.c | 65 ++++++----------- .../HAL/STM32F4/serial_hal_config.h | 6 -- .../HAL/STM32F4/serial_network_hal.c | 65 ++++++----------- .../HAL/STM32G431/serial_hal_config.h | 6 -- .../HAL/STM32G431/serial_network_hal.c | 71 +++++++------------ .../HAL/STM32G474/serial_hal_config.h | 6 -- .../HAL/STM32G474/serial_network_hal.c | 71 +++++++------------ .../HAL/STM32L4/serial_hal_config.h | 6 -- .../HAL/STM32L4/serial_network_hal.c | 65 ++++++----------- .../HAL/template/serial_hal_config.h | 6 -- .../HAL/template/serial_network_hal.c | 24 ++----- network/serial_network/inc/_serial_network.h | 4 +- network/serial_network/src/serial_network.c | 4 +- 17 files changed, 121 insertions(+), 294 deletions(-) diff --git a/network/serial_network/HAL/ARDUINO/serial_hal_config.h b/network/serial_network/HAL/ARDUINO/serial_hal_config.h index fe8d1d9dc..ecf7355c1 100644 --- a/network/serial_network/HAL/ARDUINO/serial_hal_config.h +++ b/network/serial_network/HAL/ARDUINO/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM USART3 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART3_4_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp index fce11b2a1..a93dda83a 100644 --- a/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp +++ b/network/serial_network/HAL/ARDUINO/serial_network_hal.cpp @@ -41,7 +41,7 @@ void SerialHAL_Loop(void) while (Serial.available() > 0) { data = Serial.read(); - Serial_ReceptionAdd(&data, 1); + Serial_ReceptionWrite(&data, 1); } } diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index 106417977..1a8d79cf3 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -297,7 +297,7 @@ void SerialHAL_Loop(void) #endif if (bytesRead > 0) { - Serial_ReceptionAdd((uint8_t *)recvData, (uint32_t)bytesRead); + Serial_ReceptionWrite((uint8_t *)recvData, (uint32_t)bytesRead); } } diff --git a/network/serial_network/HAL/STM32F0/serial_hal_config.h b/network/serial_network/HAL/STM32F0/serial_hal_config.h index 46ea253d2..a38ce9175 100644 --- a/network/serial_network/HAL/STM32F0/serial_hal_config.h +++ b/network/serial_network/HAL/STM32F0/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM_CLOCK_DISABLE #define SERIAL_COM USART3 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART3_4_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART3_4_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.c b/network/serial_network/HAL/STM32F0/serial_network_hal.c index 2d6f0832d..2bb2815cd 100644 --- a/network/serial_network/HAL/STM32F0/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.c @@ -14,8 +14,6 @@ #include "stm32f0xx_ll_dma.h" #include "stm32f0xx_ll_system.h" - - /******************************************************************************* * Variables ******************************************************************************/ @@ -79,12 +77,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ; LL_USART_Enable(SERIAL_COM); - LL_USART_ClearFlag_IDLE(SERIAL_COM); - LL_USART_EnableIT_IDLE(SERIAL_COM); - - HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); - HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); - RX_PrevPointerPosition = 0; __HAL_RCC_DMA1_CLK_ENABLE(); @@ -139,6 +131,27 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } /****************************************************************************** @@ -155,42 +168,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER() -{ - uint16_t size = 0; - uint16_t RX_PointerPosition = 0; - - // check if we receive an IDLE on usart3 - if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) - { - LL_USART_ClearFlag_IDLE(SERIAL_COM); - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } - - RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(size); - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/HAL/STM32F4/serial_hal_config.h b/network/serial_network/HAL/STM32F4/serial_hal_config.h index daa8fbf0f..afd509147 100644 --- a/network/serial_network/HAL/STM32F4/serial_hal_config.h +++ b/network/serial_network/HAL/STM32F4/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM USART2 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART2_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.c b/network/serial_network/HAL/STM32F4/serial_network_hal.c index 287710208..ff8da806a 100644 --- a/network/serial_network/HAL/STM32F4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.c @@ -15,8 +15,6 @@ #include "stm32f4xx_ll_system.h" #include "stm32f4xx_hal.h" - - /******************************************************************************* * Variables ******************************************************************************/ @@ -80,12 +78,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ; LL_USART_Enable(SERIAL_COM); - LL_USART_ClearFlag_IDLE(SERIAL_COM); - LL_USART_EnableIT_IDLE(SERIAL_COM); - - HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); - HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); - RX_PrevPointerPosition = 0; /////////////////////////////// @@ -142,6 +134,27 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } /****************************************************************************** @@ -158,42 +171,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) LL_DMA_EnableStream(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER() -{ - uint16_t size = 0; - uint16_t RX_PointerPosition = 0; - - // check if we receive an IDLE on usart3 - if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) - { - LL_USART_ClearFlag_IDLE(SERIAL_COM); - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } - - RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(size); - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/HAL/STM32G431/serial_hal_config.h b/network/serial_network/HAL/STM32G431/serial_hal_config.h index 78a6a096c..6bb47d578 100644 --- a/network/serial_network/HAL/STM32G431/serial_hal_config.h +++ b/network/serial_network/HAL/STM32G431/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM USART2 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART2_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.c b/network/serial_network/HAL/STM32G431/serial_network_hal.c index f296216d4..c53483b88 100644 --- a/network/serial_network/HAL/STM32G431/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.c @@ -16,8 +16,6 @@ #include "stm32g4xx_ll_system.h" #include "stm32g4xx_hal.h" - - /******************************************************************************* * Variables ******************************************************************************/ @@ -83,12 +81,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ; LL_USART_Enable(SERIAL_COM); - LL_USART_ClearFlag_IDLE(SERIAL_COM); - LL_USART_EnableIT_IDLE(SERIAL_COM); - - HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); - HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); - /////////////////////////////// // DMA SERIAL Init /////////////////////////////// @@ -142,6 +134,30 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + if (size != 0) + { + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); + } } /****************************************************************************** @@ -158,45 +174,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER() -{ - uint16_t size = 0; - uint16_t RX_PointerPosition = 0; - - // check if we receive an IDLE on usart3 - if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) - { - LL_USART_ClearFlag_IDLE(SERIAL_COM); - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } - - RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - if (size != 0) - { - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(size); - } - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/HAL/STM32G474/serial_hal_config.h b/network/serial_network/HAL/STM32G474/serial_hal_config.h index 05243322f..ca12f7c62 100644 --- a/network/serial_network/HAL/STM32G474/serial_hal_config.h +++ b/network/serial_network/HAL/STM32G474/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM LPUART1 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ LPUART1_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() LPUART1_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.c b/network/serial_network/HAL/STM32G474/serial_network_hal.c index 2415e8111..9d411f880 100644 --- a/network/serial_network/HAL/STM32G474/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.c @@ -16,8 +16,6 @@ #include "stm32g4xx_ll_system.h" #include "stm32g4xx_hal.h" - - /******************************************************************************* * Variables ******************************************************************************/ @@ -83,12 +81,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ; LL_LPUART_Enable(SERIAL_COM); - LL_LPUART_ClearFlag_IDLE(SERIAL_COM); - LL_LPUART_EnableIT_IDLE(SERIAL_COM); - - HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); - HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); - /////////////////////////////// // DMA SERIAL Init /////////////////////////////// @@ -142,6 +134,30 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + if (size != 0) + { + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); + } } /****************************************************************************** @@ -158,45 +174,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER() -{ - uint16_t size = 0; - uint16_t RX_PointerPosition = 0; - - // check if we receive an IDLE on usart3 - if (LL_LPUART_IsActiveFlag_IDLE(SERIAL_COM)) - { - LL_LPUART_ClearFlag_IDLE(SERIAL_COM); - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } - - RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - if (size != 0) - { - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(size); - } - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/HAL/STM32L4/serial_hal_config.h b/network/serial_network/HAL/STM32L4/serial_hal_config.h index 4cce7927f..9b709d223 100644 --- a/network/serial_network/HAL/STM32L4/serial_hal_config.h +++ b/network/serial_network/HAL/STM32L4/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM USART2 #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART2_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART2_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.c b/network/serial_network/HAL/STM32L4/serial_network_hal.c index f03f0c990..d0f78dc30 100644 --- a/network/serial_network/HAL/STM32L4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.c @@ -15,8 +15,6 @@ #include "stm32l4xx_ll_system.h" #include "stm32l4xx_hal.h" - - /******************************************************************************* * Variables ******************************************************************************/ @@ -80,12 +78,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ; LL_USART_Enable(SERIAL_COM); - LL_USART_ClearFlag_IDLE(SERIAL_COM); - LL_USART_EnableIT_IDLE(SERIAL_COM); - - HAL_NVIC_EnableIRQ(SERIAL_COM_IRQ); - HAL_NVIC_SetPriority(SERIAL_COM_IRQ, 1, 1); - RX_PrevPointerPosition = 0; /////////////////////////////// @@ -141,6 +133,27 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { + uint16_t size = 0; + uint16_t RX_PointerPosition = 0; + if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) + { + return; + } + + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); + + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } /****************************************************************************** @@ -157,42 +170,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) LL_DMA_EnableChannel(SERIAL_TX_DMA, SERIAL_TX_DMA_CHANNEL); } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER() -{ - uint16_t size = 0; - uint16_t RX_PointerPosition = 0; - - // check if we receive an IDLE on usart3 - if (LL_USART_IsActiveFlag_IDLE(SERIAL_COM)) - { - LL_USART_ClearFlag_IDLE(SERIAL_COM); - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } - - RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(size); - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/HAL/template/serial_hal_config.h b/network/serial_network/HAL/template/serial_hal_config.h index d2f20f664..0f2b5595c 100644 --- a/network/serial_network/HAL/template/serial_hal_config.h +++ b/network/serial_network/HAL/template/serial_hal_config.h @@ -46,12 +46,6 @@ #ifndef SERIAL_COM #define SERIAL_COM USART #endif -#ifndef SERIAL_COM_IRQ - #define SERIAL_COM_IRQ USART_IRQn -#endif -#ifndef SERIAL_COM_IRQHANDLER - #define SERIAL_COM_IRQHANDLER() USART_IRQHandler() -#endif // RX DMA configuration #ifndef SERIAL_RX_DMA_CLOCK_ENABLE diff --git a/network/serial_network/HAL/template/serial_network_hal.c b/network/serial_network/HAL/template/serial_network_hal.c index 52ec051e7..e7cd032a4 100644 --- a/network/serial_network/HAL/template/serial_network_hal.c +++ b/network/serial_network/HAL/template/serial_network_hal.c @@ -35,8 +35,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) // TODO: Init the Serial TX DMA interface, use it in normal mode and make it raise an IRQ when finished. // TODO: Init RX pin with the given pin and port and set it as rx for the usart. Select the appropriate alternate function. - // TODO: Init the serial RX DMA interface to move RX bytes in the rx_buffer, use it in circular mode and make it loop on buffer_size. Do not make it raise an IRQ when finished. - // TODO: Enable the serial RX Idle IRQ to raise an interrupt when a the RX line is idle + // TODO: Init the serial RX DMA interface to move RX bytes in the rx_buffer, use it in circular mode and make it loop on buffer_size. Do not make it raise ayn IRQ. } /****************************************************************************** @@ -46,7 +45,9 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) ******************************************************************************/ void SerialHAL_Loop(void) { - // If you want to receive data here, you can. + // Here youhave to manage your received data, you choose between those function depending on your reception methods : + // - Write the received data into the buffer using Serial_ReceptionWrite function. This is usefull if your hardware have a dedicated buffer + // - Increse the reception pointer using Serial_ReceptionIncrease function. This is used if your hardware directly write into the rx_buffer } /****************************************************************************** @@ -60,23 +61,6 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) // TODO: Start the DMA transfert to transmit data from data[0] to data[size] } -/****************************************************************************** - * @brief RX Serial IRQ handler - * @param None - * @return None - ******************************************************************************/ -void SERIAL_COM_IRQHANDLER(void) -{ - // Check if this IRQ is due to RX Idle - if (/*TODO: Check if this IRQ means that RX is Idle*/) - { - // TODO: Clear the RX idle IRQ flag - uint32_t received_data = rx_buffer_size - /* TODO: Get the size of the data received by the DMA*/; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionEnd(received_data); - } -} - /****************************************************************************** * @brief TX DMA IRQ handler * @param None diff --git a/network/serial_network/inc/_serial_network.h b/network/serial_network/inc/_serial_network.h index 118b9fbe6..fbeca4baa 100644 --- a/network/serial_network/inc/_serial_network.h +++ b/network/serial_network/inc/_serial_network.h @@ -12,7 +12,7 @@ #include "serial_config.h" void Serial_TransmissionEnd(void); -void Serial_ReceptionAdd(uint8_t *data, uint32_t size); -void Serial_ReceptionEnd(uint32_t size); +void Serial_ReceptionWrite(uint8_t *data, uint32_t size); +void Serial_ReceptionIncrease(uint32_t size); #endif /* __SERIAL_H_ */ diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index ea72e2a12..3eeaf512a 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -358,7 +358,7 @@ _CRITICAL void Serial_Send(void) * @param size size of the data * @return None *****************************************************************************/ -_CRITICAL void Serial_ReceptionAdd(uint8_t *data, uint32_t size) +_CRITICAL void Serial_ReceptionWrite(uint8_t *data, uint32_t size) { if (rx_size == 0) { @@ -390,7 +390,7 @@ _CRITICAL void Serial_ReceptionAdd(uint8_t *data, uint32_t size) * @param None * @return None ******************************************************************************/ -_CRITICAL void Serial_ReceptionEnd(uint32_t size) +_CRITICAL void Serial_ReceptionIncrease(uint32_t size) { // Reception is finished, we can parse the message rx_size += size; From 1dae1354039ea9a2aa7a5886fd2798fa54162e94 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 12:56:21 +0200 Subject: [PATCH 125/198] Remove telemetry --- README.md | 4 -- .../robus_network/robus_select_hal_script.py | 1 + source_filter_script.py | 41 ------------------- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/README.md b/README.md index 93f1e731f..933a318eb 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,3 @@ Luos proposes organized and effective development practices, guaranteeing develo * → Try on your own with the [get started](https://www.luos.io/tutorials/get-started) * → Consult the full [documentation](https://www.luos.io/docs) - -## Disclaimer -Using Platformio, this library compilation send some anonymous information to Luos allowing to improve Luos_engine experience. -To disable the telemetry please add "-DNOTELEMETRY" as a compilation flag on your platformio.ini file. diff --git a/network/robus_network/robus_select_hal_script.py b/network/robus_network/robus_select_hal_script.py index ced9b644f..f2b58fcd1 100644 --- a/network/robus_network/robus_select_hal_script.py +++ b/network/robus_network/robus_select_hal_script.py @@ -5,6 +5,7 @@ from os.path import join, realpath Import('env') +click.secho("") click.secho("Robus network build configuration:", underline=True) # Find the appropriate hal find_HAL = False diff --git a/source_filter_script.py b/source_filter_script.py index 2ae3fbbbd..dec404727 100644 --- a/source_filter_script.py +++ b/source_filter_script.py @@ -10,24 +10,6 @@ from os.path import join, realpath Import("env") -telemetry = True -luos_telemetry = {"telemetry_type": "luos_engine_build", - "mac": hex(uuid.getnode()), - "system": sys.platform, - "unix_time": env.get("UNIX_TIME"), - "platform": env.get("PIOPLATFORM"), - "project_path": env.get("PROJECT_DIR")} - -if (env.get("BOARD_MCU") != None): - luos_telemetry["mcu"] = env.get("BOARD_MCU") -if (env.get("BOARD_F_CPU") != None): - luos_telemetry["f_cpu"] = env.get("BOARD_F_CPU") - -try: - luos_telemetry["framework"] = env.get("PIOFRAMEWORK")[0] -except: - pass - # Check if this script have been already executed during this compilation visited_key = "__LUOS_CORE_SCRIPT_CALLED" global_env = DefaultEnvironment() @@ -47,11 +29,9 @@ from pyluos import version click.secho("\t* Pyluos revision " + str(version.version) + " ready.", fg="green") - luos_telemetry["pyluos_rev"] = str(version.version) except ImportError: # module doesn't exist, deal with it. click.secho( "\t* Pyluos install failed. Platformio will be unable to use bootloader flash feature.", fg="red") - luos_telemetry["pyluos_rev"] = "none" sources = ["+<*.c>", "+<../../IO/src/*.c>", @@ -72,7 +52,6 @@ if not visited_key in global_env: click.secho( "\t* %s HAL selected for luos_engine." % item[1], fg="green") - luos_telemetry["luos_hal"] = item[1] if (path.exists("engine/HAL/" + item[1] + "/hal_script.py")): # This is an extra script dedicated to this HAL, run it hal_script_path = realpath( @@ -81,28 +60,8 @@ else: if not visited_key in global_env: click.secho("\t* %s HAL not found" % item[1], fg="red") - luos_telemetry["luos_hal"] = "invalid" + str(item[1]) env.Append(CPPPATH=[realpath("engine/HAL/" + item[1])]) env.Append(SRC_FILTER=["+<../../HAL/%s/*.c>" % item[1]]) - if (item == 'NOTELEMETRY'): - telemetry = False - - -if not visited_key in global_env: - if (telemetry == True): - click.secho("\t* Telemetry enabled.", fg="green") - try: - r = requests.post("https://monorepo-services.vercel.app/api/telemetry", - data=luos_telemetry) - if not r: - click.secho("\tX Telemetry request failed : error " + - str(r.status_code), fg="red") - except: - click.secho("\tX Telemetry request failed.", fg="red") - else: - click.secho( - "\t* Telemetry disabled, please consider enabling it by removing the 'NOTELEMETRY' flag to help Luos_engine improve.", fg="red") - click.secho("") # Native only => we should put this on a specific script on engine/HAL/STUB for item in env.ParseFlags(env['BUILD_FLAGS'])["CPPDEFINES"]: From db3424529d5123c9c429854f6560c51379affe99 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 15:36:44 +0200 Subject: [PATCH 126/198] Manage multi-message in one Serial burst --- network/serial_network/src/serial_network.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 3eeaf512a..4c428c77a 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -276,6 +276,12 @@ void Serial_Loop(void) phy_serial->rx_buffer_base = rx_buffer_base_bkp; // The message have been consumed, we can move the rx buffer pointer Serial_MoveRxPtr(header.size + 1); + // If we still have data in the buffer after this message we need to move the phy_serial->rx_timestamp accordingly allowing the next message to be correctly timed. + if (rx_size > 0) + { + // Add to the original timestamp value the time needed to receive all the bytes of the current message. + phy_serial->rx_timestamp += (header.size + sizeof(SerialHeader_t) + 1) * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE; + } } } } From a9af94360b004b608db0c8843a87ea435adaf0db Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 25 Aug 2023 16:34:33 +0200 Subject: [PATCH 127/198] Allow synchronized nodes to manage timestamping without any differential computation, fix #444 --- engine/IO/inc/luos_phy.h | 7 ++-- engine/IO/inc/struct_phy.h | 1 + engine/IO/src/luos_phy.c | 23 +++++++++++-- network/robus_network/src/transmission.c | 2 +- network/serial_network/src/serial_network.c | 2 +- test/tests_io/test_phy/main.c | 36 ++++++++++++++------- 6 files changed, 53 insertions(+), 18 deletions(-) diff --git a/engine/IO/inc/luos_phy.h b/engine/IO/inc/luos_phy.h index 590372dc4..e93471dd3 100644 --- a/engine/IO/inc/luos_phy.h +++ b/engine/IO/inc/luos_phy.h @@ -32,6 +32,7 @@ extern "C" // Phy creation luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy); // Use it to reference your phy to Luos. + void Phy_DisableSynchro(luos_phy_t *phy_ptr); // Use it to disable the luos synchronisation mechanism with this phy. // Topology management void Phy_TopologyNext(void); // Use it to find the next node that need to be detected accross phys. @@ -44,9 +45,9 @@ extern "C" void Phy_ResetMsg(luos_phy_t *phy_ptr); // Call this function to reset the rx process. // Tx management - time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job); // Use it to compute the timestamp of the message to send. - uint64_t Phy_GetTimestamp(void); // Use it to get the current timestamp in ns. - uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) + time_luos_t Phy_ComputeMsgTimestamp(luos_phy_t *phy_ptr, phy_job_t *job); // Use it to compute the timestamp of the message to send. + uint64_t Phy_GetTimestamp(void); // Use it to get the current timestamp in ns. + uint16_t Phy_GetNodeId(void); // Use it to get your current node id. (This can be used to compute priority or controled latency avoiding infinite collision condition) // Job management void Phy_FailedJob(luos_phy_t *phy_ptr, phy_job_t *job); // If some messages failed to be sent, call this function to consider the target as dead diff --git a/engine/IO/inc/struct_phy.h b/engine/IO/inc/struct_phy.h index a11226a72..8dfa2e4b2 100644 --- a/engine/IO/inc/struct_phy.h +++ b/engine/IO/inc/struct_phy.h @@ -61,6 +61,7 @@ typedef struct luos_phy_t volatile uint8_t rx_alloc_job : 1; // If true, Luosio_Loop funciton will need to filter already received data, if filter is ok, set rx_keep, alloc needed space, move *rx_data to point at the good place on allocator, put the number of bytes remaining on rx_size, and copy already received data in the allocated space. volatile uint8_t rx_keep : 1; // True if we want to keep the received data. volatile uint8_t rx_ack : 1; // True if we need to generate an acknoledgement for this message. + uint8_t enable_synchro : 1; // True if we want Luos to manage time synchronisation for this phy. }; // *** RX Private data *** diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 86d76afef..b0404564f 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -431,10 +431,22 @@ luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY rese phy_ctx.phy[id].run_topo = run_topo; phy_ctx.phy[id].reset_phy = reset_phy; phy_ctx.phy[id].job_nb = 0; + // By default enable synchronisation for all phys + phy_ctx.phy[id].enable_synchro = true; // Return the phy pointer return &phy_ctx.phy[id]; } +/****************************************************************************** + * @brief Disable synchronisation for a specific phy. Use it if your network already manage synchronisation. + * @param phy_ptr pointer on the phy we want to disable synchronisation + * @return None + ******************************************************************************/ +void Phy_DisableSynchro(luos_phy_t *phy_ptr) +{ + phy_ptr->enable_synchro = false; +} + /****************************************************************************** * @brief return a local physical layer pointer (only used by LuosIO, this function is private) * @param id of the phy we want @@ -694,9 +706,16 @@ _CRITICAL void Phy_ResetMsg(luos_phy_t *phy_ptr) * @param job Pointer to the job concerned by this message * @return None ******************************************************************************/ -time_luos_t Phy_ComputeMsgTimestamp(phy_job_t *job) +time_luos_t Phy_ComputeMsgTimestamp(luos_phy_t *phy_ptr, phy_job_t *job) { - LUOS_ASSERT((job != NULL) && (job->msg_pt != NULL) && (job->timestamp == true)); + LUOS_ASSERT((job != NULL) && (job->msg_pt != NULL) && (job->timestamp == true) && (phy_ptr != NULL)); + if (phy_ptr->enable_synchro == false) + { + // We don't want to synchronize this phy, just return the timestamp + time_luos_t timestamp_date; + memcpy(×tamp_date, &job->msg_pt->data[job->msg_pt->header.size], sizeof(time_luos_t)); + return timestamp_date; + } return Timestamp_ConvertToLatency(job->msg_pt); } diff --git a/network/robus_network/src/transmission.c b/network/robus_network/src/transmission.c index c1b463ac8..1e4498fb8 100644 --- a/network/robus_network/src/transmission.c +++ b/network/robus_network/src/transmission.c @@ -187,7 +187,7 @@ _CRITICAL void Transmit_Process() { // Convert date to a sendable timestamp and put it on the encapsulation - jobEncaps->timestamp = Phy_ComputeMsgTimestamp(job); + jobEncaps->timestamp = Phy_ComputeMsgTimestamp(robus_phy, job); jobEncaps->timestamped_crc = ll_crc_compute(jobEncaps->unmaped, sizeof(time_luos_t), crc_val); jobEncaps->size = sizeof(time_luos_t) + CRC_SIZE; diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 4c428c77a..42955246a 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -344,7 +344,7 @@ _CRITICAL void Serial_Send(void) if (job->timestamp) { // Convert date to a sendable timestamp and put it in the end of the message - time_luos_t timestamp = Phy_ComputeMsgTimestamp(job); + time_luos_t timestamp = Phy_ComputeMsgTimestamp(phy_serial, job); memcpy(&TX_data[sizeof(SerialHeader_t) + job->size - +sizeof(timestamp)], ×tamp, sizeof(time_luos_t)); TX_data[sizeof(SerialHeader_t) + job->size] = SERIAL_FOOTER; } diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 2305e40a2..2ba19b3f3 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -699,7 +699,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -740,7 +740,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -781,7 +781,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = BASE_PROTOCOL; @@ -822,7 +822,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -863,7 +863,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -903,7 +903,7 @@ void unittest_phy_ComputeHeader() { phy_test_reset(); // Create a fake service with id 1 - Phy_AddLocalServices(1, 1); + Phy_AddLocalServices(1, 1); msg_t msg; msg.header.config = TIMESTAMP_PROTOCOL; @@ -1066,7 +1066,16 @@ void unittest_phy_ComputeTimestamp() { TRY { - Phy_ComputeMsgTimestamp(NULL); + phy_job_t job; + Phy_ComputeMsgTimestamp(NULL, &job); + } + TEST_ASSERT_TRUE(IS_ASSERT()); + END_TRY; + + TRY + { + luos_phy phy; + Phy_ComputeMsgTimestamp(luos_phy, NULL); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1076,7 +1085,7 @@ void unittest_phy_ComputeTimestamp() phy_job_t job; job.timestamp = false; job.data_pt = (uint8_t *)msg_buffer; - Phy_ComputeMsgTimestamp(&job); + Phy_ComputeMsgTimestamp(luos_phy, &job); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1086,7 +1095,7 @@ void unittest_phy_ComputeTimestamp() phy_job_t job; job.timestamp = true; job.data_pt = NULL; - Phy_ComputeMsgTimestamp(&job); + Phy_ComputeMsgTimestamp(luos_phy, &job); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1115,11 +1124,16 @@ void unittest_phy_ComputeTimestamp() volatile time_luos_t timestamp = TimeOD_TimeFrom_ns(10); memcpy(&msg->data[msg->header.size], (void *)×tamp, sizeof(time_luos_t)); - volatile time_luos_t resulting_latency = Phy_ComputeMsgTimestamp(&job); + volatile time_luos_t resulting_latency = Phy_ComputeMsgTimestamp(luos_phy, &job); - TEST_ASSERT_EQUAL(0xAE, job.msg_pt->data[0]); #ifndef _WIN32 TEST_ASSERT_NOT_EQUAL(TimeOD_TimeTo_ns(timestamp), TimeOD_TimeTo_ns(resulting_latency)); +#endif + Phy_DisableSynchro(luos_phy); + resulting_latency = Phy_ComputeMsgTimestamp(luos_phy, &job); + +#ifndef _WIN32 + TEST_ASSERT_EQUAL(TimeOD_TimeTo_ns(timestamp), TimeOD_TimeTo_ns(resulting_latency)); #endif } CATCH From e25326c465e16290711c4df090c59ae4f3ec6a8a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 18:17:06 +0200 Subject: [PATCH 128/198] [OD] rename the `_private` var into `raw` to explicitely allow users to perform calculations with `raw` instead of converting it each time. --- engine/OD/od_angular.h | 32 +++++----- engine/OD/od_electric.h | 30 +++++----- engine/OD/od_force.h | 52 ++++++++-------- engine/OD/od_illuminance.h | 6 +- engine/OD/od_linear.h | 60 +++++++++---------- engine/OD/od_pressure.h | 16 ++--- engine/OD/od_ratio.h | 6 +- engine/OD/od_temperature.h | 14 ++--- engine/core/inc/time_luos.h | 30 +++++----- test/tests_core/tests_od/test_angular/main.c | 22 +++---- test/tests_core/tests_od/test_electric/main.c | 24 ++++---- test/tests_core/tests_od/test_force/main.c | 32 +++++----- .../tests_od/test_illuminance/main.c | 6 +- test/tests_core/tests_od/test_linear/main.c | 36 +++++------ test/tests_core/tests_od/test_pressure/main.c | 10 ++-- test/tests_core/tests_od/test_ratio/main.c | 6 +- .../tests_od/test_temperature/main.c | 10 ++-- test/tests_core/tests_od/test_time/main.c | 18 +++--- 18 files changed, 205 insertions(+), 205 deletions(-) diff --git a/engine/OD/od_angular.h b/engine/OD/od_angular.h index c5c196726..e2e607cfd 100644 --- a/engine/OD/od_angular.h +++ b/engine/OD/od_angular.h @@ -13,12 +13,12 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } angular_position_t; typedef struct { - float _private; + float raw; } angular_speed_t; /******************************************************************************* @@ -34,39 +34,39 @@ typedef struct // deg static inline float AngularOD_PositionTo_deg(angular_position_t self) { - return self._private; + return self.raw; } static inline angular_position_t AngularOD_PositionFrom_deg(float deg) { angular_position_t self; - self._private = deg; + self.raw = deg; return self; } // rev static inline float AngularOD_PositionTo_rev(angular_position_t self) { - return self._private / 360.0f; + return self.raw / 360.0f; } static inline angular_position_t AngularOD_PositionFrom_rev(float rev) { angular_position_t self; - self._private = rev * 360.0f; + self.raw = rev * 360.0f; return self; } // rad static inline float AngularOD_PositionTo_rad(angular_position_t self) { - return (self._private * 2.0f * 3.141592653589793f) / 360.0f; + return (self.raw * 2.0f * 3.141592653589793f) / 360.0f; } static inline angular_position_t AngularOD_PositionFrom_rad(float rad) { angular_position_t self; - self._private = (rad * 360.0f) / (2.0f * 3.141592653589793f); + self.raw = (rad * 360.0f) / (2.0f * 3.141592653589793f); return self; } @@ -93,52 +93,52 @@ static inline void AngularOD_PositionFromMsg(angular_position_t *const self, con // deg_s static inline float AngularOD_SpeedTo_deg_s(angular_speed_t self) { - return self._private; + return self.raw; } static inline angular_speed_t AngularOD_SpeedFrom_deg_s(float deg) { angular_speed_t self; - self._private = deg; + self.raw = deg; return self; } // rev_s static inline float AngularOD_SpeedTo_rev_s(angular_speed_t self) { - return self._private / 360.0f; + return self.raw / 360.0f; } static inline angular_speed_t AngularOD_SpeedFrom_rev_s(float rev_s) { angular_speed_t self; - self._private = rev_s * 360.0f; + self.raw = rev_s * 360.0f; return self; } // rev_min static inline float AngularOD_SpeedTo_rev_min(angular_speed_t self) { - return self._private * 60.0f / 360.0f; + return self.raw * 60.0f / 360.0f; } static inline angular_speed_t AngularOD_SpeedFrom_rev_min(float rev_min) { angular_speed_t self; - self._private = rev_min * 360.0f / 60.0f; + self.raw = rev_min * 360.0f / 60.0f; return self; } // rad_s static inline float AngularOD_SpeedTo_rad_s(angular_speed_t self) { - return (self._private * 2.0f * 3.141592653589793f) / 360.0f; + return (self.raw * 2.0f * 3.141592653589793f) / 360.0f; } static inline angular_speed_t AngularOD_SpeedFrom_rad_s(float rad_s) { angular_speed_t self; - self._private = (rad_s * 360.0f) / (2.0f * 3.141592653589793f); + self.raw = (rad_s * 360.0f) / (2.0f * 3.141592653589793f); return self; } diff --git a/engine/OD/od_electric.h b/engine/OD/od_electric.h index ee166a140..d125c6f50 100644 --- a/engine/OD/od_electric.h +++ b/engine/OD/od_electric.h @@ -13,17 +13,17 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } voltage_t; typedef struct { - float _private; + float raw; } current_t; typedef struct { - float _private; + float raw; } power_t; /******************************************************************************* * Variables @@ -38,26 +38,26 @@ typedef struct // mv static inline float ElectricOD_VoltageTo_mV(voltage_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline voltage_t ElectricOD_VoltageFrom_mV(float mv) { voltage_t self; - self._private = mv / 1000.0f; + self.raw = mv / 1000.0f; return self; } // v static inline float ElectricOD_VoltageTo_V(voltage_t self) { - return self._private; + return self.raw; } static inline voltage_t ElectricOD_VoltageFrom_V(float v) { voltage_t self; - self._private = v; + self.raw = v; return self; } @@ -84,26 +84,26 @@ static inline void ElectricOD_VoltageFromMsg(voltage_t *const self, const msg_t // ma static inline float ElectricOD_CurrentTo_mA(current_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline current_t ElectricOD_CurrentFrom_mA(float ma) { current_t self; - self._private = ma / 1000.0f; + self.raw = ma / 1000.0f; return self; } // A static inline float ElectricOD_CurrentTo_A(current_t self) { - return self._private; + return self.raw; } static inline current_t ElectricOD_CurrentFrom_A(float a) { current_t self; - self._private = a; + self.raw = a; return self; } @@ -130,26 +130,26 @@ static inline void ElectricOD_CurrentFromMsg(current_t *const self, const msg_t // mw static inline float ElectricOD_PowerTo_mW(power_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline power_t ElectricOD_PowerFrom_mW(float mw) { power_t self; - self._private = mw / 1000.0f; + self.raw = mw / 1000.0f; return self; } // A static inline float ElectricOD_PowerTo_W(power_t self) { - return self._private; + return self.raw; } static inline power_t ElectricOD_PowerFrom_W(float w) { power_t self; - self._private = w; + self.raw = w; return self; } diff --git a/engine/OD/od_force.h b/engine/OD/od_force.h index ad76fddc4..070cc1317 100644 --- a/engine/OD/od_force.h +++ b/engine/OD/od_force.h @@ -13,12 +13,12 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } moment_t; typedef struct { - float _private; + float raw; } force_t; /******************************************************************************* * Variables @@ -34,104 +34,104 @@ typedef struct // N.mm static inline float ForceOD_MomentTo_N_mm(moment_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline moment_t ForceOD_MomentFrom_N_mm(float n_mm) { moment_t self; - self._private = n_mm / 1000.0f; + self.raw = n_mm / 1000.0f; return self; } // N.cm static inline float ForceOD_MomentTo_N_cm(moment_t self) { - return self._private * 100.0f; + return self.raw * 100.0f; } static inline moment_t ForceOD_MomentFrom_N_cm(float n_cm) { moment_t self; - self._private = n_cm / 100.0f; + self.raw = n_cm / 100.0f; return self; } // N.m static inline float ForceOD_MomentTo_N_m(moment_t self) { - return self._private; + return self.raw; } static inline moment_t ForceOD_MomentFrom_N_m(float n_m) { moment_t self; - self._private = n_m; + self.raw = n_m; return self; } // kgf.mm static inline float ForceOD_MomentTo_kgf_mm(moment_t self) { - return self._private * 101.97f; + return self.raw * 101.97f; } static inline moment_t ForceOD_MomentFrom_kgf_mm(float kgf_mm) { moment_t self; - self._private = kgf_mm / 101.97f; + self.raw = kgf_mm / 101.97f; return self; } // kgf.cm static inline float ForceOD_MomentTo_kgf_cm(moment_t self) { - return self._private * 10.2f; + return self.raw * 10.2f; } static inline moment_t ForceOD_MomentFrom_kgf_cm(float kgf_cm) { moment_t self; - self._private = kgf_cm / 10.2f; + self.raw = kgf_cm / 10.2f; return self; } // kgf.m static inline float ForceOD_MomentTo_kgf_m(moment_t self) { - return self._private * 0.102f; + return self.raw * 0.102f; } static inline moment_t ForceOD_MomentFrom_kgf_m(float kgf_m) { moment_t self; - self._private = kgf_m / 0.102f; + self.raw = kgf_m / 0.102f; return self; } // ozf.in static inline float ForceOD_MomentTo_ozf_in(moment_t self) { - return self._private * 141.612f; + return self.raw * 141.612f; } static inline moment_t ForceOD_MomentFrom_ozf_in(float ozf_in) { moment_t self; - self._private = ozf_in / 141.612f; + self.raw = ozf_in / 141.612f; return self; } // lbf.in static inline float ForceOD_MomentTo_lbf_in(moment_t self) { - return self._private * 8.851f; + return self.raw * 8.851f; } static inline moment_t ForceOD_MomentFrom_lbf_in(float lbf_in) { moment_t self; - self._private = lbf_in / 8.851f; + self.raw = lbf_in / 8.851f; return self; } @@ -158,52 +158,52 @@ static inline void ForceOD_MomentFromMsg(moment_t *const self, const msg_t *cons // N static inline float ForceOD_ForceTo_N(force_t self) { - return self._private; + return self.raw; } static inline force_t ForceOD_ForceFrom_N(float n) { force_t self; - self._private = n; + self.raw = n; return self; } // kgf static inline float ForceOD_ForceTo_kgf(force_t self) { - return self._private * 0.102f; + return self.raw * 0.102f; } static inline force_t ForceOD_ForceFrom_kgf(float kgf) { force_t self; - self._private = kgf / 0.102f; + self.raw = kgf / 0.102f; return self; } // ozf static inline float ForceOD_ForceTo_ozf(force_t self) { - return self._private * 3.5969430896f; + return self.raw * 3.5969430896f; } static inline force_t ForceOD_ForceFrom_ozf(float ozf) { force_t self; - self._private = ozf / 3.5969430896f; + self.raw = ozf / 3.5969430896f; return self; } // lbf static inline float ForceOD_ForceTo_lbf(force_t self) { - return self._private * 0.2248089431f; + return self.raw * 0.2248089431f; } static inline force_t ForceOD_ForceFrom_lbf(float lbf) { force_t self; - self._private = lbf / 0.2248089431f; + self.raw = lbf / 0.2248089431f; return self; } diff --git a/engine/OD/od_illuminance.h b/engine/OD/od_illuminance.h index 210fbf1ec..2e06d06f1 100644 --- a/engine/OD/od_illuminance.h +++ b/engine/OD/od_illuminance.h @@ -13,7 +13,7 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } illuminance_t; // GPIO struct @@ -44,13 +44,13 @@ typedef struct __attribute__((__packed__)) // lx static inline float IlluminanceOD_IlluminanceTo_Lux(illuminance_t self) { - return self._private; + return self.raw; } static inline illuminance_t IlluminanceOD_IlluminanceFrom_Lux(float lx) { illuminance_t self; - self._private = lx; + self.raw = lx; return self; } diff --git a/engine/OD/od_linear.h b/engine/OD/od_linear.h index b25e9f517..6428f9be3 100644 --- a/engine/OD/od_linear.h +++ b/engine/OD/od_linear.h @@ -14,12 +14,12 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } linear_position_t; typedef struct { - float _private; + float raw; } linear_speed_t; /******************************************************************************* @@ -35,117 +35,117 @@ typedef struct // nm static inline float LinearOD_PositionTo_nm(linear_position_t self) { - return self._private * 1000000000.0f; + return self.raw * 1000000000.0f; } static inline linear_position_t LinearOD_PositionFrom_nm(float nm) { linear_position_t self; - self._private = nm / 1000000000.0f; + self.raw = nm / 1000000000.0f; return self; } // um static inline float LinearOD_PositionTo_um(linear_position_t self) { - return self._private * 1000000.0f; + return self.raw * 1000000.0f; } static inline linear_position_t LinearOD_PositionFrom_um(float um) { linear_position_t self; - self._private = um / 1000000.0f; + self.raw = um / 1000000.0f; return self; } // mm static inline float LinearOD_PositionTo_mm(linear_position_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline linear_position_t LinearOD_PositionFrom_mm(float mm) { linear_position_t self; - self._private = mm / 1000.0f; + self.raw = mm / 1000.0f; return self; } // cm static inline float LinearOD_PositionTo_cm(linear_position_t self) { - return self._private * 100.0f; + return self.raw * 100.0f; } static inline linear_position_t LinearOD_PositionFrom_cm(float cm) { linear_position_t self; - self._private = cm / 100.0f; + self.raw = cm / 100.0f; return self; } // m static inline float LinearOD_PositionTo_m(linear_position_t self) { - return self._private; + return self.raw; } static inline linear_position_t LinearOD_PositionFrom_m(float m) { linear_position_t self; - self._private = m; + self.raw = m; return self; } // km static inline float LinearOD_PositionTo_km(linear_position_t self) { - return self._private / 1000.0f; + return self.raw / 1000.0f; } static inline linear_position_t LinearOD_PositionFrom_km(float km) { linear_position_t self; - self._private = km * 1000.0f; + self.raw = km * 1000.0f; return self; } // inch static inline float LinearOD_PositionTo_in(linear_position_t self) { - return self._private * 39.37007874015748f; + return self.raw * 39.37007874015748f; } static inline linear_position_t LinearOD_PositionFrom_in(float in) { linear_position_t self; - self._private = in / 39.37007874015748f; + self.raw = in / 39.37007874015748f; return self; } // foot static inline float LinearOD_PositionTo_ft(linear_position_t self) { - return self._private * 3.28084f; + return self.raw * 3.28084f; } static inline linear_position_t LinearOD_PositionFrom_ft(float ft) { linear_position_t self; - self._private = ft / 3.28084f; + self.raw = ft / 3.28084f; return self; } // mile static inline float LinearOD_PositionTo_mi(linear_position_t self) { - return self._private / 1609.344f; + return self.raw / 1609.344f; } static inline linear_position_t LinearOD_PositionFrom_mi(float mi) { linear_position_t self; - self._private = mi * 1609.344f; + self.raw = mi * 1609.344f; return self; } @@ -172,66 +172,66 @@ static inline void LinearOD_PositionFromMsg(linear_position_t *const self, const // mm_s static inline float LinearOD_SpeedTo_mm_s(linear_speed_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline linear_speed_t LinearOD_SpeedFrom_mm_s(float mm_s) { linear_speed_t self; - self._private = mm_s / 1000.0f; + self.raw = mm_s / 1000.0f; return self; } // m_s static inline float LinearOD_SpeedTo_m_s(linear_speed_t self) { - return self._private; + return self.raw; } static inline linear_speed_t LinearOD_SpeedFrom_m_s(float m_s) { linear_speed_t self; - self._private = m_s; + self.raw = m_s; return self; } // km_h static inline float LinearOD_SpeedTo_km_h(linear_speed_t self) { - return (self._private * 3600.0f) / 1000.0f; + return (self.raw * 3600.0f) / 1000.0f; } static inline linear_speed_t LinearOD_SpeedFrom_km_h(float km_h) { linear_speed_t self; - self._private = (km_h * 1000.0f) / 3600.0f; + self.raw = (km_h * 1000.0f) / 3600.0f; return self; } // in_s static inline float LinearOD_SpeedTo_in_s(linear_speed_t self) { - return self._private * 39.37007874015748; + return self.raw * 39.37007874015748; } static inline linear_speed_t LinearOD_SpeedFrom_in_s(float in_s) { linear_speed_t self; - self._private = in_s / 39.37007874015748; + self.raw = in_s / 39.37007874015748; return self; } // mi_h static inline float LinearOD_SpeedTo_mi_h(linear_speed_t self) { - return self._private * 2.23694f; + return self.raw * 2.23694f; } static inline linear_speed_t LinearOD_SpeedFrom_mi_h(float mi_h) { linear_speed_t self; - self._private = mi_h / 2.23694f; + self.raw = mi_h / 2.23694f; return self; } diff --git a/engine/OD/od_pressure.h b/engine/OD/od_pressure.h index b429787d5..d0be87258 100644 --- a/engine/OD/od_pressure.h +++ b/engine/OD/od_pressure.h @@ -13,7 +13,7 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } pressure_t; /******************************************************************************* @@ -29,39 +29,39 @@ typedef struct // Pa static inline float PressureOD_PressureTo_Pa(pressure_t self) { - return self._private; + return self.raw; } static inline pressure_t PressureOD_PressureFrom_Pa(float Pa) { pressure_t self; - self._private = Pa; + self.raw = Pa; return self; } // Bars static inline float PressureOD_PressureTo_Bars(pressure_t self) { - return self._private / 100000.0f; + return self.raw / 100000.0f; } static inline pressure_t PressureOD_PressureFrom_Bars(float Bars) { pressure_t self; - self._private = Bars * (float)100000.0f; + self.raw = Bars * (float)100000.0f; return self; } // hPa static inline float PressureOD_PressureTo_hPa(pressure_t self) { - return self._private / (float)100.0f; + return self.raw / (float)100.0f; } static inline pressure_t PressureOD_PressureFrom_hPa(float hPa) { pressure_t self; - self._private = hPa * 100.0f; + self.raw = hPa * 100.0f; return self; } @@ -82,4 +82,4 @@ static inline void PressureOD_PressureFromMsg(pressure_t *const self, const msg_ memcpy(self, msg->data, msg->header.size); } -#endif /* OD_OD_PRESSURE_H_ */ \ No newline at end of file +#endif /* OD_OD_PRESSURE_H_ */ diff --git a/engine/OD/od_ratio.h b/engine/OD/od_ratio.h index 7c6cd1998..47c391431 100644 --- a/engine/OD/od_ratio.h +++ b/engine/OD/od_ratio.h @@ -13,7 +13,7 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } ratio_t; /******************************************************************************* @@ -29,13 +29,13 @@ typedef struct // percentage static inline float RatioOD_RatioTo_Percent(ratio_t self) { - return self._private; + return self.raw; } static inline ratio_t RatioOD_RatioFrom_Percent(float percentage) { ratio_t self; - self._private = percentage; + self.raw = percentage; return self; } diff --git a/engine/OD/od_temperature.h b/engine/OD/od_temperature.h index d95b6df0c..e3344013a 100644 --- a/engine/OD/od_temperature.h +++ b/engine/OD/od_temperature.h @@ -13,7 +13,7 @@ ******************************************************************************/ typedef struct { - float _private; + float raw; } temperature_t; /******************************************************************************* @@ -29,39 +29,39 @@ typedef struct // °C static inline float TemperatureOD_TemperatureTo_deg_c(temperature_t self) { - return self._private; + return self.raw; } static inline temperature_t TemperatureOD_TemperatureFrom_deg_c(float deg_c) { temperature_t self; - self._private = deg_c; + self.raw = deg_c; return self; } // °F static inline float TemperatureOD_TemperatureTo_deg_f(temperature_t self) { - return self._private * 1.8f + 32.0f; + return self.raw * 1.8f + 32.0f; } static inline temperature_t TemperatureOD_TemperatureFrom_deg_f(float deg_f) { temperature_t self; - self._private = (deg_f - 32.0f) / 1.8f; + self.raw = (deg_f - 32.0f) / 1.8f; return self; } // °K static inline float TemperatureOD_TemperatureTo_deg_k(temperature_t self) { - return self._private + 273.15f; + return self.raw + 273.15f; } static inline temperature_t TemperatureOD_TemperatureFrom_deg_k(float deg_k) { temperature_t self; - self._private = deg_k - 273.15f; + self.raw = deg_k - 273.15f; return self; } diff --git a/engine/core/inc/time_luos.h b/engine/core/inc/time_luos.h index 6ff874915..9598906d6 100644 --- a/engine/core/inc/time_luos.h +++ b/engine/core/inc/time_luos.h @@ -13,7 +13,7 @@ ******************************************************************************/ typedef struct { - double _private; + double raw; } time_luos_t; /******************************************************************************* @@ -29,91 +29,91 @@ typedef struct // sec static inline double TimeOD_TimeTo_s(time_luos_t self) { - return self._private; + return self.raw; } static inline time_luos_t TimeOD_TimeFrom_s(double sec) { time_luos_t self; - self._private = sec; + self.raw = sec; return self; } // ms static inline double TimeOD_TimeTo_ms(time_luos_t self) { - return self._private * 1000.0f; + return self.raw * 1000.0f; } static inline time_luos_t TimeOD_TimeFrom_ms(double ms) { time_luos_t self; - self._private = ms / 1000.0f; + self.raw = ms / 1000.0f; return self; } // µs static inline double TimeOD_TimeTo_us(time_luos_t self) { - return self._private * 1000000.0f; + return self.raw * 1000000.0f; } static inline time_luos_t TimeOD_TimeFrom_us(double us) { time_luos_t self; - self._private = us / 1000000.0f; + self.raw = us / 1000000.0f; return self; } // ns static inline double TimeOD_TimeTo_ns(time_luos_t self) { - return self._private * 1000000000.0f; + return self.raw * 1000000000.0f; } static inline time_luos_t TimeOD_TimeFrom_ns(double ns) { time_luos_t self; - self._private = ns / 1000000000.0f; + self.raw = ns / 1000000000.0f; return self; } // min static inline double TimeOD_TimeTo_min(time_luos_t self) { - return self._private / 60.0f; + return self.raw / 60.0f; } static inline time_luos_t TimeOD_TimeFrom_min(double min) { time_luos_t self; - self._private = min * 60.0f; + self.raw = min * 60.0f; return self; } // hour static inline double TimeOD_TimeTo_h(time_luos_t self) { - return self._private / 3600.0f; + return self.raw / 3600.0f; } static inline time_luos_t TimeOD_TimeFrom_h(double hour) { time_luos_t self; - self._private = hour * 3600.0f; + self.raw = hour * 3600.0f; return self; } // day static inline double TimeOD_TimeTo_day(time_luos_t self) { - return self._private / 86400.0f; + return self.raw / 86400.0f; } static inline time_luos_t TimeOD_TimeFrom_day(double day) { time_luos_t self; - self._private = day * 86400.0f; + self.raw = day * 86400.0f; return self; } diff --git a/test/tests_core/tests_od/test_angular/main.c b/test/tests_core/tests_od/test_angular/main.c index 8061db23f..673c877b6 100644 --- a/test/tests_core/tests_od/test_angular/main.c +++ b/test/tests_core/tests_od/test_angular/main.c @@ -11,13 +11,13 @@ void unittest_Od_angularPosition(void) NEW_STEP("Angular position FROM deg test"); angular_pos = AngularOD_PositionFrom_deg(90); - TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref._private, (uint32_t)angular_pos._private); + TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref.raw, (uint32_t)angular_pos.raw); NEW_STEP("Angular position FROM rev test"); angular_pos = AngularOD_PositionFrom_rev(0.25); - TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref._private, (uint32_t)angular_pos._private); + TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref.raw, (uint32_t)angular_pos.raw); NEW_STEP("Angular position FROM rad test"); angular_pos = AngularOD_PositionFrom_rad(1.5707963267948966); - TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref._private, (uint32_t)angular_pos._private); + TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref.raw, (uint32_t)angular_pos.raw); } NEW_TEST_CASE("Angular position TO test"); { @@ -45,12 +45,12 @@ void unittest_Od_angularPosition(void) msg_ref.header.size = sizeof(angular_position_t); memcpy(msg_ref.data, &angular_pos_ref, sizeof(angular_position_t)); AngularOD_PositionFromMsg(&angular_pos, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref._private, (uint32_t)angular_pos._private); + TEST_ASSERT_EQUAL((uint32_t)angular_pos_ref.raw, (uint32_t)angular_pos.raw); NEW_STEP("Angular position msg conversion TO test"); AngularOD_PositionToMsg(&angular_pos_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((angular_position_t *)msg_ref.data)->_private, (uint32_t)((angular_position_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((angular_position_t *)msg_ref.data)->raw, (uint32_t)((angular_position_t *)msg.data)->raw); } NEW_TEST_CASE("Angular position msg conversion wrong values test"); { @@ -93,16 +93,16 @@ void unittest_Od_angularSpeed(void) NEW_STEP("Angular speed FROM deg/s test"); angular_speed = AngularOD_SpeedFrom_deg_s(90); - TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref._private, (uint32_t)angular_speed._private); + TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref.raw, (uint32_t)angular_speed.raw); NEW_STEP("Angular speed FROM rev/s test"); angular_speed = AngularOD_SpeedFrom_rev_s(0.25); - TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref._private, (uint32_t)angular_speed._private); + TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref.raw, (uint32_t)angular_speed.raw); NEW_STEP("Angular speed FROM rev/min test"); angular_speed = AngularOD_SpeedFrom_rev_min(0.25 * 60); - TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref._private, (uint32_t)angular_speed._private); + TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref.raw, (uint32_t)angular_speed.raw); NEW_STEP("Angular speed FROM rad/s test"); angular_speed = AngularOD_SpeedFrom_rad_s(1.5707963267948966); - TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref._private, (uint32_t)angular_speed._private); + TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref.raw, (uint32_t)angular_speed.raw); } NEW_TEST_CASE("Angular speed TO test"); { @@ -133,12 +133,12 @@ void unittest_Od_angularSpeed(void) msg_ref.header.size = sizeof(angular_speed_t); memcpy(msg_ref.data, &angular_speed_ref, sizeof(angular_speed_t)); AngularOD_SpeedFromMsg(&angular_speed, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref._private, (uint32_t)angular_speed._private); + TEST_ASSERT_EQUAL((uint32_t)angular_speed_ref.raw, (uint32_t)angular_speed.raw); NEW_STEP("Angular speed msg conversion TO test"); AngularOD_SpeedToMsg(&angular_speed_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((angular_speed_t *)msg_ref.data)->_private, (uint32_t)((angular_speed_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((angular_speed_t *)msg_ref.data)->raw, (uint32_t)((angular_speed_t *)msg.data)->raw); } NEW_TEST_CASE("Angular speed msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_electric/main.c b/test/tests_core/tests_od/test_electric/main.c index f2e7645f1..74ba00e88 100644 --- a/test/tests_core/tests_od/test_electric/main.c +++ b/test/tests_core/tests_od/test_electric/main.c @@ -11,10 +11,10 @@ void unittest_Od_electricVoltage(void) NEW_STEP("Electric voltage FROM V test"); voltage = ElectricOD_VoltageFrom_V(1.0); - TEST_ASSERT_EQUAL((uint32_t)voltage_ref._private, (uint32_t)voltage._private); + TEST_ASSERT_EQUAL((uint32_t)voltage_ref.raw, (uint32_t)voltage.raw); NEW_STEP("Electric voltage FROM mV test"); voltage = ElectricOD_VoltageFrom_mV(1000); - TEST_ASSERT_EQUAL((uint32_t)voltage_ref._private, (uint32_t)voltage._private); + TEST_ASSERT_EQUAL((uint32_t)voltage_ref.raw, (uint32_t)voltage.raw); } NEW_TEST_CASE("Electric voltage TO test"); { @@ -39,12 +39,12 @@ void unittest_Od_electricVoltage(void) msg_ref.header.size = sizeof(voltage_t); memcpy(msg_ref.data, &voltage_ref, sizeof(voltage_t)); ElectricOD_VoltageFromMsg(&voltage, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)voltage_ref._private, (uint32_t)voltage._private); + TEST_ASSERT_EQUAL((uint32_t)voltage_ref.raw, (uint32_t)voltage.raw); NEW_STEP("Electric voltage msg conversion TO test"); ElectricOD_VoltageToMsg(&voltage_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((voltage_t *)msg_ref.data)->_private, (uint32_t)((voltage_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((voltage_t *)msg_ref.data)->raw, (uint32_t)((voltage_t *)msg.data)->raw); } NEW_TEST_CASE("Electric voltage msg conversion wrong values test"); { @@ -87,10 +87,10 @@ void unittest_Od_electricCurrent(void) NEW_STEP("Electric current FROM A test"); current = ElectricOD_CurrentFrom_A(1.0); - TEST_ASSERT_EQUAL((uint32_t)current_ref._private, (uint32_t)current._private); + TEST_ASSERT_EQUAL((uint32_t)current_ref.raw, (uint32_t)current.raw); NEW_STEP("Electric current FROM mA test"); current = ElectricOD_CurrentFrom_mA(1000); - TEST_ASSERT_EQUAL((uint32_t)current_ref._private, (uint32_t)current._private); + TEST_ASSERT_EQUAL((uint32_t)current_ref.raw, (uint32_t)current.raw); } NEW_TEST_CASE("Electric current TO test"); { @@ -115,12 +115,12 @@ void unittest_Od_electricCurrent(void) msg_ref.header.size = sizeof(current_t); memcpy(msg_ref.data, ¤t_ref, sizeof(current_t)); ElectricOD_CurrentFromMsg(¤t, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)current_ref._private, (uint32_t)current._private); + TEST_ASSERT_EQUAL((uint32_t)current_ref.raw, (uint32_t)current.raw); NEW_STEP("Electric current msg conversion TO test"); ElectricOD_CurrentToMsg(¤t_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((current_t *)msg_ref.data)->_private, (uint32_t)((current_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((current_t *)msg_ref.data)->raw, (uint32_t)((current_t *)msg.data)->raw); } NEW_TEST_CASE("Electric current msg conversion wrong values test"); { @@ -163,10 +163,10 @@ void unittest_Od_electricPower(void) NEW_STEP("Electric power FROM W test"); power = ElectricOD_PowerFrom_W(1.0); - TEST_ASSERT_EQUAL((uint32_t)power_ref._private, (uint32_t)power._private); + TEST_ASSERT_EQUAL((uint32_t)power_ref.raw, (uint32_t)power.raw); NEW_STEP("Electric power FROM mW test"); power = ElectricOD_PowerFrom_mW(1000); - TEST_ASSERT_EQUAL((uint32_t)power_ref._private, (uint32_t)power._private); + TEST_ASSERT_EQUAL((uint32_t)power_ref.raw, (uint32_t)power.raw); } NEW_TEST_CASE("Electric power TO test"); { @@ -191,12 +191,12 @@ void unittest_Od_electricPower(void) msg_ref.header.size = sizeof(power_t); memcpy(msg_ref.data, &power_ref, sizeof(power_t)); ElectricOD_PowerFromMsg(&power, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)power_ref._private, (uint32_t)power._private); + TEST_ASSERT_EQUAL((uint32_t)power_ref.raw, (uint32_t)power.raw); NEW_STEP("Electric power msg conversion TO test"); ElectricOD_PowerToMsg(&power_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((power_t *)msg_ref.data)->_private, (uint32_t)((power_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((power_t *)msg_ref.data)->raw, (uint32_t)((power_t *)msg.data)->raw); } NEW_TEST_CASE("Electric power msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_force/main.c b/test/tests_core/tests_od/test_force/main.c index 028da1a33..4af7b8522 100644 --- a/test/tests_core/tests_od/test_force/main.c +++ b/test/tests_core/tests_od/test_force/main.c @@ -11,28 +11,28 @@ void unittest_Od_forceMoment(void) NEW_STEP("Force moment FROM Nm test"); moment = ForceOD_MomentFrom_N_m(90.5); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM Nmm test"); moment = ForceOD_MomentFrom_N_mm(90500); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM Ncm test"); moment = ForceOD_MomentFrom_N_cm(9050); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM Kgf/mm test"); moment = ForceOD_MomentFrom_kgf_mm(9228.43172745); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM Kgf/cm test"); moment = ForceOD_MomentFrom_kgf_cm(922.843172745); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM Kgf/m test"); moment = ForceOD_MomentFrom_kgf_m(9.22843172745); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM ozf/in test"); moment = ForceOD_MomentFrom_ozf_in(12815.87956868); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment FROM lbf/in test"); moment = ForceOD_MomentFrom_lbf_in(800.9924635902); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); } NEW_TEST_CASE("Force moment TO test"); { @@ -75,12 +75,12 @@ void unittest_Od_forceMoment(void) msg_ref.header.size = sizeof(moment_t); memcpy(msg_ref.data, &moment_ref, sizeof(moment_t)); ForceOD_MomentFromMsg(&moment, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)moment_ref._private, (uint32_t)moment._private); + TEST_ASSERT_EQUAL((uint32_t)moment_ref.raw, (uint32_t)moment.raw); NEW_STEP("Force moment msg conversion TO test"); ForceOD_MomentToMsg(&moment_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((moment_t *)msg_ref.data)->_private, (uint32_t)((moment_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((moment_t *)msg_ref.data)->raw, (uint32_t)((moment_t *)msg.data)->raw); } NEW_TEST_CASE("Force moment msg conversion wrong values test"); { @@ -123,16 +123,16 @@ void unittest_Od_forceForce(void) NEW_STEP("Force force FROM N test"); force = ForceOD_ForceFrom_N(90.5); - TEST_ASSERT_EQUAL((uint32_t)force_ref._private, (uint32_t)force._private); + TEST_ASSERT_EQUAL((uint32_t)force_ref.raw, (uint32_t)force.raw); NEW_STEP("Force force FROM Kgf test"); force = ForceOD_ForceFrom_kgf(9.22843172745); - TEST_ASSERT_EQUAL((uint32_t)force_ref._private, (uint32_t)force._private); + TEST_ASSERT_EQUAL((uint32_t)force_ref.raw, (uint32_t)force.raw); NEW_STEP("Force force FROM ozf test"); force = ForceOD_ForceFrom_ozf(325.52334961); - TEST_ASSERT_EQUAL((uint32_t)force_ref._private, (uint32_t)force._private); + TEST_ASSERT_EQUAL((uint32_t)force_ref.raw, (uint32_t)force.raw); NEW_STEP("Force force FROM lbf test"); force = ForceOD_ForceFrom_lbf(20.345209351); - TEST_ASSERT_EQUAL((uint32_t)force_ref._private, (uint32_t)force._private); + TEST_ASSERT_EQUAL((uint32_t)force_ref.raw, (uint32_t)force.raw); } NEW_TEST_CASE("Force force TO test"); { @@ -163,12 +163,12 @@ void unittest_Od_forceForce(void) msg_ref.header.size = sizeof(force_t); memcpy(msg_ref.data, &force_ref, sizeof(force_t)); ForceOD_ForceFromMsg(&force, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)force_ref._private, (uint32_t)force._private); + TEST_ASSERT_EQUAL((uint32_t)force_ref.raw, (uint32_t)force.raw); NEW_STEP("Force force msg conversion TO test"); ForceOD_ForceToMsg(&force_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((force_t *)msg_ref.data)->_private, (uint32_t)((force_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((force_t *)msg_ref.data)->raw, (uint32_t)((force_t *)msg.data)->raw); } NEW_TEST_CASE("Force force msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_illuminance/main.c b/test/tests_core/tests_od/test_illuminance/main.c index 82ea80b8a..91423cd96 100644 --- a/test/tests_core/tests_od/test_illuminance/main.c +++ b/test/tests_core/tests_od/test_illuminance/main.c @@ -11,7 +11,7 @@ void unittest_Od_illuminance_illuminance(void) NEW_STEP("Illuminance FROM lux test"); illuminance = IlluminanceOD_IlluminanceFrom_Lux(100); - TEST_ASSERT_EQUAL((uint32_t)illuminance_ref._private, (uint32_t)illuminance._private); + TEST_ASSERT_EQUAL((uint32_t)illuminance_ref.raw, (uint32_t)illuminance.raw); } NEW_TEST_CASE("Illuminance TO test"); { @@ -33,12 +33,12 @@ void unittest_Od_illuminance_illuminance(void) msg_ref.header.size = sizeof(illuminance_t); memcpy(msg_ref.data, &illuminance_ref, sizeof(illuminance_t)); IlluminanceOD_IlluminanceFromMsg(&illuminance, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)illuminance_ref._private, (uint32_t)illuminance._private); + TEST_ASSERT_EQUAL((uint32_t)illuminance_ref.raw, (uint32_t)illuminance.raw); NEW_STEP("Illuminance msg conversion TO test"); IlluminanceOD_IlluminanceToMsg(&illuminance_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((illuminance_t *)msg_ref.data)->_private, (uint32_t)((illuminance_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((illuminance_t *)msg_ref.data)->raw, (uint32_t)((illuminance_t *)msg.data)->raw); } NEW_TEST_CASE("Illuminance msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_linear/main.c b/test/tests_core/tests_od/test_linear/main.c index fea2b96ed..f386ce8bc 100644 --- a/test/tests_core/tests_od/test_linear/main.c +++ b/test/tests_core/tests_od/test_linear/main.c @@ -11,31 +11,31 @@ void unittest_Od_linearPosition(void) NEW_STEP("Linear position FROM m test"); linear_pos = LinearOD_PositionFrom_m(90); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM nm test"); linear_pos = LinearOD_PositionFrom_nm(90000000000); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM um test"); linear_pos = LinearOD_PositionFrom_um(90000000); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM mm test"); linear_pos = LinearOD_PositionFrom_mm(90000); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM cm test"); linear_pos = LinearOD_PositionFrom_cm(9000); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM km test"); linear_pos = LinearOD_PositionFrom_km(0.09); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM in test"); linear_pos = LinearOD_PositionFrom_in(3543.31); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM ft test"); linear_pos = LinearOD_PositionFrom_ft(295.275833333); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position FROM mi test"); linear_pos = LinearOD_PositionFrom_mi(0.05592345328276514954); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); } NEW_TEST_CASE("Linear position TO test"); { @@ -81,12 +81,12 @@ void unittest_Od_linearPosition(void) msg_ref.header.size = sizeof(linear_position_t); memcpy(msg_ref.data, &linear_pos_ref, sizeof(linear_position_t)); LinearOD_PositionFromMsg(&linear_pos, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref._private, (uint32_t)linear_pos._private); + TEST_ASSERT_EQUAL((uint32_t)linear_pos_ref.raw, (uint32_t)linear_pos.raw); NEW_STEP("Linear position msg conversion TO test"); LinearOD_PositionToMsg(&linear_pos_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((linear_position_t *)msg_ref.data)->_private, (uint32_t)((linear_position_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((linear_position_t *)msg_ref.data)->raw, (uint32_t)((linear_position_t *)msg.data)->raw); } NEW_TEST_CASE("Linear position msg conversion wrong values test"); { @@ -129,19 +129,19 @@ void unittest_Od_linearSpeed(void) NEW_STEP("Linear speed FROM m/s test"); linear_speed = LinearOD_SpeedFrom_m_s(90.5); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); NEW_STEP("Linear speed FROM mm/s test"); linear_speed = LinearOD_SpeedFrom_mm_s(90500); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); NEW_STEP("Linear speed FROM km/h test"); linear_speed = LinearOD_SpeedFrom_km_h(324); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); NEW_STEP("Linear speed FROM in/s test"); linear_speed = LinearOD_SpeedFrom_in_s(3543.307086614173); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); NEW_STEP("Linear speed FROM mph test"); linear_speed = LinearOD_SpeedFrom_mi_h(202.4427); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); } NEW_TEST_CASE("Linear speed TO test"); { @@ -175,12 +175,12 @@ void unittest_Od_linearSpeed(void) msg_ref.header.size = sizeof(linear_speed_t); memcpy(msg_ref.data, &linear_speed_ref, sizeof(linear_speed_t)); LinearOD_SpeedFromMsg(&linear_speed, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref._private, (uint32_t)linear_speed._private); + TEST_ASSERT_EQUAL((uint32_t)linear_speed_ref.raw, (uint32_t)linear_speed.raw); NEW_STEP("Linear speed msg conversion TO test"); LinearOD_SpeedToMsg(&linear_speed_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((linear_speed_t *)msg_ref.data)->_private, (uint32_t)((linear_speed_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((linear_speed_t *)msg_ref.data)->raw, (uint32_t)((linear_speed_t *)msg.data)->raw); } NEW_TEST_CASE("Linear speed msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_pressure/main.c b/test/tests_core/tests_od/test_pressure/main.c index f414bfdb5..728d9bb52 100644 --- a/test/tests_core/tests_od/test_pressure/main.c +++ b/test/tests_core/tests_od/test_pressure/main.c @@ -11,13 +11,13 @@ void unittest_Od_pressure(void) NEW_STEP("Pressure FROM Pa test"); pressure = PressureOD_PressureFrom_Pa(1000.0f); - TEST_ASSERT_EQUAL((uint32_t)pressure_ref._private, (uint32_t)pressure._private); + TEST_ASSERT_EQUAL((uint32_t)pressure_ref.raw, (uint32_t)pressure.raw); NEW_STEP("Pressure FROM bars test"); pressure = PressureOD_PressureFrom_Bars(0.01f); - TEST_ASSERT_EQUAL((uint32_t)pressure_ref._private, (uint32_t)pressure._private); + TEST_ASSERT_EQUAL((uint32_t)pressure_ref.raw, (uint32_t)pressure.raw); NEW_STEP("Pressure FROM hPa test"); pressure = PressureOD_PressureFrom_hPa(10.0f); - TEST_ASSERT_EQUAL((uint32_t)pressure_ref._private, (uint32_t)pressure._private); + TEST_ASSERT_EQUAL((uint32_t)pressure_ref.raw, (uint32_t)pressure.raw); } NEW_TEST_CASE("Pressure TO test"); { @@ -45,12 +45,12 @@ void unittest_Od_pressure(void) msg_ref.header.size = sizeof(pressure_t); memcpy(msg_ref.data, &pressure_ref, sizeof(pressure_t)); PressureOD_PressureFromMsg(&pressure, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)pressure_ref._private, (uint32_t)pressure._private); + TEST_ASSERT_EQUAL((uint32_t)pressure_ref.raw, (uint32_t)pressure.raw); NEW_STEP("Pressure msg conversion TO test"); PressureOD_PressureToMsg(&pressure_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((pressure_t *)msg_ref.data)->_private, (uint32_t)((pressure_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((pressure_t *)msg_ref.data)->raw, (uint32_t)((pressure_t *)msg.data)->raw); } NEW_TEST_CASE("Pressure msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_ratio/main.c b/test/tests_core/tests_od/test_ratio/main.c index e25d879d1..203c037cf 100644 --- a/test/tests_core/tests_od/test_ratio/main.c +++ b/test/tests_core/tests_od/test_ratio/main.c @@ -11,7 +11,7 @@ void unittest_Od_ratio(void) NEW_STEP("Ratio FROM Percent test"); ratio = RatioOD_RatioFrom_Percent(95.0f); - TEST_ASSERT_EQUAL((uint32_t)ratio_ref._private, (uint32_t)ratio._private); + TEST_ASSERT_EQUAL((uint32_t)ratio_ref.raw, (uint32_t)ratio.raw); } NEW_TEST_CASE("Ratio TO test"); { @@ -33,12 +33,12 @@ void unittest_Od_ratio(void) msg_ref.header.size = sizeof(ratio_t); memcpy(msg_ref.data, &ratio_ref, sizeof(ratio_t)); RatioOD_RatioFromMsg(&ratio, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)ratio_ref._private, (uint32_t)ratio._private); + TEST_ASSERT_EQUAL((uint32_t)ratio_ref.raw, (uint32_t)ratio.raw); NEW_STEP("Ratio msg conversion TO test"); RatioOD_RatioToMsg(&ratio_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((ratio_t *)msg_ref.data)->_private, (uint32_t)((ratio_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((ratio_t *)msg_ref.data)->raw, (uint32_t)((ratio_t *)msg.data)->raw); } NEW_TEST_CASE("Ratio msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_temperature/main.c b/test/tests_core/tests_od/test_temperature/main.c index 86f4e448c..60ed70796 100644 --- a/test/tests_core/tests_od/test_temperature/main.c +++ b/test/tests_core/tests_od/test_temperature/main.c @@ -11,13 +11,13 @@ void unittest_Od_temperature(void) NEW_STEP("Temperature FROM degree C test"); temperature = TemperatureOD_TemperatureFrom_deg_c(1000.0f); - TEST_ASSERT_EQUAL((uint32_t)temperature_ref._private, (uint32_t)temperature._private); + TEST_ASSERT_EQUAL((uint32_t)temperature_ref.raw, (uint32_t)temperature.raw); NEW_STEP("Temperature FROM degree F test"); temperature = TemperatureOD_TemperatureFrom_deg_f(1832.0f); - TEST_ASSERT_EQUAL((uint32_t)temperature_ref._private, (uint32_t)temperature._private); + TEST_ASSERT_EQUAL((uint32_t)temperature_ref.raw, (uint32_t)temperature.raw); NEW_STEP("Temperature FROM degree K test"); temperature = TemperatureOD_TemperatureFrom_deg_k(1273.15f); - TEST_ASSERT_EQUAL((uint32_t)temperature_ref._private, (uint32_t)temperature._private); + TEST_ASSERT_EQUAL((uint32_t)temperature_ref.raw, (uint32_t)temperature.raw); } NEW_TEST_CASE("Temperature TO test"); { @@ -45,12 +45,12 @@ void unittest_Od_temperature(void) msg_ref.header.size = sizeof(temperature_t); memcpy(msg_ref.data, &temperature_ref, sizeof(temperature_t)); TemperatureOD_TemperatureFromMsg(&temperature, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)temperature_ref._private, (uint32_t)temperature._private); + TEST_ASSERT_EQUAL((uint32_t)temperature_ref.raw, (uint32_t)temperature.raw); NEW_STEP("Temperature msg conversion TO test"); TemperatureOD_TemperatureToMsg(&temperature_ref, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)((temperature_t *)msg_ref.data)->_private, (uint32_t)((temperature_t *)msg.data)->_private); + TEST_ASSERT_EQUAL((uint32_t)((temperature_t *)msg_ref.data)->raw, (uint32_t)((temperature_t *)msg.data)->raw); } NEW_TEST_CASE("Temperature msg conversion wrong values test"); { diff --git a/test/tests_core/tests_od/test_time/main.c b/test/tests_core/tests_od/test_time/main.c index ee2ca69dc..febf03999 100644 --- a/test/tests_core/tests_od/test_time/main.c +++ b/test/tests_core/tests_od/test_time/main.c @@ -11,25 +11,25 @@ void unittest_Od_time(void) NEW_STEP("Time FROM seconds test"); time = TimeOD_TimeFrom_s(1000.5f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM ms test"); time = TimeOD_TimeFrom_ms(1000500.0f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM us test"); time = TimeOD_TimeFrom_us(1000500000.0f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM ns test"); time = TimeOD_TimeFrom_ns(1000500000000.0f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM min test"); time = TimeOD_TimeFrom_min(16.675f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM hour test"); time = TimeOD_TimeFrom_h(0.2779166666666667f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time FROM day test"); time = TimeOD_TimeFrom_day(0.0115798611f); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); } NEW_TEST_CASE("Time TO test"); { @@ -69,12 +69,12 @@ void unittest_Od_time(void) msg_ref.header.size = sizeof(time_luos_t); memcpy(msg_ref.data, &time_ref, sizeof(time_luos_t)); TimeOD_TimeFromMsg(&time, &msg_ref); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); NEW_STEP("Time msg conversion TO test"); TimeOD_TimeToMsg(&time, &msg); TEST_ASSERT_EQUAL(msg_ref.header.cmd, msg.header.cmd); TEST_ASSERT_EQUAL(msg_ref.header.size, msg.header.size); - TEST_ASSERT_EQUAL((uint32_t)time_ref._private, (uint32_t)time._private); + TEST_ASSERT_EQUAL((uint32_t)time_ref.raw, (uint32_t)time.raw); } NEW_TEST_CASE("Time msg conversion wrong values test"); { From 1e967606878e1b24eb7e85f98b7027f9b452a16b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 18:17:41 +0200 Subject: [PATCH 129/198] Fix some OD warnings on `Controller_motor` example --- .../lib/Controller_motor/ll_motor.c | 32 +++++++++---------- .../lib/Controller_motor/ll_motor.h | 10 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.c b/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.c index cebd728c4..7d55b9476 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.c +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.c @@ -205,16 +205,16 @@ void ll_motor_enable(char state) ******************************************************************************/ void ll_motor_Command(uint16_t mode, float ratio) { - float current = ll_motor_GetCurrent(); - float currentfactor = 1.0f; - currentfactor = *motor_parameters.limit_current / (current * 2); + current_t current = ElectricOD_CurrentFrom_A(ll_motor_GetCurrent()); + float currentfactor; + currentfactor = motor_parameters.limit_current->raw / (current.raw * 2.0f); static float surpCurrentSum = 0.0; - float surpCurrent = current - *motor_parameters.limit_current; + const float surpCurrent = current.raw - motor_parameters.limit_current->raw; surpCurrentSum += surpCurrent; // If surpCurrentSum > 0 do a real coef if (surpCurrentSum > 0.0) { - currentfactor = *motor_parameters.limit_current / (*motor_parameters.limit_current + (surpCurrentSum / 1.5)); + currentfactor = motor_parameters.limit_current->raw / (motor_parameters.limit_current->raw + (surpCurrentSum / 1.5)); } else { @@ -228,10 +228,10 @@ void ll_motor_Command(uint16_t mode, float ratio) } // limit power value - if (ratio < -*motor_parameters.limit_ratio) - ratio = -*motor_parameters.limit_ratio; - if (ratio > *motor_parameters.limit_ratio) - ratio = *motor_parameters.limit_ratio; + if (ratio < -motor_parameters.limit_ratio->raw) + ratio = -motor_parameters.limit_ratio->raw; + if (ratio > motor_parameters.limit_ratio->raw) + ratio = motor_parameters.limit_ratio->raw; // transform power ratio to timer value uint16_t pulse; @@ -278,7 +278,7 @@ float ll_motor_GetAngularPosition(void) ******************************************************************************/ float ll_motor_GetLinearPosition(float angular_position) { - return angular_position / 360.0 * M_PI * (*motor_parameters.wheel_diameter); + return angular_position / 360.0 * M_PI * LinearOD_PositionTo_m(*motor_parameters.wheel_diameter); } /****************************************************************************** @@ -294,11 +294,11 @@ void ll_motor_config(motor_config_t motor_config) motor_parameters.limit_ratio = motor_config.limit_ratio; motor_parameters.limit_current = motor_config.limit_current; - // default motor configuration + // Default motor configuration *motor_parameters.motor_reduction = 131; *motor_parameters.resolution = 16; - *motor_parameters.wheel_diameter = 0.100f; - // default motor hardware limits - *motor_parameters.limit_ratio = 100.0; - *motor_parameters.limit_current = 6.0; -} \ No newline at end of file + *motor_parameters.wheel_diameter = LinearOD_PositionFrom_m(0.100f); + // Default motor hardware limits + *motor_parameters.limit_ratio = RatioOD_RatioFrom_Percent(100.0f); + *motor_parameters.limit_current = ElectricOD_CurrentFrom_A(6.0f); +} diff --git a/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.h b/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.h index 086199e29..b51e53187 100644 --- a/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.h +++ b/examples/projects/l0/controller_motor/lib/Controller_motor/ll_motor.h @@ -7,7 +7,7 @@ #ifndef _LL_MOTOR_H #define _LL_MOTOR_H -#include "float.h" +#include "luos_engine.h" #include "stdio.h" /******************************************************************************* @@ -44,11 +44,11 @@ typedef struct motor_config // motor configuration float *motor_reduction; float *resolution; - float *wheel_diameter; + linear_position_t *wheel_diameter; // hardware limits - float *limit_ratio; - float *limit_current; + ratio_t *limit_ratio; + current_t *limit_current; } motor_config_t; /******************************************************************************* * Variables @@ -65,4 +65,4 @@ float ll_motor_GetAngularPosition(void); float ll_motor_GetLinearPosition(float); void ll_motor_config(motor_config_t); -#endif /* _LL_MOTOR_H */ \ No newline at end of file +#endif /* _LL_MOTOR_H */ From 82001f81693f68a71b4737d19ec74f5d39ec1f57 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 28 Aug 2023 18:39:27 +0200 Subject: [PATCH 130/198] Add a user_context pointer on services and apply it on DXL example --- engine/core/inc/struct_luos.h | 1 + examples/projects/l0/dxl/lib/Dxl/dxl.c | 104 +++++++++++-------------- 2 files changed, 47 insertions(+), 58 deletions(-) diff --git a/engine/core/inc/struct_luos.h b/engine/core/inc/struct_luos.h index ddb5ea08c..c85f3065d 100644 --- a/engine/core/inc/struct_luos.h +++ b/engine/core/inc/struct_luos.h @@ -206,6 +206,7 @@ typedef struct service_t uint8_t alias[MAX_ALIAS_SIZE]; /*!< service alias. */ revision_t revision; /*!< service firmware version. */ access_t access; /*!< service read write access. */ + void *user_context; /*!< Pointer to the user context. */ // Callback void (*service_cb)(struct service_t *service, const msg_t *msg); diff --git a/examples/projects/l0/dxl/lib/Dxl/dxl.c b/examples/projects/l0/dxl/lib/Dxl/dxl.c index 14eb2966e..7064f2995 100644 --- a/examples/projects/l0/dxl/lib/Dxl/dxl.c +++ b/examples/projects/l0/dxl/lib/Dxl/dxl.c @@ -39,7 +39,6 @@ volatile float measurement_buf[BUFFER_SIZE]; ******************************************************************************/ static void Dxl_MsgHandler(service_t *service, const msg_t *msg); static void discover_dxl(void); -static int find_id(service_t *service); /****************************************************************************** * @brief init must be call in project init @@ -131,6 +130,7 @@ void Dxl_Loop(void) } index++; } + /****************************************************************************** * @brief Msg handler call back when a msg receive for this service * @param Service destination @@ -139,12 +139,11 @@ void Dxl_Loop(void) ******************************************************************************/ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) { - int index = find_id(service); - + dxl_t *my_dxl = (dxl_t *)service->user_context; if (msg->header.cmd == GET_CMD) { // if a temperature have been send stop temperature transmission to make it one shot - dxl[index].dxl_motor.motor.mode.temperature = 0; + my_dxl->dxl_motor.motor.mode.temperature = 0; } if (msg->header.cmd == REGISTER) { @@ -166,7 +165,7 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) else { volatile char baud = 3; // Default value for 1000000 for MX/XL - if (dxl[index].model == AX12 || dxl[index].model == AX18) + if (my_dxl->model == AX12 || my_dxl->model == AX18) { baud = 1; // Default value for 1000000 for AX switch (val) @@ -253,7 +252,7 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) else { // else reset a specific ID - servo_factory_reset(dxl[index].id, DXL_TIMEOUT); + servo_factory_reset(my_dxl->id, DXL_TIMEOUT); } } else @@ -262,11 +261,11 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) char size = get_register_size(reg); if (size == 2) { - servo_set_raw_word(dxl[index].id, reg, (uint16_t)val, DXL_TIMEOUT); + servo_set_raw_word(my_dxl->id, reg, (uint16_t)val, DXL_TIMEOUT); } else { - servo_set_raw_byte(dxl[index].id, reg, (uint8_t)val, DXL_TIMEOUT); + servo_set_raw_byte(my_dxl->id, reg, (uint8_t)val, DXL_TIMEOUT); } } @@ -279,8 +278,8 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) // check address integrity if (id < 255) { - servo_set_raw_byte(dxl[index].id, SERVO_REGISTER_ID, id, DXL_TIMEOUT); - dxl[index].id = id; + servo_set_raw_byte(my_dxl->id, SERVO_REGISTER_ID, id, DXL_TIMEOUT); + my_dxl->id = id; } return; } @@ -292,16 +291,16 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) if ((msg->header.cmd == ANGULAR_POSITION) && (msg->header.size == sizeof(float))) { int pos; - if (dxl[index].model == AX12 || dxl[index].model == AX18 || dxl[index].model == XL320) + if (my_dxl->model == AX12 || my_dxl->model == AX18 || my_dxl->model == XL320) { - pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.target_angular_position)) / 300)); + pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.target_angular_position)) / 300)); } else { - pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.target_angular_position)) / 360)); + pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.target_angular_position)) / 360)); } int retry = 0; - while ((servo_set_raw_word(dxl[index].id, SERVO_REGISTER_GOAL_ANGLE, pos, DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) + while ((servo_set_raw_word(my_dxl->id, SERVO_REGISTER_GOAL_ANGLE, pos, DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) { retry++; } @@ -309,46 +308,46 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) } if (msg->header.cmd == RATIO_LIMIT) { - unsigned short limit = (unsigned short)(RatioOD_RatioTo_Percent(dxl[index].dxl_motor.motor.power) * 1023.0 / 100.0); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_TORQUE_LIMIT, limit, DXL_TIMEOUT); + unsigned short limit = (unsigned short)(RatioOD_RatioTo_Percent(my_dxl->dxl_motor.motor.power) * 1023.0 / 100.0); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_TORQUE_LIMIT, limit, DXL_TIMEOUT); return; } if (msg->header.cmd == PID) { - if (dxl[index].model >= MX12) + if (my_dxl->model >= MX12) { // clamp PID values for (int i = 0; i < 3; i++) { - if (dxl[index].dxl_motor.position_pid.table[i] > 254.0) - dxl[index].dxl_motor.position_pid.table[i] = 254.0; - if (dxl[index].dxl_motor.position_pid.table[i] < 0.0) - dxl[index].dxl_motor.position_pid.table[i] = 0.0; + if (my_dxl->dxl_motor.position_pid.table[i] > 254.0) + my_dxl->dxl_motor.position_pid.table[i] = 254.0; + if (my_dxl->dxl_motor.position_pid.table[i] < 0.0) + my_dxl->dxl_motor.position_pid.table[i] = 0.0; } - servo_set_raw_byte(dxl[index].id, SERVO_REGISTER_P_GAIN, (char)dxl[index].dxl_motor.position_pid.p, DXL_TIMEOUT); - servo_set_raw_byte(dxl[index].id, SERVO_REGISTER_I_GAIN, (char)dxl[index].dxl_motor.position_pid.i, DXL_TIMEOUT); - servo_set_raw_byte(dxl[index].id, SERVO_REGISTER_D_GAIN, (char)dxl[index].dxl_motor.position_pid.d, DXL_TIMEOUT); + servo_set_raw_byte(my_dxl->id, SERVO_REGISTER_P_GAIN, (char)my_dxl->dxl_motor.position_pid.p, DXL_TIMEOUT); + servo_set_raw_byte(my_dxl->id, SERVO_REGISTER_I_GAIN, (char)my_dxl->dxl_motor.position_pid.i, DXL_TIMEOUT); + servo_set_raw_byte(my_dxl->id, SERVO_REGISTER_D_GAIN, (char)my_dxl->dxl_motor.position_pid.d, DXL_TIMEOUT); } return; } if (msg->header.cmd == ANGULAR_POSITION_LIMIT) { - if (dxl[index].model == AX12 || dxl[index].model == AX18 || dxl[index].model == XL320) + if (my_dxl->model == AX12 || my_dxl->model == AX18 || my_dxl->model == XL320) { - int pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.limit_angular_position[0])) / 300)); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_MIN_ANGLE, pos, DXL_TIMEOUT); + int pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.limit_angular_position[0])) / 300)); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_MIN_ANGLE, pos, DXL_TIMEOUT); HAL_Delay(1); - pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.limit_angular_position[1])) / 300)); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_MAX_ANGLE, pos, DXL_TIMEOUT); + pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.limit_angular_position[1])) / 300)); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_MAX_ANGLE, pos, DXL_TIMEOUT); } else { - int pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.limit_angular_position[0])) / 360)); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_MIN_ANGLE, pos, DXL_TIMEOUT); + int pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.limit_angular_position[0])) / 360)); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_MIN_ANGLE, pos, DXL_TIMEOUT); HAL_Delay(1); - pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.limit_angular_position[1])) / 360)); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_MAX_ANGLE, pos, DXL_TIMEOUT); + pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.limit_angular_position[1])) / 360)); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_MAX_ANGLE, pos, DXL_TIMEOUT); } return; } @@ -356,18 +355,18 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) { // Set the direction bit - int direction = (AngularOD_SpeedTo_deg_s(dxl[index].dxl_motor.target_angular_speed) < 0) << 10; + int direction = (AngularOD_SpeedTo_deg_s(my_dxl->dxl_motor.target_angular_speed) < 0) << 10; // find the speed factor and compute the max speed float speed_factor = 0.111; - if (dxl[index].model == MX12 || dxl[index].model == MX64 || dxl[index].model == MX106) + if (my_dxl->model == MX12 || my_dxl->model == MX64 || my_dxl->model == MX106) { speed_factor = 0.114; } float speed_max = 1023.0 * speed_factor * 360.0 / 60.0; // Maximisation - dxl[index].dxl_motor.target_angular_speed = AngularOD_SpeedFrom_deg_s(fminf(fmaxf(AngularOD_SpeedTo_deg_s(dxl[index].dxl_motor.target_angular_speed), -speed_max), speed_max)); - int speed = direction + (int)(fabs(AngularOD_SpeedTo_deg_s(dxl[index].dxl_motor.target_angular_speed)) / (speed_factor * 360.0 / 60.0)); - servo_set_raw_word(dxl[index].id, SERVO_REGISTER_MOVING_SPEED, speed, DXL_TIMEOUT); + my_dxl->dxl_motor.target_angular_speed = AngularOD_SpeedFrom_deg_s(fminf(fmaxf(AngularOD_SpeedTo_deg_s(my_dxl->dxl_motor.target_angular_speed), -speed_max), speed_max)); + int speed = direction + (int)(fabs(AngularOD_SpeedTo_deg_s(my_dxl->dxl_motor.target_angular_speed)) / (speed_factor * 360.0 / 60.0)); + servo_set_raw_word(my_dxl->id, SERVO_REGISTER_MOVING_SPEED, speed, DXL_TIMEOUT); return; } if (msg->header.cmd == PARAMETERS) @@ -375,25 +374,25 @@ static void Dxl_MsgHandler(service_t *service, const msg_t *msg) // Some motors need some time to manage all of those. Just try it multiple times. // set compliance uint8_t retry = 0; - while ((servo_set_raw_byte(dxl[index].id, SERVO_REGISTER_TORQUE_ENABLE, (dxl[index].dxl_motor.mode.mode_compliant == 0), DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) + while ((servo_set_raw_byte(my_dxl->id, SERVO_REGISTER_TORQUE_ENABLE, (my_dxl->dxl_motor.mode.mode_compliant == 0), DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) { retry++; } - if (!dxl[index].dxl_motor.mode.mode_compliant) + if (!my_dxl->dxl_motor.mode.mode_compliant) { // If we are not compliant set current position as target position - dxl[index].dxl_motor.target_angular_position = dxl[index].dxl_motor.angular_position; + my_dxl->dxl_motor.target_angular_position = my_dxl->dxl_motor.angular_position; int pos; - if (dxl[index].model == AX12 || dxl[index].model == AX18 || dxl[index].model == XL320) + if (my_dxl->model == AX12 || my_dxl->model == AX18 || my_dxl->model == XL320) { - pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.target_angular_position)) / 300)); + pos = (int)((1024 - 1) * ((300 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.target_angular_position)) / 300)); } else { - pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(dxl[index].dxl_motor.target_angular_position)) / 360)); + pos = (int)((4096 - 1) * ((360 / 2 + AngularOD_PositionTo_deg(my_dxl->dxl_motor.target_angular_position)) / 360)); } retry = 0; - while ((servo_set_raw_word(dxl[index].id, SERVO_REGISTER_GOAL_ANGLE, pos, DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) + while ((servo_set_raw_word(my_dxl->id, SERVO_REGISTER_GOAL_ANGLE, pos, DXL_TIMEOUT) != SERVO_NO_ERROR) && (retry < 10)) { retry++; } @@ -462,7 +461,8 @@ static void discover_dxl(void) dxl[dxl_index].id = dxl_id; // ************** Service creation ***************** - ProfileServo_CreateService(&dxl[dxl_index].dxl_motor, Dxl_MsgHandler, alias, revision); + service_t *service = ProfileServo_CreateService(&dxl[dxl_index].dxl_motor, Dxl_MsgHandler, alias, revision); + service->user_context = (void *)&dxl[dxl_index]; servo_get_raw_word(dxl_id, SERVO_REGISTER_MODEL_NUMBER, (uint16_t *)&dxl[dxl_index].model, DXL_TIMEOUT); // put a delay on motor response servo_set_raw_byte(dxl_id, SERVO_REGISTER_RETURN_DELAY_TIME, 10, DXL_TIMEOUT); @@ -488,15 +488,3 @@ static void discover_dxl(void) Luos_CreateService(Dxl_MsgHandler, VOID_TYPE, "void_dxl", revision); } } - -static int find_id(service_t *service) -{ - profile_core_t *profile = (profile_core_t *)service->profile_context; - int i = 0; - for (i = 0; i <= MAX_LOCAL_SERVICE_NUMBER; i++) - { - if ((uint32_t)profile->profile_data == (uint32_t)&dxl[i].dxl_motor) - return i; - } - return i; -} From 1802b42bfba86734c2a6622ca6021a98c18bd946 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 29 Aug 2023 16:48:33 +0200 Subject: [PATCH 131/198] Fix Serial HAL for Native on Linux and windows, fix #442 --- engine/core/src/luos_utils.c | 9 +- .../projects/native/gate_wscom/src/main.c | 17 ++- .../HAL/NATIVE/serial_network_hal.c | 118 ++++++++++++------ 3 files changed, 95 insertions(+), 49 deletions(-) diff --git a/engine/core/src/luos_utils.c b/engine/core/src/luos_utils.c index 01958e2d9..b009a9966 100644 --- a/engine/core/src/luos_utils.c +++ b/engine/core/src/luos_utils.c @@ -5,6 +5,7 @@ * @version 0.0.0 ******************************************************************************/ #include +#include #include "luos_utils.h" #include "luos_engine.h" #include "string.h" @@ -60,9 +61,6 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) // prepare a message as a node. // To do that we have to reset the service ID and clear PTP states to unlock others. - #if (defined _WIN32) || (defined _WIN64) || (defined __linux__) || (defined __APPLE__) || (defined __unix__) || (defined __CYGWIN__) || (defined __MINGW32__) || (defined __MINGW64__) - printf("ASSERT: %s:%d\n", file, line); - #endif Luos_Init(); // completely reinit the allocator MsgAlloc_Init(NULL); @@ -88,6 +86,11 @@ _CRITICAL void Luos_assert(char *file, uint32_t line) Luos_JumpToBootloader(); #endif Phy_SetIrqState(false); + + #if (defined _WIN32) || (defined _WIN64) || (defined __linux__) || (defined __APPLE__) || (defined __unix__) || (defined __CYGWIN__) || (defined __MINGW32__) || (defined __MINGW64__) + printf("ASSERT: %s:%d\n", file, line); + exit(1); + #endif while (1) { } diff --git a/examples/projects/native/gate_wscom/src/main.c b/examples/projects/native/gate_wscom/src/main.c index f6e5953fe..c82b80661 100644 --- a/examples/projects/native/gate_wscom/src/main.c +++ b/examples/projects/native/gate_wscom/src/main.c @@ -4,11 +4,13 @@ #include "gate.h" #include -#include -#include -#include -#include -#include +#ifndef WIN32 + #include + #include + #include + #include + #include +#endif void *Gate_Pipe_LoopThread(void *vargp) { @@ -19,7 +21,7 @@ void *Gate_Pipe_LoopThread(void *vargp) } return NULL; } - +#ifndef _WIN32 void handler(int sig) { void *array[10]; @@ -33,10 +35,13 @@ void handler(int sig) backtrace_symbols_fd(array, size, STDERR_FILENO); exit(1); } +#endif int main(void) { +#ifndef _WIN32 signal(SIGSEGV, handler); // install our handler +#endif Luos_Init(); Serial_Init(); Pipe_Init(); diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index 1a8d79cf3..6fe1092ff 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -20,6 +20,9 @@ #include #include #include + #ifdef __linux__ + #include + #endif #endif /******************************************************************************* @@ -64,35 +67,28 @@ char *stripStr(char *string) } #ifdef _WIN32 -void set_serial_raw_mode(HANDLE hSerial) +void set_serial_raw_mode() { - DCB dcbSerialParams = {0}; - dcbSerialParams.DCBlength = sizeof(dcbSerialParams); + DCB dcb; + SecureZeroMemory(&dcb, sizeof(DCB)); + dcb.DCBlength = sizeof(DCB); - if (!GetCommState(hSerial, &dcbSerialParams)) + if (!GetCommState(hSerial, &dcb)) { - perror("Error getting serial port state"); + printf("GetCommState failed with error %d.\n", GetLastError()); LUOS_ASSERT(0); return; } - dcbSerialParams.BaudRate = SERIAL_NETWORK_BAUDRATE; - dcbSerialParams.ByteSize = 8; - dcbSerialParams.StopBits = ONESTOPBIT; - dcbSerialParams.Parity = NOPARITY; - dcbSerialParams.fBinary = TRUE; - dcbSerialParams.fRtsControl = RTS_CONTROL_DISABLE; - dcbSerialParams.fOutxCtsFlow = FALSE; - dcbSerialParams.fDtrControl = DTR_CONTROL_DISABLE; - dcbSerialParams.fOutxDsrFlow = FALSE; - dcbSerialParams.fOutX = FALSE; - dcbSerialParams.fInX = FALSE; - // dcbSerialParams.XonChar = 17; // ASCII XON (Ctrl-Q) - // dcbSerialParams.XoffChar = 19; // ASCII XOFF (Ctrl-S) - - if (!SetCommState(hSerial, &dcbSerialParams)) + dcb.BaudRate = SERIAL_NETWORK_BAUDRATE; + dcb.ByteSize = 8; + dcb.StopBits = ONESTOPBIT; + dcb.Parity = NOPARITY; + dcb.fBinary = TRUE; + + if (!SetCommState(hSerial, &dcb)) { - perror("Error setting serial port state"); + printf("SetCommState failed with error %d.\n", GetLastError()); LUOS_ASSERT(0); return; } @@ -179,7 +175,7 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) #else printf("Please enter the serial port name (ex: /dev/ttyUSB0): "); #endif - fgets(portname, sizeof(portname), stdin); + char *unused = fgets(portname, sizeof(portname), stdin); #else printf("Using default serial port: %s\n", SERIAL_PORT); memcpy(portname, SERIAL_PORT, strlen(SERIAL_PORT)); @@ -189,41 +185,41 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) // Open the serial port #ifdef _WIN32 - HANDLE hSerial; hSerial = CreateFile( portname, GENERIC_READ | GENERIC_WRITE, 0, // exclusive access NULL, // no security OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, - 0); + 0, // not overlapped I/O + NULL); if (hSerial == INVALID_HANDLE_VALUE) { - printf("Error opening serial port\n"); + printf("CreateFile failed with error %d.\n", GetLastError()); LUOS_ASSERT(0); } // Set serial port parameters - set_serial_raw_mode(hSerial); + set_serial_raw_mode(); - // DCB dcbSerialParams = {0}; - // dcbSerialParams.DCBlength = sizeof(dcbSerialParams); - // if (!GetCommState(hSerial, &dcbSerialParams)) + // DCB dcb = {0}; + // dcb.DCBlength = sizeof(dcb); + // if (!GetCommState(hSerial, &dcb)) // { // printf("Error getting serial port state\n"); // CloseHandle(hSerial); // LUOS_ASSERT(0); // } - // dcbSerialParams.BaudRate = SERIAL_NETWORK_BAUDRATE; - // dcbSerialParams.ByteSize = 8; - // dcbSerialParams.StopBits = ONESTOPBIT; - // dcbSerialParams.Parity = NOPARITY; - // if (!SetCommState(hSerial, &dcbSerialParams)) + // dcb.BaudRate = SERIAL_NETWORK_BAUDRATE; + // dcb.ByteSize = 8; + // dcb.StopBits = ONESTOPBIT; + // dcb.Parity = NOPARITY; + // if (!SetCommState(hSerial, &dcb)) // { // printf("Error setting serial port state\n"); // CloseHandle(hSerial); // LUOS_ASSERT(0); // } + Sleep(2); #else serial_port = open(portname, O_RDWR | O_NOCTTY | O_NONBLOCK); if (serial_port < 0) @@ -251,6 +247,10 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) // Set output/ input to be non-blocking // tty.c_cc[VMIN] = 0; // tty.c_cc[VTIME] = 0; + // #if defined(__linux__) + // tty.c_ispeed = SERIAL_NETWORK_BAUDRATE; + // tty.c_ospeed = SERIAL_NETWORK_BAUDRATE; + // #endif if (tcsetattr(serial_port, TCSANOW, &tty) != 0) { @@ -261,8 +261,9 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) } tcflush(serial_port, TCIOFLUSH); - // Bypass baudrate speed limitations of termios by using ioctl - #define IOSSIOSPEED 0x80045402 + #if defined(__APPLE__) + // Bypass baudrate speed limitations of termios by using ioctl + #define IOSSIOSPEED 0x80045402 speed_t speed = SERIAL_NETWORK_BAUDRATE; if (ioctl(serial_port, IOSSIOSPEED, &speed) < 0) { @@ -271,8 +272,45 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) close(serial_port); LUOS_ASSERT(0); } -#endif + #else + // Set the baudrate + struct termios2 + { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[19]; + speed_t c_ispeed; + speed_t c_ospeed; + }; + + // Get current serial port settings + struct termios2 serial_settings; + if (ioctl(serial_port, TCGETS2, &serial_settings) != 0) + { + perror("Error getting current settings"); + close(serial_port); + LUOS_ASSERT(0); + } + + // Set new baud rate + #define BOTHER 0x1000 + serial_settings.c_cflag &= ~CBAUD; // Clear existing baud rate settings + serial_settings.c_cflag |= BOTHER; // Set custom baud rate + serial_settings.c_ispeed = SERIAL_NETWORK_BAUDRATE; // Input baud rate + serial_settings.c_ospeed = SERIAL_NETWORK_BAUDRATE; // Output baud rate + + if (ioctl(serial_port, TCSETS2, &serial_settings) != 0) + { + perror("Error setting baud rate"); + close(serial_port); + LUOS_ASSERT(0); + } + #endif sleep(2); +#endif } /****************************************************************************** @@ -287,7 +325,7 @@ void SerialHAL_Loop(void) DWORD bytesRead; if (!ReadFile(hSerial, recvData, sizeof(recvData), &bytesRead, NULL)) { - printf("Error reading from serial port\n"); + printf("Error reading from serial port, ERROR_CODE : %d\n", GetLastError()); CloseHandle(hSerial); LUOS_ASSERT(0); } @@ -313,7 +351,7 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) DWORD bytesWritten; if (!WriteFile(hSerial, data, size, &bytesWritten, NULL)) { - printf("Error writing to serial port\n"); + printf("Error writing to serial port, ERROR_CODE : %d\n", GetLastError()); CloseHandle(hSerial); LUOS_ASSERT(0); } From f0de0439bf135ca4dac99c1ed212c2c0d9138a8a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 31 Aug 2023 10:49:40 +0200 Subject: [PATCH 132/198] Improve compilation messaging presentation --- .../robus_network/robus_select_hal_script.py | 2 -- .../serial_select_hal_script.py | 3 +-- source_filter_script.py | 20 +------------------ 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/network/robus_network/robus_select_hal_script.py b/network/robus_network/robus_select_hal_script.py index f2b58fcd1..23f1981fc 100644 --- a/network/robus_network/robus_select_hal_script.py +++ b/network/robus_network/robus_select_hal_script.py @@ -45,12 +45,10 @@ hal_script_path = realpath( "HAL/" + item[1] + "/hal_script.py") env.SConscript(hal_script_path, exports="env") - click.secho("") else: click.secho("\t* %s Robus network HAL not found" % item[1], fg="red") - click.secho("") env.Append(CPPPATH=[realpath("HAL/" + item[1])]) env.Append(CPPPATH=[realpath("inc/")]) diff --git a/network/serial_network/serial_select_hal_script.py b/network/serial_network/serial_select_hal_script.py index 205f44fe8..6ac38b248 100644 --- a/network/serial_network/serial_select_hal_script.py +++ b/network/serial_network/serial_select_hal_script.py @@ -5,6 +5,7 @@ from os.path import join, realpath Import('env') +click.secho("") click.secho("Serial network build configuration:", underline=True) # Find the appropriate hal find_HAL = False @@ -44,12 +45,10 @@ hal_script_path = realpath( "HAL/" + item[1] + "/hal_script.py") env.SConscript(hal_script_path, exports="env") - click.secho("") else: click.secho("\t* %s Serial network HAL not found" % item[1], fg="red") - click.secho("") env.Append(CPPPATH=[realpath("HAL/" + item[1])]) env.Append(CPPPATH=[realpath("inc/")]) diff --git a/source_filter_script.py b/source_filter_script.py index dec404727..8a61a440e 100644 --- a/source_filter_script.py +++ b/source_filter_script.py @@ -66,6 +66,7 @@ # Native only => we should put this on a specific script on engine/HAL/STUB for item in env.ParseFlags(env['BUILD_FLAGS'])["CPPDEFINES"]: if (item == 'UNIT_TEST'): + click.secho("") click.secho("Native unit testing:", underline=True) current_os = pf.system() click.secho("\t* Native Mock HAL for %s is selected for Luos." % @@ -80,25 +81,6 @@ if (current_os == 'Linux') or (current_os == 'Windows'): env.Append(LINKFLAGS=["-lgcov", "--coverage", "-fprofile-arcs"]) - # CODE COVERAGE WILL BE ADDED SOON - # if (current_os == 'Linux') or (current_os == 'Darwin') or (current_os == 'Windows'): - # env.Append(LINKFLAGS=["-lgcov"]) - # env.Append(LINKFLAGS=["--coverage"]) - # env.Append(LINKFLAGS=["-fprofile-arcs"]) - - # def generateCoverageInfo(source, target, env): - # for file in os.listdir("test"): - # env.Execute(".pio/build/native/program test/"+file) - # env.Execute("lcov -d .pio/build/native/ -c -o lcov.info") - # env.Execute( - # "lcov --remove lcov.info '*/Platforms/*' '*/bootloader/*' '*/.pio/*' '*/HAL/*' '*/test/*' -o filtered_lcov.info") - # env.Execute( - # "genhtml filtered_lcov.info -o cov/ --demangle-cpp") - - # Generate code coverage when testing workflow is ended - # env.AddPostAction(".pio/build/native/program", generateCoverageInfo) - # else: - # click.echo("Unit tests are not supported on your os ", current_os) break if not visited_key in global_env: From 38bc6511fcf34753b5612f523bbba784b70496f6 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 31 Aug 2023 12:53:55 +0200 Subject: [PATCH 133/198] Remove some useless reset on detetion and increase some timing allowing native to always perform as expected. --- engine/IO/src/luos_io.c | 10 ++++------ test/tests_core/test_routing_table/main.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 39860b09b..b312d0708 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -310,13 +310,11 @@ static int LuosIO_StartTopologyDetection(service_t *service) } detect_state_machine++; case 2: - // Reinit Phy (this will call LuosIO_Reset) - Phy_ResetAll(); - // Wait 2ms to be sure all previous messages are received and treated by other nodes + // Wait 2ms to be sure all previous messages are received and treated by nodes start_tick = LuosHAL_GetSystick(); detect_state_machine++; case 3: - // Wait 2ms for the other to manage the message + // Wait 2ms for all nodes to manage the message if (LuosHAL_GetSystick() - start_tick < 2) { return 0; @@ -339,8 +337,8 @@ static int LuosIO_StartTopologyDetection(service_t *service) start_tick = LuosHAL_GetSystick(); detect_state_machine++; case 6: - // Wait 2ms to be sure all previous messages are received and treated by other nodes - if (LuosHAL_GetSystick() - start_tick < 2) + // Wait 10ms to be sure all previous messages are received and treated by all the nodes + if (LuosHAL_GetSystick() - start_tick < 10) { return 0; } diff --git a/test/tests_core/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c index d53dce182..b624b99ae 100644 --- a/test/tests_core/test_routing_table/main.c +++ b/test/tests_core/test_routing_table/main.c @@ -307,7 +307,7 @@ void unittest_RoutingTB_ConvertServiceToRoutingTable(void) routing_table_t entry; service_t service; service.id = 10; - strcpy(service.alias, "Dummy_App"); + strcpy((char *)service.alias, "Dummy_App"); service.type = DISTANCE_TYPE; RoutingTB_ConvertServiceToRoutingTable(&entry, &service); From e98e9900758c164c61f19254d12e10bcee0f558f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 31 Aug 2023 17:38:57 +0200 Subject: [PATCH 134/198] Fix the detection flag init --- engine/IO/src/luos_io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index b312d0708..4f13fc0e1 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -83,6 +83,9 @@ void LuosIO_Init(void) luos_phy = Phy_Get(0, LuosIO_MsgHandler, LuosIO_RunTopo, LuosIO_Reset); // Set the irq management function Phy_SetIrqStateFunciton(LuosHAL_SetIrqState); + + // Detection init + Flag_DetectServices = false; } /****************************************************************************** @@ -310,6 +313,8 @@ static int LuosIO_StartTopologyDetection(service_t *service) } detect_state_machine++; case 2: + // Reinit Phy (this will call LuosIO_Reset) + Phy_ResetAll(); // Wait 2ms to be sure all previous messages are received and treated by nodes start_tick = LuosHAL_GetSystick(); detect_state_machine++; From 44c03ffd893672ac42d11a706048c9bac4b74eca Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 31 Aug 2023 17:39:41 +0200 Subject: [PATCH 135/198] Fix and remove deprecated unit test --- test/tests_io/test_filter/main.c | 414 ------------------------------ test/tests_io/test_luos_io/main.c | 118 +-------- test/tests_io/test_phy/main.c | 33 +-- 3 files changed, 21 insertions(+), 544 deletions(-) diff --git a/test/tests_io/test_filter/main.c b/test/tests_io/test_filter/main.c index 7b2c7884c..f318dcca5 100644 --- a/test/tests_io/test_filter/main.c +++ b/test/tests_io/test_filter/main.c @@ -2,163 +2,6 @@ #include "filter.h" #include "../src/service.c" -void unittest_Filter_ServiceId() -{ - uint16_t service_number = 10; - NEW_TEST_CASE("Basic Service ID mask test"); - { - Phy_FiltersInit(); - TRY - { - Phy_AddLocalServices(7, service_number); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(8, service_number); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(9, service_number); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(9, 0); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - service_number = MAX_LOCAL_SERVICE_NUMBER; - NEW_TEST_CASE("Service ID mask test with max services"); - { - Phy_FiltersInit(); - - TRY - { - Phy_AddLocalServices(7, service_number); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(7 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(8, service_number); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(7)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(8 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(9, service_number); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9)); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(9 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(9, 0); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(8)); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(9)); - TEST_ASSERT_EQUAL(false, Filter_ServiceID(9 + service_number - 1)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Overlap the MAX_LOCAL_SERVICE_NUMBER"); - { - Phy_FiltersInit(); - TRY - { - Phy_AddLocalServices(1, MAX_LOCAL_SERVICE_NUMBER + 1); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Test the id 4096 Limit"); - { - Phy_FiltersInit(); - TRY - { - Phy_AddLocalServices(4096 - MAX_LOCAL_SERVICE_NUMBER, service_number); - TEST_ASSERT_EQUAL(true, Filter_ServiceID(4096 - MAX_LOCAL_SERVICE_NUMBER)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(4096 - MAX_LOCAL_SERVICE_NUMBER + 1, service_number); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - - TRY - { - Filter_ServiceID(4096 + 1); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Test the id 0 Limit"); - { - Phy_FiltersInit(); - TRY - { - Phy_AddLocalServices(0, service_number); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } -} - void unittest_Filter_Topic() { NEW_TEST_CASE("Test the id max Limit"); @@ -449,269 +292,12 @@ void unittest_Filter_Type() } } -void unittest_Phy_ComputeTargets() -{ - header_t header; - NEW_TEST_CASE("Test a wrong header target_mode"); - { - TRY - { - header.target_mode = 0x0f; - Phy_ComputeTargets(&header); - } - TEST_ASSERT_TRUE(!IS_ASSERT()); - END_TRY; - } - - NEW_TEST_CASE("Test service ID"); - { - TRY - { - Phy_AddLocalServices(1, 1); - header.target_mode = SERVICEIDACK; - header.target = 1; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 1); - header.target_mode = SERVICEIDACK; - header.target = 2; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 1); - header.target_mode = SERVICEID; - header.target = 1; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 1); - header.target_mode = SERVICEID; - header.target = 2; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 2); - header.target_mode = SERVICEIDACK; - header.target = 2; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 2); - header.target_mode = SERVICEIDACK; - header.target = 3; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 2); - header.target_mode = SERVICEID; - header.target = 2; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Phy_AddLocalServices(1, 2); - header.target_mode = SERVICEID; - header.target = 3; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Test Type"); - { - TRY - { - service_ctx.number = 1; - service_ctx.list[0].type = 0; - header.target_mode = TYPE; - header.target = 0; - // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - service_ctx.number = 1; - service_ctx.list[0].type = 0; - header.target_mode = TYPE; - header.target = 1; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Test Broadcast"); - { - TRY - { - header.target_mode = BROADCAST; - header.target = BROADCAST_VAL; - // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - header.target_mode = BROADCAST; - header.target = 1; - // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Test Node ID"); - { - TRY - { - Node_Get()->node_id = 1; - header.target_mode = NODEIDACK; - header.target = 1; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Node_Get()->node_id = 1; - header.target_mode = NODEIDACK; - header.target = 2; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Node_Get()->node_id = 1; - header.target_mode = NODEID; - header.target = 1; - // We should have Luos only - TEST_ASSERT_EQUAL(0x01, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - - TRY - { - Node_Get()->node_id = 1; - header.target_mode = NODEID; - header.target = 2; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } - - NEW_TEST_CASE("Test Topic"); - { - TRY - { - Filter_TopicInit(); - Filter_AddTopic(3); - header.target_mode = TOPIC; - header.target = 3; - // We should have Luos and Robus - TEST_ASSERT_EQUAL(0x03, Phy_ComputeTargets(&header)); - header.target = 2; - // We should have Robus only - TEST_ASSERT_EQUAL(0x02, Phy_ComputeTargets(&header)); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - } -} - int main(int argc, char **argv) { UNITY_BEGIN(); - RUN_TEST(unittest_Filter_ServiceId); RUN_TEST(unittest_Filter_Topic); RUN_TEST(unittest_Filter_Type); - RUN_TEST(unittest_Phy_ComputeTargets); UNITY_END(); } diff --git a/test/tests_io/test_luos_io/main.c b/test/tests_io/test_luos_io/main.c index 4c91ed2b0..c6cae4a31 100644 --- a/test/tests_io/test_luos_io/main.c +++ b/test/tests_io/test_luos_io/main.c @@ -215,119 +215,6 @@ void unittest_luosIO_ConsumeMsg() END_TRY; } - NEW_TEST_CASE("Check CONNECTION_DATA size of a port_ treatment (topology retriving)"); - { - TRY - { - luosIO_reset_overlap_callback(); - last_node = 1; - Node_Get()->node_id = 1; - msg_t msg; - msg.header.cmd = CONNECTION_DATA; - msg.header.size = sizeof(port_t); - port_t port; - port.node_id = 1; - port.phy_id = 2; - port.port_id = 3; - memcpy(msg.data, &port, sizeof(port_t)); - memset(connection_table_ptr, 0xFF, sizeof(connection_t) * 2); - - LuosIO_ConsumeMsg(&msg); - TEST_ASSERT_EQUAL(2, last_node); - - TEST_ASSERT_EQUAL(1, connection_table_ptr[1].parent.node_id); - TEST_ASSERT_EQUAL(2, connection_table_ptr[1].parent.phy_id); - TEST_ASSERT_EQUAL(3, connection_table_ptr[1].parent.port_id); - - TEST_ASSERT_EQUAL(0xFFFF, connection_table_ptr[0].parent.node_id); - TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.phy_id); - TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.port_id); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } - - NEW_TEST_CASE("Check CONNECTION_DATA size of a connection_t treatment (topology retriving)"); - { - TRY - { - luosIO_reset_overlap_callback(); - last_node = 1; - Node_Get()->node_id = 1; - msg_t msg; - msg.header.cmd = CONNECTION_DATA; - msg.header.size = 2 * sizeof(connection_t); - connection_t con[2]; - con[0].parent.node_id = 2; - con[0].parent.phy_id = 1; - con[0].parent.port_id = 3; - con[0].child.node_id = 4; - con[0].child.phy_id = 5; - con[0].child.port_id = 6; - con[1].parent.node_id = 7; - con[1].parent.phy_id = 8; - con[1].parent.port_id = 9; - con[1].child.node_id = 3; - con[1].child.phy_id = 11; - con[1].child.port_id = 12; - - memcpy(msg.data, con, 2 * sizeof(connection_t)); - memset(connection_table_ptr, 0xFF, sizeof(connection_t) * 2); - - LuosIO_ConsumeMsg(&msg); - TEST_ASSERT_EQUAL(3, last_node); - - TEST_ASSERT_EQUAL(2, connection_table_ptr[1].parent.node_id); - TEST_ASSERT_EQUAL(1, connection_table_ptr[1].parent.phy_id); - TEST_ASSERT_EQUAL(3, connection_table_ptr[1].parent.port_id); - - TEST_ASSERT_EQUAL(3, connection_table_ptr[2].child.node_id); - TEST_ASSERT_EQUAL(11, connection_table_ptr[2].child.phy_id); - TEST_ASSERT_EQUAL(12, connection_table_ptr[2].child.port_id); - - TEST_ASSERT_EQUAL(0xFFFF, connection_table_ptr[0].parent.node_id); - TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.phy_id); - TEST_ASSERT_EQUAL(0xFF, connection_table_ptr[0].parent.port_id); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } - - NEW_TEST_CASE("Check NODE_ID reception"); - { - TRY - { - luosIO_reset_overlap_callback(); - Luos_handled_job = NULL; - Robus_handled_job = NULL; - Node_Get()->node_id = 0; - msg_t msg; - msg.header.cmd = NODE_ID; - msg.header.size = 2; - msg.header.source = 1; - uint16_t node_id = 2; - memcpy(msg.data, &node_id, sizeof(uint16_t)); - - error_return_t ret_val = LuosIO_ConsumeMsg(&msg); - - TEST_ASSERT_EQUAL(SUCCEED, ret_val); - TEST_ASSERT_EQUAL(NULL, Luos_handled_job); - TEST_ASSERT_EQUAL(NULL, Robus_handled_job); - TEST_ASSERT_EQUAL(2, Node_Get()->node_id); - } - CATCH - { - TEST_ASSERT_TRUE(false); - } - END_TRY; - } - NEW_TEST_CASE("Check PORT_DATA treatment (topology retriving)"); { TRY @@ -405,7 +292,7 @@ void unittest_luosIO_ConsumeMsg() TEST_ASSERT_EQUAL(RTB, Luos_handled_job->msg_pt->header.cmd); TEST_ASSERT_EQUAL(1, Luos_handled_job->msg_pt->header.target); TEST_ASSERT_EQUAL(3 * sizeof(routing_table_t), Luos_handled_job->msg_pt->header.size); - TEST_ASSERT_EQUAL(SERVICEIDACK, Luos_handled_job->msg_pt->header.target_mode); + TEST_ASSERT_EQUAL(NODEIDACK, Luos_handled_job->msg_pt->header.target_mode); } CATCH { @@ -443,7 +330,7 @@ void unittest_luosIO_ConsumeMsg() TEST_ASSERT_EQUAL(RTB, Luos_handled_job->msg_pt->header.cmd); TEST_ASSERT_EQUAL(1, Luos_handled_job->msg_pt->header.target); TEST_ASSERT_EQUAL(3 * sizeof(routing_table_t), Luos_handled_job->msg_pt->header.size); - TEST_ASSERT_EQUAL(SERVICEIDACK, Luos_handled_job->msg_pt->header.target_mode); + TEST_ASSERT_EQUAL(NODEIDACK, Luos_handled_job->msg_pt->header.target_mode); routing_table_t rtb[3]; memcpy((void *)rtb, (void *)Luos_handled_job->msg_pt->data, 3 * sizeof(routing_table_t)); TEST_ASSERT_EQUAL(NODE, rtb[0].mode); @@ -474,6 +361,7 @@ void unittest_luosIO_ConsumeMsg() msg.header.size = 0; error_return_t ret_val = LuosIO_ConsumeMsg(&msg); + Luos_Loop(); // Start detection will reset on the next loop. // Check received message content TEST_ASSERT_EQUAL(SUCCEED, ret_val); diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 2ba19b3f3..750693b0a 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -2,6 +2,7 @@ #include "../src/luos_phy.c" #include "../src/msg_alloc.c" #include "../src/luos_io.c" +#include luos_phy_t *robus_phy; uint8_t buffer[512]; @@ -48,6 +49,7 @@ void reset_cb(luos_phy_t *phy_ptr) static void phy_test_reset(void) { Phy_Init(); + // Init default scenario context luos_phy = Phy_Get(0, phy_luos_MsgHandler, reset_cb, topo_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); TEST_ASSERT_EQUAL(1, phy_ctx.phy_nb); @@ -725,7 +727,6 @@ void unittest_phy_ComputeHeader() TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted } CATCH { @@ -766,7 +767,6 @@ void unittest_phy_ComputeHeader() TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted } CATCH { @@ -807,7 +807,6 @@ void unittest_phy_ComputeHeader() TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(false, luos_phy->rx_ack); TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted } CATCH { @@ -848,7 +847,6 @@ void unittest_phy_ComputeHeader() TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A luos service is targeted } CATCH { @@ -888,7 +886,6 @@ void unittest_phy_ComputeHeader() TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); TEST_ASSERT_EQUAL(true, luos_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x02, luos_phy->rx_phy_filter); // A Robus node is targeted } CATCH { @@ -926,10 +923,9 @@ void unittest_phy_ComputeHeader() robus_phy->rx_phy_filter = 0x00; Phy_ComputeHeader(robus_phy); TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); - TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); - TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); - TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); - TEST_ASSERT_EQUAL(0x00, robus_phy->rx_phy_filter); // No service is targeted + TEST_ASSERT_EQUAL(true, robus_phy->rx_keep); // By default at this stage we don't check all the node so we consider this as valid + TEST_ASSERT_EQUAL(true, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(true, robus_phy->rx_alloc_job); } CATCH { @@ -969,7 +965,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_alloc_job = false; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); + luos_phy->rx_timestamp = 10; TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1006,7 +1002,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_alloc_job = false; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); + luos_phy->rx_timestamp = 10; TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1024,10 +1020,17 @@ void unittest_phy_ValidMsg() TRY { phy_test_reset(); + Init_Context(); memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); msg_t msg; + msg.header.config = TIMESTAMP_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 600; + msg.data[0] = 0xAE; // Save message information in the Luos phy struct // Robus cannot target himself. luos_phy->rx_buffer_base = (uint8_t *)&msg; @@ -1038,8 +1041,8 @@ void unittest_phy_ValidMsg() luos_phy->rx_ack = true; luos_phy->rx_alloc_job = true; luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); - luos_phy->rx_phy_filter = 0x02; // A Robus node is targeted - luos_phy->rx_timestamp = TimeOD_TimeFrom_ns(10.0f); + luos_phy->rx_phy_filter = 0x00; + luos_phy->rx_timestamp = 10; TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1047,10 +1050,11 @@ void unittest_phy_ValidMsg() TEST_ASSERT_EQUAL(10, phy_ctx.io_job[0].timestamp); TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.io_job[0].alloc_msg); - TEST_ASSERT_EQUAL(0x02, phy_ctx.io_job[0].phy_filter); + TEST_ASSERT_EQUAL(0x01, phy_ctx.io_job[0].phy_filter); TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), phy_ctx.io_job[0].size); TEST_ASSERT_EQUAL(0, luos_phy->received_data); TEST_ASSERT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); + TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A Robus node is targeted } CATCH { @@ -1074,7 +1078,6 @@ void unittest_phy_ComputeTimestamp() TRY { - luos_phy phy; Phy_ComputeMsgTimestamp(luos_phy, NULL); } TEST_ASSERT_TRUE(IS_ASSERT()); From 317431776eae1c31feadda5be2cc53655a13496c Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 31 Aug 2023 17:51:06 +0200 Subject: [PATCH 136/198] Fix some code format --- examples/projects/ESP32/button/node_config.h | 2 +- examples/projects/NUCLEO-L073RZ/bootloader/node_config.h | 2 +- network/serial_network/HAL/template/serial_network_hal.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/projects/ESP32/button/node_config.h b/examples/projects/ESP32/button/node_config.h index 6d0d72f71..0f0d5d4a8 100644 --- a/examples/projects/ESP32/button/node_config.h +++ b/examples/projects/ESP32/button/node_config.h @@ -45,7 +45,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 1024 +#define MSG_BUFFER_SIZE 1024 #define ROBUS_NETWORK_BAUDRATE 500000 /******************************************************************************* diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index f8c9f6ab0..f8cbea49b 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -48,7 +48,7 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define ROBUS_NETWORK_BAUDRATE 500000 -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 512 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/network/serial_network/HAL/template/serial_network_hal.c b/network/serial_network/HAL/template/serial_network_hal.c index e7cd032a4..7f44411eb 100644 --- a/network/serial_network/HAL/template/serial_network_hal.c +++ b/network/serial_network/HAL/template/serial_network_hal.c @@ -9,8 +9,6 @@ #include "_serial_network.h" // TODO: Include the needed files - - /******************************************************************************* * Variables ******************************************************************************/ From 43c9a0851ad032562ee2d542a1c62e539a4be40d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 5 Sep 2023 16:40:41 +0200 Subject: [PATCH 137/198] Fix a typo --- engine/core/inc/luos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/core/inc/luos.h b/engine/core/inc/luos.h index 9091d69dd..9d33006af 100644 --- a/engine/core/inc/luos.h +++ b/engine/core/inc/luos.h @@ -4,5 +4,5 @@ * @author Luos ******************************************************************************/ -#error 'luos.h' inclusion is deprecated since luos_engine@2.3.1, replace it by '#include "luos_engine.h" +#error 'luos.h' inclusion is deprecated since luos_engine@2.3.1, replace it by '#include "luos_engine.h"` #include "luos_engine.h" From c152eaaf45917bba4144893f6deac2a78d945680 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 5 Sep 2023 16:41:39 +0200 Subject: [PATCH 138/198] Secure Robus initialization by setting Callback before enabling the hardware. This avoid a potential IRQ to broke the code. --- network/robus_network/inc/reception.h | 3 ++- network/robus_network/src/reception.c | 18 +++++++++++++----- network/robus_network/src/robus.c | 7 +++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/network/robus_network/inc/reception.h b/network/robus_network/inc/reception.h index f04abef0a..d76082660 100644 --- a/network/robus_network/inc/reception.h +++ b/network/robus_network/inc/reception.h @@ -49,7 +49,8 @@ void Recep_Drop(luos_phy_t *phy_robus, volatile uint8_t *data); // Callbacks send void Recep_CatchAck(luos_phy_t *phy_robus, volatile uint8_t *data); -void Recep_Init(luos_phy_t *phy_robus); +void Recep_Init(void); +void Recep_PhyInit(luos_phy_t *phy_robus); void Recep_EndMsg(void); void Recep_Reset(void); void Recep_Timeout(void); diff --git a/network/robus_network/src/reception.c b/network/robus_network/src/reception.c index 684e2b323..82f112e8c 100644 --- a/network/robus_network/src/reception.c +++ b/network/robus_network/src/reception.c @@ -73,13 +73,21 @@ uint16_t crc_val = 0; // CRC value * @param None * @return None ******************************************************************************/ -void Recep_Init(luos_phy_t *phy_robus) +void Recep_Init() { - LUOS_ASSERT(phy_robus != NULL); // Initialize the reception state machine - ctx.rx.status.unmap = 0; - ctx.rx.callback = Recep_GetHeader; - ctx.rx.status.identifier = 0xF; + ctx.rx.status.unmap = 0; + ctx.rx.callback = Recep_GetHeader; + ctx.rx.status.identifier = 0xF; +} +/****************************************************************************** + * @brief Reception init. + * @param None + * @return None + ******************************************************************************/ +void Recep_PhyInit(luos_phy_t *phy_robus) +{ + LUOS_ASSERT(phy_robus != NULL); phy_robus->rx_timestamp = 0; phy_robus->rx_buffer_base = data_rx; phy_robus->rx_data = data_rx; diff --git a/network/robus_network/src/robus.c b/network/robus_network/src/robus.c index dc2c5003d..afa7365f9 100644 --- a/network/robus_network/src/robus.c +++ b/network/robus_network/src/robus.c @@ -49,12 +49,15 @@ void Robus_Init(void) // Init transmission Transmit_Init(); + // Init Receiption + Recep_Init(); + // Instantiate the phy struct phy_robus = Phy_Create(Robus_JobHandler, Robus_RunTopology, Robus_Reset); LUOS_ASSERT(phy_robus); - // Init reception - Recep_Init(phy_robus); + // Init reception of the phy + Recep_PhyInit(phy_robus); } /****************************************************************************** From 7b83495c93686a842b3a1532e682a5a534f0aeaf Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 5 Sep 2023 17:36:19 +0200 Subject: [PATCH 139/198] [Gate] Allow user to put custom conversion on project lib --- tool_services/gate/select_format_script.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tool_services/gate/select_format_script.py b/tool_services/gate/select_format_script.py index f2fa9b5bb..020f712b3 100644 --- a/tool_services/gate/select_format_script.py +++ b/tool_services/gate/select_format_script.py @@ -14,11 +14,18 @@ if (path.exists(item[1])): click.secho("\t* %s translation format selected." % item[1], fg="green") + env.Append(CPPPATH=[realpath(item[1])]) + env.Replace(SRC_FILTER=["+<*.c>, +<%s>" % item[1]]) + elif (path.exists(env.get("PROJECT_DIR")+"/lib/"+item[1])): + click.secho("\t* %s translation format selected." % + item[1], fg="green") + env.Append( + CPPPATH=[realpath(env.get("PROJECT_DIR")+"/lib/"+item[1])]) + env.Replace(SRC_FILTER=["+<*.c>, +<%s>" % + env.get("PROJECT_DIR")+"/lib/"+item[1]]) else: click.secho("\t* %s translation format not found." % item[1], fg="red") - env.Append(CPPPATH=[realpath(item[1])]) - env.Replace(SRC_FILTER=["+<*.c>, +<%s>" % item[1]]) break if find_format == False: From c36ddaccfb8a635af1e72f5dacd3408d11d77f8a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 11 Sep 2023 13:27:56 +0200 Subject: [PATCH 140/198] Fix assert infinite re-entrance on Gate --- tool_services/pipe/pipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tool_services/pipe/pipe.c b/tool_services/pipe/pipe.c index 12aeeec30..5b7b2efc0 100644 --- a/tool_services/pipe/pipe.c +++ b/tool_services/pipe/pipe.c @@ -115,6 +115,7 @@ void node_assert(char *file, uint32_t line) // manage self crashing scenario char json[512]; sprintf(json, "{\"assert\":{\"node_id\":1,\"file\":\"%s\",\"line\":%d}}\n", file, (unsigned int)line); + Streaming_ResetChannel(&tx_StreamChannel); Streaming_PutSample(&tx_StreamChannel, json, strlen(json)); // Send the message From bf0ac489cc2a567cdd52c4a30fd574d97a9e9175 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 11 Sep 2023 17:15:51 +0200 Subject: [PATCH 141/198] Avoid asserts appening sometime during the reset_detection --- engine/IO/src/luos_phy.c | 1 + engine/core/src/routing_table.c | 6 +++++- test/tests_core/test_routing_table/main.c | 10 ---------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index b0404564f..1536dae0f 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -772,6 +772,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) { // We probably have been reseted in the meantime. Just drop the message. phy_ptr->rx_alloc_job = false; + phy_ptr->rx_keep = false; return; } diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 98ed59d22..11563d78f 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -766,7 +766,11 @@ void RoutingTB_ConvertServiceToRoutingTable(routing_table_t *entry, service_t *s ******************************************************************************/ void RoutingTB_RemoveNode(uint16_t nodeid) { - LUOS_ASSERT(nodeid != 0); + if (nodeid == 0) + { + // This mean that a node crashed before detection, we don't have to remove it. + return; + } // Instead of removing a node just remove all the service in it to make it unusable // We could add a param (CONTROL for example) to declare the node as STOP // find the node diff --git a/test/tests_core/test_routing_table/main.c b/test/tests_core/test_routing_table/main.c index b624b99ae..d6c1b34de 100644 --- a/test/tests_core/test_routing_table/main.c +++ b/test/tests_core/test_routing_table/main.c @@ -378,16 +378,6 @@ void unittest_RoutingTB_RemoveService(void) void unittest_RoutingTB_RemoveNode(void) { - NEW_TEST_CASE("Test RoutingTB_RemoveNode assert conditions"); - { - TRY - { - RoutingTB_RemoveNode(0); - } - TEST_ASSERT_TRUE(IS_ASSERT()); - END_TRY; - } - NEW_TEST_CASE("check RoutingTB_RemoveNode return value"); { TRY From 31943f23423c4ab194608364b9e7294ad81c8e46 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 11 Sep 2023 17:19:05 +0200 Subject: [PATCH 142/198] Clean Native Serial HAL --- .../HAL/NATIVE/serial_network_hal.c | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index 6fe1092ff..bad7d3365 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -201,24 +201,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) // Set serial port parameters set_serial_raw_mode(); - // DCB dcb = {0}; - // dcb.DCBlength = sizeof(dcb); - // if (!GetCommState(hSerial, &dcb)) - // { - // printf("Error getting serial port state\n"); - // CloseHandle(hSerial); - // LUOS_ASSERT(0); - // } - // dcb.BaudRate = SERIAL_NETWORK_BAUDRATE; - // dcb.ByteSize = 8; - // dcb.StopBits = ONESTOPBIT; - // dcb.Parity = NOPARITY; - // if (!SetCommState(hSerial, &dcb)) - // { - // printf("Error setting serial port state\n"); - // CloseHandle(hSerial); - // LUOS_ASSERT(0); - // } Sleep(2); #else serial_port = open(portname, O_RDWR | O_NOCTTY | O_NONBLOCK); @@ -227,8 +209,6 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) printf("Error opening serial port\n"); printf("Error code: %d\n", errno); LUOS_ASSERT(0); - while (1) - ; } struct termios tty; memset(&tty, 0, sizeof(tty)); @@ -241,17 +221,8 @@ void SerialHAL_Init(uint8_t *rx_buffer, uint32_t buffer_size) } // Set raw mode without any special handling of input/output - // cfmakeraw(&tty); set_termios_raw_mode(&tty); - // Set output/ input to be non-blocking - // tty.c_cc[VMIN] = 0; - // tty.c_cc[VTIME] = 0; - // #if defined(__linux__) - // tty.c_ispeed = SERIAL_NETWORK_BAUDRATE; - // tty.c_ospeed = SERIAL_NETWORK_BAUDRATE; - // #endif - if (tcsetattr(serial_port, TCSANOW, &tty) != 0) { printf("Error setting serial port attributes\n"); @@ -361,10 +332,8 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) int bytes_in_buffer; ssize_t bytesWritten; ioctl(serial_port, TIOCOUTQ, &bytes_in_buffer); - printf("%d bytes present before adding %d other.\n", bytes_in_buffer, size); bytesWritten = write(serial_port, data, size); LUOS_ASSERT(bytesWritten == size); - // tcdrain(serial_port); if (bytesWritten < 0) { printf("Error writing to serial port\n"); From 85c080053948170575fae2f94d0e8ce8ceca82c9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 11 Sep 2023 17:32:02 +0200 Subject: [PATCH 143/198] Secure potential RX segfault if the RX buffer is smaller than the receiving datas. --- network/serial_network/src/serial_network.c | 1 + 1 file changed, 1 insertion(+) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 42955246a..3a8db4107 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -366,6 +366,7 @@ _CRITICAL void Serial_Send(void) *****************************************************************************/ _CRITICAL void Serial_ReceptionWrite(uint8_t *data, uint32_t size) { + LUOS_ASSERT((size < sizeof(RX_data)) && (data != NULL)); if (rx_size == 0) { // This is probably the first data we received for this message, we need to timestamp the reception date. From 6f958b4e5e7382aa93dc3ed36ec99722da9946c0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 12 Sep 2023 17:15:51 +0200 Subject: [PATCH 144/198] Fix Gate compilation on windows --- tool_services/gate/select_format_script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool_services/gate/select_format_script.py b/tool_services/gate/select_format_script.py index 020f712b3..7417d0203 100644 --- a/tool_services/gate/select_format_script.py +++ b/tool_services/gate/select_format_script.py @@ -22,7 +22,7 @@ env.Append( CPPPATH=[realpath(env.get("PROJECT_DIR")+"/lib/"+item[1])]) env.Replace(SRC_FILTER=["+<*.c>, +<%s>" % - env.get("PROJECT_DIR")+"/lib/"+item[1]]) + (env.get("PROJECT_DIR")+"/lib/"+item[1])]) else: click.secho("\t* %s translation format not found." % item[1], fg="red") From 7fb67375948032f5ec0ab51419062da443855db1 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 12 Sep 2023 17:47:32 +0200 Subject: [PATCH 145/198] Fix a small datarace on RX --- engine/IO/src/luos_phy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 1536dae0f..6c0096996 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -766,6 +766,12 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now we can check if we need to store the received data if (phy_ptr->rx_keep) { + Phy_SetIrqState(false); + if (phy_ptr->rx_alloc_job == false) + { + Phy_SetIrqState(true); + return; + } // Compute the rx_phy_filter phy_ptr->rx_phy_filter = Phy_ComputeTargets(phy_ptr, (header_t *)phy_ptr->rx_buffer_base); if (phy_ptr->rx_phy_filter == 0) @@ -778,7 +784,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We need to store the received data. // Update the informations allowing reception to continue and directly copy the data into the allocated buffer - Phy_SetIrqState(false); if (phy_ptr->rx_alloc_job) { uint16_t phy_stored_data_size = phy_ptr->received_data; From b32fa7ce25be39776344d9d412514e30ed1e24a3 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 12 Sep 2023 17:56:54 +0200 Subject: [PATCH 146/198] Improve serial Loop on ST MCU --- .../HAL/STM32F0/serial_network_hal.c | 28 +++++++++---------- .../HAL/STM32F4/serial_network_hal.c | 28 +++++++++---------- .../HAL/STM32G431/serial_network_hal.c | 27 ++++++++---------- .../HAL/STM32G474/serial_network_hal.c | 28 ++++++++----------- .../HAL/STM32L4/serial_network_hal.c | 28 +++++++++---------- 5 files changed, 61 insertions(+), 78 deletions(-) diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.c b/network/serial_network/HAL/STM32F0/serial_network_hal.c index 2bb2815cd..34f66a071 100644 --- a/network/serial_network/HAL/STM32F0/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.c @@ -133,25 +133,23 @@ void SerialHAL_Loop(void) { uint16_t size = 0; uint16_t RX_PointerPosition = 0; - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else + if (RX_PointerPosition != RX_PrevPointerPosition) { - size = RX_PointerPosition - RX_PrevPointerPosition; + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionIncrease(size); } /****************************************************************************** diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.c b/network/serial_network/HAL/STM32F4/serial_network_hal.c index ff8da806a..4b21d53af 100644 --- a/network/serial_network/HAL/STM32F4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.c @@ -136,25 +136,23 @@ void SerialHAL_Loop(void) { uint16_t size = 0; uint16_t RX_PointerPosition = 0; - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else + if (RX_PointerPosition != RX_PrevPointerPosition) { - size = RX_PointerPosition - RX_PrevPointerPosition; + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionIncrease(size); } /****************************************************************************** diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.c b/network/serial_network/HAL/STM32G431/serial_network_hal.c index c53483b88..05b93944a 100644 --- a/network/serial_network/HAL/STM32G431/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.c @@ -136,25 +136,20 @@ void SerialHAL_Loop(void) { uint16_t size = 0; uint16_t RX_PointerPosition = 0; - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - if (size != 0) + if (RX_PointerPosition != RX_PrevPointerPosition) { + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy Serial_ReceptionIncrease(size); } diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.c b/network/serial_network/HAL/STM32G474/serial_network_hal.c index 9d411f880..726eceb51 100644 --- a/network/serial_network/HAL/STM32G474/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.c @@ -136,30 +136,24 @@ void SerialHAL_Loop(void) { uint16_t size = 0; uint16_t RX_PointerPosition = 0; - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else - { - size = RX_PointerPosition - RX_PrevPointerPosition; - } - RX_PrevPointerPosition = RX_PointerPosition; - if (size != 0) + if (RX_PointerPosition != RX_PrevPointerPosition) { + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy Serial_ReceptionIncrease(size); } } - /****************************************************************************** * @brief Initialisation of the Serial communication * @param data pointer of the data to send diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.c b/network/serial_network/HAL/STM32L4/serial_network_hal.c index d0f78dc30..71ae31a07 100644 --- a/network/serial_network/HAL/STM32L4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.c @@ -135,25 +135,23 @@ void SerialHAL_Loop(void) { uint16_t size = 0; uint16_t RX_PointerPosition = 0; - if (LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL) == 0) - { - return; - } RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); - - if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow - { - SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); - size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; - } - else + if (RX_PointerPosition != RX_PrevPointerPosition) { - size = RX_PointerPosition - RX_PrevPointerPosition; + if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow + { + SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); + size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; + } + else + { + size = RX_PointerPosition - RX_PrevPointerPosition; + } + RX_PrevPointerPosition = RX_PointerPosition; + // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy + Serial_ReceptionIncrease(size); } - RX_PrevPointerPosition = RX_PointerPosition; - // Send the received data and size to the serial stack to deencapsulate it and send it to luos_phy - Serial_ReceptionIncrease(size); } /****************************************************************************** From 3c3e8cebdffb77165512a846129850a91651be63 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 12 Sep 2023 18:17:30 +0200 Subject: [PATCH 147/198] Fix Serial --- network/serial_network/HAL/NATIVE/serial_network_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index bad7d3365..1a9a861ab 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -333,13 +333,13 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) ssize_t bytesWritten; ioctl(serial_port, TIOCOUTQ, &bytes_in_buffer); bytesWritten = write(serial_port, data, size); - LUOS_ASSERT(bytesWritten == size); if (bytesWritten < 0) { printf("Error writing to serial port\n"); close(serial_port); LUOS_ASSERT(0); } + LUOS_ASSERT(bytesWritten == size); #endif Serial_TransmissionEnd(); } From 23428f6e6661cf0bb7067364b7045f9570e3e3bc Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 12 Sep 2023 18:18:18 +0200 Subject: [PATCH 148/198] Fix Native Gate node_config --- examples/projects/native/gate_wscom/node_config.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index 94e496935..c789f57da 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -107,10 +107,10 @@ * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size * INIT_TIME | 150 | Wait init time before first detection ******************************************************************************/ -#define GATE_BUFF_SIZE 65000 -#define PIPE_RX_BUFFER_SIZE 65000 -#define PIPE_TX_BUFFER_SIZE 65000 -#define INIT_TIME 150 -#define GATE_REFRESH_TIME_S 0.05f - +#define GATE_BUFF_SIZE 65000 +#define PIPE_RX_BUFFER_SIZE 65000 +#define PIPE_TX_BUFFER_SIZE 65000 +#define SERIAL_RX_BUFFER_SIZE 65000 +#define INIT_TIME 150 +#define GATE_REFRESH_TIME_S 0.05f #endif /* _NODE_CONFIG_H_ */ From 25f9ee3d3985ad71b5ffb7e52e41d4d144582195 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 14 Sep 2023 10:48:35 +0200 Subject: [PATCH 149/198] Fix a Robus reception byte count mistake making big messages potentially crash. --- network/robus_network/src/reception.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network/robus_network/src/reception.c b/network/robus_network/src/reception.c index 82f112e8c..473479e6a 100644 --- a/network/robus_network/src/reception.c +++ b/network/robus_network/src/reception.c @@ -181,6 +181,8 @@ _CRITICAL void Recep_GetData(luos_phy_t *phy_robus, volatile uint8_t *data) // Send an Ack Transmit_SendAck(); } + // Remove the CRC additional byte + phy_robus->received_data--; // Valid the message Phy_ValidMsg(phy_robus); } From a74df885670cc58a16a8b0183d90d05618b90984 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 14 Sep 2023 14:04:48 +0200 Subject: [PATCH 150/198] [SERIAL] Fix STM HAL DMA received size computation datarace in case of DATA RX during computation. --- network/serial_network/HAL/STM32F0/serial_network_hal.c | 3 +++ network/serial_network/HAL/STM32F4/serial_network_hal.c | 3 +++ network/serial_network/HAL/STM32G431/serial_network_hal.c | 3 +++ network/serial_network/HAL/STM32G474/serial_network_hal.c | 3 +++ network/serial_network/HAL/STM32L4/serial_network_hal.c | 3 +++ 5 files changed, 15 insertions(+) diff --git a/network/serial_network/HAL/STM32F0/serial_network_hal.c b/network/serial_network/HAL/STM32F0/serial_network_hal.c index 34f66a071..705d6a573 100644 --- a/network/serial_network/HAL/STM32F0/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F0/serial_network_hal.c @@ -139,6 +139,9 @@ void SerialHAL_Loop(void) { if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow { + // Recompute the RX_PointerPosition to be sure to get the DMA buffer after the overflow. + // If the RX_PointerPosition was taken just before the overflow we may compute this with a wrong value. + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; } diff --git a/network/serial_network/HAL/STM32F4/serial_network_hal.c b/network/serial_network/HAL/STM32F4/serial_network_hal.c index 4b21d53af..cb38b3706 100644 --- a/network/serial_network/HAL/STM32F4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32F4/serial_network_hal.c @@ -142,6 +142,9 @@ void SerialHAL_Loop(void) { if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow { + // Recompute the RX_PointerPosition to be sure to get the DMA buffer after the overflow. + // If the RX_PointerPosition was taken just before the overflow we may compute this with a wrong value. + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; } diff --git a/network/serial_network/HAL/STM32G431/serial_network_hal.c b/network/serial_network/HAL/STM32G431/serial_network_hal.c index 05b93944a..035565c34 100644 --- a/network/serial_network/HAL/STM32G431/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G431/serial_network_hal.c @@ -142,6 +142,9 @@ void SerialHAL_Loop(void) { if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow { + // Recompute the RX_PointerPosition to be sure to get the DMA buffer after the overflow. + // If the RX_PointerPosition was taken just before the overflow we may compute this with a wrong value. + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; } diff --git a/network/serial_network/HAL/STM32G474/serial_network_hal.c b/network/serial_network/HAL/STM32G474/serial_network_hal.c index 726eceb51..589048861 100644 --- a/network/serial_network/HAL/STM32G474/serial_network_hal.c +++ b/network/serial_network/HAL/STM32G474/serial_network_hal.c @@ -142,6 +142,9 @@ void SerialHAL_Loop(void) { if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow { + // Recompute the RX_PointerPosition to be sure to get the DMA buffer after the overflow. + // If the RX_PointerPosition was taken just before the overflow we may compute this with a wrong value. + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; } diff --git a/network/serial_network/HAL/STM32L4/serial_network_hal.c b/network/serial_network/HAL/STM32L4/serial_network_hal.c index 71ae31a07..60ac5ac66 100644 --- a/network/serial_network/HAL/STM32L4/serial_network_hal.c +++ b/network/serial_network/HAL/STM32L4/serial_network_hal.c @@ -141,6 +141,9 @@ void SerialHAL_Loop(void) { if (SERIAL_RX_DMA_TC(SERIAL_RX_DMA) != RESET) // DMA buffer overflow { + // Recompute the RX_PointerPosition to be sure to get the DMA buffer after the overflow. + // If the RX_PointerPosition was taken just before the overflow we may compute this with a wrong value. + RX_PointerPosition = rx_buffer_size - LL_DMA_GetDataLength(SERIAL_RX_DMA, SERIAL_RX_DMA_CHANNEL); SERIAL_RX_DMA_CLEAR_TC(SERIAL_RX_DMA); size = (rx_buffer_size - RX_PrevPointerPosition) + RX_PointerPosition; } From bd5778f20c547265d7464f81604b9b6f647d69a9 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 14 Sep 2023 16:44:14 +0200 Subject: [PATCH 151/198] [SERIAL] Secure messy RX interpretation --- network/serial_network/src/serial_network.c | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 3a8db4107..887d7a5b8 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -130,11 +130,17 @@ static void Serial_MoveRxPtr(uint8_t size) ******************************************************************************/ void Serial_Loop(void) { + static uint32_t timeout_systick = 0; SerialHAL_Loop(); // Manage received data while (rx_size > 0) { + if (*phy_serial->rx_buffer_base != SERIAL_HEADER) + { + Serial_MoveRxPtr(1); + continue; + } /*********************************************** * 1 - Receive the header and check if the message is complete *********************************************/ @@ -158,15 +164,37 @@ void Serial_Loop(void) // Header is continuous memcpy(&header, phy_serial->rx_buffer_base, sizeof(SerialHeader_t)); } + if (header.size >= sizeof(msg_t)) + { + // This data seems to be corrupted or at least we can't receive it with our buffer size, drop it. + Serial_MoveRxPtr(1); + } // Now we have the complete header, check if we receive the complete message if (rx_size < header.size + sizeof(SerialHeader_t) + 1) { // We don't receive the complete message yet. + // Manage a timeout to be sure we are not looking for a wrong message + if (timeout_systick == 0) + { + // Start the timeout counter + timeout_systick = LuosHAL_GetSystick(); + } + else + { + // We already start the timeout + if ((LuosHAL_GetSystick() - timeout_systick) > 100) + { + // We spend the 100ms timeout, remove the byte + Serial_MoveRxPtr(1); + timeout_systick = 0; + } + } return; } /*********************************************** * 2 - Receive the message *********************************************/ + timeout_systick = 0; uint8_t *footer_position = &phy_serial->rx_buffer_base[header.size + sizeof(SerialHeader_t)]; // Check if the footer address is after the end of the buffer if ((uintptr_t)footer_position >= (uintptr_t)RX_data + sizeof(RX_data)) From 1d2d167c1a84c722f0bf7d097c289f981763f858 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 18 Sep 2023 10:18:14 +0200 Subject: [PATCH 152/198] [SERIAL] Fix loop in buffer at the very begining of the message. --- network/serial_network/src/serial_network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 887d7a5b8..e4765bf15 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -157,7 +157,7 @@ void Serial_Loop(void) // We need to go back to the beginning of the buffer uint8_t buffer_end_size = ((uintptr_t)RX_data + sizeof(RX_data)) - (uintptr_t)(phy_serial->rx_buffer_base); memcpy(&header, phy_serial->rx_buffer_base, buffer_end_size); - memcpy(&header + buffer_end_size, RX_data, sizeof(SerialHeader_t) - buffer_end_size); + memcpy((void *)((uintptr_t)&header + buffer_end_size), RX_data, sizeof(SerialHeader_t) - buffer_end_size); } else { From 6642666cbb7961409c4fb4dfd4602d1fca919ca1 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 19 Sep 2023 16:41:40 +0200 Subject: [PATCH 153/198] [SERIAL] Fix big message reception sizing and timing issue --- network/serial_network/src/serial_network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index e4765bf15..62d70f100 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -164,7 +164,7 @@ void Serial_Loop(void) // Header is continuous memcpy(&header, phy_serial->rx_buffer_base, sizeof(SerialHeader_t)); } - if (header.size >= sizeof(msg_t)) + if (header.size > sizeof(msg_t)) { // This data seems to be corrupted or at least we can't receive it with our buffer size, drop it. Serial_MoveRxPtr(1); @@ -182,7 +182,7 @@ void Serial_Loop(void) else { // We already start the timeout - if ((LuosHAL_GetSystick() - timeout_systick) > 100) + if ((LuosHAL_GetSystick() - timeout_systick) > 200) { // We spend the 100ms timeout, remove the byte Serial_MoveRxPtr(1); From f47d1681d25c43d654593933609fad12ad32c431 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 19 Sep 2023 17:11:21 +0200 Subject: [PATCH 154/198] Rename phy index var in LuosIO_ConsumeMsg for readability --- engine/IO/src/luos_io.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 4f13fc0e1..c50dddac8 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -371,11 +371,11 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) LUOS_ASSERT(input != NULL); msg_t output_msg; time_luos_t time; - service_t *service = Service_GetConcerned(&input->header); - dead_target_t *dead_target = (dead_target_t *)input->data; - uint16_t base_id = 0; - routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()]; - static luos_phy_t *phy_ptr = NULL; + service_t *service = Service_GetConcerned(&input->header); + dead_target_t *dead_target = (dead_target_t *)input->data; + uint16_t base_id = 0; + routing_table_t *route_tab = &RoutingTB_Get()[RoutingTB_GetLastEntry()]; + static luos_phy_t *phy_index_ptr = NULL; switch (input->header.cmd) { @@ -501,39 +501,44 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) break; case PHY_ID: + // We receive a phy id. We have to save it, because we will need it to save the indexes in the good phy. base_id = 0; memcpy(&base_id, input->data, sizeof(uint8_t)); - phy_ptr = Phy_GetPhyFromId((uint8_t)base_id); + phy_index_ptr = Phy_GetPhyFromId((uint8_t)base_id); // This message have been consumed + return SUCCEED; break; case NODE_INDEXES: // We are receiving a node index table - LUOS_ASSERT(phy_ptr != NULL); - base_id = Luos_ReceiveData(service, input, (void *)phy_ptr->nodes); + LUOS_ASSERT(phy_index_ptr != NULL); + base_id = Luos_ReceiveData(service, input, (void *)phy_index_ptr->nodes); if (base_id > 0) { - LUOS_ASSERT(base_id <= sizeof(phy_ptr->nodes)); // The MAX_NODE_NUMBER of the detecting node is bigger than the one we have + LUOS_ASSERT(base_id <= sizeof(phy_index_ptr->nodes)); // The MAX_NODE_NUMBER of the detecting node is bigger than the one we have // We finished to receive the phy indexes - phy_ptr = NULL; + phy_index_ptr = NULL; } // This message have been consumed + return SUCCEED; break; case SERVICE_INDEXES: + // We are receiving a service index table - LUOS_ASSERT(phy_ptr != NULL); - base_id = Luos_ReceiveData(service, input, (void *)phy_ptr->services); + LUOS_ASSERT(phy_index_ptr != NULL); + base_id = Luos_ReceiveData(service, input, (void *)phy_index_ptr->services); if (base_id > 0) { - LUOS_ASSERT(base_id <= sizeof(phy_ptr->services)); // The MAX_SERVICE_NUMBER of the detecting node is bigger than the one we have + LUOS_ASSERT(base_id <= sizeof(phy_index_ptr->services)); // The MAX_SERVICE_NUMBER of the detecting node is bigger than the one we have // We finished to receive the phy indexes - phy_ptr = NULL; + phy_index_ptr = NULL; } // This message have been consumed + return SUCCEED; break; From 8a966bc80ccc24b9c7bb3e38d3b3efd9f051ce73 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 21 Sep 2023 11:52:26 +0200 Subject: [PATCH 155/198] Make Luos_engine immune to port (PTP) glitch out of detection --- engine/IO/src/luos_phy.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 6c0096996..de4600271 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -377,19 +377,24 @@ void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id) { LUOS_ASSERT((phy_ptr != NULL) && (port_id < 0xFF)); - // This port is the source of a topology request. it become the input port. - // We have to save it in the node context. - phy_ctx.topology_source.phy_id = Phy_GetPhyId(phy_ptr); - phy_ctx.topology_source.port_id = port_id; - phy_ctx.topology_source.node_id = 0xFFFF; - // We don't have the node id yet, we will fill it out when we will receive it from the master. - // Put a flag to indicate that we are waiting for a node id. - Node_WillGetId(); - - // We also know that this phy is liked to the detecting node. - // To enable any communication with it we have to set the nodes and services filter of this phy allowing us to communicate with it. - Phy_IndexSet(phy_ptr->nodes, 0x01); - Phy_IndexSet(phy_ptr->services, 0x01); + // First we need to be sure that this event is not a glitch. We should get it only after a start detection and ignore any other. + if (Node_Get()->node_id == 0) + { + // Our node id is not set yet, we are ready to receive this event. + // This port is the source of a topology request. it become the input port. + // We have to save it in the node context. + phy_ctx.topology_source.phy_id = Phy_GetPhyId(phy_ptr); + phy_ctx.topology_source.port_id = port_id; + phy_ctx.topology_source.node_id = 0xFFFF; + // We don't have the node id yet, we will fill it out when we will receive it from the master. + // Put a flag to indicate that we are waiting for a node id. + Node_WillGetId(); + + // We also know that this phy is linked to the detecting node. + // To enable any communication with it we have to set the nodes and services filter of this phy allowing us to communicate with it. + Phy_IndexSet(phy_ptr->nodes, 0x01); + Phy_IndexSet(phy_ptr->services, 0x01); + } } /****************************************************************************** From cf09e2dd60a05bde275397a49a840005e58f5300 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 21 Sep 2023 11:53:15 +0200 Subject: [PATCH 156/198] Fix a Job manager datarace --- engine/IO/src/luos_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index de4600271..acbb243a0 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -678,11 +678,11 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) // Now we can create a phy_job to dispatch the tx_job later LUOS_ASSERT(phy_ctx.io_job_nb < MAX_MSG_NB); Phy_SetIrqState(false); - uint16_t my_job = phy_ctx.io_job_nb++; + uint16_t my_job = phy_ctx.io_job_nb++; + phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; Phy_SetIrqState(true); // Now copy the data in the job phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; - phy_ctx.io_job[my_job].alloc_msg = (msg_t *)phy_ptr->rx_data; phy_ctx.io_job[my_job].phy_filter = phy_ptr->rx_phy_filter; phy_ctx.io_job[my_job].size = phy_ptr->rx_size; @@ -983,10 +983,10 @@ static phy_job_t *Phy_AddJob(luos_phy_t *phy_ptr, phy_job_t *phy_job) phy_ptr->available_job_index = 0; } LUOS_ASSERT(phy_ptr->available_job_index != phy_ptr->oldest_job_index); - Phy_SetIrqState(true); phy_ptr->job_nb++; // Copy the actual job data to the allocated job *returned_job = *phy_job; + Phy_SetIrqState(true); return returned_job; } From f6fe5a0dd4eb2221ca0fdd47c31d4a0736a5940f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 22 Sep 2023 13:34:14 +0200 Subject: [PATCH 157/198] Improve header validation to avoid concurent ACK during detection --- engine/IO/src/luos_io.c | 7 +++++++ engine/IO/src/luos_phy.c | 21 ++++++++++++++++----- engine/core/inc/node.h | 1 + engine/core/src/node.c | 12 +++++++++++- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index c50dddac8..aa7a603aa 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -445,6 +445,13 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) // Add this node id in the Luos phy filter allowing us to receive node messages memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); Phy_IndexSet(luos_phy->nodes, node_id); + // Also add all node before our node_id in the philter of the source phy + port_t *source_port = Phy_GetTopologysource(); + luos_phy_t *source_phy_ptr = Phy_GetPhyFromId(source_port->phy_id); + for (uint16_t i = 0; i < node_id; i++) + { + Phy_IndexSet(source_phy_ptr->nodes, i); + } // Now we need to send back the input part of the connection data. port_t *input_port = Phy_GetTopologysource(); input_port->node_id = Node_Get()->node_id; diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index acbb243a0..96fd9161d 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -79,6 +79,7 @@ typedef struct bool topology_running; // We put this bits to 1 when a phy is running the topology detection. bool find_next_node_job; // We put this bits to 1 to indicate that we will need to find another node. bool resetAllNeed; // We put this bits to 1 to indicate that we will need to reset all the nodes. We need it to avoid to reset all phy at reset message reception, allowing the phy's to send their reset message. + bool PhyExeptSourceDone; // We put this bit to 1 when all the phys except the source one are done with their detection. // ******************** Job management ******************** // io_jobs are stores from the newest to the oldest. @@ -150,6 +151,7 @@ void Phy_Reset(void) phy_ctx.topology_done = 0; phy_ctx.topology_running = false; phy_ctx.find_next_node_job = false; + phy_ctx.PhyExeptSourceDone = true; } void Phy_ResetAllNeeded(void) @@ -311,7 +313,8 @@ error_return_t Phy_FindNextNode(void) // This phy still have port to detect uint8_t port_id; // Check if a node is connected - phy_ctx.topology_running = true; + phy_ctx.topology_running = true; + phy_ctx.PhyExeptSourceDone = false; if (phy_ctx.phy[i].run_topo(&phy_ctx.phy[i], &port_id) == SUCCEED) { port_t output_port; @@ -334,6 +337,7 @@ error_return_t Phy_FindNextNode(void) } } // We checked all the phys except the source one. + phy_ctx.PhyExeptSourceDone = true; // Check if the source phy still have port to detect if (phy_ctx.topology_done != (1 << phy_ctx.phy_nb) - 2) { @@ -537,8 +541,15 @@ bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) break; case NODEIDACK: case NODEID: - // If the target is not the phy_ptr, we need to keep this message - return !Phy_IndexFilter(phy_ptr->nodes, header->target); + if (header->target == 0) + { + return Node_DoWeWaitId() || (phy_ctx.PhyExeptSourceDone == false); // or we are waiting for child branches ((phy_ctx.topology_running == true) && (header->source == 1)) + } + else + { + // If the target is not the phy_ptr, we need to keep this message + return !Phy_IndexFilter(phy_ptr->nodes, header->target); + } break; default: // This message is wrong, trash it. @@ -581,8 +592,8 @@ inline phy_target_t Phy_ComputeTargets(luos_phy_t *phy_ptr, header_t *header) // This concerns Luos phy only if ((phy_ctx.topology_running == true) && (header->source != 1)) { - // We are performing a topology and this message is for us. - // We need to store the node that send us this in our index allowing us to communicate with it later. + // We are performing a topology as master and this message is for us. + // We need to store the node that send us this in our index allowing us to communicate with it later Phy_IndexSet(phy_ptr->nodes, header->source); } target = 0x01; diff --git a/engine/core/inc/node.h b/engine/core/inc/node.h index 0433354b7..4b798a602 100644 --- a/engine/core/inc/node.h +++ b/engine/core/inc/node.h @@ -52,6 +52,7 @@ void Node_Loop(void); node_t *Node_Get(void); void Node_WillGetId(void); bool Node_WaitId(void); +bool Node_DoWeWaitId(void); node_state_t Node_GetState(void); void Node_SetState(node_state_t); diff --git a/engine/core/src/node.c b/engine/core/src/node.c index b452dd5aa..06d7673d6 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -49,7 +49,7 @@ void Node_WillGetId(void) } /****************************************************************************** - * @brief check if node is actually expecting an ID to come + * @brief check if node is actually expecting an ID to come and reset it * @param None * @return bool ******************************************************************************/ @@ -60,6 +60,16 @@ bool Node_WaitId(void) return return_value; } +/****************************************************************************** + * @brief check if node is actually expecting an ID to come + * @param None + * @return bool + ******************************************************************************/ +bool Node_DoWeWaitId(void) +{ + return node_ctx.wait_id; +} + /****************************************************************************** * @brief get network_state value * @param None From 803b85f11581fa6cda0adc95fef3c4bee0bd8c31 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 22 Sep 2023 13:35:17 +0200 Subject: [PATCH 158/198] Fix topology bug involving multiple networks with multiple ports --- engine/IO/src/luos_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 96fd9161d..d30f3da1c 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -409,7 +409,7 @@ void Phy_TopologySource(luos_phy_t *phy_ptr, uint8_t port_id) void Phy_TopologyDone(luos_phy_t *phy_ptr) { LUOS_ASSERT(phy_ptr != NULL); - phy_ctx.topology_done = (1 << Phy_GetPhyId(phy_ptr)); + phy_ctx.topology_done |= (1 << Phy_GetPhyId(phy_ptr)); phy_ctx.topology_running = false; } From 80a6bff80243f7cd3cdbd90e953301c0ecd2c2e6 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 22 Sep 2023 13:36:46 +0200 Subject: [PATCH 159/198] Increase detection timeout allowing complex network to spend more time generating the local RTB --- engine/core/src/routing_table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 11563d78f..57171f331 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -245,18 +245,18 @@ static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t intro_msg.header.target_mode = NODEIDACK; // Target next unknown node intro_msg.header.target = last_node_id + 1; - // set the first service id it can use + // Set the first service id it can use intro_msg.header.size = 2; last_service_id = RoutingTB_BigestID() + 1; memcpy(intro_msg.data, &last_service_id, sizeof(uint16_t)); - // save the current last routing table entry allowing us to easily write the connection informations later + // Save the current last routing table entry allowing us to easily write the connection informations later rtb_next_node_index = RoutingTB_GetLastEntry(); entry_bkp = last_routing_table_entry; Luos_SendMsg(service, &intro_msg); timestamp = LuosHAL_GetSystick(); detect_state_machine++; case 1: - if ((LuosHAL_GetSystick() - timestamp) >= 200) + if ((LuosHAL_GetSystick() - timestamp) >= 2000) { // Time out is reached // We don't get the answer @@ -273,7 +273,7 @@ static int RoutingTB_Generate(service_t *service, uint16_t nb_node, connection_t } // We get the answer // The node answer don't include connection because the node don't know it yet - // add this information to the routing table + // Add this information to the routing table LUOS_ASSERT(routing_table[rtb_next_node_index].mode == NODE); routing_table[rtb_next_node_index].connection = connection_table[last_node_id]; last_node_id = RoutingTB_BigestNodeID(); From a72df1810d470e0b109999414e3dfcd37aeebbbd Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 25 Sep 2023 10:43:29 +0200 Subject: [PATCH 160/198] Fix serial detection from RT compute unit --- network/serial_network/src/serial_network.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/network/serial_network/src/serial_network.c b/network/serial_network/src/serial_network.c index 62d70f100..987bf4ece 100644 --- a/network/serial_network/src/serial_network.c +++ b/network/serial_network/src/serial_network.c @@ -413,7 +413,7 @@ _CRITICAL void Serial_ReceptionWrite(uint8_t *data, uint32_t size) } rx_size += size; LUOS_ASSERT(rx_size < sizeof(RX_data)); - if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) + if ((wait_reception == true) && (rx_size >= sizeof(SerialHeader_t) + 1)) { // We received the answer of a topology ping, just indicate that we receive it wait_reception = false; @@ -428,12 +428,15 @@ _CRITICAL void Serial_ReceptionWrite(uint8_t *data, uint32_t size) _CRITICAL void Serial_ReceptionIncrease(uint32_t size) { // Reception is finished, we can parse the message + if (rx_size == 0) + { + // We consider this as the end of a complete message + // If we received multiple messages in this call, this could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. + phy_serial->rx_timestamp = Phy_GetTimestamp() - (size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) + } rx_size += size; - // We consider this as the end of a complete message - // If we received multiple messages in this call, this could result in a wrong timestamp for the second message. Their is no way to avoid this problem, so we need to accept it. - phy_serial->rx_timestamp = Phy_GetTimestamp() - (rx_size * (uint32_t)10 * (uint32_t)1000000000 / (uint32_t)SERIAL_NETWORK_BAUDRATE); // now - (nbr_byte * 10bits * (1s in ns) / baudrate) LUOS_ASSERT(rx_size < sizeof(RX_data)); - if ((wait_reception == true) && (size >= sizeof(SerialHeader_t) + 1)) + if ((wait_reception == true) && (rx_size >= sizeof(SerialHeader_t) + 1)) { // We received the answer of a topology ping, just indicate that we receive it wait_reception = false; From 34f2b35401047ae42f65eab524e454a7b42ec5b7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 25 Sep 2023 13:48:26 +0200 Subject: [PATCH 161/198] Fix the ping chain during detection over multiple phys branches. --- engine/IO/src/luos_phy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index d30f3da1c..23b4b10b2 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -411,6 +411,13 @@ void Phy_TopologyDone(luos_phy_t *phy_ptr) LUOS_ASSERT(phy_ptr != NULL); phy_ctx.topology_done |= (1 << Phy_GetPhyId(phy_ptr)); phy_ctx.topology_running = false; + // We need to check if we have to find another node + if (phy_ctx.topology_done != ((1 << phy_ctx.phy_nb) - 1 - 1)) + { + // We don't have detected all the nodes on all the phys. + // We need to find the next node. + phy_ctx.find_next_node_job = true; + } } /****************************************************************************** From a147cdc98a9657177f4b20e80dd98ccd9be1fcd8 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 25 Sep 2023 13:49:05 +0200 Subject: [PATCH 162/198] Fix ACK collision during detection on ACK compatible phys --- engine/IO/src/luos_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 23b4b10b2..78b941365 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -555,7 +555,7 @@ bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) else { // If the target is not the phy_ptr, we need to keep this message - return !Phy_IndexFilter(phy_ptr->nodes, header->target); + return (!Phy_IndexFilter(phy_ptr->nodes, header->target) && (Node_Get()->node_id != 0)); } break; default: From 3a0350bba9d2ad8d6a4d6c65f5fb820adc681a2f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 26 Sep 2023 13:49:29 +0200 Subject: [PATCH 163/198] Improve some typo --- engine/core/src/routing_table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 57171f331..c67379266 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -412,9 +412,9 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 /* * To get all the nodes indexes of the provided node ID, we have to parse the routing table and use the connection informations to know how to dispatch all the nodes. * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. - * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it phy 1. - * Then we will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider taht they are accessible trough phy 1. - * We we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it is phy 1. + * We will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider that they are accessible trough phy 1. + * If we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. * When we reach the end of the routing table, we have 2 options: * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. From ca84cd523f20fcece5f8af14d9698afa3cefa36e Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 26 Sep 2023 13:50:22 +0200 Subject: [PATCH 164/198] Enable multiple phy on nodes other than detection --- engine/core/src/routing_table.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index c67379266..169fcbc0e 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -440,7 +440,6 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 memset(nodes_indexes, 0, sizeof(nodes_indexes)); node_phy = connection_table[node_idx].parent.phy_id; } - LUOS_ASSERT(node_phy != -1); // Add the node index to the nodes_indexes table. uint8_t bit_index = node_idx; nodes_indexes[bit_index / 8] |= 1 << (bit_index % 8); @@ -562,7 +561,6 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) memset(services_indexes, 0, sizeof(services_indexes)); node_phy = routing_table[node_idx].connection.parent.phy_id; } - LUOS_ASSERT(node_phy != -1); break; case SERVICE: // This is a service slot. From 0714d27a11d2c16b053610aee58e0bba54b33a6f Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 26 Sep 2023 13:50:52 +0200 Subject: [PATCH 165/198] Improve IRQ disabled time to secure Robus RX on small targets --- engine/IO/src/luos_phy.c | 2 ++ engine/IO/src/msg_alloc.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 78b941365..26ddd151f 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -804,6 +804,8 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) phy_ptr->rx_keep = false; return; } + Phy_SetIrqState(true); + Phy_SetIrqState(false); // We need to store the received data. // Update the informations allowing reception to continue and directly copy the data into the allocated buffer diff --git a/engine/IO/src/msg_alloc.c b/engine/IO/src/msg_alloc.c index 72c0661d0..6a159ab72 100644 --- a/engine/IO/src/msg_alloc.c +++ b/engine/IO/src/msg_alloc.c @@ -114,12 +114,17 @@ void MsgAlloc_Init(memory_stats_t *memory_stats) ******************************************************************************/ void MsgAlloc_Loop(void) { + static volatile uint8_t *last_data_ptr = NULL; // Compute buffer occupation rate uint8_t stat = 0; - stat = (uint8_t)(((MSG_BUFFER_SIZE - MsgAlloc_BufferAvailableSpaceComputation()) * 100) / (MSG_BUFFER_SIZE)); - if (stat > mem_stat->buffer_occupation_ratio) + if (data_ptr != last_data_ptr) { - mem_stat->buffer_occupation_ratio = stat; + last_data_ptr = data_ptr; + stat = (uint8_t)(((MSG_BUFFER_SIZE - MsgAlloc_BufferAvailableSpaceComputation()) * 100) / (MSG_BUFFER_SIZE)); + if (stat > mem_stat->buffer_occupation_ratio) + { + mem_stat->buffer_occupation_ratio = stat; + } } } From 043c57e99b89acb9c3da4d558118c100b4896375 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 27 Sep 2023 18:42:30 +0200 Subject: [PATCH 166/198] Fix a cornercase where IRQ may stay stuck disabled --- engine/IO/src/luos_phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 26ddd151f..14a015b7e 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -802,6 +802,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We probably have been reseted in the meantime. Just drop the message. phy_ptr->rx_alloc_job = false; phy_ptr->rx_keep = false; + Phy_SetIrqState(true); return; } Phy_SetIrqState(true); From ada647304dba6defbf5db307316c88ebba118397 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 28 Sep 2023 14:36:32 +0200 Subject: [PATCH 167/198] Fix phy unit test --- test/tests_io/test_phy/main.c | 38 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 750693b0a..0435f37ca 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -50,10 +50,10 @@ static void phy_test_reset(void) { Phy_Init(); // Init default scenario context - luos_phy = Phy_Get(0, phy_luos_MsgHandler, reset_cb, topo_cb); + luos_phy = Phy_Get(0, phy_luos_MsgHandler, topo_cb, reset_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[0], luos_phy); TEST_ASSERT_EQUAL(1, phy_ctx.phy_nb); - robus_phy = Phy_Create(phy_robus_MsgHandler, reset_cb, topo_cb); + robus_phy = Phy_Create(phy_robus_MsgHandler, topo_cb, reset_cb); TEST_ASSERT_EQUAL(&phy_ctx.phy[1], robus_phy); TEST_ASSERT_EQUAL(2, phy_ctx.phy_nb); } @@ -923,9 +923,9 @@ void unittest_phy_ComputeHeader() robus_phy->rx_phy_filter = 0x00; Phy_ComputeHeader(robus_phy); TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), luos_phy->rx_size); - TEST_ASSERT_EQUAL(true, robus_phy->rx_keep); // By default at this stage we don't check all the node so we consider this as valid - TEST_ASSERT_EQUAL(true, robus_phy->rx_ack); - TEST_ASSERT_EQUAL(true, robus_phy->rx_alloc_job); + TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); } CATCH { @@ -1068,24 +1068,25 @@ void unittest_phy_ComputeTimestamp() { NEW_TEST_CASE("Check ComputeTimestamp assertion conditions"); { + phy_job_t job; TRY { - phy_job_t job; - Phy_ComputeMsgTimestamp(NULL, &job); + Phy_ComputeMsgTimestamp(luos_phy, NULL); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; TRY { - Phy_ComputeMsgTimestamp(luos_phy, NULL); + job.timestamp = true; + job.data_pt = (uint8_t *)msg_buffer; + Phy_ComputeMsgTimestamp(NULL, &job); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; TRY { - phy_job_t job; job.timestamp = false; job.data_pt = (uint8_t *)msg_buffer; Phy_ComputeMsgTimestamp(luos_phy, &job); @@ -1095,7 +1096,6 @@ void unittest_phy_ComputeTimestamp() TRY { - phy_job_t job; job.timestamp = true; job.data_pt = NULL; Phy_ComputeMsgTimestamp(luos_phy, &job); @@ -1143,6 +1143,7 @@ void unittest_phy_ComputeTimestamp() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1159,6 +1160,7 @@ void unittest_phy_GetNodeId() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1208,6 +1210,7 @@ void unittest_phy_AddJob() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1225,6 +1228,7 @@ void unittest_phy_AddJob() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1256,6 +1260,7 @@ void unittest_phy_GetJob() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1270,6 +1275,7 @@ void unittest_phy_GetJob() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1284,6 +1290,7 @@ void unittest_phy_GetJob() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1319,6 +1326,7 @@ void unittest_phy_GetNextJob() { TEST_ASSERT_TRUE(false); } + END_TRY; phy_job_t *job = NULL; TRY @@ -1335,6 +1343,7 @@ void unittest_phy_GetNextJob() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1352,6 +1361,7 @@ void unittest_phy_GetNextJob() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1395,6 +1405,7 @@ void unittest_phy_GetJobId() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1407,6 +1418,7 @@ void unittest_phy_GetJobId() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1419,6 +1431,7 @@ void unittest_phy_GetJobId() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1455,6 +1468,7 @@ void unittest_phy_GetPhyId() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1517,6 +1531,7 @@ void unittest_phy_RmJob() { TEST_ASSERT_TRUE(false); } + END_TRY; } } @@ -1582,6 +1597,7 @@ void unittest_phy_TxAllComplete() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1598,6 +1614,7 @@ void unittest_phy_TxAllComplete() { TEST_ASSERT_TRUE(false); } + END_TRY; TRY { @@ -1610,6 +1627,7 @@ void unittest_phy_TxAllComplete() { TEST_ASSERT_TRUE(false); } + END_TRY; } } From 1888094e37272a0b54545b30451253912db69da7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 28 Sep 2023 10:34:22 +0200 Subject: [PATCH 168/198] Add a re-entrance protection on allocation to Fix a data-race resulting on message allocation fail sometimes. --- engine/IO/src/luos_phy.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 14a015b7e..534b80030 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -771,6 +771,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) LUOS_ASSERT(phy_ptr != NULL); void *rx_data; void *copy_from; + static bool rx_phy_computed = false; Phy_SetIrqState(false); // Check if this phy really need to alloc @@ -795,15 +796,19 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) Phy_SetIrqState(true); return; } - // Compute the rx_phy_filter - phy_ptr->rx_phy_filter = Phy_ComputeTargets(phy_ptr, (header_t *)phy_ptr->rx_buffer_base); - if (phy_ptr->rx_phy_filter == 0) + if (rx_phy_computed == false) { - // We probably have been reseted in the meantime. Just drop the message. - phy_ptr->rx_alloc_job = false; - phy_ptr->rx_keep = false; - Phy_SetIrqState(true); - return; + // Compute the rx_phy_filter + phy_ptr->rx_phy_filter = Phy_ComputeTargets(phy_ptr, (header_t *)phy_ptr->rx_buffer_base); + if (phy_ptr->rx_phy_filter == 0) + { + // We probably have been reseted in the meantime. Just drop the message. + phy_ptr->rx_alloc_job = false; + phy_ptr->rx_keep = false; + Phy_SetIrqState(true); + return; + } + rx_phy_computed = true; } Phy_SetIrqState(true); Phy_SetIrqState(false); @@ -824,6 +829,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We don't successfully allocated the message we are trying to send. // return and the transmitter will be able to wait to get more space... phy_ptr->rx_keep = false; + rx_phy_computed = false; return; } LUOS_ASSERT(rx_data != NULL); // Assert if the allocation failed. We don't allow to loose a message comming from outside. @@ -832,6 +838,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now we can copy the data already received memcpy(rx_data, copy_from, phy_stored_data_size); + rx_phy_computed = false; return; } Phy_SetIrqState(true); @@ -841,6 +848,7 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We don't want to keep it so we don't allocate it. phy_ptr->rx_alloc_job = false; } + rx_phy_computed = false; } /****************************************************************************** From 9cf87c39d241e10e1164072fcb529052cdcf10e1 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 6 Oct 2023 15:05:28 +0200 Subject: [PATCH 169/198] Fix a data-race on Robus when we send something too close to the end of a reception. --- network/robus_network/src/transmission.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/network/robus_network/src/transmission.c b/network/robus_network/src/transmission.c index 1e4498fb8..eae2bfa7e 100644 --- a/network/robus_network/src/transmission.c +++ b/network/robus_network/src/transmission.c @@ -162,8 +162,6 @@ _CRITICAL void Transmit_Process() if (Transmit_GetLockStatus() == false) { // We are free to transmit - // We will prepare to transmit something enable tx status with precomputed value of the initial_transmit_status - ctx.tx.status = initial_transmit_status; // Lock the bus ctx.tx.lock = true; RobusHAL_SetRxDetecPin(false); @@ -199,8 +197,12 @@ _CRITICAL void Transmit_Process() if (Phy_GetJob(robus_phy) == job) { LUOS_ASSERT((job->size + jobEncaps->size) >= 9); + Phy_SetIrqState(false); + // We will prepare to transmit something enable tx status with precomputed value of the initial_transmit_status + ctx.tx.status = initial_transmit_status; // We still have something to send, no reset occured RobusHAL_ComTransmit(tx_data, (job->size + jobEncaps->size)); + Phy_SetIrqState(true); } else { From 0b4ce054750c581e0861e2578455da5c2ea24249 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 6 Oct 2023 15:06:55 +0200 Subject: [PATCH 170/198] use the value of the rx_phy_filter to know if we compute it or not --- engine/IO/src/luos_phy.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 534b80030..682bc5a8b 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -702,6 +702,7 @@ _CRITICAL void Phy_ValidMsg(luos_phy_t *phy_ptr) // Now copy the data in the job phy_ctx.io_job[my_job].timestamp = phy_ptr->rx_timestamp; phy_ctx.io_job[my_job].phy_filter = phy_ptr->rx_phy_filter; + phy_ptr->rx_phy_filter = 0; phy_ctx.io_job[my_job].size = phy_ptr->rx_size; // Then reset the phy to receive the next message @@ -771,7 +772,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) LUOS_ASSERT(phy_ptr != NULL); void *rx_data; void *copy_from; - static bool rx_phy_computed = false; Phy_SetIrqState(false); // Check if this phy really need to alloc @@ -796,19 +796,18 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) Phy_SetIrqState(true); return; } - if (rx_phy_computed == false) + if (phy_ptr->rx_phy_filter == 0) { // Compute the rx_phy_filter phy_ptr->rx_phy_filter = Phy_ComputeTargets(phy_ptr, (header_t *)phy_ptr->rx_buffer_base); if (phy_ptr->rx_phy_filter == 0) { - // We probably have been reseted in the meantime. Just drop the message. + // We probably have been reseted in the meantime, or the message is corrupted. Just drop it. phy_ptr->rx_alloc_job = false; phy_ptr->rx_keep = false; Phy_SetIrqState(true); return; } - rx_phy_computed = true; } Phy_SetIrqState(true); Phy_SetIrqState(false); @@ -829,7 +828,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We don't successfully allocated the message we are trying to send. // return and the transmitter will be able to wait to get more space... phy_ptr->rx_keep = false; - rx_phy_computed = false; return; } LUOS_ASSERT(rx_data != NULL); // Assert if the allocation failed. We don't allow to loose a message comming from outside. @@ -838,7 +836,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // Now we can copy the data already received memcpy(rx_data, copy_from, phy_stored_data_size); - rx_phy_computed = false; return; } Phy_SetIrqState(true); @@ -848,7 +845,6 @@ _CRITICAL static void Phy_alloc(luos_phy_t *phy_ptr) // We don't want to keep it so we don't allocate it. phy_ptr->rx_alloc_job = false; } - rx_phy_computed = false; } /****************************************************************************** From 52ae1aedc0f6578f6d0ad93993000f85bad80f4b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 12 Oct 2023 13:04:15 +0200 Subject: [PATCH 171/198] Fix NO_RTB mode --- engine/core/src/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/core/src/node.c b/engine/core/src/node.c index 06d7673d6..7432b18c1 100644 --- a/engine/core/src/node.c +++ b/engine/core/src/node.c @@ -94,7 +94,7 @@ void Node_Init(void) // set node_info value node_ctx.info.node_info = 0; #ifdef NO_RTB - node_ctx.node_info |= 1 << 0; + node_ctx.info.node_info |= 1 << 0; #endif Node_SetState(NO_DETECTION); node_ctx.wait_id = false; From 3b1fe2949ee3ce28887ccae679e8a8cd3ba4d2b4 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 12 Oct 2023 13:05:38 +0200 Subject: [PATCH 172/198] Update some hardware project to the new Kicad version --- examples/hardware/l0/l0.kicad_pcb | 9555 +++++++++++++++++++++-------- examples/hardware/l0/l0.kicad_prl | 78 + examples/hardware/l0/l0.kicad_pro | 731 +++ examples/hardware/l0/l0.kicad_sch | 4464 ++++++++++++++ 4 files changed, 12183 insertions(+), 2645 deletions(-) create mode 100644 examples/hardware/l0/l0.kicad_prl create mode 100644 examples/hardware/l0/l0.kicad_pro create mode 100644 examples/hardware/l0/l0.kicad_sch diff --git a/examples/hardware/l0/l0.kicad_pcb b/examples/hardware/l0/l0.kicad_pcb index 2659fde22..bbe69b2a4 100644 --- a/examples/hardware/l0/l0.kicad_pcb +++ b/examples/hardware/l0/l0.kicad_pcb @@ -1,75 +1,49 @@ -(kicad_pcb (version 20171130) (host pcbnew "(5.0.1-3-g963ef8bb5)") +(kicad_pcb (version 20221018) (generator pcbnew) (general (thickness 1.6) - (drawings 32) - (tracks 337) - (zones 0) - (modules 46) - (nets 60) ) - (page A4) + (paper "A4") (layers - (0 F.Cu signal) - (31 B.Cu signal) - (32 B.Adhes user hide) - (33 F.Adhes user hide) - (34 B.Paste user hide) - (35 F.Paste user hide) - (36 B.SilkS user) - (37 F.SilkS user hide) - (38 B.Mask user hide) - (39 F.Mask user hide) - (40 Dwgs.User user hide) - (41 Cmts.User user hide) - (42 Eco1.User user hide) - (43 Eco2.User user hide) - (44 Edge.Cuts user) - (45 Margin user hide) - (46 B.CrtYd user hide) - (47 F.CrtYd user hide) - (48 B.Fab user hide) - (49 F.Fab user) + (0 "F.Cu" signal) + (31 "B.Cu" signal) + (32 "B.Adhes" user "B.Adhesive") + (33 "F.Adhes" user "F.Adhesive") + (34 "B.Paste" user) + (35 "F.Paste" user) + (36 "B.SilkS" user "B.Silkscreen") + (37 "F.SilkS" user "F.Silkscreen") + (38 "B.Mask" user) + (39 "F.Mask" user) + (40 "Dwgs.User" user "User.Drawings") + (41 "Cmts.User" user "User.Comments") + (42 "Eco1.User" user "User.Eco1") + (43 "Eco2.User" user "User.Eco2") + (44 "Edge.Cuts" user) + (45 "Margin" user) + (46 "B.CrtYd" user "B.Courtyard") + (47 "F.CrtYd" user "F.Courtyard") + (48 "B.Fab" user) + (49 "F.Fab" user) ) (setup - (last_trace_width 0.15) - (trace_clearance 0.15) - (zone_clearance 0.254) - (zone_45_only no) - (trace_min 0.15) - (segment_width 0.2) - (edge_width 0.15) - (via_size 0.5) - (via_drill 0.2) - (via_min_size 0.5) - (via_min_drill 0.2) - (uvia_size 0.3) - (uvia_drill 0.1) - (uvias_allowed no) - (uvia_min_size 0.2) - (uvia_min_drill 0.1) - (pcb_text_width 0.3) - (pcb_text_size 1.5 1.5) - (mod_edge_width 0.15) - (mod_text_size 1 1) - (mod_text_width 0.125) - (pad_size 1.524 1.524) - (pad_drill 0.762) (pad_to_mask_clearance 0.06) (solder_mask_min_width 0.25) (aux_axis_origin 27.755 160.295) (grid_origin 27.755 160.295) - (visible_elements 7FFDFF7F) (pcbplotparams - (layerselection 0x310fc_ffffffff) + (layerselection 0x00310fc_ffffffff) + (plot_on_all_layers_selection 0x0000000_00000000) + (disableapertmacros false) (usegerberextensions true) (usegerberattributes false) (usegerberadvancedattributes false) (creategerberjobfile false) - (excludeedgelayer true) - (linewidth 0.100000) + (dashed_line_dash_ratio 12.000000) + (dashed_line_gap_ratio 3.000000) + (svgprecision 4) (plotframeref false) (viasonmask false) (mode 1) @@ -77,18 +51,22 @@ (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15.000000) + (dxfpolygonmode true) + (dxfimperialunits true) + (dxfusepcbnewfont true) (psnegative false) (psa4output false) (plotreference true) (plotvalue true) (plotinvisibletext false) - (padsonsilk false) + (sketchpadsonfab false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) (drillshape 0) (scaleselection 1) - (outputdirectory "gerber/placement/")) + (outputdirectory "gerber/placement/") + ) ) (net 0 "") @@ -110,30 +88,30 @@ (net 16 "Net-(U2-Pad45)") (net 17 "Net-(U2-Pad46)") (net 18 "Net-(J3-Pad4)") - (net 19 /RxD) - (net 20 /DE) - (net 21 /PTPA) - (net 22 /TxD) - (net 23 /PTPB) - (net 24 /RE) - (net 25 GND) - (net 26 /A_RS_485_N) - (net 27 /B_RS_485_P) - (net 28 +3V3) - (net 29 /Vin) - (net 30 /D-) - (net 31 /D+) - (net 32 /SCK/CK) - (net 33 /MISO/MCK) - (net 34 /MOSI/SD) - (net 35 /TIM2.1/ADC0) - (net 36 /TIM2.2/ADC1) - (net 37 /TIM3.3) - (net 38 /TIM3.4) - (net 39 /TX/SCL/TIM2.3) - (net 40 /RX/SDA/TIM2.4) - (net 41 /BOOT0) - (net 42 +5VP) + (net 19 "/RxD") + (net 20 "/DE") + (net 21 "/PTPA") + (net 22 "/TxD") + (net 23 "/PTPB") + (net 24 "/RE") + (net 25 "GND") + (net 26 "/A_RS_485_N") + (net 27 "/B_RS_485_P") + (net 28 "+3V3") + (net 29 "/Vin") + (net 30 "/D-") + (net 31 "/D+") + (net 32 "/SCK/CK") + (net 33 "/MISO/MCK") + (net 34 "/MOSI/SD") + (net 35 "/TIM2.1/ADC0") + (net 36 "/TIM2.2/ADC1") + (net 37 "/TIM3.3") + (net 38 "/TIM3.4") + (net 39 "/TX/SCL/TIM2.3") + (net 40 "/RX/SDA/TIM2.4") + (net 41 "/BOOT0") + (net 42 "+5VP") (net 43 "Net-(Q1-Pad1)") (net 44 "Net-(C12-Pad1)") (net 45 "Net-(C12-Pad2)") @@ -144,2895 +122,7182 @@ (net 50 "Net-(R10-Pad1)") (net 51 "Net-(C9-Pad1)") (net 52 "Net-(C10-Pad1)") - (net 53 /RS485_LVL_DOWN) - (net 54 /RS485_LVL_UP) + (net 53 "/RS485_LVL_DOWN") + (net 54 "/RS485_LVL_UP") (net 55 "Net-(R11-Pad2)") (net 56 "Net-(D3-Pad1)") (net 57 "Net-(R13-Pad2)") - (net 58 /PTPB_PRO) - (net 59 /PTPA_PRO) - - (net_class Default "Ceci est la Netclass par défaut." - (clearance 0.15) - (trace_width 0.15) - (via_dia 0.5) - (via_drill 0.2) - (uvia_dia 0.3) - (uvia_drill 0.1) - (add_net +3V3) - (add_net +5VP) - (add_net /A_RS_485_N) - (add_net /BOOT0) - (add_net /B_RS_485_P) - (add_net /D+) - (add_net /D-) - (add_net /DE) - (add_net /MISO/MCK) - (add_net /MOSI/SD) - (add_net /PTPA) - (add_net /PTPA_PRO) - (add_net /PTPB) - (add_net /PTPB_PRO) - (add_net /RE) - (add_net /RS485_LVL_DOWN) - (add_net /RS485_LVL_UP) - (add_net /RX/SDA/TIM2.4) - (add_net /RxD) - (add_net /SCK/CK) - (add_net /TIM2.1/ADC0) - (add_net /TIM2.2/ADC1) - (add_net /TIM3.3) - (add_net /TIM3.4) - (add_net /TX/SCL/TIM2.3) - (add_net /TxD) - (add_net GND) - (add_net "Net-(C10-Pad1)") - (add_net "Net-(C11-Pad1)") - (add_net "Net-(C12-Pad1)") - (add_net "Net-(C12-Pad2)") - (add_net "Net-(C9-Pad1)") - (add_net "Net-(D3-Pad1)") - (add_net "Net-(J3-Pad4)") - (add_net "Net-(Q1-Pad1)") - (add_net "Net-(R10-Pad1)") - (add_net "Net-(R11-Pad2)") - (add_net "Net-(R13-Pad2)") - (add_net "Net-(R5-Pad2)") - (add_net "Net-(R8-Pad1)") - (add_net "Net-(U2-Pad14)") - (add_net "Net-(U2-Pad17)") - (add_net "Net-(U2-Pad2)") - (add_net "Net-(U2-Pad20)") - (add_net "Net-(U2-Pad25)") - (add_net "Net-(U2-Pad3)") - (add_net "Net-(U2-Pad34)") - (add_net "Net-(U2-Pad37)") - (add_net "Net-(U2-Pad38)") - (add_net "Net-(U2-Pad4)") - (add_net "Net-(U2-Pad42)") - (add_net "Net-(U2-Pad43)") - (add_net "Net-(U2-Pad45)") - (add_net "Net-(U2-Pad46)") - (add_net "Net-(U2-Pad5)") - (add_net "Net-(U2-Pad6)") - (add_net "Net-(U2-Pad7)") - (add_net "Net-(U3-Pad6)") - ) + (net 58 "/PTPB_PRO") + (net 59 "/PTPA_PRO") - (net_class Vin "" - (clearance 0.2) - (trace_width 0.3) - (via_dia 0.6) - (via_drill 0.3) - (uvia_dia 0.3) - (uvia_drill 0.1) - (add_net /Vin) - ) - - (module Common_Footprint:S-PDSO-G10 (layer F.Cu) (tedit 5D513C90) (tstamp 5C64D2B1) - (at 40.836 154.453) - (path /5A8CF234) - (fp_text reference U3 (at -0.0508 -0.0508) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value TPS5401 (at 0 -3.6) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_circle (center -1.016 1.016) (end -0.889 1.016) (layer F.Fab) (width 0.1)) - (fp_line (start -1.397 -1.524) (end 1.397 -1.524) (layer F.Fab) (width 0.1)) - (fp_line (start -1.397 1.524) (end -1.397 -1.524) (layer F.Fab) (width 0.1)) - (fp_line (start 1.397 1.524) (end -1.397 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start 1.397 -1.524) (end 1.397 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start -1.3 -1.55) (end -1.45 -1.55) (layer F.SilkS) (width 0.125)) - (fp_line (start 1.45 -1.55) (end 1.3 -1.55) (layer F.SilkS) (width 0.125)) - (fp_line (start -1.45 -1.55) (end -1.45 1.55) (layer F.SilkS) (width 0.125)) - (fp_line (start 1.45 1.55) (end 1.45 -1.55) (layer F.SilkS) (width 0.125)) - (fp_line (start 1.3 1.55) (end 1.45 1.55) (layer F.SilkS) (width 0.125)) - (fp_line (start -1.45 1.55) (end -1.3 1.55) (layer F.SilkS) (width 0.125)) - (fp_circle (center -1 1) (end -0.9 1) (layer F.SilkS) (width 0.125)) - (fp_line (start 1.45 1.55) (end 1.45 -1.55) (layer F.CrtYd) (width 0.125)) - (fp_line (start -1.45 -1.55) (end -1.45 1.55) (layer F.CrtYd) (width 0.125)) - (fp_line (start 1.45 -1.55) (end -1.45 -1.55) (layer F.CrtYd) (width 0.125)) - (fp_line (start -1.45 1.55) (end 1.45 1.55) (layer F.CrtYd) (width 0.125)) - (pad 1 smd rect (at -1 2.1) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 45 "Net-(C12-Pad2)")) - (pad 2 smd rect (at -0.5 2.1) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) - (pad 3 smd rect (at 0 2.1) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 46 "Net-(R5-Pad2)")) - (pad 4 smd rect (at 0.5 2.1) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 47 "Net-(C11-Pad1)")) - (pad 5 smd rect (at 1 2.1) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 48 "Net-(R8-Pad1)")) - (pad 6 smd rect (at 1 -2.1 180) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 49 "Net-(U3-Pad6)")) - (pad 7 smd rect (at 0.5 -2.1 180) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 50 "Net-(R10-Pad1)")) - (pad 8 smd rect (at 0 -2.1 180) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 51 "Net-(C9-Pad1)")) - (pad 9 smd rect (at -0.5 -2.1 180) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 10 smd rect (at -1 -2.1 180) (size 0.3 1.6) (layers F.Cu F.Paste F.Mask) - (net 44 "Net-(C12-Pad1)")) - (pad 11 smd rect (at 0 0 180) (size 1.88 1.57) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (model "${KISYS3DMOD}/DGQ (S-PDSO-G10).STEP" - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz -90 0 -90)) - ) - ) - - (module Common_Footprint:L_0806 (layer F.Cu) (tedit 5D513C63) (tstamp 5AA68936) - (at 40.709 150.135) - (path /5A8D16DA) - (fp_text reference L1 (at 0.0254 0) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 4,7µH (at 0 -2) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.889 0.762) (end -0.889 -0.762) (layer F.Fab) (width 0.1)) - (fp_line (start 0.889 0.762) (end -0.889 0.762) (layer F.Fab) (width 0.1)) - (fp_line (start 0.889 -0.762) (end 0.889 0.762) (layer F.Fab) (width 0.1)) - (fp_line (start -0.889 -0.762) (end 0.889 -0.762) (layer F.Fab) (width 0.1)) - (fp_line (start 1 1) (end -1 1) (layer F.SilkS) (width 0.125)) - (fp_line (start -1 -1) (end 1 -1) (layer F.SilkS) (width 0.125)) - (pad 2 smd rect (at 0.9 0 180) (size 0.8 1.6) (layers F.Cu F.Paste F.Mask) - (net 28 +3V3)) - (pad 1 smd rect (at -0.9 0) (size 0.8 1.6) (layers F.Cu F.Paste F.Mask) - (net 44 "Net-(C12-Pad1)")) - (model "${KISYS3DMOD}/0806 SMD Inductor.stp" - (offset (xyz 0 0 0.5)) + (footprint "Common_Footprint:SO8" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005a8d8985) + (at 33.216 149.119 180) + (path "/00000000-0000-0000-0000-00005a8debd8") + (attr through_hole) + (fp_text reference "U1" (at -0.0254 -0.0254 180) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 7bb947c7-4c42-4047-b242-057416618a94) + ) + (fp_text value "ST3485ECDR" (at 0 -0.5 180) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 82f9a62b-017b-45a9-9bca-a94a2e55c950) + ) + (fp_line (start -2.45 1.95) (end -2.45 -1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp eac16abe-19c8-4865-9fbe-e88a8144f9df)) + (fp_line (start -2.35 -1.95) (end -2.45 -1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 6c272e34-b294-48b1-8075-eeac51b852c0)) + (fp_line (start -2.35 1.95) (end -2.45 1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp bda85f6b-dc83-4e93-bdf8-b9b14530c169)) + (fp_line (start 2.35 -1.95) (end 2.45 -1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp fdc9fce4-5ed0-4f51-b6aa-e9390d00fc81)) + (fp_line (start 2.35 1.95) (end 2.45 1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 213d872c-bb44-4516-99fd-336078aca6c0)) + (fp_line (start 2.45 -1.95) (end 2.45 1.95) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 1978e5a3-5087-47c5-868e-864db1ad22c6)) + (fp_circle (center -1.905 1) (end -1.7 1) + (stroke (width 0.125) (type solid)) (fill none) (layer "F.SilkS") (tstamp 8d1681c3-d610-427f-9380-fea3449b3a04)) + (fp_line (start -2.413 -1.905) (end 2.413 -1.905) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp de5e92ce-a213-4ce6-b8ed-a1916684bab5)) + (fp_line (start -2.413 1.905) (end -2.413 -1.905) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp cb613ded-4ee9-4cd3-a9e2-80bc0fc23ed7)) + (fp_line (start 2.413 -1.905) (end 2.413 1.905) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp dd0470fd-15b8-481b-9765-2529e827cf04)) + (fp_line (start 2.413 1.905) (end -2.413 1.905) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 53455f1b-4d0a-44e8-b148-b1aabd66eedc)) + (fp_circle (center -1.905 1.016) (end -1.651 1.016) + (stroke (width 0.1) (type solid)) (fill none) (layer "F.Fab") (tstamp 72c99199-8e61-4ffd-a0a2-cfa77e712775)) + (pad "1" smd rect (at -1.905 2.525 180) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 19 "/RxD") (tstamp 629c5a88-4881-4ac2-afc6-886a2c4dd33d)) + (pad "2" smd rect (at -0.635 2.525 180) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 24 "/RE") (tstamp bd9f2ecc-c464-4121-924a-9a4aa800fe46)) + (pad "3" smd rect (at 0.635 2.525 180) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 20 "/DE") (tstamp 03f6f038-5a5d-4c4e-8959-95e40de675fc)) + (pad "4" smd rect (at 1.905 2.525 180) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 22 "/TxD") (tstamp edc5257b-4695-4dba-8a2f-9b7708b6d69b)) + (pad "5" smd rect (at 1.905 -2.525) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp f23844aa-c431-4dfe-9b8a-75d5f86bc5de)) + (pad "6" smd rect (at 0.635 -2.525) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 26 "/A_RS_485_N") (tstamp 5f6df5cd-fd25-4647-8508-220c8bd9d976)) + (pad "7" smd rect (at -0.635 -2.525) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 27 "/B_RS_485_P") (tstamp 7beb515a-9833-46b0-880d-b490e24cdd51)) + (pad "8" smd rect (at -1.905 -2.525) (size 0.61 1.77) (layers "F.Cu" "F.Paste" "F.Mask") + (net 28 "+3V3") (tstamp 38f0193c-1316-4501-beda-394fc28fcd2b)) + (model "${KISYS3DMOD}/SO8.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz 0 0 -90)) ) ) - (module Common_Footprint:C_0603 (layer F.Cu) (tedit 5D513C21) (tstamp 5AA68989) - (at 42.487 147.849 270) - (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0603") - (path /5A8CC30A) + (footprint "l0_Kicad_Footprint:l0_logo" locked (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005a91ac73) + (at 33.455 156.945) (attr smd) - (fp_text reference C10 (at -0.025 0) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_text value 470pF (at 0 1.5 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_line (start 1.4 0.65) (end -1.4 0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1.4 0.65) (end 1.4 -0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.4 -0.65) (end -1.4 0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.4 -0.65) (end 1.4 -0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.12)) - (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.12)) - (fp_line (start -0.8 -0.4) (end 0.8 -0.4) (layer F.Fab) (width 0.1)) - (fp_line (start 0.8 -0.4) (end 0.8 0.4) (layer F.Fab) (width 0.1)) - (fp_line (start 0.8 0.4) (end -0.8 0.4) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 0.4) (end -0.8 -0.4) (layer F.Fab) (width 0.1)) - (fp_text user %R (at 0 0 270) (layer F.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1))) - ) - (pad 2 smd rect (at 0.75 0 270) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.75 0 270) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) - (net 52 "Net-(C10-Pad1)")) - (model "${KISYS3DMOD}/0603 SMD Capacitor.step" - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (fp_text reference "G***" (at 0 0) (layer "F.SilkS") hide + (effects (font (size 1.524 1.524) (thickness 0.3))) + (tstamp 9a4b84a7-2530-4f63-9320-f92a07e5ad84) ) + (fp_text value "LOGO" (at 0.75 0) (layer "F.SilkS") hide + (effects (font (size 1.524 1.524) (thickness 0.3))) + (tstamp d6ed0160-354b-4915-b747-be4085acc938) + ) + (fp_poly + (pts + (xy -2.246907 -0.992008) + (xy -2.246726 -0.65611) + (xy -2.246198 -0.337901) + (xy -2.245341 -0.039436) + (xy -2.244171 0.237228) + (xy -2.242705 0.490034) + (xy -2.240959 0.716928) + (xy -2.238951 0.915851) + (xy -2.236696 1.084749) + (xy -2.234213 1.221565) + (xy -2.231516 1.324242) + (xy -2.228624 1.390724) + (xy -2.227412 1.406769) + (xy -2.197965 1.616173) + (xy -2.152317 1.801495) + (xy -2.092018 1.956523) + (xy -2.088323 1.964015) + (xy -2.035633 2.044585) + (xy -1.957862 2.132649) + (xy -1.865114 2.218692) + (xy -1.767489 2.293199) + (xy -1.689375 2.339775) + (xy -1.633891 2.366287) + (xy -1.580352 2.387827) + (xy -1.524006 2.404903) + (xy -1.460103 2.418026) + (xy -1.38389 2.427705) + (xy -1.290617 2.434449) + (xy -1.175531 2.438769) + (xy -1.033881 2.441173) + (xy -0.860915 2.442171) + (xy -0.733188 2.442308) + (xy -0.100607 2.442308) + (xy 0.025469 2.623039) + (xy 0.096082 2.716467) + (xy 0.18279 2.819813) + (xy 0.272135 2.917433) + (xy 0.320004 2.965402) + (xy 0.385353 3.028837) + (xy 0.438886 3.082202) + (xy 0.475092 3.119903) + (xy 0.488461 3.136348) + (xy 0.488462 3.136363) + (xy 0.469681 3.138957) + (xy 0.416363 3.140993) + (xy 0.333043 3.1425) + (xy 0.224256 3.143505) + (xy 0.094536 3.144036) + (xy -0.051581 3.144119) + (xy -0.209559 3.143781) + (xy -0.374865 3.143051) + (xy -0.542962 3.141956) + (xy -0.709315 3.140523) + (xy -0.869391 3.138778) + (xy -1.018652 3.136751) + (xy -1.152565 3.134467) + (xy -1.266594 3.131955) + (xy -1.356204 3.129242) + (xy -1.41686 3.126354) + (xy -1.43574 3.12476) + (xy -1.686218 3.079272) + (xy -1.916334 3.002073) + (xy -2.13108 2.89095) + (xy -2.335449 2.743689) + (xy -2.379679 2.706077) + (xy -2.565308 2.519619) + (xy -2.717159 2.314726) + (xy -2.834386 2.092895) + (xy -2.916141 1.855622) + (xy -2.948897 1.699846) + (xy -2.952449 1.65738) + (xy -2.95568 1.576163) + (xy -2.95859 1.456518) + (xy -2.961176 1.298769) + (xy -2.963433 1.10324) + (xy -2.965361 0.870255) + (xy -2.966956 0.600138) + (xy -2.968216 0.293213) + (xy -2.969137 -0.050196) + (xy -2.969717 -0.429765) + (xy -2.969945 -0.801077) + (xy -2.970492 -3.175) + (xy -2.608708 -3.180316) + (xy -2.246923 -3.185631) + (xy -2.246907 -0.992008) + ) + + (stroke (width 0.01) (type solid)) (fill solid) (layer "F.SilkS") (tstamp f2f21769-3c9e-4869-a8ee-951ff7b06152)) + (fp_poly + (pts + (xy 1.534037 -1.768577) + (xy 1.74671 -1.722472) + (xy 1.95117 -1.641213) + (xy 2.145202 -1.526097) + (xy 2.32659 -1.378422) + (xy 2.493117 -1.199486) + (xy 2.642567 -0.990585) + (xy 2.763475 -0.772223) + (xy 2.870139 -0.515165) + (xy 2.954018 -0.23148) + (xy 3.014171 0.073052) + (xy 3.049653 0.392655) + (xy 3.059521 0.721551) + (xy 3.049112 0.976923) + (xy 3.023731 1.246123) + (xy 2.987725 1.484732) + (xy 2.939339 1.700216) + (xy 2.87682 1.900039) + (xy 2.798413 2.091668) + (xy 2.775984 2.139462) + (xy 2.637666 2.391647) + (xy 2.481843 2.609798) + (xy 2.308914 2.793548) + (xy 2.119279 2.94253) + (xy 1.913339 3.056379) + (xy 1.691493 3.134728) + (xy 1.687709 3.135719) + (xy 1.60773 3.149674) + (xy 1.501647 3.158754) + (xy 1.382151 3.162769) + (xy 1.261932 3.161531) + (xy 1.153683 3.15485) + (xy 1.080539 3.144748) + (xy 0.899784 3.091215) + (xy 0.71783 3.003568) + (xy 0.541845 2.885862) + (xy 0.391788 2.754923) + (xy 0.218183 2.562705) + (xy 0.070609 2.353296) + (xy -0.05208 2.123833) + (xy -0.151034 1.871452) + (xy -0.227401 1.59329) + (xy -0.282328 1.286485) + (xy -0.313378 0.996462) + (xy -0.324759 0.700596) + (xy 0.400985 0.700596) + (xy 0.412724 0.993591) + (xy 0.44586 1.270807) + (xy 0.499551 1.528917) + (xy 0.572955 1.764596) + (xy 0.66523 1.974516) + (xy 0.775534 2.155351) + (xy 0.891799 2.292759) + (xy 0.980291 2.368427) + (xy 1.078626 2.432279) + (xy 1.172753 2.47558) + (xy 1.198333 2.483325) + (xy 1.301852 2.496739) + (xy 1.421971 2.492261) + (xy 1.541564 2.471739) + (xy 1.643505 2.43702) + (xy 1.648076 2.434825) + (xy 1.769243 2.355955) + (xy 1.885025 2.242706) + (xy 1.992619 2.09969) + (xy 2.089225 1.931519) + (xy 2.172043 1.742804) + (xy 2.238272 1.538158) + (xy 2.267973 1.414011) + (xy 2.314386 1.127525) + (xy 2.336662 0.834367) + (xy 2.335392 0.541018) + (xy 2.311165 0.25396) + (xy 2.264572 -0.020325) + (xy 2.196203 -0.275355) + (xy 2.106647 -0.50465) + (xy 2.090198 -0.538909) + (xy 1.984758 -0.72343) + (xy 1.868419 -0.871595) + (xy 1.739848 -0.984934) + (xy 1.657477 -1.036217) + (xy 1.588491 -1.070898) + (xy 1.531767 -1.091002) + (xy 1.470871 -1.100464) + (xy 1.389367 -1.103221) + (xy 1.377462 -1.103288) + (xy 1.285631 -1.10097) + (xy 1.215924 -1.091008) + (xy 1.151639 -1.07021) + (xy 1.111347 -1.052436) + (xy 0.969523 -0.964928) + (xy 0.840425 -0.842784) + (xy 0.725381 -0.688746) + (xy 0.625714 -0.505556) + (xy 0.542751 -0.295954) + (xy 0.477816 -0.062681) + (xy 0.432235 0.191521) + (xy 0.411485 0.395148) + (xy 0.400985 0.700596) + (xy -0.324759 0.700596) + (xy -0.327136 0.63882) + (xy -0.311635 0.295935) + (xy -0.267512 -0.029972) + (xy -0.1954 -0.336683) + (xy -0.095938 -0.62198) + (xy 0.030241 -0.883642) + (xy 0.1825 -1.119451) + (xy 0.349054 -1.315782) + (xy 0.514655 -1.469853) + (xy 0.680914 -1.589096) + (xy 0.854351 -1.677316) + (xy 1.041484 -1.738321) + (xy 1.09292 -1.750137) + (xy 1.315368 -1.778231) + (xy 1.534037 -1.768577) + ) + + (stroke (width 0.01) (type solid)) (fill solid) (layer "F.SilkS") (tstamp cef54f5b-03a1-427e-ba53-4be6764e2b4b)) ) - (module Common_Footprint:SO8 (layer F.Cu) (tedit 5D513BFC) (tstamp 5A8D8985) - (at 33.216 149.119 180) - (path /5A8DEBD8) - (fp_text reference U1 (at -0.0254 -0.0254 180) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value ST3485ECDR (at 0 -0.5 180) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_circle (center -1.905 1.016) (end -1.651 1.016) (layer F.Fab) (width 0.1)) - (fp_line (start -2.413 -1.905) (end 2.413 -1.905) (layer F.Fab) (width 0.1)) - (fp_line (start -2.413 1.905) (end -2.413 -1.905) (layer F.Fab) (width 0.1)) - (fp_line (start 2.413 1.905) (end -2.413 1.905) (layer F.Fab) (width 0.1)) - (fp_line (start 2.413 -1.905) (end 2.413 1.905) (layer F.Fab) (width 0.1)) - (fp_line (start 2.35 -1.95) (end 2.45 -1.95) (layer F.SilkS) (width 0.125)) - (fp_line (start 2.45 -1.95) (end 2.45 1.95) (layer F.SilkS) (width 0.125)) - (fp_line (start -2.45 1.95) (end -2.45 -1.95) (layer F.SilkS) (width 0.125)) - (fp_circle (center -1.905 1) (end -1.7 1) (layer F.SilkS) (width 0.125)) - (fp_line (start -2.35 1.95) (end -2.45 1.95) (layer F.SilkS) (width 0.125)) - (fp_line (start 2.35 1.95) (end 2.45 1.95) (layer F.SilkS) (width 0.125)) - (fp_line (start -2.35 -1.95) (end -2.45 -1.95) (layer F.SilkS) (width 0.125)) - (pad 1 smd rect (at -1.905 2.525 180) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 19 /RxD)) - (pad 2 smd rect (at -0.635 2.525 180) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 24 /RE)) - (pad 3 smd rect (at 0.635 2.525 180) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 20 /DE)) - (pad 4 smd rect (at 1.905 2.525 180) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 22 /TxD)) - (pad 5 smd rect (at 1.905 -2.525) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 7 smd rect (at -0.635 -2.525) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 27 /B_RS_485_P)) - (pad 8 smd rect (at -1.905 -2.525) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 28 +3V3)) - (pad 6 smd rect (at 0.635 -2.525) (size 0.61 1.77) (layers F.Cu F.Paste F.Mask) - (net 26 /A_RS_485_N)) - (model ${KISYS3DMOD}/SO8.step - (at (xyz 0 0 0)) + (footprint "Common_Footprint:SOD-123F" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68877) + (at 36.772 153.691 180) + (path "/00000000-0000-0000-0000-00005a8d101b") + (attr through_hole) + (fp_text reference "D2" (at 0 1.397 180) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 8872344b-9b50-4dd3-8e5f-d7eb53896369) + ) + (fp_text value "SS14FL" (at 0 -4.2 180) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 78b505ae-97ba-4b2c-a6a1-6356cfb8fcfd) + ) + (fp_line (start -2.46 -0.975) (end -2.46 0.975) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp fcc0c897-daf7-465b-9fb9-3f2fdb1af9dd)) + (fp_line (start -2.46 -0.975) (end 1.5 -0.975) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp b4efe5f1-9811-4ff9-a16a-89d84a5877a1)) + (fp_line (start 1.5 0.975) (end -2.46 0.975) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 14bfa935-319b-4119-81dd-b5d0f44bdc6f)) + (fp_line (start -1.27 -0.762) (end 1.27 -0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ecee683d-e80d-4852-9f49-b44a59259f97)) + (fp_line (start -1.27 0.762) (end -1.27 -0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 558080da-2575-4326-b6d5-46d8c3923eda)) + (fp_line (start -0.254 -0.508) (end -0.254 0.508) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 51863527-423d-4293-b164-aed49065482a)) + (fp_line (start -0.254 0) (end 0.508 -0.508) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 650501f1-b416-439b-81f9-78dda6544c29)) + (fp_line (start 0.508 -0.508) (end 0.508 0.508) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 3ad20b53-d299-406c-b699-d2ad477b4a77)) + (fp_line (start 0.508 0.508) (end -0.254 0) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f94fc8dc-149f-4b76-8fea-5506d6ac2295)) + (fp_line (start 1.27 -0.762) (end 1.27 0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 75161435-91a5-4f99-aa12-a28a297565e6)) + (fp_line (start 1.27 0.762) (end -1.27 0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 84a16572-12a8-4725-a2cd-ad1ab7353934)) + (pad "1" smd rect (at -1.51 0 180) (size 1.5 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 44 "Net-(C12-Pad1)") (tstamp 4120710d-7817-4eb1-a8db-7b01d3718458)) + (pad "2" smd rect (at 1.51 0) (size 1.5 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp b3fc5d01-607c-4dfa-b7f4-8c588dcba40f)) + (model "${KISYS3DMOD}/SOD-123F.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 -90)) ) ) - (module Common_Footprint:D_SOD-323F (layer B.Cu) (tedit 5D513BB9) (tstamp 5C6D533A) - (at 34.5876 145.7154 180) - (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") - (tags SOD-323F) - (path /5C647283) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6887f) + (at 42.614 150.135 -90) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8d1dfd") (attr smd) - (fp_text reference D5 (at 0 1.85 180) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value D_Zener (at 0.1 -1.9 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text user %R (at 0 1.016 180) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_line (start -1.5 0.85) (end -1.5 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start 0.2 0) (end 0.45 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 -0.35) (end -0.3 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 0.35) (end 0.2 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end 0.2 0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end -0.5 0) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0.35) (end -0.3 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 -0.7) (end -0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 -0.7) (end -0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 0.7) (end 0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 0.7) (end 0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -1.6 0.95) (end 1.6 0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1.6 0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 -0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 0.95) (end -1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.5 -0.85) (end 1.05 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start -1.5 0.85) (end 1.05 0.85) (layer B.SilkS) (width 0.12)) - (pad 1 smd rect (at -1.1 0 180) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 21 /PTPA)) - (pad 2 smd rect (at 1.1 0 180) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (model ${KISYS3DMOD}/SOD-323F.STEP - (offset (xyz -1.099999983479657 0 0)) + (fp_text reference "R9" (at 0 -1.2 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp fd0051b6-1b72-44ea-a2e2-fab82ca3a2f0) + ) + (fp_text value "31.6K" (at 0 1.25 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp c682d5d8-c5fd-4da6-aece-5a7170685786) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 6f7f66d2-bf97-44a3-8db2-d463ab1e7d82)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 1db13c52-14bb-46c4-9264-9b532d849f3a)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9d1f51d9-dae1-43fb-b3f5-48425446e155)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 2093b423-8c0a-4ec4-aae9-cd047c7bf16b)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 6c353657-49e3-487b-b58a-332818469703)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2cf86cef-d698-47b1-972e-f5541a645d10)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ed7fcc02-f4f3-41f5-9235-7f0c62974171)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp fb863d08-cbe8-4f59-8fe4-451c94ce6b03)) + (pad "1" smd rect (at -0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 28 "+3V3") (tstamp a637ec0b-9cec-4ee5-b421-c29f8c8513db)) + (pad "2" smd rect (at 0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 50 "Net-(R10-Pad1)") (tstamp ad3559f3-33b0-41f8-872c-fccbef602e4b)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:D_SOD-323F (layer B.Cu) (tedit 5D513BB9) (tstamp 5C6D5323) - (at 34.5876 147.4934) - (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") - (tags SOD-323F) - (path /5C64666C) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6888d) + (at 32.3524 153.7545 -90) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-000059ef4ea8") (attr smd) - (fp_text reference D4 (at 0 1.85) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value D_Zener (at 0.1 -1.9) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text user %R (at 0 1.016) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_line (start -1.5 0.85) (end -1.5 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start 0.2 0) (end 0.45 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 -0.35) (end -0.3 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 0.35) (end 0.2 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end 0.2 0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end -0.5 0) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0.35) (end -0.3 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 -0.7) (end -0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 -0.7) (end -0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 0.7) (end 0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 0.7) (end 0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -1.6 0.95) (end 1.6 0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1.6 0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 -0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 0.95) (end -1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.5 -0.85) (end 1.05 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start -1.5 0.85) (end 1.05 0.85) (layer B.SilkS) (width 0.12)) - (pad 1 smd rect (at -1.1 0) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 23 /PTPB)) - (pad 2 smd rect (at 1.1 0) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (model ${KISYS3DMOD}/SOD-323F.STEP - (offset (xyz -1.099999983479657 0 0)) + (fp_text reference "R4" (at 0 -1.2 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 87a5906f-8c1a-4f08-8427-f5e42f176e4d) + ) + (fp_text value "10K" (at 0 1.25 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp a9a69e58-5c9b-4aec-858a-3f808f97dde7) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 7032fded-fd0f-4744-aca0-ed6c3c103e79)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 961a111a-4612-4546-b1ee-cf4729cbf531)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 3636eff0-9700-4eab-98a6-e3cc999b847e)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 420f37ef-b030-4283-8eca-e91140551b94)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 9ee6a179-a1b2-4854-b312-eec32fa64d06)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp c396f31c-789c-42e9-bc7e-bc9f08659480)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp c76c00ac-4b88-4545-8e06-056493579835)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 85534b02-d5c3-4f91-b497-1c5bdc29732d)) + (pad "1" smd rect (at -0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 26 "/A_RS_485_N") (tstamp 594c8f0d-2cc6-4435-9b9c-d2fe9430d35e)) + (pad "2" smd rect (at 0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 54 "/RS485_LVL_UP") (tstamp 87bf3437-b232-453c-afbe-288532665e3a)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:D_SOD-323F (layer B.Cu) (tedit 5D513BB9) (tstamp 5A8C4C13) - (at 40.709 146.579 180) - (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") - (tags SOD-323F) - (path /59F162F9) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6889b) + (at 32.455 155.995 90) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8e662d") (attr smd) - (fp_text reference D1 (at 0 1.85 180) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value NSR0340HT1G (at 0.1 -1.9 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text user %R (at 0 1.016 180) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_line (start -1.5 0.85) (end -1.5 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start 0.2 0) (end 0.45 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 -0.35) (end -0.3 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.2 0.35) (end 0.2 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end 0.2 0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0) (end -0.5 0) (layer B.Fab) (width 0.1)) - (fp_line (start -0.3 0.35) (end -0.3 -0.35) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 -0.7) (end -0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 -0.7) (end -0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start 0.9 0.7) (end 0.9 -0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -0.9 0.7) (end 0.9 0.7) (layer B.Fab) (width 0.1)) - (fp_line (start -1.6 0.95) (end 1.6 0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1.6 0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 -0.95) (end 1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.6 0.95) (end -1.6 -0.95) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.5 -0.85) (end 1.05 -0.85) (layer B.SilkS) (width 0.12)) - (fp_line (start -1.5 0.85) (end 1.05 0.85) (layer B.SilkS) (width 0.12)) - (pad 1 smd rect (at -1.1 0 180) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 29 /Vin)) - (pad 2 smd rect (at 1.1 0 180) (size 0.5 0.5) (layers B.Cu B.Paste B.Mask) - (net 42 +5VP)) - (model ${KISYS3DMOD}/SOD-323F.STEP - (offset (xyz -1.099999983479657 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module Common_Footprint:MicroUSB_B locked (layer B.Cu) (tedit 5D513B78) (tstamp 59EE9C4B) - (at 37.9 137.25) - (path /59EE0192) - (fp_text reference J3 (at 0.015 0.185) (layer B.Fab) - (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) - ) - (fp_text value µUSB_B (at 0.5 4.5) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.125)) (justify mirror)) - ) - (fp_line (start -3.175 -3.175) (end -3.175 2.54) (layer B.Fab) (width 0.1)) - (fp_line (start 3.175 -3.175) (end -3.175 -3.175) (layer B.Fab) (width 0.1)) - (fp_line (start 3.175 2.54) (end 3.175 -3.175) (layer B.Fab) (width 0.1)) - (fp_line (start -3.175 2.54) (end 3.175 2.54) (layer B.Fab) (width 0.1)) - (fp_line (start 4.15 -1.45) (end -4.15 -1.45) (layer B.SilkS) (width 0.1)) - (pad 5 smd rect (at -3.1 2.55) (size 2.1 1.6) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 5 smd rect (at -1.2 0) (size 1.9 1.9) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 5 smd rect (at 1.2 0) (size 1.9 1.9) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 5 smd rect (at 3.8 0) (size 1.8 1.9) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 5 smd rect (at 1.3 2.675) (size 0.4 1.35) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 4 smd rect (at 0.65 2.675) (size 0.4 1.35) (layers B.Cu B.Paste B.Mask) - (net 18 "Net-(J3-Pad4)")) - (pad 3 smd rect (at 0 2.675) (size 0.4 1.35) (layers B.Cu B.Paste B.Mask) - (net 31 /D+)) - (pad 2 smd rect (at -0.65 2.675) (size 0.4 1.35) (layers B.Cu B.Paste B.Mask) - (net 30 /D-)) - (pad 1 smd rect (at -1.3 2.675) (size 0.4 1.35) (layers B.Cu B.Paste B.Mask) - (net 42 +5VP)) - (pad 5 smd rect (at -3.8 0) (size 1.8 1.9) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 5 smd rect (at 3.1 2.55) (size 2.1 1.6) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (model ${KISYS3DMOD}/MicroUSB_B_10118192C.stp - (offset (xyz -97.99999852818766 3.124999953067208 -0.3499999947435274)) - (scale (xyz 1 1 1)) - (rotate (xyz -90 0 0)) - ) - ) - - (module Common_Footprint:826926-6 locked (layer F.Cu) (tedit 5C6D4173) (tstamp 5AB3FCFA) - (at 46.805 152.675 90) - (path /59EE15C1) - (fp_text reference J4 (at 0 0.0508) (layer F.Fab) - (effects (font (size 0.75 0.75) (thickness 0.125))) - ) - (fp_text value Header6Contacts (at 0 -2.54 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_line (start -7.62 -1.25) (end 7.62 -1.25) (layer F.Fab) (width 0.15)) - (fp_line (start 7.62 -1.25) (end 7.62 1.25) (layer F.Fab) (width 0.15)) - (fp_line (start 7.62 1.25) (end -7.62 1.25) (layer F.Fab) (width 0.15)) - (fp_line (start -7.62 1.25) (end -7.62 -1.25) (layer F.Fab) (width 0.15)) - (pad 3 thru_hole circle (at -1.27 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 33 /MISO/MCK)) - (pad 4 thru_hole circle (at 1.27 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 32 /SCK/CK)) - (pad 2 thru_hole circle (at -3.81 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 34 /MOSI/SD)) - (pad 1 thru_hole circle (at -6.35 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 35 /TIM2.1/ADC0)) - (pad 5 thru_hole circle (at 3.81 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 28 +3V3)) - (pad 6 thru_hole circle (at 6.35 0 90) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 29 /Vin)) - (model ${KISYS3DMOD}/Connector_6cts-0826926-06-o-3d.step - (offset (xyz 0 0 1.4)) + (fp_text reference "R12" (at 0 -1.2 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 3b139687-478e-4a44-bd29-d995a11d8b26) + ) + (fp_text value "10K" (at 0 1.25 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp c326ba54-0887-4816-9516-25c590cb5d94) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 5befcf08-a0ad-42b1-ad07-e62d5288afcf)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 571a07fd-ba7d-44e6-a101-4675102d8f90)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp af1ac894-2b8e-42eb-8229-b5ee17d4091a)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 947d1447-0204-4edf-a522-531281062119)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 292a088e-1326-483e-9c72-00c726abe950)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp d42ecaa9-00e8-4014-8f83-c979502cb471)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 33dbc1de-a642-4ccd-8681-b0bc0111b295)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e6c32f57-ef64-424e-915b-3c6c2d381e73)) + (pad "1" smd rect (at -0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 55 "Net-(R11-Pad2)") (tstamp 23119be5-041c-48f7-81df-ed8efbd3701a)) + (pad "2" smd rect (at 0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp aa05bdeb-ecb0-499e-b4d8-9816bfec8ba5)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:826926-6 locked (layer F.Cu) (tedit 5C6D4173) (tstamp 5AB3FCED) - (at 29.025 152.675 270) - (path /59EE159B) - (fp_text reference J5 (at -0.0508 0.0762 180) (layer F.Fab) - (effects (font (size 0.75 0.75) (thickness 0.125))) - ) - (fp_text value Header6Contacts (at 0 -2.54 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_line (start -7.62 -1.25) (end 7.62 -1.25) (layer F.Fab) (width 0.15)) - (fp_line (start 7.62 -1.25) (end 7.62 1.25) (layer F.Fab) (width 0.15)) - (fp_line (start 7.62 1.25) (end -7.62 1.25) (layer F.Fab) (width 0.15)) - (fp_line (start -7.62 1.25) (end -7.62 -1.25) (layer F.Fab) (width 0.15)) - (pad 3 thru_hole circle (at -1.27 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 39 /TX/SCL/TIM2.3)) - (pad 4 thru_hole circle (at 1.27 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 38 /TIM3.4)) - (pad 2 thru_hole circle (at -3.81 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 40 /RX/SDA/TIM2.4)) - (pad 1 thru_hole circle (at -6.35 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 25 GND)) - (pad 5 thru_hole circle (at 3.81 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 37 /TIM3.3)) - (pad 6 thru_hole circle (at 6.35 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 36 /TIM2.2/ADC1)) - (model ${KISYS3DMOD}/Connector_6cts-0826926-06-o-3d.step - (offset (xyz 0 0 1.4)) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688a9) + (at 43.12708 156.9168) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8cfa95") + (attr smd) + (fp_text reference "R8" (at 0 -1.2) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 35f0c8a4-ad88-4da6-a7b9-38accb80b3bc) + ) + (fp_text value "174K" (at 0 1.25) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp e7d13d65-2476-420c-8a3e-0fdb1674718f) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 01335074-f82f-45ea-8205-d90200ca1c3a)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 7b219b96-248c-4d38-b441-b72d954043fa)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp aa39358a-5fca-463d-bcf8-41a58814c781)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp c14d15ab-6751-4f17-a395-b4707d20d977)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 3b803ba2-afbc-40ed-816c-5a6d181d3c67)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f900dcd7-d97d-4da2-8610-f6d5a99369c7)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 7a3568e7-1a87-4bd3-a54b-ae60a6f87500)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 5a22f199-2328-4331-9809-24d996997def)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 48 "Net-(R8-Pad1)") (tstamp a052e055-a0c1-462c-88fd-bb1854cfe9ac)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 567f9a0f-ed05-4b49-a0d9-1d09b897a679)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module "Common_Footprint:DF11-8DP-2DS(24)" locked (layer F.Cu) (tedit 5C6D4111) (tstamp 5AA6894B) - (at 32.8 143) - (path /59EDFF88) - (fp_text reference J1 (at -0.1428 -2.4916) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value "DF11-8DP-2DS(24)" (at 0 3) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -4.826 1.524) (end 4.826 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start -4.826 -6.35) (end -4.826 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start 4.826 -6.35) (end -4.826 -6.35) (layer F.Fab) (width 0.1)) - (fp_line (start 4.826 1.524) (end 4.826 -6.35) (layer F.Fab) (width 0.1)) - (fp_line (start 5 -3.55) (end 5 1.6) (layer F.SilkS) (width 0.15)) - (fp_line (start -5 1.6) (end -5 -3.55) (layer F.SilkS) (width 0.15)) - (pad 8 thru_hole circle (at -3 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 29 /Vin)) - (pad 7 thru_hole circle (at -3 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 25 GND)) - (pad 6 thru_hole circle (at -1 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 58 /PTPB_PRO)) - (pad 5 thru_hole circle (at -1 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 26 /A_RS_485_N)) - (pad 4 thru_hole circle (at 1 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 27 /B_RS_485_P)) - (pad 3 thru_hole circle (at 1 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 58 /PTPB_PRO)) - (pad 2 thru_hole circle (at 3 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 25 GND)) - (pad 1 thru_hole circle (at 3 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 29 /Vin)) - (model ${KISYS3DMOD}/DF11-8DP-2DS.step - (offset (xyz 0 3.7 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module "Common_Footprint:DF11-8DP-2DS(24)" locked (layer F.Cu) (tedit 5C6D4111) (tstamp 5AA6893D) - (at 43 143) - (path /59EDFFDD) - (fp_text reference J2 (at 0.0966 -2.4916) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value "DF11-8DP-2DS(24)" (at 0 3) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -4.826 1.524) (end 4.826 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start -4.826 -6.35) (end -4.826 1.524) (layer F.Fab) (width 0.1)) - (fp_line (start 4.826 -6.35) (end -4.826 -6.35) (layer F.Fab) (width 0.1)) - (fp_line (start 4.826 1.524) (end 4.826 -6.35) (layer F.Fab) (width 0.1)) - (fp_line (start 5 -3.55) (end 5 1.6) (layer F.SilkS) (width 0.15)) - (fp_line (start -5 1.6) (end -5 -3.55) (layer F.SilkS) (width 0.15)) - (pad 8 thru_hole circle (at -3 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 29 /Vin)) - (pad 7 thru_hole circle (at -3 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 25 GND)) - (pad 6 thru_hole circle (at -1 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 59 /PTPA_PRO)) - (pad 5 thru_hole circle (at -1 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 26 /A_RS_485_N)) - (pad 4 thru_hole circle (at 1 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 27 /B_RS_485_P)) - (pad 3 thru_hole circle (at 1 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 59 /PTPA_PRO)) - (pad 2 thru_hole circle (at 3 -1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 25 GND)) - (pad 1 thru_hole circle (at 3 1) (size 1.2 1.2) (drill 0.8) (layers *.Cu *.Mask) - (net 29 /Vin)) - (model ${KISYS3DMOD}/DF11-8DP-2DS.step - (offset (xyz 0 3.7 0)) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688b7) + (at 40.78012 148.54496) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8cbd9b") + (attr smd) + (fp_text reference "R7" (at 0 -1.2) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp e314fc1e-160d-4cb3-83cf-9f16a61fbf67) + ) + (fp_text value "150K" (at 0 1.25) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp e40940b7-3768-48bd-91f4-d24c1e89a6e1) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 64a3bbaf-d9eb-475c-a02b-9bf559b5ab67)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp d6489fe7-7bab-4641-9e0a-8ef807bbe111)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 49335d70-eb09-437d-98e0-bac468aa7a1d)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 599d0ddf-af01-4795-9062-d66c2515d7e3)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2dd9627f-5fea-4d27-86e5-8b7af2ff28eb)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 037143a2-270d-4c1e-9d94-5b78fb55d0de)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 226bd91f-39af-4b98-bf42-8db1a31066cb)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 8e047833-7594-4131-bf49-ab9854330aa9)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 51 "Net-(C9-Pad1)") (tstamp e58aaa87-ae65-4520-a016-c18463b6802d)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 52 "Net-(C10-Pad1)") (tstamp 18341e8a-c54e-4007-8743-332e346ecae1)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:SOD-123F (layer F.Cu) (tedit 5C9B55DF) (tstamp 5AA68877) - (at 36.772 153.691 180) - (path /5A8D101B) - (fp_text reference D2 (at 0 1.397 180) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value SS14FL (at 0 -4.2 180) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.254 -0.508) (end -0.254 0.508) (layer F.Fab) (width 0.1)) - (fp_line (start -0.254 0) (end 0.508 -0.508) (layer F.Fab) (width 0.1)) - (fp_line (start 0.508 0.508) (end -0.254 0) (layer F.Fab) (width 0.1)) - (fp_line (start 0.508 -0.508) (end 0.508 0.508) (layer F.Fab) (width 0.1)) - (fp_line (start -1.27 0.762) (end -1.27 -0.762) (layer F.Fab) (width 0.1)) - (fp_line (start 1.27 0.762) (end -1.27 0.762) (layer F.Fab) (width 0.1)) - (fp_line (start 1.27 -0.762) (end 1.27 0.762) (layer F.Fab) (width 0.1)) - (fp_line (start -1.27 -0.762) (end 1.27 -0.762) (layer F.Fab) (width 0.1)) - (fp_line (start -2.46 -0.975) (end -2.46 0.975) (layer F.SilkS) (width 0.125)) - (fp_line (start 1.5 0.975) (end -2.46 0.975) (layer F.SilkS) (width 0.125)) - (fp_line (start -2.46 -0.975) (end 1.5 -0.975) (layer F.SilkS) (width 0.125)) - (pad 2 smd rect (at 1.51 0) (size 1.5 1.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -1.51 0 180) (size 1.5 1.6) (layers F.Cu F.Paste F.Mask) - (net 44 "Net-(C12-Pad1)")) - (model ${KISYS3DMOD}/SOD-123F.step - (at (xyz 0 0 0)) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688c5) + (at 43.47252 159.44664) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8cb0ec") + (attr smd) + (fp_text reference "R6" (at 0 -1.2) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp a62995f2-00c1-46cd-8b76-16ca383408f4) + ) + (fp_text value "68.1K" (at 0 1.25) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 6af4975e-5325-4a36-ae16-c57034c23ab0) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 703f7cd7-2ca2-4ea6-9b6a-611a83dfdb1b)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp f1087b1b-78e5-4ede-87d4-e46f75e29b88)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 764cb1ad-e52c-4044-9d69-83b1b0fd8c7d)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 4d64c446-d76e-4b1a-ad96-ddab4160c740)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2412bf51-cdc4-4c18-b4aa-7adebde5b867)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 30e4feeb-d383-49e4-96a8-f64e346c8964)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp bda250df-f44d-4c67-9b06-edf8fd1f7a75)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 6f53dad0-767f-416a-8547-8cf117296da4)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 46 "Net-(R5-Pad2)") (tstamp 6ccd4653-0246-47ec-bfda-f7fd8b9c88f5)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 1ad6d0a4-f146-40db-a460-ebefe8cda2d8)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 -90)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:UFQFPN48 (layer B.Cu) (tedit 5C6D3E00) (tstamp 5AA6883E) - (at 37.915 152.675 90) - (path /59EE01E5) - (fp_text reference U2 (at 0.0508 0.0254 180) (layer B.Fab) - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value STM32F072CBU (at 0.2 4.6 90) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_circle (center -2.794 2.794) (end -2.54 2.794) (layer B.Fab) (width 0.1)) - (fp_line (start -3.302 -3.302) (end -3.302 3.302) (layer B.Fab) (width 0.1)) - (fp_line (start 3.302 -3.302) (end -3.302 -3.302) (layer B.Fab) (width 0.1)) - (fp_line (start 3.302 3.302) (end 3.302 -3.302) (layer B.Fab) (width 0.1)) - (fp_line (start -3.302 3.302) (end 3.302 3.302) (layer B.Fab) (width 0.1)) - (fp_circle (center -2.3 2.3) (end -2.1 2.2) (layer B.SilkS) (width 0.15)) - (fp_line (start -2.8 2.8) (end 2.8 2.8) (layer B.SilkS) (width 0.15)) - (fp_line (start 2.8 2.8) (end 2.8 -2.8) (layer B.SilkS) (width 0.15)) - (fp_line (start 2.8 -2.8) (end -2.8 -2.8) (layer B.SilkS) (width 0.15)) - (fp_line (start -2.8 -2.8) (end -2.8 2.8) (layer B.SilkS) (width 0.15)) - (pad 0 smd rect (at 0 0 90) (size 5.6 5.6) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 48 smd rect (at -2.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 47 smd rect (at -2.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 46 smd rect (at -1.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 17 "Net-(U2-Pad46)")) - (pad 45 smd rect (at -1.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 16 "Net-(U2-Pad45)")) - (pad 44 smd rect (at -0.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 41 /BOOT0)) - (pad 43 smd rect (at -0.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 15 "Net-(U2-Pad43)")) - (pad 42 smd rect (at 0.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 14 "Net-(U2-Pad42)")) - (pad 41 smd rect (at 0.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 34 /MOSI/SD)) - (pad 40 smd rect (at 1.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 33 /MISO/MCK)) - (pad 39 smd rect (at 1.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 32 /SCK/CK)) - (pad 38 smd rect (at 2.25 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 13 "Net-(U2-Pad38)")) - (pad 37 smd rect (at 2.75 3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 12 "Net-(U2-Pad37)")) - (pad 36 smd rect (at 3.375 2.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 35 smd rect (at 3.375 2.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 34 smd rect (at 3.375 1.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 11 "Net-(U2-Pad34)")) - (pad 33 smd rect (at 3.375 1.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 31 /D+)) - (pad 32 smd rect (at 3.375 0.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 30 /D-)) - (pad 31 smd rect (at 3.375 0.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 19 /RxD)) - (pad 30 smd rect (at 3.375 -0.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 22 /TxD)) - (pad 29 smd rect (at 3.375 -0.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 21 /PTPA)) - (pad 28 smd rect (at 3.375 -1.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 20 /DE)) - (pad 27 smd rect (at 3.375 -1.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 24 /RE)) - (pad 26 smd rect (at 3.375 -2.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 23 /PTPB)) - (pad 25 smd rect (at 3.375 -2.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 10 "Net-(U2-Pad25)")) - (pad 24 smd rect (at 2.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 23 smd rect (at 2.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 22 smd rect (at 1.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 40 /RX/SDA/TIM2.4)) - (pad 21 smd rect (at 1.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 39 /TX/SCL/TIM2.3)) - (pad 20 smd rect (at 0.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 9 "Net-(U2-Pad20)")) - (pad 19 smd rect (at 0.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 38 /TIM3.4)) - (pad 18 smd rect (at -0.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 37 /TIM3.3)) - (pad 17 smd rect (at -0.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 8 "Net-(U2-Pad17)")) - (pad 16 smd rect (at -1.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 54 /RS485_LVL_UP)) - (pad 15 smd rect (at -1.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 53 /RS485_LVL_DOWN)) - (pad 14 smd rect (at -2.25 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 7 "Net-(U2-Pad14)")) - (pad 12 smd rect (at -3.375 -2.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 55 "Net-(R11-Pad2)")) - (pad 11 smd rect (at -3.375 -2.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 36 /TIM2.2/ADC1)) - (pad 10 smd rect (at -3.375 -1.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 35 /TIM2.1/ADC0)) - (pad 9 smd rect (at -3.375 -1.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 8 smd rect (at -3.375 -0.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 7 smd rect (at -3.375 -0.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 6 "Net-(U2-Pad7)")) - (pad 6 smd rect (at -3.375 0.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 5 "Net-(U2-Pad6)")) - (pad 5 smd rect (at -3.375 0.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 4 "Net-(U2-Pad5)")) - (pad 4 smd rect (at -3.375 1.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 3 "Net-(U2-Pad4)")) - (pad 3 smd rect (at -3.375 1.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 2 "Net-(U2-Pad3)")) - (pad 2 smd rect (at -3.375 2.25 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 1 "Net-(U2-Pad2)")) - (pad 1 smd rect (at -3.375 2.75 90) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 13 smd rect (at -2.75 -3.375) (size 0.55 0.3) (layers B.Cu B.Paste B.Mask) - (net 57 "Net-(R13-Pad2)")) - (model ${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/UFQFPN48.step - (at (xyz 0 0 0)) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688d3) + (at 33.7494 153.7545 90) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-000059ef52f6") + (attr smd) + (fp_text reference "R3" (at 0 -1.2 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 40c59889-e18b-47a5-821f-3e0c03ebf59a) + ) + (fp_text value "10K" (at 0 1.25 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp a628e70c-4ade-4963-aa67-f7c1a1217ec5) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp c1efda3b-cc36-46e1-9c00-e0ca67c29c96)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 71ea379a-d319-43bb-b80b-3b90a82c3a1a)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 3cd07184-c429-4ddd-9757-12b40a5e11f6)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 20b862a0-b7fd-42a0-b2df-4128a781fc8c)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 73e48c01-3587-42b6-8b60-b361aaecf73e)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 76403626-b740-4dd5-ad43-01dc5c5edafc)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f47d0d45-93c5-416e-9f3a-65f5c28099a5)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp c62c5487-068a-47d4-b45d-c681b6a2adce)) + (pad "1" smd rect (at -0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 53 "/RS485_LVL_DOWN") (tstamp bb360f25-0080-4905-92d6-5086a8312a36)) + (pad "2" smd rect (at 0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 27 "/B_RS_485_P") (tstamp c097f22c-7127-4767-a3e8-e6a582691827)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:LED_0603 (layer B.Cu) (tedit 5C6D3D4B) (tstamp 5C644115) - (at 39.274 159.406) - (descr "LED 0603 smd package") - (tags "LED led 0603 SMD smd SMT smt smdled SMDLED smtled SMTLED") - (path /5A9F208A) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688fd) + (at 32.455 157.695 90) + (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") + (tags "resistor 0402") + (path "/00000000-0000-0000-0000-00005a8e63c5") (attr smd) - (fp_text reference D3 (at 0.038 -0.7112) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_text value SMLE13BC8TT86 (at 0 -1.35) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -1.3 0.5) (end -1.3 -0.5) (layer B.SilkS) (width 0.12)) - (fp_line (start -0.2 0.2) (end -0.2 -0.2) (layer B.Fab) (width 0.1)) - (fp_line (start -0.15 0) (end 0.15 0.2) (layer B.Fab) (width 0.1)) - (fp_line (start 0.15 -0.2) (end -0.15 0) (layer B.Fab) (width 0.1)) - (fp_line (start 0.15 0.2) (end 0.15 -0.2) (layer B.Fab) (width 0.1)) - (fp_line (start 0.8 -0.4) (end -0.8 -0.4) (layer B.Fab) (width 0.1)) - (fp_line (start 0.8 0.4) (end 0.8 -0.4) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.4) (end 0.8 0.4) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 -0.4) (end -0.8 0.4) (layer B.Fab) (width 0.1)) - (fp_line (start -1.3 -0.5) (end 0.8 -0.5) (layer B.SilkS) (width 0.12)) - (fp_line (start -1.3 0.5) (end 0.8 0.5) (layer B.SilkS) (width 0.12)) - (fp_line (start 1.45 0.65) (end 1.45 -0.65) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1.45 -0.65) (end -1.45 -0.65) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.45 -0.65) (end -1.45 0.65) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.45 0.65) (end 1.45 0.65) (layer B.CrtYd) (width 0.05)) - (pad 2 smd rect (at 0.8 0 180) (size 0.8 0.8) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (pad 1 smd rect (at -0.8 0 180) (size 0.8 0.8) (layers B.Cu B.Paste B.Mask) - (net 56 "Net-(D3-Pad1)")) - (model "${KISYS3DMOD}/LED SMD0603.step" - (offset (xyz 0.6 0 0)) + (fp_text reference "R11" (at 0 -1.2 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 3c0f3585-dfc4-4c9f-8f73-4ae50ed42092) + ) + (fp_text value "68K" (at 0 1.25 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp e1a2b510-ab7a-41fe-a524-39803ef4b854) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9a3b0a32-a56a-40b7-82f7-25e90fafc5a7)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 10687607-3eae-4ebe-bcaa-6d638d40729f)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 429dc226-bf00-4507-aab6-4a5c3d5c7993)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 63142be6-6fca-4050-81d6-2c3c6606a9ec)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 1d4ceb0d-559d-492f-be8b-93d7ef2fa1cc)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp fb23eabb-a3fb-4246-88c3-a7bb728623e1)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ffe8a1b6-73f5-45c5-945c-2de12a9a3d49)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp f6a1421e-0bca-4101-8a0b-27417c972061)) + (pad "1" smd rect (at -0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp 5e4db74d-7d84-46f5-b756-c33293c7889e)) + (pad "2" smd rect (at 0.45 0 90) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 55 "Net-(R11-Pad2)") (tstamp aac2115f-2ec4-423b-9a57-5f744dfb563e)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer B.Cu) (tedit 5BE5A55C) (tstamp 5C644D07) - (at 37.4832 144.8264) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6891a) + (at 42.614 151.913 -90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /5C685DF9) + (path "/00000000-0000-0000-0000-00005a8d2812") (attr smd) - (fp_text reference R15 (at 0 -0.5334) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_text value 100 (at 0 -1.25) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.8 0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 21 /PTPA)) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 59 /PTPA_PRO)) + (fp_text reference "R10" (at 0 -1.2 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 1f257d14-440a-4b8a-80ae-0b756dba5b00) + ) + (fp_text value "10K" (at 0 1.25 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp ef41f4df-fef4-4eaa-9322-8763b41554c8) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 380c4d63-98f6-4f3d-af09-2827a9272086)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp aa286552-ae1c-4b83-864b-7e5ee597c5ce)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 5d4be3b8-334c-4765-9659-41bb1fefe873)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 52e76428-70e6-49d8-a2a4-eae5951b17e8)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 4da2846a-5929-4333-97c3-24cfecbac176)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp d8262cdc-b406-40a8-aee7-4c00680750e4)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 407aaad0-4dd7-445a-aaa7-d1eae87ad754)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp d485e0a5-332a-4eb0-b8fc-23b8cb44311f)) + (pad "1" smd rect (at -0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 50 "Net-(R10-Pad1)") (tstamp b061893c-a330-444c-9781-94b800d20740)) + (pad "2" smd rect (at 0.45 0 270) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp b3e8761d-2da1-4746-8fe1-c68782cb35e6)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer B.Cu) (tedit 5BE5A55C) (tstamp 5C644CDD) - (at 32.073 147.8562 90) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68928) + (at 41.80628 159.44664) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /5C6858F0) + (path "/00000000-0000-0000-0000-00005a8cad69") (attr smd) - (fp_text reference R14 (at 0.8962 0 180) (layer B.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) - ) - (fp_text value 100 (at 0 -1.25 90) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.8 0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 23 /PTPB)) - (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 58 /PTPB_PRO)) + (fp_text reference "R5" (at 0 -1.2) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 39b02789-5e8a-42ea-9761-3d93d8f424fe) + ) + (fp_text value "105K" (at 0 1.25) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 3507e0ba-1fce-4dbd-9acd-b8d48d434c8a) + ) + (fp_line (start -0.8 -0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 00bc3d96-5542-4deb-a76d-aafc506d5629)) + (fp_line (start -0.8 -0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 2dd476b4-5777-4d9d-9508-04660f36ff91)) + (fp_line (start 0.8 0.45) (end -0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 7402ba84-18a3-4046-892c-30d1e558ed92)) + (fp_line (start 0.8 0.45) (end 0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp dd4d84dc-f227-45a8-9752-3817885ea479)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 6a4f4db4-c4bd-4b8f-af76-50baddbf1ab2)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b917afef-16a7-4d75-9f51-00c389efcc9b)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 0f54a51a-eaf0-4383-9af8-31f6d00e14b9)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 98a0e959-b5d6-4603-b291-96b4b487a425)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp 6b93bfdc-aee7-42a0-b7ea-f91ae5690449)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 46 "Net-(R5-Pad2)") (tstamp 5c8d7e1c-ed0b-43ea-9a94-a9df20fd15ac)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module TO_SOT_Packages_SMD:SOT-323_SC-70 (layer B.Cu) (tedit 58CE4E7E) (tstamp 59F07447) - (at 43.4014 151.024 90) - (descr "SOT-323, SC-70") - (tags "SOT-323 SC-70") - (path /59F1661E) - (attr smd) - (fp_text reference Q1 (at -0.05 1.95 90) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value BC846BWT1G (at -0.05 -2.05 90) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text user %R (at 0 0) (layer B.Fab) - (effects (font (size 0.5 0.5) (thickness 0.075)) (justify mirror)) - ) - (fp_line (start 0.73 -0.5) (end 0.73 -1.16) (layer B.SilkS) (width 0.12)) - (fp_line (start 0.73 1.16) (end 0.73 0.5) (layer B.SilkS) (width 0.12)) - (fp_line (start 1.7 -1.3) (end -1.7 -1.3) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1.7 1.3) (end 1.7 -1.3) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.7 1.3) (end 1.7 1.3) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1.7 -1.3) (end -1.7 1.3) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.73 1.16) (end -1.3 1.16) (layer B.SilkS) (width 0.12)) - (fp_line (start -0.68 -1.16) (end 0.73 -1.16) (layer B.SilkS) (width 0.12)) - (fp_line (start 0.67 1.1) (end -0.18 1.1) (layer B.Fab) (width 0.1)) - (fp_line (start -0.68 0.6) (end -0.68 -1.1) (layer B.Fab) (width 0.1)) - (fp_line (start 0.67 1.1) (end 0.67 -1.1) (layer B.Fab) (width 0.1)) - (fp_line (start 0.67 -1.1) (end -0.68 -1.1) (layer B.Fab) (width 0.1)) - (fp_line (start -0.18 1.1) (end -0.68 0.6) (layer B.Fab) (width 0.1)) - (pad 1 smd rect (at -1 0.65 180) (size 0.45 0.7) (layers B.Cu B.Paste B.Mask) - (net 43 "Net-(Q1-Pad1)")) - (pad 2 smd rect (at -1 -0.65 180) (size 0.45 0.7) (layers B.Cu B.Paste B.Mask) - (net 41 /BOOT0)) - (pad 3 smd rect (at 1 0 180) (size 0.45 0.7) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (model ${KISYS3DMOD}/TO_SOT_Packages_SMD.3dshapes/SOT-323_SC-70.wrl - (at (xyz 0 0 0)) + (footprint "Common_Footprint:L_0806" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68936) + (at 40.709 150.135) + (path "/00000000-0000-0000-0000-00005a8d16da") + (attr through_hole) + (fp_text reference "L1" (at 0.0254 0) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 0540d71e-c751-4151-9bae-1666e1bade36) + ) + (fp_text value "4,7µH" (at 0 -2) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp a14416e7-e1de-4c3e-b597-0d68b2953a15) + ) + (fp_line (start -1 -1) (end 1 -1) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 454cccab-954c-43f6-bc2f-6fbe2e3bb01c)) + (fp_line (start 1 1) (end -1 1) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 6c091bcb-d3ca-4f72-b58e-0dbdb387376e)) + (fp_line (start -0.889 -0.762) (end 0.889 -0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b6501424-2768-439f-9945-7212a70623d7)) + (fp_line (start -0.889 0.762) (end -0.889 -0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b0dbd83c-0b2d-4f6e-bdcb-fc6f11788986)) + (fp_line (start 0.889 -0.762) (end 0.889 0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 36e0b8c6-813a-4a4b-a030-4d74130c9b8d)) + (fp_line (start 0.889 0.762) (end -0.889 0.762) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 4f438a83-9941-4f93-ba69-bf8d26be63d6)) + (pad "1" smd rect (at -0.9 0) (size 0.8 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 44 "Net-(C12-Pad1)") (tstamp f62b82b6-ad70-4fbc-a0da-4ce6f3af3ec3)) + (pad "2" smd rect (at 0.9 0 180) (size 0.8 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 28 "+3V3") (tstamp d52f23b1-dd3a-42ca-ac2b-7d1d4fa9bc8f)) + (model "${KISYS3DMOD}/0806 SMD Inductor.stp" + (offset (xyz 0 0 0.5)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 90)) + ) + ) + + (footprint "Common_Footprint:DF11-8DP-2DS(24)" locked (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6893d) + (at 43 143) + (path "/00000000-0000-0000-0000-000059edffdd") + (attr through_hole) + (fp_text reference "J2" (at 0.0966 -2.4916) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp c6125c0f-7ed5-4cd4-9d4d-ae09a54a4e4d) + ) + (fp_text value "DF11-8DP-2DS(24)" (at 0 3) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 35258cc6-22bb-40fd-a0e5-7139c1ae0447) + ) + (fp_line (start -5 1.6) (end -5 -3.55) + (stroke (width 0.15) (type solid)) (layer "F.SilkS") (tstamp 0b0048b3-81b4-482f-9074-89232441d73e)) + (fp_line (start 5 -3.55) (end 5 1.6) + (stroke (width 0.15) (type solid)) (layer "F.SilkS") (tstamp 20b05036-36ab-4724-9792-9a5ffb8dc664)) + (fp_line (start -4.826 -6.35) (end -4.826 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp a273b622-3a1a-4a77-9f89-ec9d5f42e474)) + (fp_line (start -4.826 1.524) (end 4.826 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 76f0f5db-2c69-4b72-947a-72b93aa851e7)) + (fp_line (start 4.826 -6.35) (end -4.826 -6.35) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 46c1a22c-d185-4c4d-a64b-32a3781681b8)) + (fp_line (start 4.826 1.524) (end 4.826 -6.35) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp a1492151-2c13-46b4-92be-9869c5906a9a)) + (pad "1" thru_hole circle locked (at 3 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 29 "/Vin") (tstamp 5ba38713-42f7-4321-bc82-f06bb3566e5f)) + (pad "2" thru_hole circle locked (at 3 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 25 "GND") (tstamp a83d4093-410b-44da-8d02-0baccd5b938c)) + (pad "3" thru_hole circle locked (at 1 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 59 "/PTPA_PRO") (tstamp 0d524641-f059-41d4-a1c9-354d8c794d78)) + (pad "4" thru_hole circle locked (at 1 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 27 "/B_RS_485_P") (tstamp 9cd7eca5-a381-48c0-b9d1-195eda5f323d)) + (pad "5" thru_hole circle locked (at -1 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 26 "/A_RS_485_N") (tstamp 24702c12-4f9b-4b8a-a9a1-4a78bab0c9fb)) + (pad "6" thru_hole circle locked (at -1 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 59 "/PTPA_PRO") (tstamp d8f9c9ac-2cf0-49e5-aa4a-4c9c01a4349a)) + (pad "7" thru_hole circle locked (at -3 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 25 "GND") (tstamp 39c1e6ee-b9d4-4db4-bc69-685b4f0d4bc0)) + (pad "8" thru_hole circle locked (at -3 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 29 "/Vin") (tstamp 8a931a0d-8506-4dd1-8e8f-2b8a43ca36a8)) + (model "${KISYS3DMOD}/DF11-8DP-2DS.step" + (offset (xyz 0 3.7 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:C_1206 (layer F.Cu) (tedit 5C9A6491) (tstamp 5AA68969) - (at 44.265 153.925 90) + (footprint "Common_Footprint:DF11-8DP-2DS(24)" locked (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6894b) + (at 32.8 143) + (path "/00000000-0000-0000-0000-000059edff88") + (attr through_hole) + (fp_text reference "J1" (at -0.1428 -2.4916) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 9ed0bc76-6088-4bbd-852b-081c943c4606) + ) + (fp_text value "DF11-8DP-2DS(24)" (at 0 3) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 598dd2fb-7ca4-4d8d-b5a0-0c7bcba779ef) + ) + (fp_line (start -5 1.6) (end -5 -3.55) + (stroke (width 0.15) (type solid)) (layer "F.SilkS") (tstamp 9420699b-f64b-41cb-90a8-66c286cd6f7c)) + (fp_line (start 5 -3.55) (end 5 1.6) + (stroke (width 0.15) (type solid)) (layer "F.SilkS") (tstamp 31435dde-dd28-4971-9858-4727271767ea)) + (fp_line (start -4.826 -6.35) (end -4.826 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 1256252f-5035-4bdb-83e4-1a095a449dfa)) + (fp_line (start -4.826 1.524) (end 4.826 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 99e87d34-b962-4269-9c2b-ce2dee6877bf)) + (fp_line (start 4.826 -6.35) (end -4.826 -6.35) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 8a8ad478-12ed-4376-b8a2-695e18bf2144)) + (fp_line (start 4.826 1.524) (end 4.826 -6.35) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ba2d136e-5672-4f06-ab82-aedefa225143)) + (pad "1" thru_hole circle locked (at 3 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 29 "/Vin") (tstamp b4989d4b-fd1c-456e-becc-2d271d3e266d)) + (pad "2" thru_hole circle locked (at 3 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 25 "GND") (tstamp 86b795bc-2a0c-48ca-9c56-a320c6680ec7)) + (pad "3" thru_hole circle locked (at 1 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 58 "/PTPB_PRO") (tstamp 3402a528-74c7-4467-b552-325aebb61567)) + (pad "4" thru_hole circle locked (at 1 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 27 "/B_RS_485_P") (tstamp edbb0474-1af7-4af5-8fd6-0bfb797e3633)) + (pad "5" thru_hole circle locked (at -1 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 26 "/A_RS_485_N") (tstamp 932fdd71-45ca-4905-baf8-a47f10bc6998)) + (pad "6" thru_hole circle locked (at -1 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 58 "/PTPB_PRO") (tstamp 1de607de-05f6-4216-a36a-05a0b357c0f3)) + (pad "7" thru_hole circle locked (at -3 1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 25 "GND") (tstamp 39fd3e34-f4aa-47b3-8311-6675b5f9f329)) + (pad "8" thru_hole circle locked (at -3 -1) (size 1.2 1.2) (drill 0.8) (layers "*.Cu" "*.Mask") + (net 29 "/Vin") (tstamp 30233bca-4725-4e6a-a1c6-de2713d82c79)) + (model "${KISYS3DMOD}/DF11-8DP-2DS.step" + (offset (xyz 0 3.7 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (footprint "Common_Footprint:C_1206" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68959) + (at 44.265 148.865 -90) (descr "Capacitor SMD 1206, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 1206") - (path /5A8D2A71) + (path "/00000000-0000-0000-0000-00005a8d2e23") (attr smd) - (fp_text reference C13 (at 0 -1.75 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 47µF (at 0 2 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 2.25 1.05) (end -2.25 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start 2.25 1.05) (end 2.25 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.25 -1.05) (end -2.25 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.25 -1.05) (end 2.25 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 1.02) (end 1 1.02) (layer F.SilkS) (width 0.12)) - (fp_line (start 1 -1.02) (end -1 -1.02) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.6 -0.8) (end 1.6 -0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 1.6 -0.8) (end 1.6 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 1.6 0.8) (end -1.6 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start -1.6 0.8) (end -1.6 -0.8) (layer F.Fab) (width 0.1)) - (fp_text user %R (at 0 0 90) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (pad 2 smd rect (at 1.5 0 90) (size 1 1.6) (layers F.Cu F.Paste F.Mask) - (net 28 +3V3)) - (pad 1 smd rect (at -1.5 0 90) (size 1 1.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) + (fp_text reference "C14" (at 0 -1.75 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 82d48b00-0fc5-475e-8262-951a8a1c42e3) + ) + (fp_text value "47µF" (at 0 2 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 1ab1b8d6-dd42-4b3f-b9dd-d54e323175ae) + ) + (fp_text user "${REFERENCE}" (at 0 0 270) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 77757fc2-c908-4d7d-95da-4904b281ab13) + ) + (fp_line (start -1 1.02) (end 1 1.02) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d4ef9c07-270e-4449-b895-0d3a08e9822b)) + (fp_line (start 1 -1.02) (end -1 -1.02) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 87c5c54f-f442-4425-ab96-c136e1c4b922)) + (fp_line (start -2.25 -1.05) (end -2.25 1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp fde78869-fd0b-4cc3-aedf-a9bc4f13569e)) + (fp_line (start -2.25 -1.05) (end 2.25 -1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9f68944c-4e12-4993-a99f-5705f626ca9c)) + (fp_line (start 2.25 1.05) (end -2.25 1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp b2c92cab-aa67-4f7a-bf79-90059915f77f)) + (fp_line (start 2.25 1.05) (end 2.25 -1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 2a253d33-e399-4d0d-b7f7-e715ac311c5e)) + (fp_line (start -1.6 -0.8) (end 1.6 -0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 92f9d026-a185-44c5-8f18-c89104c82cb8)) + (fp_line (start -1.6 0.8) (end -1.6 -0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2d475f75-e6ab-49eb-856d-e00f4f1a2106)) + (fp_line (start 1.6 -0.8) (end 1.6 0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b07a5ebf-1662-487f-8894-9d6dfc726645)) + (fp_line (start 1.6 0.8) (end -1.6 0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 98e43436-78b8-4efe-8e4a-f3b4014f7a82)) + (pad "1" smd rect (at -1.5 0 270) (size 1 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp a58a967e-5111-457e-b6c2-09fb314ebecd)) + (pad "2" smd rect (at 1.5 0 270) (size 1 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 28 "+3V3") (tstamp 8bec8ce6-60a6-47ad-a0e5-f440fac67484)) (model "${KISYS3DMOD}/1206 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:C_1206 (layer F.Cu) (tedit 5C9A6491) (tstamp 5AA68959) - (at 44.265 148.865 270) + (footprint "Common_Footprint:C_1206" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68969) + (at 44.265 153.925 90) (descr "Capacitor SMD 1206, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 1206") - (path /5A8D2E23) + (path "/00000000-0000-0000-0000-00005a8d2a71") (attr smd) - (fp_text reference C14 (at 0 -1.75 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 47µF (at 0 2 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 2.25 1.05) (end -2.25 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start 2.25 1.05) (end 2.25 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.25 -1.05) (end -2.25 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.25 -1.05) (end 2.25 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 1.02) (end 1 1.02) (layer F.SilkS) (width 0.12)) - (fp_line (start 1 -1.02) (end -1 -1.02) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.6 -0.8) (end 1.6 -0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 1.6 -0.8) (end 1.6 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 1.6 0.8) (end -1.6 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start -1.6 0.8) (end -1.6 -0.8) (layer F.Fab) (width 0.1)) - (fp_text user %R (at 0 0 270) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (pad 2 smd rect (at 1.5 0 270) (size 1 1.6) (layers F.Cu F.Paste F.Mask) - (net 28 +3V3)) - (pad 1 smd rect (at -1.5 0 270) (size 1 1.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) + (fp_text reference "C13" (at 0 -1.75 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 7e6f34f5-b60c-4051-b725-0074cf846916) + ) + (fp_text value "47µF" (at 0 2 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 78426528-3412-4cb5-8fb5-bdc2015e0bbd) + ) + (fp_text user "${REFERENCE}" (at 0 0 90) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 5eafcb53-c3c8-4149-b24b-92b512ac0ac8) + ) + (fp_line (start -1 1.02) (end 1 1.02) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 037f665a-c2c8-4348-9210-7f8bdbfec451)) + (fp_line (start 1 -1.02) (end -1 -1.02) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp bf6fb9b9-2da2-4f6e-806f-f3dff07d16e7)) + (fp_line (start -2.25 -1.05) (end -2.25 1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 883f758d-d70a-40c0-b41e-c86feeb9eca5)) + (fp_line (start -2.25 -1.05) (end 2.25 -1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp f21c8104-9d52-41d2-966d-5dd0438da51c)) + (fp_line (start 2.25 1.05) (end -2.25 1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp da329f8d-24f7-4e2e-8611-2d3b9ba3a240)) + (fp_line (start 2.25 1.05) (end 2.25 -1.05) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp de061481-d5d8-4289-b716-bfff93849828)) + (fp_line (start -1.6 -0.8) (end 1.6 -0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 10d6bef1-0b90-4815-962f-0c00bbd25128)) + (fp_line (start -1.6 0.8) (end -1.6 -0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e5ea1ec2-c3ba-4381-82f8-7496b15353f8)) + (fp_line (start 1.6 -0.8) (end 1.6 0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 789057bc-cecb-452a-9737-c85b0071200d)) + (fp_line (start 1.6 0.8) (end -1.6 0.8) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 86fa192f-51fd-4665-9107-8dba80b4a01d)) + (pad "1" smd rect (at -1.5 0 90) (size 1 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 9afc1c60-fc62-45fc-aee5-426568c3b39b)) + (pad "2" smd rect (at 1.5 0 90) (size 1 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 28 "+3V3") (tstamp 9d7b0d96-368c-4d64-9e28-3dfb62c107ba)) (model "${KISYS3DMOD}/1206 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer B.Cu) (tedit 5BE9A355) (tstamp 5AA68A17) - (at 32.581 149.2968 180) - (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0402") - (path /59EF1B6C) + (footprint "Common_Footprint:C_0603" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68979) + (at 43.58428 158.22236) + (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0603") + (path "/00000000-0000-0000-0000-00005a8cf5e6") (attr smd) - (fp_text reference C8 (at 0 1.27 180) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 100nF (at 0 -1.27 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start 1 -0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1 -0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_text user %R (at -0.01 -0.01 180) (layer B.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) - ) - (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (fp_text reference "C11" (at -0.025 0 90) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp de4a2556-8b0d-42c1-b658-965d802d764b) + ) + (fp_text value "6.8nF" (at 0 1.5) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp 0239c094-d31d-44a8-a89e-4fbce6063d15) + ) + (fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1))) + (tstamp 2b389ed6-2e17-442c-b2ab-d4d584e5b6a1) + ) + (fp_line (start -0.35 -0.6) (end 0.35 -0.6) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 1242a043-c03a-4551-b675-5ae05c26cde7)) + (fp_line (start 0.35 0.6) (end -0.35 0.6) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 6a46c59c-101f-4778-98b9-7162349fa671)) + (fp_line (start -1.4 -0.65) (end -1.4 0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 4ffa2d84-18f6-43a3-8a1a-b5fe69511950)) + (fp_line (start -1.4 -0.65) (end 1.4 -0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp c1c4b080-36ce-4992-836e-7af04c15b54b)) + (fp_line (start 1.4 0.65) (end -1.4 0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 323e8c9f-2f17-4e20-99e7-3bcd7a154ecd)) + (fp_line (start 1.4 0.65) (end 1.4 -0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp ea72449e-f998-4345-bea7-ab1a015e093c)) + (fp_line (start -0.8 -0.4) (end 0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ad0fe3d5-a5ac-4551-a30e-90f4ee8727f6)) + (fp_line (start -0.8 0.4) (end -0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 267d07f5-d4ae-41b7-ba03-1f9698a07bf2)) + (fp_line (start 0.8 -0.4) (end 0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 1c7518a4-06b7-422e-a6c7-afed73b549bf)) + (fp_line (start 0.8 0.4) (end -0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp c0b6b7c7-aa1f-4277-8e26-800ea9a68cc4)) + (pad "1" smd rect (at -0.75 0) (size 0.8 0.75) (layers "F.Cu" "F.Paste" "F.Mask") + (net 47 "Net-(C11-Pad1)") (tstamp 9f192b86-93d1-465e-b2ff-8dcd8eefe6b3)) + (pad "2" smd rect (at 0.75 0) (size 0.8 0.75) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 592b0723-b21d-4f16-99bc-e148c32a001c)) + (model "${KISYS3DMOD}/0603 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz -90 0 0)) + (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer F.Cu) (tedit 5BE9A355) (tstamp 5AA68A09) - (at 38.804 150.008 270) - (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0402") - (path /5A8CB6FA) + (footprint "Common_Footprint:C_0603" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68989) + (at 42.487 147.849 -90) + (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0603") + (path "/00000000-0000-0000-0000-00005a8cc30a") (attr smd) - (fp_text reference C9 (at 0 -1.27 270) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 27pF (at 0 1.27 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1 0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1 0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_text user %R (at -0.01 0.01 270) (layer F.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075))) - ) - (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 51 "Net-(C9-Pad1)")) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (fp_text reference "C10" (at -0.025 0) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp 154ffea1-b5ce-46b1-ac02-f6d1018a3187) + ) + (fp_text value "470pF" (at 0 1.5 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp 1292039d-e70a-4bb0-b49a-158df3ef2927) + ) + (fp_text user "${REFERENCE}" (at 0 0 270) (layer "F.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1))) + (tstamp e1bb6c56-39c5-44a2-a6dd-82f7dd1e4b51) + ) + (fp_line (start -0.35 -0.6) (end 0.35 -0.6) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 164cf55b-c57d-4453-985e-0577940c0812)) + (fp_line (start 0.35 0.6) (end -0.35 0.6) + (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp c6c26c92-d460-4527-a934-afe4bac96a73)) + (fp_line (start -1.4 -0.65) (end -1.4 0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp e0b71b39-2817-44f8-9806-a386978fd1f7)) + (fp_line (start -1.4 -0.65) (end 1.4 -0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 80e73ee4-732c-4e99-a0b0-303d315d9786)) + (fp_line (start 1.4 0.65) (end -1.4 0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 8874c21d-cd31-48e1-ba29-f7e91651e144)) + (fp_line (start 1.4 0.65) (end 1.4 -0.65) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp bdaace7e-2057-4031-a2cd-22e367576cc4)) + (fp_line (start -0.8 -0.4) (end 0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp a5303634-b18a-416d-bd74-461ede78deba)) + (fp_line (start -0.8 0.4) (end -0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp fbed35f6-4744-4ce2-925f-6bdf80f39627)) + (fp_line (start 0.8 -0.4) (end 0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 55c37fab-43f1-43ca-8b07-343ebb3e27d3)) + (fp_line (start 0.8 0.4) (end -0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 10750c56-e160-4556-8c82-4bcbc083bc09)) + (pad "1" smd rect (at -0.75 0 270) (size 0.8 0.75) (layers "F.Cu" "F.Paste" "F.Mask") + (net 52 "Net-(C10-Pad1)") (tstamp 6b94f164-aadb-467f-8586-bd333494b0a1)) + (pad "2" smd rect (at 0.75 0 270) (size 0.8 0.75) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 86f81658-aad5-4078-a1b7-5ffc8c7a9e62)) + (model "${KISYS3DMOD}/0603 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz -90 0 0)) + (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer F.Cu) (tedit 5BE9A355) (tstamp 5C64CB76) - (at 38.59572 156.22084 270) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689b5) + (at 38.6135 158.898 -90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") - (path /5A8CFF32) + (path "/00000000-0000-0000-0000-00005a8caabb") (attr smd) - (fp_text reference C12 (at 0 -1.27 270) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 100nF (at 0 1.27 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1 0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1 0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_text user %R (at -0.01 0.01 270) (layer F.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075))) - ) - (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 45 "Net-(C12-Pad2)")) - (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 44 "Net-(C12-Pad1)")) + (fp_text reference "C7" (at 0 -1.27 270) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 939ba340-84b8-4763-b6dd-6edaeeb4ed31) + ) + (fp_text value "1µF" (at 0 1.27 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 7a932e12-fd55-4835-a134-a13fdb1d41fc) + ) + (fp_text user "${REFERENCE}" (at -0.01 0.01 270) (layer "F.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075))) + (tstamp 3e063dc6-aab6-419f-a31b-b7416504a4e3) + ) + (fp_line (start -1 -0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp f56b00bf-24e5-484f-88e7-0b1d81d2a1ab)) + (fp_line (start -1 -0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 32ed98f9-c881-48b3-b8b4-966289bf64de)) + (fp_line (start 1 0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9a84e8a7-6845-4f66-baac-175c3c6c259d)) + (fp_line (start 1 0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp b49205d8-181c-4f19-8c23-5a2a1e8267c2)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp aed5fb16-69c1-4e56-bcf2-d1417c3b84bf)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 966965a1-f0a9-4b58-95ce-9e8645ef1743)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 644244b8-05bf-4cfe-907c-4c1bbe2a0e40)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ef08a9c7-260a-4d4d-8230-3f6893895878)) + (pad "1" smd rect (at -0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp 1e0c6fd6-faa0-45b5-8668-0a69cff7f91d)) + (pad "2" smd rect (at 0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 80866be7-6637-4d12-a94e-5b167d20d73b)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer F.Cu) (tedit 5BE9A355) (tstamp 5AA689ED) - (at 39.4771 158.898 270) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689df) + (at 40.3407 158.898 -90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") - (path /5A8D21B0) + (path "/00000000-0000-0000-0000-00005a8d222a") (attr smd) - (fp_text reference C6 (at 0 -1.27 270) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 1µF (at 0 1.27 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1 0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1 0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_text user %R (at -0.01 0.01 270) (layer F.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075))) - ) - (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) + (fp_text reference "C5" (at 0 -1.27 270) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 490bebff-2320-429d-9e9a-357fa758142f) + ) + (fp_text value "1µF" (at 0 1.27 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 16fa7cfe-aa76-4251-ac75-01557297ccc6) + ) + (fp_text user "${REFERENCE}" (at -0.01 0.01 270) (layer "F.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075))) + (tstamp fcdbdbce-7527-4606-a281-ace07c8ba9ab) + ) + (fp_line (start -1 -0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp d7f9cda7-80ec-4a25-9a22-d4902bd5c9b1)) + (fp_line (start -1 -0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 1cb524bf-b126-40d8-ad5d-a08e45e0d885)) + (fp_line (start 1 0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp da4f0e0d-e6e3-4ece-832e-31c94d4b2a0e)) + (fp_line (start 1 0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 3ada7761-9609-4b23-a40c-f3d3891e8b80)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 116ed8cd-602d-48b5-9553-d30ad985ec9d)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 81eef262-ebd0-4ad6-94bf-fbabeadc72c8)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 48d645fb-cadc-4aba-b72c-ba19fbde4519)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 83bf72e4-9d77-480a-9636-135aaacf0a00)) + (pad "1" smd rect (at -0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp ebf7199f-49b6-4297-868e-2ead4e2fa898)) + (pad "2" smd rect (at 0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp eb57faa3-975c-4cd4-8094-05e28b8b5108)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer F.Cu) (tedit 5BE9A355) (tstamp 5AA689DF) - (at 40.3407 158.898 270) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689ed) + (at 39.4771 158.898 -90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") - (path /5A8D222A) + (path "/00000000-0000-0000-0000-00005a8d21b0") (attr smd) - (fp_text reference C5 (at 0 -1.27 270) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 1µF (at 0 1.27 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1 0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1 0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_text user %R (at -0.01 0.01 270) (layer F.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075))) - ) - (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) + (fp_text reference "C6" (at 0 -1.27 270) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 06e30c54-80af-4225-a55f-04d1afad2dbf) + ) + (fp_text value "1µF" (at 0 1.27 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 319669ff-4e0b-45c0-a137-f7fff3cfc653) + ) + (fp_text user "${REFERENCE}" (at -0.01 0.01 270) (layer "F.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075))) + (tstamp d15cb4d2-de8f-4427-b6df-ffc44be28b6f) + ) + (fp_line (start -1 -0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp eec70526-b3f1-4d8f-977a-548f8966dfc4)) + (fp_line (start -1 -0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 36fefa16-e061-4c34-b30f-b8ede9d29eaa)) + (fp_line (start 1 0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp a06bd2b0-d694-40ab-bb44-5f007e8dd248)) + (fp_line (start 1 0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 0880f60a-1988-47bb-9266-2cef80524185)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 756f4b41-caf8-4b1b-b948-a5cd7c81cb51)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 23e3148d-211b-49bb-bf5e-e7beff7271fe)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp fcb6f170-d581-4c0b-a249-67b1241aaed8)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp af3f3014-61a6-45c0-8221-6091f10fac9d)) + (pad "1" smd rect (at -0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp cf6d0a3a-3a4d-498b-a4bf-17f5328c3735)) + (pad "2" smd rect (at 0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp bac927cb-697e-4159-99c0-53fa0c0213d6)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer B.Cu) (tedit 5BE9A355) (tstamp 5AA689D1) - (at 41.217 148.357 180) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68a09) + (at 38.804 150.008 -90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") - (path /59F0A559) + (path "/00000000-0000-0000-0000-00005a8cb6fa") (attr smd) - (fp_text reference C1 (at 0 1.27 180) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 100nF (at 0 -1.27 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start 1 -0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1 -0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_text user %R (at -0.01 -0.01 180) (layer B.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) - ) - (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) + (fp_text reference "C9" (at 0 -1.27 270) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp a91c78df-096a-4b26-a170-bd647d94d3ac) + ) + (fp_text value "27pF" (at 0 1.27 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp b6b0a113-4760-4fa2-9f52-64c23a315aa2) + ) + (fp_text user "${REFERENCE}" (at -0.01 0.01 270) (layer "F.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075))) + (tstamp dc3aae98-5355-45e6-a436-f6fa24fff063) + ) + (fp_line (start -1 -0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 3604a46d-183c-47fe-91d2-c77a5fa6cf9d)) + (fp_line (start -1 -0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 31090ec8-6892-4837-b516-b0eeea149ea8)) + (fp_line (start 1 0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp a7eaf182-1146-48e7-bf11-aadbcd0af3a8)) + (fp_line (start 1 0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 7d7144f6-2f46-48cf-a284-b6a996e4c6ff)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp dbd706be-f1f3-408c-b0c3-7e77291d301d)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e0b65a71-d5da-4148-8749-9a7380b80c2c)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 24de37f5-6fcb-4875-b3eb-1e083afb7370)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 2dc680c0-9434-445a-b42a-29585932a1d9)) + (pad "1" smd rect (at -0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 51 "Net-(C9-Pad1)") (tstamp ed7f11a5-e8d3-4414-87d2-e4665750095d)) + (pad "2" smd rect (at 0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 4d514d29-f006-4adc-90e3-75a302980583)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer B.Cu) (tedit 5BE9A355) (tstamp 5AA689C3) - (at 39.82 156.993 180) - (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0402") - (path /59F0AA11) - (attr smd) - (fp_text reference C4 (at 0 1.27 180) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 1µF (at 0 -1.27 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start 1 -0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1 -0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_text user %R (at -0.01 -0.01 180) (layer B.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) - ) - (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (footprint "Common_Footprint:826926-6" locked (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005ab3fced) + (at 29.025 152.675 -90) + (path "/00000000-0000-0000-0000-000059ee159b") + (attr through_hole) + (fp_text reference "J5" (at -0.0508 0.0762 180) (layer "F.Fab") + (effects (font (size 0.75 0.75) (thickness 0.125))) + (tstamp 9c662474-5168-413e-831b-79f882b1502a) + ) + (fp_text value "Header6Contacts" (at 0 -2.54 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp 7bc51e28-9c17-43fc-821d-d8de3c9ca3e7) + ) + (fp_line (start -7.62 -1.25) (end 7.62 -1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 1a7645a5-e956-4135-9f5b-61b2945e6da6)) + (fp_line (start -7.62 1.25) (end -7.62 -1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 7303133e-0504-4460-80c2-b9ea198dce67)) + (fp_line (start 7.62 -1.25) (end 7.62 1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 54df31c7-776c-4f01-9d29-cfbca3105507)) + (fp_line (start 7.62 1.25) (end -7.62 1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp db8a7f82-1754-4d7c-94e4-8c848d72a435)) + (pad "1" thru_hole circle locked (at -6.35 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 25 "GND") (tstamp 1feea876-3e86-41d6-87c6-f7e0d070f650)) + (pad "2" thru_hole circle locked (at -3.81 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 40 "/RX/SDA/TIM2.4") (tstamp 51a7cfe2-5df1-49df-b70f-fd2a457489ff)) + (pad "3" thru_hole circle locked (at -1.27 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 39 "/TX/SCL/TIM2.3") (tstamp e86cf9b6-18bd-4d66-bce5-aad655c7ada7)) + (pad "4" thru_hole circle locked (at 1.27 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 38 "/TIM3.4") (tstamp 876413d8-ffd9-4647-8000-e135d592dc33)) + (pad "5" thru_hole circle locked (at 3.81 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 37 "/TIM3.3") (tstamp 8b2c2a78-fe45-4394-a358-b3bb87043d3c)) + (pad "6" thru_hole circle locked (at 6.35 0 270) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 36 "/TIM2.2/ADC1") (tstamp 5ddf475d-1352-4f29-882a-9d012ce286ce)) + (model "${KISYS3DMOD}/Connector_6cts-0826926-06-o-3d.step" + (offset (xyz 0 0 1.4)) (scale (xyz 1 1 1)) - (rotate (xyz -90 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer F.Cu) (tedit 5BE9A355) (tstamp 5AA689B5) - (at 38.6135 158.898 270) - (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0402") - (path /5A8CAABB) - (attr smd) - (fp_text reference C7 (at 0 -1.27 270) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 1µF (at 0 1.27 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1 0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1 0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end -1 0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1 -0.4) (end 1 -0.4) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_text user %R (at -0.01 0.01 270) (layer F.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075))) - ) - (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (footprint "Common_Footprint:826926-6" locked (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005ab3fcfa) + (at 46.805 152.675 90) + (path "/00000000-0000-0000-0000-000059ee15c1") + (attr through_hole) + (fp_text reference "J4" (at 0 0.0508) (layer "F.Fab") + (effects (font (size 0.75 0.75) (thickness 0.125))) + (tstamp f08845a9-1c66-41e0-98bb-68272bd1d124) + ) + (fp_text value "Header6Contacts" (at 0 -2.54 90) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.125))) + (tstamp 74b3eb45-2ad9-4589-903b-20203f3317c9) + ) + (fp_line (start -7.62 -1.25) (end 7.62 -1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp e68a4766-8014-448c-9642-d889b270b174)) + (fp_line (start -7.62 1.25) (end -7.62 -1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 4974f459-60e7-4fef-89d3-aa259485ce46)) + (fp_line (start 7.62 -1.25) (end 7.62 1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 4109706f-afc0-468f-ba69-c301f03b7b7c)) + (fp_line (start 7.62 1.25) (end -7.62 1.25) + (stroke (width 0.15) (type solid)) (layer "F.Fab") (tstamp 5a4aa623-e83d-4ec6-b02d-70e27a9c6354)) + (pad "1" thru_hole circle locked (at -6.35 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 35 "/TIM2.1/ADC0") (tstamp 9d8f5008-7401-4c82-9388-3f056bd7a782)) + (pad "2" thru_hole circle locked (at -3.81 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 34 "/MOSI/SD") (tstamp d8227695-ba09-4dfd-b200-b288481a60bd)) + (pad "3" thru_hole circle locked (at -1.27 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 33 "/MISO/MCK") (tstamp 47afb164-693a-410d-ab29-91ac6b1873bf)) + (pad "4" thru_hole circle locked (at 1.27 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 32 "/SCK/CK") (tstamp b0b74d45-2fa2-471d-b21f-be42af1739a1)) + (pad "5" thru_hole circle locked (at 3.81 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 28 "+3V3") (tstamp f0f6d2e9-9d2f-438d-9fd0-6ff8f9046b0c)) + (pad "6" thru_hole circle locked (at 6.35 0 90) (size 1.7 1.7) (drill 1) (layers "*.Cu" "*.Mask") + (net 29 "/Vin") (tstamp 0b7b00e1-9e06-4133-b4bc-f0258fe35ec6)) + (model "${KISYS3DMOD}/Connector_6cts-0826926-06-o-3d.step" + (offset (xyz 0 0 1.4)) (scale (xyz 1 1 1)) - (rotate (xyz -90 0 0)) + (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer B.Cu) (tedit 5BE9A355) (tstamp 5AA689A7) - (at 37.28 156.993) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005c64cb76) + (at 38.59572 156.22084 -90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") - (path /59F0B8BA) + (path "/00000000-0000-0000-0000-00005a8cff32") (attr smd) - (fp_text reference C3 (at 0 1.27) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 100nF (at 0 -1.27) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start 1 -0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1 -0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_text user %R (at -0.01 -0.01) (layer B.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) - ) - (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) + (fp_text reference "C12" (at 0 -1.27 270) (layer "F.SilkS") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 2eddf5bc-817f-4e2b-a5c6-52ccc6cb242d) + ) + (fp_text value "100nF" (at 0 1.27 270) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp be923bf8-04d7-480c-93e8-d2f621aea003) + ) + (fp_text user "${REFERENCE}" (at -0.01 0.01 270) (layer "F.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075))) + (tstamp a8c0d28e-acf4-4646-be60-1199e05b552a) + ) + (fp_line (start -1 -0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 725274bd-f039-49de-bd51-fdf63ea008f8)) + (fp_line (start -1 -0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 28af9265-d108-4670-9db4-2dbdf7b32002)) + (fp_line (start 1 0.4) (end -1 0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp de4efc47-ce84-47e1-97bd-b3fa8aecae4c)) + (fp_line (start 1 0.4) (end 1 -0.4) + (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 8643c69d-ed9b-4f00-bb5c-db0150085b83)) + (fp_line (start -0.5 -0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ed0d97bc-6581-4efc-b13c-8769f3fd78ca)) + (fp_line (start -0.5 0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 0f11fd0d-5fd1-479c-9f25-54fa313c098d)) + (fp_line (start 0.5 -0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp ec5454b3-9543-4bd6-839a-802c5f4aecf9)) + (fp_line (start 0.5 0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 1460ad04-af94-44dd-b288-52db8e6df2a6)) + (pad "1" smd rect (at -0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 44 "Net-(C12-Pad1)") (tstamp 2842d45e-5885-4a1e-8e04-afcd72c5dcc6)) + (pad "2" smd rect (at 0.55 0 270) (size 0.6 0.5) (layers "F.Cu" "F.Paste" "F.Mask") + (net 45 "Net-(C12-Pad2)") (tstamp 62a915a5-0fdb-4650-85c4-7730a5f1a8aa)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0402_NoSilk (layer B.Cu) (tedit 5BE9A355) (tstamp 5AA68999) - (at 42.233 156.993) - (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0402") - (path /59F0B866) - (attr smd) - (fp_text reference C2 (at 0 1.27) (layer B.SilkS) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 100nF (at 0 -1.27) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start 1 -0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start 1 -0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end -1 -0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -1 0.4) (end 1 0.4) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_text user %R (at -0.01 -0.01) (layer B.Fab) - (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) - ) - (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) - (net 28 +3V3)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" - (at (xyz 0 0 0)) + (footprint "Common_Footprint:S-PDSO-G10" (layer "F.Cu") + (tstamp 00000000-0000-0000-0000-00005c64d2b1) + (at 40.836 154.453) + (path "/00000000-0000-0000-0000-00005a8cf234") + (attr through_hole) + (fp_text reference "U3" (at -0.0508 -0.0508) (layer "F.Fab") + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 2ff73f26-fb55-4b00-94e3-5bbf4f5f761e) + ) + (fp_text value "TPS5401" (at 0 -3.6) (layer "F.Fab") hide + (effects (font (size 1 1) (thickness 0.15))) + (tstamp 334c8da3-d3d4-467c-a495-628c45e84555) + ) + (fp_line (start -1.45 -1.55) (end -1.45 1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 86db26d8-7521-47a3-be24-2565b14c79d7)) + (fp_line (start -1.45 1.55) (end -1.3 1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 92906df5-2d39-4bda-acb0-ef5b59a339fd)) + (fp_line (start -1.3 -1.55) (end -1.45 -1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 955be274-6f4a-4614-907f-c0e022eab0ee)) + (fp_line (start 1.3 1.55) (end 1.45 1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp d62c98ff-432c-4c89-b12d-6da76724dcbd)) + (fp_line (start 1.45 -1.55) (end 1.3 -1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 69bffb78-7a33-4d2e-9e51-0b6de5df07c0)) + (fp_line (start 1.45 1.55) (end 1.45 -1.55) + (stroke (width 0.125) (type solid)) (layer "F.SilkS") (tstamp 9aa0ed98-8c4f-4c87-9caf-7c34f7903ff5)) + (fp_circle (center -1 1) (end -0.9 1) + (stroke (width 0.125) (type solid)) (fill none) (layer "F.SilkS") (tstamp dda43290-612c-40b1-94c1-d7ad2b68e804)) + (fp_line (start -1.45 -1.55) (end -1.45 1.55) + (stroke (width 0.125) (type solid)) (layer "F.CrtYd") (tstamp a163f2b7-6280-4d2b-90a6-7f684e0aef38)) + (fp_line (start -1.45 1.55) (end 1.45 1.55) + (stroke (width 0.125) (type solid)) (layer "F.CrtYd") (tstamp 1f2d2d52-2b1e-4b94-a88f-aa56fec11827)) + (fp_line (start 1.45 -1.55) (end -1.45 -1.55) + (stroke (width 0.125) (type solid)) (layer "F.CrtYd") (tstamp a39e748d-cb22-4f60-85c6-40b16ef54f2d)) + (fp_line (start 1.45 1.55) (end 1.45 -1.55) + (stroke (width 0.125) (type solid)) (layer "F.CrtYd") (tstamp f4b93d00-a754-4373-aa8c-f8457730552c)) + (fp_line (start -1.397 -1.524) (end 1.397 -1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 424d5849-29d0-44d0-ba25-696c180b49ee)) + (fp_line (start -1.397 1.524) (end -1.397 -1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e2a30ac8-c218-4a44-b6e3-b926b4274ea3)) + (fp_line (start 1.397 -1.524) (end 1.397 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 7d1eebd2-f6fe-4955-a637-730b6f1be9a1)) + (fp_line (start 1.397 1.524) (end -1.397 1.524) + (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 837654e8-e408-4184-a954-fa8c9661d02c)) + (fp_circle (center -1.016 1.016) (end -0.889 1.016) + (stroke (width 0.1) (type solid)) (fill none) (layer "F.Fab") (tstamp 4b1ce7a6-edf3-4578-9fa6-1664caf3cc18)) + (pad "1" smd rect (at -1 2.1) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 45 "Net-(C12-Pad2)") (tstamp 6ccd1a3e-1d4c-4610-8fef-fec4d402338b)) + (pad "2" smd rect (at -0.5 2.1) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 29 "/Vin") (tstamp b3c3e406-9029-4719-bfa5-7df6f6b89cc4)) + (pad "3" smd rect (at 0 2.1) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 46 "Net-(R5-Pad2)") (tstamp 72431a2d-5160-451d-a25d-2f20b8cafdb1)) + (pad "4" smd rect (at 0.5 2.1) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 47 "Net-(C11-Pad1)") (tstamp 17422c9a-1eb7-400d-8ac2-d94ce584f992)) + (pad "5" smd rect (at 1 2.1) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 48 "Net-(R8-Pad1)") (tstamp 5256b833-5e75-4b01-9391-95dfe781d46a)) + (pad "6" smd rect (at 1 -2.1 180) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 49 "Net-(U3-Pad6)") (tstamp 9724cbb1-7024-496f-b1a8-d42514ef4f0d)) + (pad "7" smd rect (at 0.5 -2.1 180) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 50 "Net-(R10-Pad1)") (tstamp a74d23a0-1693-43e9-ace4-4bf8e34b9e80)) + (pad "8" smd rect (at 0 -2.1 180) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 51 "Net-(C9-Pad1)") (tstamp 4f302ee4-eaf3-4f92-aea4-c0ba3664f24a)) + (pad "9" smd rect (at -0.5 -2.1 180) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 8755844f-dba6-40da-b99b-a5491481cdc1)) + (pad "10" smd rect (at -1 -2.1 180) (size 0.3 1.6) (layers "F.Cu" "F.Paste" "F.Mask") + (net 44 "Net-(C12-Pad1)") (tstamp 457b06ef-b44e-43d0-bdd6-137745e8001c)) + (pad "11" smd rect (at 0 0 180) (size 1.88 1.57) (layers "F.Cu" "F.Paste" "F.Mask") + (net 25 "GND") (tstamp 71dd983c-4813-492b-8646-d81df56e1083)) + (model "${KISYS3DMOD}/DGQ (S-PDSO-G10).STEP" + (offset (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz -90 0 -90)) + ) + ) + + (footprint "Common_Footprint:MicroUSB_B" locked (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-000059ee9c4b) + (at 37.9 137.25) + (path "/00000000-0000-0000-0000-000059ee0192") + (attr through_hole) + (fp_text reference "J3" (at 0.015 0.185) (layer "B.Fab") + (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) + (tstamp 3289ccab-cad7-482a-8dec-2473d4fcb152) + ) + (fp_text value "µUSB_B" (at 0.5 4.5) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.125)) (justify mirror)) + (tstamp b855085e-c0d9-48b1-bfda-19010335640f) + ) + (fp_line (start 4.15 -1.45) (end -4.15 -1.45) + (stroke (width 0.1) (type solid)) (layer "B.SilkS") (tstamp 117691ff-1bf2-4743-bd01-33d13911edb7)) + (fp_line (start -3.175 -3.175) (end -3.175 2.54) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 4394a972-89fe-4a81-90bb-52b7d752ae7e)) + (fp_line (start -3.175 2.54) (end 3.175 2.54) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 40c8ab91-44eb-4981-8bc9-e741b6f94cb1)) + (fp_line (start 3.175 -3.175) (end -3.175 -3.175) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 9ee5b4e6-98b5-4215-997b-40ebd085f765)) + (fp_line (start 3.175 2.54) (end 3.175 -3.175) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 186e59e0-fb12-45dd-adcf-ca71d02364d9)) + (pad "1" smd rect locked (at -1.3 2.675) (size 0.4 1.35) (layers "B.Cu" "B.Paste" "B.Mask") + (net 42 "+5VP") (tstamp dfc8a353-2415-4d57-9775-cd12aa7e9e9d)) + (pad "2" smd rect locked (at -0.65 2.675) (size 0.4 1.35) (layers "B.Cu" "B.Paste" "B.Mask") + (net 30 "/D-") (tstamp d3df3629-8e13-4de2-b5a3-71be81335935)) + (pad "3" smd rect locked (at 0 2.675) (size 0.4 1.35) (layers "B.Cu" "B.Paste" "B.Mask") + (net 31 "/D+") (tstamp 0ad84dd3-e207-4ed8-98bf-c1edc13b9bfa)) + (pad "4" smd rect locked (at 0.65 2.675) (size 0.4 1.35) (layers "B.Cu" "B.Paste" "B.Mask") + (net 18 "Net-(J3-Pad4)") (tstamp 2b23c17a-f2a6-425c-9c98-889b01374a43)) + (pad "5" smd rect locked (at -3.8 0) (size 1.8 1.9) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp f9d2e3cf-9913-4b51-abd9-4b1545314cad)) + (pad "5" smd rect locked (at -3.1 2.55) (size 2.1 1.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 9389ef82-5acb-4f89-9606-1dcd590662d8)) + (pad "5" smd rect locked (at -1.2 0) (size 1.9 1.9) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 909159cb-90bd-42b2-a247-35742a482f1e)) + (pad "5" smd rect locked (at 1.2 0) (size 1.9 1.9) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp fecb5ef1-a29c-482c-a1ef-e909916d99ab)) + (pad "5" smd rect locked (at 1.3 2.675) (size 0.4 1.35) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp dc07242f-0b92-4bf9-b9bf-6c67964e761d)) + (pad "5" smd rect locked (at 3.1 2.55) (size 2.1 1.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 024c85e3-9fdf-4cb2-bd98-881561d01b0f)) + (pad "5" smd rect locked (at 3.8 0) (size 1.8 1.9) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp de6880f0-7ba6-4ee1-85b3-1bf49dfcd45e)) + (model "${KISYS3DMOD}/MicroUSB_B_10118192C.stp" + (offset (xyz -97.99999853 3.124999953 -0.3499999947)) (scale (xyz 1 1 1)) (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:C_0603 (layer F.Cu) (tedit 5D513C21) (tstamp 5AA68979) - (at 43.58428 158.22236) - (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") - (tags "capacitor 0603") - (path /5A8CF5E6) + (footprint "TO_SOT_Packages_SMD:SOT-323_SC-70" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-000059f07447) + (at 43.4014 151.024 90) + (descr "SOT-323, SC-70") + (tags "SOT-323 SC-70") + (path "/00000000-0000-0000-0000-000059f1661e") (attr smd) - (fp_text reference C11 (at -0.025 0 90) (layer F.SilkS) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_text value 6.8nF (at 0 1.5) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.125))) - ) - (fp_line (start 1.4 0.65) (end -1.4 0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1.4 0.65) (end 1.4 -0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.4 -0.65) (end -1.4 0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.4 -0.65) (end 1.4 -0.65) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.12)) - (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.12)) - (fp_line (start -0.8 -0.4) (end 0.8 -0.4) (layer F.Fab) (width 0.1)) - (fp_line (start 0.8 -0.4) (end 0.8 0.4) (layer F.Fab) (width 0.1)) - (fp_line (start 0.8 0.4) (end -0.8 0.4) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 0.4) (end -0.8 -0.4) (layer F.Fab) (width 0.1)) - (fp_text user %R (at 0 0) (layer F.Fab) - (effects (font (size 0.4 0.4) (thickness 0.1))) - ) - (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) - (net 47 "Net-(C11-Pad1)")) - (model "${KISYS3DMOD}/0603 SMD Capacitor.step" - (at (xyz 0 0 0)) + (fp_text reference "Q1" (at -0.05 1.95 90) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 72ba5212-aea0-43ea-985d-84320e304920) + ) + (fp_text value "BC846BWT1G" (at -0.05 -2.05 90) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 5f9897ed-5927-4805-a92d-1cdcf7a2fb48) + ) + (fp_text user "${REFERENCE}" (at 0 0) (layer "B.Fab") + (effects (font (size 0.5 0.5) (thickness 0.075)) (justify mirror)) + (tstamp 10a0ef1b-79fe-406d-9d81-0b3641fb21c0) + ) + (fp_line (start -0.68 -1.16) (end 0.73 -1.16) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp d5e6f0e7-44cb-4e17-a4c5-01a68f6fe10c)) + (fp_line (start 0.73 -0.5) (end 0.73 -1.16) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 04b2d1bf-3504-4b0e-b3dc-66999561420b)) + (fp_line (start 0.73 1.16) (end -1.3 1.16) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 1c58a8b0-22ed-4c54-8c69-e728a7a0d307)) + (fp_line (start 0.73 1.16) (end 0.73 0.5) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 97be4497-54cf-4eed-aa00-b314428ee0fc)) + (fp_line (start -1.7 -1.3) (end -1.7 1.3) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 9e9c3c51-9599-4585-937c-342df4c27094)) + (fp_line (start -1.7 1.3) (end 1.7 1.3) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 6df98379-29aa-4c48-9ac5-a7137b694adb)) + (fp_line (start 1.7 -1.3) (end -1.7 -1.3) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp dc74c719-4d6d-47dc-8d66-c52625f6956f)) + (fp_line (start 1.7 1.3) (end 1.7 -1.3) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 5e270670-3216-4a3d-8657-c038bc01917e)) + (fp_line (start -0.68 0.6) (end -0.68 -1.1) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 41997e61-60f3-4bb9-b017-eccd1c8e4362)) + (fp_line (start -0.18 1.1) (end -0.68 0.6) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp ab254117-2863-4c6d-bedf-71773f31f779)) + (fp_line (start 0.67 -1.1) (end -0.68 -1.1) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 0ec4a431-d526-47d2-bada-d3bbf8cb4a2d)) + (fp_line (start 0.67 1.1) (end -0.18 1.1) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp c514349e-2df2-4555-b67d-98a82fa55809)) + (fp_line (start 0.67 1.1) (end 0.67 -1.1) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp ab7f5d62-1126-47ec-92fe-7727b43dc9de)) + (pad "1" smd rect (at -1 0.65 180) (size 0.45 0.7) (layers "B.Cu" "B.Paste" "B.Mask") + (net 43 "Net-(Q1-Pad1)") (tstamp 1d68c9fc-56fd-49db-840c-8409c40dc610)) + (pad "2" smd rect (at -1 -0.65 180) (size 0.45 0.7) (layers "B.Cu" "B.Paste" "B.Mask") + (net 41 "/BOOT0") (tstamp 4c05af73-e2fc-4989-9e1a-137babec3eda)) + (pad "3" smd rect (at 1 0 180) (size 0.45 0.7) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 6089c6c7-ead5-4877-aa16-6d877750d129)) + (model "${KISYS3DMOD}/TO_SOT_Packages_SMD.3dshapes/SOT-323_SC-70.wrl" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA68928) - (at 41.80628 159.44664) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8CAD69) + (footprint "Common_Footprint:D_SOD-323F" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005a8c4c13) + (at 40.709 146.579 180) + (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") + (tags "SOD-323F") + (path "/00000000-0000-0000-0000-000059f162f9") (attr smd) - (fp_text reference R5 (at 0 -1.2) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 105K (at 0 1.25) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 46 "Net-(R5-Pad2)")) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "D1" (at 0 1.85 180) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp c4633e46-e228-4d79-8484-92f081650859) + ) + (fp_text value "NSR0340HT1G" (at 0.1 -1.9 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp a7e72058-4d57-40a5-970b-2c7d2add0e12) + ) + (fp_text user "${REFERENCE}" (at 0 1.016 180) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp cca63e9a-2235-4270-9b39-568b0652afea) + ) + (fp_line (start -1.5 -0.85) (end 1.05 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp f08d3aa9-7ece-4371-b5cf-1afd1b0625b2)) + (fp_line (start -1.5 0.85) (end -1.5 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp f37ffccf-8437-449d-8902-a8a36e4883f7)) + (fp_line (start -1.5 0.85) (end 1.05 0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 92872560-f6fe-49b2-9aa4-8488bbea1993)) + (fp_line (start -1.6 -0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 14288d19-efaf-45df-963f-2af9ce853bf3)) + (fp_line (start -1.6 0.95) (end -1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 39830262-a730-413f-94cf-be9a98de9654)) + (fp_line (start -1.6 0.95) (end 1.6 0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp a77019f9-1df1-4eb8-ab65-fbb1087e71e0)) + (fp_line (start 1.6 0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 53517ef6-cf91-44e9-9ddb-ffabe9e048c2)) + (fp_line (start -0.9 -0.7) (end -0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 55af6360-4143-498c-bc23-b99517843796)) + (fp_line (start -0.9 0.7) (end 0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 1cd114e3-de8d-4c93-9cc7-e169efec8c85)) + (fp_line (start -0.3 0) (end -0.5 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 5280b7f0-b120-4520-aaae-8bd3c98b4016)) + (fp_line (start -0.3 0) (end 0.2 0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 651d1a0a-a213-4e64-b04d-19edc8c3c9fd)) + (fp_line (start -0.3 0.35) (end -0.3 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a0f892ee-0b3e-46df-9c80-91f32bc7c1ae)) + (fp_line (start 0.2 -0.35) (end -0.3 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 1a6bde32-f5c0-4fbd-9243-0dc633a0208b)) + (fp_line (start 0.2 0) (end 0.45 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d3617881-cd6a-4fa0-b42d-ab916b506a08)) + (fp_line (start 0.2 0.35) (end 0.2 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp bbac5000-b5c5-46f1-8781-cff782157986)) + (fp_line (start 0.9 -0.7) (end -0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d9341eb4-fccf-4437-97c7-a3d81ae5c80d)) + (fp_line (start 0.9 0.7) (end 0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp f8d73b50-f42d-4395-9f98-cdb920ce0898)) + (pad "1" smd rect (at -1.1 0 180) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 29 "/Vin") (tstamp d834dedd-4c7d-40b6-9fda-52afedebe719)) + (pad "2" smd rect (at 1.1 0 180) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 42 "+5VP") (tstamp b3a03d51-e507-498b-aed8-29023de87d0f)) + (model "${KISYS3DMOD}/SOD-323F.STEP" + (offset (xyz -1.099999983 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA6891A) - (at 42.614 151.913 270) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8D2812) - (attr smd) - (fp_text reference R10 (at 0 -1.2 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 10K (at 0 1.25 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 50 "Net-(R10-Pad1)")) - (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (footprint "Common_Footprint:UFQFPN48" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa6883e) + (at 37.915 152.675 90) + (path "/00000000-0000-0000-0000-000059ee01e5") + (attr through_hole) + (fp_text reference "U2" (at 0.0508 0.0254 180) (layer "B.Fab") + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp eddcb7a5-cbf2-4609-b1fd-674933f38385) + ) + (fp_text value "STM32F072CBU" (at 0.2 4.6 90) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 2543b8f3-67d8-4889-b83d-2e4d7bb44c69) + ) + (fp_line (start -2.8 -2.8) (end -2.8 2.8) + (stroke (width 0.15) (type solid)) (layer "B.SilkS") (tstamp 5cfa240b-49b4-442f-beec-6e1968eeaba4)) + (fp_line (start -2.8 2.8) (end 2.8 2.8) + (stroke (width 0.15) (type solid)) (layer "B.SilkS") (tstamp 0f209bec-31e4-454d-9f8a-dd0448cc9434)) + (fp_line (start 2.8 -2.8) (end -2.8 -2.8) + (stroke (width 0.15) (type solid)) (layer "B.SilkS") (tstamp 4696020c-fa5f-496c-8354-da6197e09d39)) + (fp_line (start 2.8 2.8) (end 2.8 -2.8) + (stroke (width 0.15) (type solid)) (layer "B.SilkS") (tstamp 326aa5ff-6c1e-4d12-8145-a7b14a66d5c2)) + (fp_circle (center -2.3 2.3) (end -2.1 2.2) + (stroke (width 0.15) (type solid)) (fill none) (layer "B.SilkS") (tstamp 9278a27f-af56-413c-9688-00d57d229a84)) + (fp_line (start -3.302 -3.302) (end -3.302 3.302) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp b62df093-3c1e-4709-b13c-e326c36810f7)) + (fp_line (start -3.302 3.302) (end 3.302 3.302) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 67fe6cdc-ff74-49a6-ad9e-3175ae42d666)) + (fp_line (start 3.302 -3.302) (end -3.302 -3.302) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp cb0cf1e9-d436-4467-bcf5-85f3ac9843ae)) + (fp_line (start 3.302 3.302) (end 3.302 -3.302) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 3cbef0e7-d860-4754-85dc-96bad529a324)) + (fp_circle (center -2.794 2.794) (end -2.54 2.794) + (stroke (width 0.1) (type solid)) (fill none) (layer "B.Fab") (tstamp 98701738-6701-4e82-b8fe-60082ed220bb)) + (pad "0" smd rect (at 0 0 90) (size 5.6 5.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 4f9faadb-5ae0-4fb8-b78a-51c1f56cb087)) + (pad "1" smd rect (at -3.375 2.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 397f221f-0c76-496a-a453-2b8aa008cd36)) + (pad "2" smd rect (at -3.375 2.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 1 "Net-(U2-Pad2)") (tstamp 4d082143-f07f-4bc3-a80c-cf27f834546c)) + (pad "3" smd rect (at -3.375 1.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 2 "Net-(U2-Pad3)") (tstamp a8c973ce-2e92-41d7-aed6-19d1aafc7016)) + (pad "4" smd rect (at -3.375 1.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 3 "Net-(U2-Pad4)") (tstamp 4fa39199-8202-4549-9072-2b2bc292dff5)) + (pad "5" smd rect (at -3.375 0.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 4 "Net-(U2-Pad5)") (tstamp a15131c9-8341-40e4-a607-ce70933298b1)) + (pad "6" smd rect (at -3.375 0.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 5 "Net-(U2-Pad6)") (tstamp bc8a5bdb-e7ea-43c5-a206-6302f3979e47)) + (pad "7" smd rect (at -3.375 -0.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 6 "Net-(U2-Pad7)") (tstamp ad27df71-ba41-429a-a66e-899b56f68e47)) + (pad "8" smd rect (at -3.375 -0.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp b0ea7a9f-68c0-44cf-a94c-18cd7a2ba2ea)) + (pad "9" smd rect (at -3.375 -1.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 79c40a2a-d0dc-4ef2-88ed-470182b7ea1b)) + (pad "10" smd rect (at -3.375 -1.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 35 "/TIM2.1/ADC0") (tstamp 16c1584c-3f20-4ce1-b7df-a7e4f7e9b043)) + (pad "11" smd rect (at -3.375 -2.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 36 "/TIM2.2/ADC1") (tstamp 38c9f45b-983c-4249-9fd4-a1dab110e539)) + (pad "12" smd rect (at -3.375 -2.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 55 "Net-(R11-Pad2)") (tstamp da621e67-cbbb-4be6-8312-95d8f821e3a0)) + (pad "13" smd rect (at -2.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 57 "Net-(R13-Pad2)") (tstamp f6acd47a-eb71-4fb5-a37f-88dbe529726a)) + (pad "14" smd rect (at -2.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 7 "Net-(U2-Pad14)") (tstamp e25a9096-8152-405e-9906-a1593da824e4)) + (pad "15" smd rect (at -1.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 53 "/RS485_LVL_DOWN") (tstamp 3e0ec0e2-5a1b-411c-ae2a-89862421721a)) + (pad "16" smd rect (at -1.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 54 "/RS485_LVL_UP") (tstamp 1f5c2108-a970-4487-bc5a-57b31b27c081)) + (pad "17" smd rect (at -0.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 8 "Net-(U2-Pad17)") (tstamp 161f269a-60eb-402d-bf23-98ce49684e98)) + (pad "18" smd rect (at -0.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 37 "/TIM3.3") (tstamp 5881f9d4-8115-4bc2-afc1-2d7b2732b84e)) + (pad "19" smd rect (at 0.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 38 "/TIM3.4") (tstamp af00fb89-4ed6-40c5-b4bb-6aeebe96e032)) + (pad "20" smd rect (at 0.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 9 "Net-(U2-Pad20)") (tstamp b77dd831-00e0-451d-9a2f-27e548d3b3f9)) + (pad "21" smd rect (at 1.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 39 "/TX/SCL/TIM2.3") (tstamp dc4d9257-6d9c-4849-aeae-34decd132253)) + (pad "22" smd rect (at 1.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 40 "/RX/SDA/TIM2.4") (tstamp 3151e9cc-ffd5-492f-b0e5-1790f14f35d0)) + (pad "23" smd rect (at 2.25 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp c95eb9a5-1065-4942-9387-3abede88fc38)) + (pad "24" smd rect (at 2.75 -3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp dc9ee445-662e-4cc9-98b5-9a6ef1a65556)) + (pad "25" smd rect (at 3.375 -2.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 10 "Net-(U2-Pad25)") (tstamp 975df5e7-5c2e-40f6-99cf-61157db54507)) + (pad "26" smd rect (at 3.375 -2.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 23 "/PTPB") (tstamp e64dcf3b-22f3-449f-b80c-b625b623fb16)) + (pad "27" smd rect (at 3.375 -1.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 24 "/RE") (tstamp 2ac12e1a-b301-44d9-a17d-6ce26e9db1a2)) + (pad "28" smd rect (at 3.375 -1.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 20 "/DE") (tstamp 9cc6d9f6-0399-4811-bf99-2b807446a632)) + (pad "29" smd rect (at 3.375 -0.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 21 "/PTPA") (tstamp 1e06043b-25bc-441f-9653-5453bec167f4)) + (pad "30" smd rect (at 3.375 -0.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 22 "/TxD") (tstamp 270e331d-a947-4f69-910c-055669651256)) + (pad "31" smd rect (at 3.375 0.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 19 "/RxD") (tstamp 2e2e181e-18d9-4d36-b60e-70c0ebb09b95)) + (pad "32" smd rect (at 3.375 0.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 30 "/D-") (tstamp 697f92ff-9fa1-4b91-9a97-eeabd08dd927)) + (pad "33" smd rect (at 3.375 1.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 31 "/D+") (tstamp 8ea4be87-d69a-40e0-88ce-5ebebb128d3a)) + (pad "34" smd rect (at 3.375 1.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 11 "Net-(U2-Pad34)") (tstamp 27a0339b-b8a7-4b42-bd70-8a0eff393bb0)) + (pad "35" smd rect (at 3.375 2.25 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 2dec5ef2-82d7-432b-a0c6-9434b59a3ceb)) + (pad "36" smd rect (at 3.375 2.75 90) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 8ad2dc7d-60e3-4f31-a073-0368875058a2)) + (pad "37" smd rect (at 2.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 12 "Net-(U2-Pad37)") (tstamp b707096d-9475-49e7-ac8b-84609427ed3c)) + (pad "38" smd rect (at 2.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 13 "Net-(U2-Pad38)") (tstamp 0c463b63-d008-4598-935e-125f3beb3b46)) + (pad "39" smd rect (at 1.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 32 "/SCK/CK") (tstamp ccde7b17-3ca9-4aef-990f-2fcbecff439b)) + (pad "40" smd rect (at 1.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 33 "/MISO/MCK") (tstamp 1a4cd5e9-8cc4-4b80-aa31-21e701d71f8e)) + (pad "41" smd rect (at 0.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 34 "/MOSI/SD") (tstamp 8ffa37e6-e9ec-4a61-aa55-d933b028d930)) + (pad "42" smd rect (at 0.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 14 "Net-(U2-Pad42)") (tstamp 816a7364-d660-4ab2-9fb2-d27d425b2aef)) + (pad "43" smd rect (at -0.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 15 "Net-(U2-Pad43)") (tstamp fbea6eb8-e79a-4dcc-bf25-d048dc6346e1)) + (pad "44" smd rect (at -0.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 41 "/BOOT0") (tstamp 7775d2a5-2d5a-485f-9abe-391b623d5960)) + (pad "45" smd rect (at -1.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 16 "Net-(U2-Pad45)") (tstamp 87eb690c-d597-462e-8b19-e82b51a7fcc6)) + (pad "46" smd rect (at -1.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 17 "Net-(U2-Pad46)") (tstamp 224b8bcc-2fb4-49b9-bee6-b3b6c95e3f41)) + (pad "47" smd rect (at -2.25 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp b285da8e-a8d2-4375-b5d0-30ade0617433)) + (pad "48" smd rect (at -2.75 3.375) (size 0.55 0.3) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 7ccb300a-50d3-45e3-9b69-5c9c56368fd0)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/UFQFPN48.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz 0 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer B.Cu) (tedit 5BE5A55C) (tstamp 5AA68919) - (at 32.8985 157.0438) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688e1) + (at 42.36 153.8688 -90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /5A9F2F8A) + (path "/00000000-0000-0000-0000-000059f171e2") (attr smd) - (fp_text reference R13 (at 0 1.2) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 82 (at 0 -1.25) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.8 0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 56 "Net-(D3-Pad1)")) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 57 "Net-(R13-Pad2)")) + (fp_text reference "R2" (at 0 1.2 270) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 96310ec3-78bb-4dae-93d3-58b2c5d07f14) + ) + (fp_text value "510" (at 0 -1.25 270) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp bb6fc241-0f20-4eca-864e-cfa7d4d91625) + ) + (fp_line (start -0.8 0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 9666f821-b33d-4d57-96d7-286fa7dbe38c)) + (fp_line (start -0.8 0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp cf0e3efd-10e8-4c97-b57b-4fdf05a43277)) + (fp_line (start 0.8 -0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 058ae535-6f4e-4cce-8ccf-2859842573d7)) + (fp_line (start 0.8 -0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 803d3765-9a55-4d80-8b7a-3f469f3f3c21)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a636fd48-62ac-4fcb-a4b5-61b319a93ed3)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 2edd5db2-9474-49db-910a-0db8b187e502)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 52e51add-53bd-4cd2-9022-b078a3021458)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 08fb87a6-ef7c-405c-bbd8-fb2ecee248ac)) + (pad "1" smd rect (at -0.45 0 270) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 41 "/BOOT0") (tstamp 14091643-7d2a-4dbb-a3a2-6223eb9e9338)) + (pad "2" smd rect (at 0.45 0 270) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp de2b1731-5f92-42e9-8cea-40dc4a756a98)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA688FD) - (at 32.455 157.695 90) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa688ef) + (at 44.3666 147.595 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /5A8E63C5) + (path "/00000000-0000-0000-0000-000059f19ffc") (attr smd) - (fp_text reference R11 (at 0 -1.2 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 68K (at 0 1.25 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 29 /Vin)) - (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 55 "Net-(R11-Pad2)")) + (fp_text reference "R1" (at 0 1.2 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp c33e8cc5-ea9d-4588-9e0a-1f7f07a286ab) + ) + (fp_text value "10K" (at 0 -1.25 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 44a4e70c-9339-4d96-a0c9-abb9e6a22be8) + ) + (fp_line (start -0.8 0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp a9a848f3-55e6-480a-8b05-142f8180a453)) + (fp_line (start -0.8 0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 761889a0-50ae-4245-93fb-ff78cb68cfbc)) + (fp_line (start 0.8 -0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp ebec7b50-322c-4799-a319-5b3447410fd6)) + (fp_line (start 0.8 -0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 1c1d4827-537b-4af9-919d-bb6a4a49a54c)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 9a541f65-b600-46d5-bf5e-58fc39a71249)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp f7905114-b8ef-4c27-8563-804042c3c96b)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a2d5ea0b-69e7-4d03-9b90-4b9707b47d0a)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp c44bd448-40ab-432d-a796-d21b3ee6ddad)) + (pad "1" smd rect (at -0.45 0 180) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 43 "Net-(Q1-Pad1)") (tstamp f49d61eb-a26e-4ff1-8b90-b4e1746b74f8)) + (pad "2" smd rect (at 0.45 0 180) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 42 "+5VP") (tstamp 7ee342aa-5d47-4358-9c59-c1efca5b24b8)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer B.Cu) (tedit 5BE5A55C) (tstamp 5AA688EF) - (at 44.3666 147.595 180) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68919) + (at 32.8985 157.0438) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /59F19FFC) + (path "/00000000-0000-0000-0000-00005a9f2f8a") (attr smd) - (fp_text reference R1 (at 0 1.2 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 10K (at 0 -1.25 180) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.8 0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 43 "Net-(Q1-Pad1)")) - (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 42 +5VP)) + (fp_text reference "R13" (at 0 1.2) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 4aa6b114-809a-4c25-8bcb-e536f7c74650) + ) + (fp_text value "82" (at 0 -1.25) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 1365082d-9bd7-4885-be01-f2a02ad2c185) + ) + (fp_line (start -0.8 0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 827a2083-c977-46c4-8fb1-37e9c103a945)) + (fp_line (start -0.8 0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 3fbf03f8-3d52-4a14-8ac1-c963b2a332af)) + (fp_line (start 0.8 -0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 8d9292c4-1a2f-4ecb-8df3-ac8a7597e685)) + (fp_line (start 0.8 -0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 20e3644a-b14f-407b-88fc-bb0b0c0ddc82)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp dc70b80d-1411-4bb0-915d-a8d73712f96c)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 2f57be63-f5d0-4c1e-aead-212b7b4f7e38)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp fad2a0e2-281a-4c49-aaa1-1704c0c55ff5)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 68e5ec82-b5a5-4ba1-a153-2bc28a81615f)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 56 "Net-(D3-Pad1)") (tstamp 1637c943-c79c-4d78-99d1-be9048e58c86)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 57 "Net-(R13-Pad2)") (tstamp 90ba0d89-a05a-4c88-8596-0cb2561c69a6)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer B.Cu) (tedit 5BE5A55C) (tstamp 5AA688E1) - (at 42.36 153.8688 270) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /59F171E2) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68999) + (at 42.233 156.993) + (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0402") + (path "/00000000-0000-0000-0000-000059f0b866") (attr smd) - (fp_text reference R2 (at 0 1.2 270) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_text value 510 (at 0 -1.25 270) (layer B.Fab) hide - (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) - ) - (fp_line (start -0.5 -0.25) (end -0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end -0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end 0.5 -0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.5 0.25) (end 0.5 0.25) (layer B.Fab) (width 0.1)) - (fp_line (start -0.8 0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start -0.8 0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end 0.8 0.45) (layer B.CrtYd) (width 0.05)) - (fp_line (start 0.8 -0.45) (end -0.8 -0.45) (layer B.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 41 /BOOT0)) - (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) - (net 25 GND)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "C2" (at 0 1.27) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 7b4ba755-90c7-4175-b128-5da22dc7a1ae) + ) + (fp_text value "100nF" (at 0 -1.27) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp abcb8226-e5c6-4b22-acc0-1385d5b5e31b) + ) + (fp_text user "${REFERENCE}" (at -0.01 -0.01) (layer "B.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) + (tstamp a3018411-93f6-42b3-aaab-ebc82246ea89) + ) + (fp_line (start -1 0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp f79db54e-01cf-4840-a65c-6a1163d69688)) + (fp_line (start -1 0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp dd09993b-7ac8-4463-932a-d62e976640b0)) + (fp_line (start 1 -0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 6dc14c0c-d901-4b0a-a531-8e39ac93ff80)) + (fp_line (start 1 -0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 43fac400-db49-47cf-8b17-8f785d98d503)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp b1838109-3851-4147-91f9-66a888ba1c2d)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 3e5233f9-21a4-4b8e-8e73-003c014044db)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 06ac25ad-cb5b-4f39-984f-45763f6fc83f)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 94a2cbd9-3c8d-415b-b616-2222a86c2b60)) + (pad "1" smd rect (at -0.55 0) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 4c1d2f71-c8b5-4376-8632-d79c1fd70be1)) + (pad "2" smd rect (at 0.55 0) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp a06393df-9aa2-4d4f-ae82-b44d47e30d6d)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA688D3) - (at 33.7494 153.7545 90) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /59EF52F6) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689a7) + (at 37.28 156.993) + (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0402") + (path "/00000000-0000-0000-0000-000059f0b8ba") (attr smd) - (fp_text reference R3 (at 0 -1.2 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 10K (at 0 1.25 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 53 /RS485_LVL_DOWN)) - (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 27 /B_RS_485_P)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "C3" (at 0 1.27) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp f09c415f-e7e7-4fa7-a06e-62ddd7046a3f) + ) + (fp_text value "100nF" (at 0 -1.27) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp dab60fd8-840b-41e0-9cf0-d642ee9a2fb9) + ) + (fp_text user "${REFERENCE}" (at -0.01 -0.01) (layer "B.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) + (tstamp 2fc3fad2-6d69-4e19-9cb3-8f4e1fabb894) + ) + (fp_line (start -1 0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 29557aa0-139a-4ca7-a054-a59ee67aeb04)) + (fp_line (start -1 0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp f8362edc-6b2d-404f-bfaa-2ee96c853344)) + (fp_line (start 1 -0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp c8d9a0b0-4d4b-463b-98cd-547afa95a995)) + (fp_line (start 1 -0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 01356c04-baff-4a32-85cb-72f00955d1ba)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 80e4555f-213b-48a1-9646-4cc0ea27464c)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp c5631693-8be3-4a20-ab25-04a41af9003d)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 6cc683fa-3cef-496c-b7e8-282292a98411)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 92e5c9bc-47b6-4f2a-9859-96f580ccec37)) + (pad "1" smd rect (at -0.55 0) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp ff5f7ea3-5c2a-473d-86a1-f1ce5cf56ca6)) + (pad "2" smd rect (at 0.55 0) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 5b80d142-2af9-495d-a27f-671aaf86833b)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA688C5) - (at 43.47252 159.44664) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8CB0EC) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689c3) + (at 39.82 156.993 180) + (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0402") + (path "/00000000-0000-0000-0000-000059f0aa11") (attr smd) - (fp_text reference R6 (at 0 -1.2) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 68.1K (at 0 1.25) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 46 "Net-(R5-Pad2)")) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "C4" (at 0 1.27 180) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp f5d01e55-6824-44e1-9ea2-2f82f107cf39) + ) + (fp_text value "1µF" (at 0 -1.27 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 84624524-4515-41cc-861a-2b1f48f4215a) + ) + (fp_text user "${REFERENCE}" (at -0.01 -0.01 180) (layer "B.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) + (tstamp 9d2bbe2d-a79b-4a01-9a28-3346990fde8a) + ) + (fp_line (start -1 0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 7342c4cb-a037-4aed-ba1e-b99d50deee0c)) + (fp_line (start -1 0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 04d14880-b294-48ba-8a1e-92c70f10f4e9)) + (fp_line (start 1 -0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 39985118-1ff0-4289-bb95-7a5371cbdf82)) + (fp_line (start 1 -0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp e3d2b104-1501-4d37-b08f-73f154441f00)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp e867798b-76d3-4b89-a298-1141fa6e9306)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 54b6faa8-2059-40eb-8a80-a8e4e2bf60f7)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a64cd242-ff03-4718-816a-979d670ee4e1)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp b45e67c8-1ebe-4583-ad0b-c5bc761bbbc1)) + (pad "1" smd rect (at -0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp d0179b9e-9918-422b-a7f0-1d9575888269)) + (pad "2" smd rect (at 0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp edcdaf9e-54d1-4993-95af-7060ae6b89c3)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA688B7) - (at 40.78012 148.54496) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8CBD9B) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa689d1) + (at 41.217 148.357 180) + (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0402") + (path "/00000000-0000-0000-0000-000059f0a559") (attr smd) - (fp_text reference R7 (at 0 -1.2) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 150K (at 0 1.25) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 51 "Net-(C9-Pad1)")) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 52 "Net-(C10-Pad1)")) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "C1" (at 0 1.27 180) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 9919d062-faa9-4951-953e-8a4b56f39636) + ) + (fp_text value "100nF" (at 0 -1.27 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 9aa84e27-12bd-49b9-8fd7-04b690ead43e) + ) + (fp_text user "${REFERENCE}" (at -0.01 -0.01 180) (layer "B.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) + (tstamp 1a8fae41-3f32-48e0-a57f-d4008d56a400) + ) + (fp_line (start -1 0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 72c31912-62c0-4f4f-893d-921bf51a9589)) + (fp_line (start -1 0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp ed67ce51-7237-45d1-a285-86e9d55307ac)) + (fp_line (start 1 -0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 2f499d41-6695-47e9-b231-7f43b877da62)) + (fp_line (start 1 -0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp d6b8d898-cd12-48db-b1c1-4e72a88193cf)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a8ce8e81-2b56-4fe7-a0ad-67150ce35379)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp fdef41bf-dca4-4bef-86f4-d0349e0cb953)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp c7863a7f-a9e8-420a-86dc-f1c79f456083)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 33880df9-5c4a-47a6-ac22-c0eb32c04678)) + (pad "1" smd rect (at -0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 674e7c2f-4dcc-4722-ab80-0e9248a2c023)) + (pad "2" smd rect (at 0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 592edb02-574a-4ca2-a0d4-efd3c1e9b0a4)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA688A9) - (at 43.12708 156.9168) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8CFA95) + (footprint "Common_Footprint:C_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005aa68a17) + (at 32.581 149.2968 180) + (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") + (tags "capacitor 0402") + (path "/00000000-0000-0000-0000-000059ef1b6c") (attr smd) - (fp_text reference R8 (at 0 -1.2) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 174K (at 0 1.25) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 48 "Net-(R8-Pad1)")) - (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "C8" (at 0 1.27 180) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 526b6e9b-c387-4557-92a7-a23dcc1d2280) + ) + (fp_text value "100nF" (at 0 -1.27 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 7755210c-8318-49ae-8d3d-0bfcaf48275c) + ) + (fp_text user "${REFERENCE}" (at -0.01 -0.01 180) (layer "B.Fab") + (effects (font (size 0.3 0.3) (thickness 0.075)) (justify mirror)) + (tstamp 36137abf-3093-406f-aeb3-259438be4c41) + ) + (fp_line (start -1 0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 4db71587-7c9d-42ff-9775-e386ef868f25)) + (fp_line (start -1 0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp b8062cb2-89ba-4106-82e3-d7829182f85e)) + (fp_line (start 1 -0.4) (end -1 -0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 48678cb1-8727-4d2b-a8e9-4cde051c9a1f)) + (fp_line (start 1 -0.4) (end 1 0.4) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 0188c5d4-f1ba-4f47-9a32-8362f4590155)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp df7176f2-9246-4c88-a278-336d9c4b6909)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 83f3abf3-54a8-45f8-b7b8-20f1845e981c)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 2fc78127-3704-461e-93aa-68ca66e1822e)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 23e52dd0-256f-459a-8b38-7fe20ce089d4)) + (pad "1" smd rect (at -0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp bf65bf7c-4957-40fa-9bf0-d62df4a075ab)) + (pad "2" smd rect (at 0.55 0 180) (size 0.6 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 9f25206b-fdb4-4854-ae27-a5b5afa2f4d7)) + (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Capacitor.step" + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) - (rotate (xyz 0 0 90)) + (rotate (xyz -90 0 0)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA6889B) - (at 32.455 155.995 90) - (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") - (tags "resistor 0402") - (path /5A8E662D) + (footprint "Common_Footprint:LED_0603" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c644115) + (at 39.274 159.406) + (descr "LED 0603 smd package") + (tags "LED led 0603 SMD smd SMT smt smdled SMDLED smtled SMTLED") + (path "/00000000-0000-0000-0000-00005a9f208a") (attr smd) - (fp_text reference R12 (at 0 -1.2 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 10K (at 0 1.25 90) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 55 "Net-(R11-Pad2)")) - (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 25 GND)) - (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (fp_text reference "D3" (at 0.038 -0.7112) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp 9cd976fa-eef7-463a-a846-164de28f7311) + ) + (fp_text value "SMLE13BC8TT86" (at 0 -1.35) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp d7df3a44-ff26-4221-a4e5-b464f679a15a) + ) + (fp_line (start -1.3 -0.5) (end 0.8 -0.5) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 8e1dd61a-2eb2-4072-a82a-9658a4b7f2b8)) + (fp_line (start -1.3 0.5) (end -1.3 -0.5) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp b0f2656d-1427-4df0-a373-80fcc1b0807f)) + (fp_line (start -1.3 0.5) (end 0.8 0.5) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp c297ae4d-6af8-4d35-949a-c4713fc40454)) + (fp_line (start -1.45 -0.65) (end -1.45 0.65) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 5bb64c7a-51ae-4f09-9a6f-1c0666a3a581)) + (fp_line (start -1.45 0.65) (end 1.45 0.65) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 4e1ad9bc-92ba-445b-bd1c-675b22eee87b)) + (fp_line (start 1.45 -0.65) (end -1.45 -0.65) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp cfa4d8d0-c1c0-44cd-97db-438470e79dfe)) + (fp_line (start 1.45 0.65) (end 1.45 -0.65) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 87525487-66ea-4e74-b41b-3c60258fad0a)) + (fp_line (start -0.8 -0.4) (end -0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 8364d646-f395-4785-9f83-bd84624c8d8a)) + (fp_line (start -0.8 0.4) (end 0.8 0.4) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 2b74113e-565f-4dbf-a83c-ce9242c21d3f)) + (fp_line (start -0.2 0.2) (end -0.2 -0.2) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp bba0948f-3beb-4e54-9e35-bc9b884fcd51)) + (fp_line (start -0.15 0) (end 0.15 0.2) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d99c8cc4-3a6e-47cc-be0d-cd044b2c8d39)) + (fp_line (start 0.15 -0.2) (end -0.15 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d8a4eb9b-4bc5-4810-a6fe-78acdd0c77aa)) + (fp_line (start 0.15 0.2) (end 0.15 -0.2) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 15e24e0f-9fd6-456a-bd5b-3e466b19a91e)) + (fp_line (start 0.8 -0.4) (end -0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d18f1520-ef41-4b67-a4ad-f735d5d47881)) + (fp_line (start 0.8 0.4) (end 0.8 -0.4) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp ce9e5eb5-4462-4449-b83f-fbd9680e49cf)) + (pad "1" smd rect (at -0.8 0 180) (size 0.8 0.8) (layers "B.Cu" "B.Paste" "B.Mask") + (net 56 "Net-(D3-Pad1)") (tstamp d4015008-1e90-44a4-8d7d-b7bffece9ca6)) + (pad "2" smd rect (at 0.8 0 180) (size 0.8 0.8) (layers "B.Cu" "B.Paste" "B.Mask") + (net 28 "+3V3") (tstamp 1d02e907-a387-44c5-8c67-a5771a23c231)) + (model "${KISYS3DMOD}/LED SMD0603.step" + (offset (xyz 0.6 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA6888D) - (at 32.3524 153.7545 270) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c644cdd) + (at 32.073 147.8562 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /59EF4EA8) + (path "/00000000-0000-0000-0000-00005c6858f0") (attr smd) - (fp_text reference R4 (at 0 -1.2 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 10K (at 0 1.25 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 26 /A_RS_485_N)) - (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 54 /RS485_LVL_UP)) + (fp_text reference "R14" (at 0.8962 0 180) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp 414784c0-42da-4248-b6bb-ce2586f8959e) + ) + (fp_text value "100" (at 0 -1.25 90) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 642f72a0-0d85-4e7c-81de-ee883521ca76) + ) + (fp_line (start -0.8 0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 807db77a-33dc-4b22-8dda-1593a94893f3)) + (fp_line (start -0.8 0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp af9f2e09-eba0-4c14-b9b3-96b862f4ba0b)) + (fp_line (start 0.8 -0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 28e3ea31-7bc5-4c72-a6ff-f2c1f5bae9f9)) + (fp_line (start 0.8 -0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 2ae63fc4-7fb2-4863-bd88-8b8c10878e15)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp d51142d7-d1df-433d-9759-bc3f9109e211)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 752e5c4b-d9dc-43f2-9666-ae365b829097)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 8273f3cc-27c9-4ec9-85a0-325a2825de42)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 603f69f6-2bf5-49ae-8619-153bb92c4b2b)) + (pad "1" smd rect (at -0.45 0 90) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 23 "/PTPB") (tstamp eb7c7d9d-e377-49d0-ae9e-83707ae91d79)) + (pad "2" smd rect (at 0.45 0 90) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 58 "/PTPB_PRO") (tstamp 89fc99da-253d-4930-894a-073dce6263f0)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:R_0402_NoSilk (layer F.Cu) (tedit 5BE5A55C) (tstamp 5AA6887F) - (at 42.614 150.135 270) + (footprint "Common_Footprint:R_0402_NoSilk" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c644d07) + (at 37.4832 144.8264) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") - (path /5A8D1DFD) + (path "/00000000-0000-0000-0000-00005c685df9") (attr smd) - (fp_text reference R9 (at 0 -1.2 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value 31.6K (at 0 1.25 270) (layer F.Fab) hide - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start -0.5 0.25) (end -0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 0.25) (end -0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start 0.5 -0.25) (end 0.5 0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.5 -0.25) (end 0.5 -0.25) (layer F.Fab) (width 0.1)) - (fp_line (start -0.8 -0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.8 -0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end 0.8 -0.45) (layer F.CrtYd) (width 0.05)) - (fp_line (start 0.8 0.45) (end -0.8 0.45) (layer F.CrtYd) (width 0.05)) - (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 28 +3V3)) - (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) - (net 50 "Net-(R10-Pad1)")) + (fp_text reference "R15" (at 0 -0.5334) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp 2b279d93-b8db-4883-a787-68d9b40df287) + ) + (fp_text value "100" (at 0 -1.25) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 771572f7-276c-4b85-b6bd-36aca3af7e29) + ) + (fp_line (start -0.8 0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp bb6f9503-cbfc-481c-8347-c4d54ddf68f1)) + (fp_line (start -0.8 0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 4ff0630d-88dc-49d2-b7ae-4a6aa653e993)) + (fp_line (start 0.8 -0.45) (end -0.8 -0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 8a02da24-6b4e-4286-bdf3-96b0982fb620)) + (fp_line (start 0.8 -0.45) (end 0.8 0.45) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp b931b438-128c-43a0-a1c1-12aa01883ff1)) + (fp_line (start -0.5 -0.25) (end -0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp f8ac5bfe-bb1d-41f0-a04b-b7002924cb25)) + (fp_line (start -0.5 0.25) (end 0.5 0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp f2c31e70-de03-44b1-98a1-e8662fda9ead)) + (fp_line (start 0.5 -0.25) (end -0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a695ae40-d16e-4638-8f5d-7c475886940c)) + (fp_line (start 0.5 0.25) (end 0.5 -0.25) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 8162abd7-4e82-4d6f-b32c-72d5a98146cf)) + (pad "1" smd rect (at -0.45 0) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 21 "/PTPA") (tstamp 1b41608f-01da-41e0-a524-ebace2534cb6)) + (pad "2" smd rect (at 0.45 0) (size 0.4 0.6) (layers "B.Cu" "B.Paste" "B.Mask") + (net 59 "/PTPA_PRO") (tstamp 8f140326-f775-49e4-8375-7b0a96675e26)) (model "${KIPRJMOD}/../00_Common_Libraries/Common_Mecanic/0402 SMD Resistor.step" - (at (xyz 0 0 0)) + (offset (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) - (module Common_Footprint:Luos_logo_small locked (layer B.Cu) (tedit 5B9B9439) (tstamp 5C64774A) + (footprint "Common_Footprint:Luos_logo_small" locked (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c64774a) (at 32.7588 153.7672 90) - (fp_text reference "" (at 0 0 90) (layer B.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3)) (justify mirror)) - ) - (fp_text value "" (at 0.75 0 90) (layer B.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3)) (justify mirror)) - ) - (fp_poly (pts (xy -0.262466 0.793703) (xy -0.343787 0.708979) (xy -0.4312 0.610734) (xy -0.513708 0.504156) - (xy -0.58608 0.396046) (xy -0.59225 0.385923) (xy -0.614235 0.347777) (xy -0.638082 0.303503) - (xy -0.662061 0.256641) (xy -0.684439 0.210733) (xy -0.703487 0.16932) (xy -0.717475 0.135942) - (xy -0.724277 0.11581) (xy -0.728688 0.100574) (xy -0.732455 0.093313) (xy -0.735624 0.094937) - (xy -0.738241 0.106354) (xy -0.740355 0.128474) (xy -0.742011 0.162206) (xy -0.743256 0.20846) - (xy -0.744138 0.268143) (xy -0.744702 0.342166) (xy -0.744995 0.431438) (xy -0.745067 0.5202) - (xy -0.745067 0.956733) (xy -0.262466 0.956733) (xy -0.262466 0.793703)) (layer B.SilkS) (width 0.01)) - (fp_poly (pts (xy -3.994136 0.60325) (xy -3.99382 0.410224) (xy -3.993533 0.233361) (xy -3.993251 0.071889) - (xy -3.992953 -0.074964) (xy -3.992618 -0.207968) (xy -3.992225 -0.327895) (xy -3.99175 -0.435515) - (xy -3.991174 -0.531601) (xy -3.990473 -0.616923) (xy -3.989627 -0.692252) (xy -3.988614 -0.758359) - (xy -3.987413 -0.816017) (xy -3.986001 -0.865995) (xy -3.984356 -0.909066) (xy -3.982459 -0.945999) - (xy -3.980286 -0.977568) (xy -3.977816 -1.004541) (xy -3.975028 -1.027692) (xy -3.9719 -1.047791) - (xy -3.96841 -1.065608) (xy -3.964536 -1.081917) (xy -3.960258 -1.097486) (xy -3.955553 -1.113089) - (xy -3.950399 -1.129495) (xy -3.945064 -1.146544) (xy -3.906424 -1.244993) (xy -3.854912 -1.332673) - (xy -3.791105 -1.409003) (xy -3.715581 -1.473403) (xy -3.62892 -1.525291) (xy -3.531698 -1.564087) - (xy -3.528669 -1.565029) (xy -3.499873 -1.572976) (xy -3.468149 -1.579693) (xy -3.431929 -1.585273) - (xy -3.389646 -1.589808) (xy -3.339733 -1.593388) (xy -3.280622 -1.596107) (xy -3.210748 -1.598055) - (xy -3.128543 -1.599326) (xy -3.032439 -1.60001) (xy -2.928787 -1.6002) (xy -2.557368 -1.6002) - (xy -2.543926 -1.626194) (xy -2.51481 -1.674484) (xy -2.474778 -1.729431) (xy -2.426694 -1.787854) - (xy -2.373427 -1.846573) (xy -2.31784 -1.902408) (xy -2.262802 -1.952178) (xy -2.218266 -1.987577) - (xy -2.189503 -2.008846) (xy -2.165621 -2.026783) (xy -2.150156 -2.03872) (xy -2.146723 -2.041568) - (xy -2.153846 -2.042526) (xy -2.176354 -2.04341) (xy -2.212698 -2.044218) (xy -2.261328 -2.04495) - (xy -2.320696 -2.045601) (xy -2.389254 -2.046172) (xy -2.465453 -2.046659) (xy -2.547743 -2.047061) - (xy -2.634577 -2.047376) (xy -2.724405 -2.047602) (xy -2.815678 -2.047736) (xy -2.906849 -2.047778) - (xy -2.996367 -2.047725) (xy -3.082685 -2.047575) (xy -3.164254 -2.047326) (xy -3.239524 -2.046976) - (xy -3.306947 -2.046523) (xy -3.364975 -2.045966) (xy -3.412059 -2.045302) (xy -3.446649 -2.04453) - (xy -3.467197 -2.043647) (xy -3.471333 -2.043233) (xy -3.607139 -2.015922) (xy -3.730586 -1.979007) - (xy -3.843994 -1.931327) (xy -3.949682 -1.871721) (xy -4.04997 -1.799027) (xy -4.147178 -1.712084) - (xy -4.161793 -1.697584) (xy -4.250062 -1.597065) (xy -4.324498 -1.486964) (xy -4.384819 -1.367857) - (xy -4.43074 -1.240322) (xy -4.461979 -1.104935) (xy -4.466061 -1.0795) (xy -4.46764 -1.067226) - (xy -4.469085 -1.051862) (xy -4.470404 -1.032678) (xy -4.471601 -1.008942) (xy -4.472681 -0.979925) - (xy -4.473652 -0.944894) (xy -4.474518 -0.903119) (xy -4.475285 -0.853868) (xy -4.475958 -0.796411) - (xy -4.476544 -0.730016) (xy -4.477048 -0.653953) (xy -4.477475 -0.56749) (xy -4.477831 -0.469897) - (xy -4.478122 -0.360442) (xy -4.478354 -0.238394) (xy -4.478532 -0.103023) (xy -4.478661 0.046403) - (xy -4.478748 0.210615) (xy -4.478798 0.390344) (xy -4.478817 0.573616) (xy -4.478866 2.142066) - (xy -4.237786 2.142067) (xy -3.996705 2.142067) (xy -3.994136 0.60325)) (layer B.SilkS) (width 0.01)) - (fp_poly (pts (xy 3.114164 1.14419) (xy 3.215798 1.134623) (xy 3.303365 1.117251) (xy 3.408359 1.081606) - (xy 3.511246 1.031064) (xy 3.608776 0.967625) (xy 3.697698 0.893287) (xy 3.743371 0.846711) - (xy 3.768697 0.817402) (xy 3.796732 0.782606) (xy 3.825493 0.745074) (xy 3.853 0.707556) - (xy 3.877271 0.672802) (xy 3.896324 0.643565) (xy 3.908177 0.622593) (xy 3.911151 0.613833) - (xy 3.904392 0.60536) (xy 3.886868 0.591919) (xy 3.86691 0.579185) (xy 3.845585 0.56655) - (xy 3.812862 0.547155) (xy 3.771909 0.522876) (xy 3.725893 0.495593) (xy 3.67798 0.467182) - (xy 3.677676 0.467002) (xy 3.632932 0.440696) (xy 3.592978 0.417641) (xy 3.560154 0.399149) - (xy 3.536795 0.386536) (xy 3.525239 0.381112) (xy 3.524638 0.381) (xy 3.516873 0.387704) - (xy 3.502764 0.405668) (xy 3.484742 0.431673) (xy 3.475068 0.446616) (xy 3.419171 0.523591) - (xy 3.358555 0.584875) (xy 3.292148 0.631313) (xy 3.218877 0.66375) (xy 3.188038 0.672832) - (xy 3.147163 0.680012) (xy 3.095686 0.684255) (xy 3.039697 0.685474) (xy 2.985286 0.683584) - (xy 2.938542 0.678498) (xy 2.927767 0.676512) (xy 2.862925 0.656639) (xy 2.798973 0.62528) - (xy 2.739373 0.584998) (xy 2.687587 0.538357) (xy 2.647076 0.487919) (xy 2.628821 0.455172) - (xy 2.603199 0.381587) (xy 2.594066 0.309607) (xy 2.601294 0.240197) (xy 2.624758 0.17432) - (xy 2.664329 0.11294) (xy 2.675743 0.099507) (xy 2.707467 0.067504) (xy 2.744722 0.037172) - (xy 2.789409 0.007417) (xy 2.84343 -0.022855) (xy 2.908687 -0.054738) (xy 2.987082 -0.089325) - (xy 3.048 -0.114596) (xy 3.094629 -0.133572) (xy 3.148932 -0.155684) (xy 3.202902 -0.17767) - (xy 3.234267 -0.190453) (xy 3.372428 -0.251581) (xy 3.494996 -0.316087) (xy 3.603087 -0.384619) - (xy 3.697821 -0.457821) (xy 3.699933 -0.459635) (xy 3.779873 -0.536843) (xy 3.846203 -0.619815) - (xy 3.900162 -0.710694) (xy 3.94299 -0.81162) (xy 3.975927 -0.924735) (xy 3.980346 -0.944033) - (xy 3.985969 -0.981619) (xy 3.989648 -1.031821) (xy 3.991422 -1.090442) (xy 3.991333 -1.153282) - (xy 3.989422 -1.216142) (xy 3.985729 -1.274822) (xy 3.980295 -1.325125) (xy 3.976417 -1.348528) - (xy 3.946383 -1.466717) (xy 3.904258 -1.575324) (xy 3.848894 -1.676382) (xy 3.779145 -1.77192) - (xy 3.693864 -1.863971) (xy 3.675539 -1.881489) (xy 3.577784 -1.961777) (xy 3.470553 -2.028054) - (xy 3.353997 -2.080237) (xy 3.246967 -2.113638) (xy 3.214106 -2.12153) (xy 3.183689 -2.127403) - (xy 3.15201 -2.131623) (xy 3.115359 -2.134556) (xy 3.070028 -2.136571) (xy 3.012309 -2.138032) - (xy 2.9972 -2.138323) (xy 2.916475 -2.13899) (xy 2.851281 -2.137671) (xy 2.800326 -2.134319) - (xy 2.7686 -2.130081) (xy 2.641266 -2.099573) (xy 2.523289 -2.055068) (xy 2.414863 -1.996677) - (xy 2.316183 -1.92451) (xy 2.227442 -1.838679) (xy 2.196916 -1.803175) (xy 2.148364 -1.74383) - (xy 2.193688 -1.695298) (xy 2.215736 -1.671825) (xy 2.233291 -1.653383) (xy 2.243183 -1.643297) - (xy 2.244012 -1.642534) (xy 2.258542 -1.627333) (xy 2.280215 -1.601046) (xy 2.306805 -1.566691) - (xy 2.336087 -1.527289) (xy 2.365833 -1.485858) (xy 2.393819 -1.445416) (xy 2.417818 -1.408983) - (xy 2.426597 -1.394908) (xy 2.483485 -1.30157) (xy 2.50182 -1.355635) (xy 2.521239 -1.407653) - (xy 2.541578 -1.449535) (xy 2.566285 -1.487889) (xy 2.580873 -1.507196) (xy 2.640645 -1.569934) - (xy 2.710954 -1.619765) (xy 2.790935 -1.6563) (xy 2.879725 -1.679153) (xy 2.976461 -1.687937) - (xy 2.9845 -1.68802) (xy 3.051364 -1.685888) (xy 3.108655 -1.677841) (xy 3.163133 -1.662428) - (xy 3.22156 -1.638198) (xy 3.2258 -1.636216) (xy 3.27747 -1.605656) (xy 3.330277 -1.563558) - (xy 3.379656 -1.514327) (xy 3.421043 -1.46237) (xy 3.44287 -1.426633) (xy 3.477278 -1.343954) - (xy 3.497776 -1.25607) (xy 3.504274 -1.16611) (xy 3.496678 -1.077203) (xy 3.474897 -0.992479) - (xy 3.456925 -0.948981) (xy 3.418868 -0.88664) (xy 3.365375 -0.825697) (xy 3.297944 -0.767354) - (xy 3.218072 -0.712813) (xy 3.127256 -0.663276) (xy 3.067043 -0.635994) (xy 3.032129 -0.621282) - (xy 2.98591 -0.601776) (xy 2.93267 -0.579286) (xy 2.876697 -0.555623) (xy 2.827867 -0.534965) - (xy 2.671233 -0.46867) (xy 2.665167 -0.3784) (xy 2.64586 -0.21006) (xy 2.610868 -0.047859) - (xy 2.559985 0.108817) (xy 2.493004 0.260579) (xy 2.40972 0.408037) (xy 2.388988 0.440266) - (xy 2.360686 0.481744) (xy 2.329642 0.52474) (xy 2.300067 0.563539) (xy 2.280742 0.587195) - (xy 2.255786 0.616391) (xy 2.232769 0.643498) (xy 2.215592 0.663916) (xy 2.211821 0.668461) - (xy 2.192676 0.6917) (xy 2.226567 0.741667) (xy 2.25908 0.784334) (xy 2.301407 0.832193) - (xy 2.349341 0.880934) (xy 2.398679 0.926251) (xy 2.4384 0.958722) (xy 2.476827 0.984826) - (xy 2.526025 1.01368) (xy 2.580737 1.042568) (xy 2.635706 1.068772) (xy 2.685676 1.089579) - (xy 2.704663 1.096303) (xy 2.798004 1.120866) (xy 2.900528 1.137146) (xy 3.007494 1.144976) - (xy 3.114164 1.14419)) (layer B.SilkS) (width 0.01)) - (fp_poly (pts (xy 0.972904 1.14064) (xy 1.128819 1.130628) (xy 1.274394 1.108828) (xy 1.412098 1.074524) - (xy 1.5444 1.027005) (xy 1.67377 0.965555) (xy 1.769617 0.910356) (xy 1.804477 0.888563) - (xy 1.832676 0.870067) (xy 1.858436 0.851793) (xy 1.885976 0.830666) (xy 1.919516 0.803611) - (xy 1.94594 0.78188) (xy 2.077036 0.664245) (xy 2.192331 0.540691) (xy 2.292004 0.410901) - (xy 2.376231 0.274562) (xy 2.445192 0.131359) (xy 2.499064 -0.019022) (xy 2.538024 -0.176896) - (xy 2.557443 -0.299404) (xy 2.562855 -0.363251) (xy 2.56528 -0.438707) (xy 2.564898 -0.521238) - (xy 2.561886 -0.606309) (xy 2.556425 -0.689384) (xy 2.548692 -0.765929) (xy 2.538867 -0.831409) - (xy 2.535865 -0.846667) (xy 2.496759 -0.998654) (xy 2.444679 -1.141723) (xy 2.378808 -1.277404) - (xy 2.298329 -1.40723) (xy 2.202422 -1.532731) (xy 2.120687 -1.624087) (xy 1.997918 -1.741862) - (xy 1.867829 -1.844485) (xy 1.729928 -1.932227) (xy 1.583725 -2.005356) (xy 1.428728 -2.064142) - (xy 1.264445 -2.108854) (xy 1.2192 -2.118396) (xy 1.186507 -2.124548) (xy 1.156224 -2.129258) - (xy 1.125326 -2.132714) (xy 1.090787 -2.135103) (xy 1.049581 -2.136613) (xy 0.998683 -2.137429) - (xy 0.935068 -2.137739) (xy 0.905934 -2.137764) (xy 0.821585 -2.137282) (xy 0.750732 -2.135547) - (xy 0.689959 -2.132156) (xy 0.63585 -2.126707) (xy 0.58499 -2.118796) (xy 0.533963 -2.108023) - (xy 0.479352 -2.093984) (xy 0.440267 -2.082903) (xy 0.288664 -2.030257) (xy 0.140935 -1.962126) - (xy -0.000532 -1.879894) (xy -0.133347 -1.784943) (xy -0.251145 -1.682485) (xy -0.320256 -1.616218) - (xy -0.279205 -1.529892) (xy -0.258526 -1.483075) (xy -0.237564 -1.430071) (xy -0.219608 -1.379404) - (xy -0.212974 -1.358253) (xy -0.199816 -1.308431) (xy -0.187342 -1.251758) (xy -0.176385 -1.193035) - (xy -0.167777 -1.137064) (xy -0.162354 -1.088644) (xy -0.160866 -1.058077) (xy -0.158975 -1.033688) - (xy -0.153494 -1.025686) (xy -0.144714 -1.034187) (xy -0.137376 -1.048618) (xy -0.118736 -1.083855) - (xy -0.090951 -1.127586) (xy -0.056684 -1.176169) (xy -0.0186 -1.225963) (xy 0.020637 -1.273325) - (xy 0.053459 -1.309528) (xy 0.158954 -1.410005) (xy 0.268354 -1.494425) (xy 0.382786 -1.563436) - (xy 0.503378 -1.617684) (xy 0.631256 -1.657817) (xy 0.679588 -1.668997) (xy 0.746284 -1.679466) - (xy 0.823982 -1.685804) (xy 0.907249 -1.687958) (xy 0.990652 -1.68587) (xy 1.068758 -1.679487) - (xy 1.111817 -1.673403) (xy 1.243928 -1.642469) (xy 1.370762 -1.596007) (xy 1.491125 -1.534925) - (xy 1.603824 -1.460129) (xy 1.707666 -1.372525) (xy 1.801456 -1.273019) (xy 1.884002 -1.162517) - (xy 1.95411 -1.041927) (xy 1.960709 -1.0287) (xy 2.007841 -0.918793) (xy 2.042086 -0.80604) - (xy 2.064095 -0.687446) (xy 2.074518 -0.560014) (xy 2.075602 -0.499534) (xy 2.068219 -0.352123) - (xy 2.04592 -0.21262) (xy 2.00859 -0.080704) (xy 1.956111 0.043943) (xy 1.888368 0.161644) - (xy 1.805244 0.272717) (xy 1.788579 0.2921) (xy 1.688699 0.393776) (xy 1.580274 0.480842) - (xy 1.463177 0.553372) (xy 1.337284 0.611441) (xy 1.202467 0.655124) (xy 1.159934 0.665509) - (xy 1.117339 0.672616) (xy 1.06218 0.678075) (xy 0.998756 0.681802) (xy 0.931364 0.683718) - (xy 0.8643 0.683739) (xy 0.801862 0.681783) (xy 0.748348 0.67777) (xy 0.719667 0.673896) - (xy 0.583232 0.643372) (xy 0.457351 0.600273) (xy 0.340338 0.54373) (xy 0.230509 0.472871) - (xy 0.126178 0.386826) (xy 0.08188 0.344232) (xy -0.011917 0.239381) (xy -0.090045 0.128622) - (xy -0.15301 0.011062) (xy -0.201317 -0.114194) (xy -0.224475 -0.197552) (xy -0.233049 -0.235347) - (xy -0.240188 -0.272105) (xy -0.246029 -0.309844) (xy -0.250703 -0.350585) (xy -0.254344 -0.396348) - (xy -0.257088 -0.449153) (xy -0.259066 -0.51102) (xy -0.260414 -0.583968) (xy -0.261264 -0.670017) - (xy -0.261713 -0.75992) (xy -0.262104 -0.845947) (xy -0.262684 -0.91722) (xy -0.263549 -0.97592) - (xy -0.264792 -1.024226) (xy -0.266507 -1.064317) (xy -0.268789 -1.098373) (xy -0.271733 -1.128575) - (xy -0.275432 -1.157101) (xy -0.27998 -1.186131) (xy -0.280207 -1.187487) (xy -0.311115 -1.32563) - (xy -0.35601 -1.454279) (xy -0.414986 -1.573618) (xy -0.488137 -1.683834) (xy -0.575556 -1.785111) - (xy -0.588889 -1.798538) (xy -0.697015 -1.894494) (xy -0.811983 -1.974965) (xy -0.933851 -2.03998) - (xy -1.062676 -2.08957) (xy -1.198516 -2.123764) (xy -1.231647 -2.129599) (xy -1.27369 -2.134511) - (xy -1.327903 -2.138062) (xy -1.38964 -2.140212) (xy -1.454253 -2.140924) (xy -1.517095 -2.140159) - (xy -1.573519 -2.137879) (xy -1.61888 -2.134046) (xy -1.627832 -2.132858) (xy -1.755099 -2.107665) - (xy -1.873747 -2.07007) (xy -1.986722 -2.018829) (xy -2.096971 -1.952698) (xy -2.15849 -1.908793) - (xy -2.263949 -1.819057) (xy -2.356729 -1.718652) (xy -2.436146 -1.608649) (xy -2.501517 -1.490118) - (xy -2.552159 -1.364128) (xy -2.585766 -1.239648) (xy -2.590256 -1.21697) (xy -2.594285 -1.193457) - (xy -2.59788 -1.168123) (xy -2.601063 -1.139982) (xy -2.603859 -1.10805) (xy -2.606294 -1.07134) - (xy -2.60839 -1.028868) (xy -2.610174 -0.979649) (xy -2.611669 -0.922696) (xy -2.612899 -0.857024) - (xy -2.613889 -0.781649) (xy -2.614665 -0.695584) (xy -2.615249 -0.597845) (xy -2.615667 -0.487446) - (xy -2.615942 -0.363401) (xy -2.616101 -0.224725) (xy -2.616166 -0.070433) (xy -2.616171 -0.014817) - (xy -2.6162 0.956733) (xy -2.125133 0.956733) (xy -2.125133 0.000777) (xy -2.125108 -0.150307) - (xy -2.125025 -0.285462) (xy -2.124872 -0.40569) (xy -2.124634 -0.511996) (xy -2.1243 -0.605382) - (xy -2.123856 -0.686854) (xy -2.12329 -0.757413) (xy -2.12259 -0.818064) (xy -2.121741 -0.869811) - (xy -2.120732 -0.913656) (xy -2.119549 -0.950604) (xy -2.11818 -0.981658) (xy -2.116612 -1.007821) - (xy -2.114833 -1.030098) (xy -2.112828 -1.049491) (xy -2.111601 -1.059481) (xy -2.093293 -1.168757) - (xy -2.068522 -1.263174) (xy -2.036976 -1.343652) (xy -1.998346 -1.411109) (xy -1.987099 -1.426633) - (xy -1.916226 -1.506592) (xy -1.835976 -1.572453) (xy -1.746451 -1.62415) (xy -1.647756 -1.661618) - (xy -1.604433 -1.672904) (xy -1.542982 -1.682828) (xy -1.471762 -1.687737) (xy -1.397179 -1.687632) - (xy -1.325637 -1.682512) (xy -1.265766 -1.672881) (xy -1.167461 -1.64262) (xy -1.076954 -1.597993) - (xy -0.995535 -1.54025) (xy -0.924489 -1.470637) (xy -0.865102 -1.390403) (xy -0.818663 -1.300797) - (xy -0.788061 -1.20951) (xy -0.778734 -1.171071) (xy -0.771054 -1.134617) (xy -0.76485 -1.097929) - (xy -0.75995 -1.058786) (xy -0.756182 -1.014966) (xy -0.753375 -0.964248) (xy -0.751358 -0.904412) - (xy -0.74996 -0.833238) (xy -0.74901 -0.748503) (xy -0.748636 -0.6985) (xy -0.748002 -0.624002) - (xy -0.747123 -0.55205) (xy -0.746047 -0.485085) (xy -0.744824 -0.425548) (xy -0.743504 -0.375878) - (xy -0.742136 -0.338516) (xy -0.740911 -0.3175) (xy -0.719901 -0.166599) (xy -0.682612 -0.017773) - (xy -0.629683 0.12764) (xy -0.561752 0.268305) (xy -0.479457 0.402886) (xy -0.383436 0.530047) - (xy -0.283891 0.638966) (xy -0.166521 0.748446) (xy -0.048378 0.842386) (xy 0.072627 0.922127) - (xy 0.198587 0.989009) (xy 0.331593 1.044374) (xy 0.3683 1.057291) (xy 0.473789 1.089696) - (xy 0.576304 1.113761) (xy 0.68004 1.130063) (xy 0.789196 1.139182) (xy 0.907969 1.141696) - (xy 0.972904 1.14064)) (layer B.SilkS) (width 0.01)) - ) + (attr through_hole) + (fp_text reference "" (at 0 0 90) (layer "B.SilkS") hide + (effects (font (size 1.524 1.524) (thickness 0.3)) (justify mirror)) + (tstamp fd78e71a-c596-4f0b-9562-bf1d578a3711) + ) + (fp_text value "" (at 0.75 0 90) (layer "B.SilkS") hide + (effects (font (size 1.524 1.524) (thickness 0.3)) (justify mirror)) + (tstamp 3c75cfea-6df9-4bcd-af3d-2da4889df819) + ) + (fp_poly + (pts + (xy -0.262466 0.793703) + (xy -0.343787 0.708979) + (xy -0.4312 0.610734) + (xy -0.513708 0.504156) + (xy -0.58608 0.396046) + (xy -0.59225 0.385923) + (xy -0.614235 0.347777) + (xy -0.638082 0.303503) + (xy -0.662061 0.256641) + (xy -0.684439 0.210733) + (xy -0.703487 0.16932) + (xy -0.717475 0.135942) + (xy -0.724277 0.11581) + (xy -0.728688 0.100574) + (xy -0.732455 0.093313) + (xy -0.735624 0.094937) + (xy -0.738241 0.106354) + (xy -0.740355 0.128474) + (xy -0.742011 0.162206) + (xy -0.743256 0.20846) + (xy -0.744138 0.268143) + (xy -0.744702 0.342166) + (xy -0.744995 0.431438) + (xy -0.745067 0.5202) + (xy -0.745067 0.956733) + (xy -0.262466 0.956733) + (xy -0.262466 0.793703) + ) - (module l0_Kicad_Footprint:l0_logo locked (layer F.Cu) (tedit 0) (tstamp 5A91AC73) - (at 33.455 156.945) - (attr smd) - (fp_text reference G*** (at 0 0) (layer F.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3))) - ) - (fp_text value LOGO (at 0.75 0) (layer F.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3))) - ) - (fp_poly (pts (xy -2.246907 -0.992008) (xy -2.246726 -0.65611) (xy -2.246198 -0.337901) (xy -2.245341 -0.039436) - (xy -2.244171 0.237228) (xy -2.242705 0.490034) (xy -2.240959 0.716928) (xy -2.238951 0.915851) - (xy -2.236696 1.084749) (xy -2.234213 1.221565) (xy -2.231516 1.324242) (xy -2.228624 1.390724) - (xy -2.227412 1.406769) (xy -2.197965 1.616173) (xy -2.152317 1.801495) (xy -2.092018 1.956523) - (xy -2.088323 1.964015) (xy -2.035633 2.044585) (xy -1.957862 2.132649) (xy -1.865114 2.218692) - (xy -1.767489 2.293199) (xy -1.689375 2.339775) (xy -1.633891 2.366287) (xy -1.580352 2.387827) - (xy -1.524006 2.404903) (xy -1.460103 2.418026) (xy -1.38389 2.427705) (xy -1.290617 2.434449) - (xy -1.175531 2.438769) (xy -1.033881 2.441173) (xy -0.860915 2.442171) (xy -0.733188 2.442308) - (xy -0.100607 2.442308) (xy 0.025469 2.623039) (xy 0.096082 2.716467) (xy 0.18279 2.819813) - (xy 0.272135 2.917433) (xy 0.320004 2.965402) (xy 0.385353 3.028837) (xy 0.438886 3.082202) - (xy 0.475092 3.119903) (xy 0.488461 3.136348) (xy 0.488462 3.136363) (xy 0.469681 3.138957) - (xy 0.416363 3.140993) (xy 0.333043 3.1425) (xy 0.224256 3.143505) (xy 0.094536 3.144036) - (xy -0.051581 3.144119) (xy -0.209559 3.143781) (xy -0.374865 3.143051) (xy -0.542962 3.141956) - (xy -0.709315 3.140523) (xy -0.869391 3.138778) (xy -1.018652 3.136751) (xy -1.152565 3.134467) - (xy -1.266594 3.131955) (xy -1.356204 3.129242) (xy -1.41686 3.126354) (xy -1.43574 3.12476) - (xy -1.686218 3.079272) (xy -1.916334 3.002073) (xy -2.13108 2.89095) (xy -2.335449 2.743689) - (xy -2.379679 2.706077) (xy -2.565308 2.519619) (xy -2.717159 2.314726) (xy -2.834386 2.092895) - (xy -2.916141 1.855622) (xy -2.948897 1.699846) (xy -2.952449 1.65738) (xy -2.95568 1.576163) - (xy -2.95859 1.456518) (xy -2.961176 1.298769) (xy -2.963433 1.10324) (xy -2.965361 0.870255) - (xy -2.966956 0.600138) (xy -2.968216 0.293213) (xy -2.969137 -0.050196) (xy -2.969717 -0.429765) - (xy -2.969945 -0.801077) (xy -2.970492 -3.175) (xy -2.608708 -3.180316) (xy -2.246923 -3.185631) - (xy -2.246907 -0.992008)) (layer F.SilkS) (width 0.01)) - (fp_poly (pts (xy 1.534037 -1.768577) (xy 1.74671 -1.722472) (xy 1.95117 -1.641213) (xy 2.145202 -1.526097) - (xy 2.32659 -1.378422) (xy 2.493117 -1.199486) (xy 2.642567 -0.990585) (xy 2.763475 -0.772223) - (xy 2.870139 -0.515165) (xy 2.954018 -0.23148) (xy 3.014171 0.073052) (xy 3.049653 0.392655) - (xy 3.059521 0.721551) (xy 3.049112 0.976923) (xy 3.023731 1.246123) (xy 2.987725 1.484732) - (xy 2.939339 1.700216) (xy 2.87682 1.900039) (xy 2.798413 2.091668) (xy 2.775984 2.139462) - (xy 2.637666 2.391647) (xy 2.481843 2.609798) (xy 2.308914 2.793548) (xy 2.119279 2.94253) - (xy 1.913339 3.056379) (xy 1.691493 3.134728) (xy 1.687709 3.135719) (xy 1.60773 3.149674) - (xy 1.501647 3.158754) (xy 1.382151 3.162769) (xy 1.261932 3.161531) (xy 1.153683 3.15485) - (xy 1.080539 3.144748) (xy 0.899784 3.091215) (xy 0.71783 3.003568) (xy 0.541845 2.885862) - (xy 0.391788 2.754923) (xy 0.218183 2.562705) (xy 0.070609 2.353296) (xy -0.05208 2.123833) - (xy -0.151034 1.871452) (xy -0.227401 1.59329) (xy -0.282328 1.286485) (xy -0.313378 0.996462) - (xy -0.324759 0.700596) (xy 0.400985 0.700596) (xy 0.412724 0.993591) (xy 0.44586 1.270807) - (xy 0.499551 1.528917) (xy 0.572955 1.764596) (xy 0.66523 1.974516) (xy 0.775534 2.155351) - (xy 0.891799 2.292759) (xy 0.980291 2.368427) (xy 1.078626 2.432279) (xy 1.172753 2.47558) - (xy 1.198333 2.483325) (xy 1.301852 2.496739) (xy 1.421971 2.492261) (xy 1.541564 2.471739) - (xy 1.643505 2.43702) (xy 1.648076 2.434825) (xy 1.769243 2.355955) (xy 1.885025 2.242706) - (xy 1.992619 2.09969) (xy 2.089225 1.931519) (xy 2.172043 1.742804) (xy 2.238272 1.538158) - (xy 2.267973 1.414011) (xy 2.314386 1.127525) (xy 2.336662 0.834367) (xy 2.335392 0.541018) - (xy 2.311165 0.25396) (xy 2.264572 -0.020325) (xy 2.196203 -0.275355) (xy 2.106647 -0.50465) - (xy 2.090198 -0.538909) (xy 1.984758 -0.72343) (xy 1.868419 -0.871595) (xy 1.739848 -0.984934) - (xy 1.657477 -1.036217) (xy 1.588491 -1.070898) (xy 1.531767 -1.091002) (xy 1.470871 -1.100464) - (xy 1.389367 -1.103221) (xy 1.377462 -1.103288) (xy 1.285631 -1.10097) (xy 1.215924 -1.091008) - (xy 1.151639 -1.07021) (xy 1.111347 -1.052436) (xy 0.969523 -0.964928) (xy 0.840425 -0.842784) - (xy 0.725381 -0.688746) (xy 0.625714 -0.505556) (xy 0.542751 -0.295954) (xy 0.477816 -0.062681) - (xy 0.432235 0.191521) (xy 0.411485 0.395148) (xy 0.400985 0.700596) (xy -0.324759 0.700596) - (xy -0.327136 0.63882) (xy -0.311635 0.295935) (xy -0.267512 -0.029972) (xy -0.1954 -0.336683) - (xy -0.095938 -0.62198) (xy 0.030241 -0.883642) (xy 0.1825 -1.119451) (xy 0.349054 -1.315782) - (xy 0.514655 -1.469853) (xy 0.680914 -1.589096) (xy 0.854351 -1.677316) (xy 1.041484 -1.738321) - (xy 1.09292 -1.750137) (xy 1.315368 -1.778231) (xy 1.534037 -1.768577)) (layer F.SilkS) (width 0.01)) + (stroke (width 0.01) (type solid)) (fill solid) (layer "B.SilkS") (tstamp e8a9ba8e-16a3-4a34-975e-1a1c4b4a9373)) + (fp_poly + (pts + (xy -3.994136 0.60325) + (xy -3.99382 0.410224) + (xy -3.993533 0.233361) + (xy -3.993251 0.071889) + (xy -3.992953 -0.074964) + (xy -3.992618 -0.207968) + (xy -3.992225 -0.327895) + (xy -3.99175 -0.435515) + (xy -3.991174 -0.531601) + (xy -3.990473 -0.616923) + (xy -3.989627 -0.692252) + (xy -3.988614 -0.758359) + (xy -3.987413 -0.816017) + (xy -3.986001 -0.865995) + (xy -3.984356 -0.909066) + (xy -3.982459 -0.945999) + (xy -3.980286 -0.977568) + (xy -3.977816 -1.004541) + (xy -3.975028 -1.027692) + (xy -3.9719 -1.047791) + (xy -3.96841 -1.065608) + (xy -3.964536 -1.081917) + (xy -3.960258 -1.097486) + (xy -3.955553 -1.113089) + (xy -3.950399 -1.129495) + (xy -3.945064 -1.146544) + (xy -3.906424 -1.244993) + (xy -3.854912 -1.332673) + (xy -3.791105 -1.409003) + (xy -3.715581 -1.473403) + (xy -3.62892 -1.525291) + (xy -3.531698 -1.564087) + (xy -3.528669 -1.565029) + (xy -3.499873 -1.572976) + (xy -3.468149 -1.579693) + (xy -3.431929 -1.585273) + (xy -3.389646 -1.589808) + (xy -3.339733 -1.593388) + (xy -3.280622 -1.596107) + (xy -3.210748 -1.598055) + (xy -3.128543 -1.599326) + (xy -3.032439 -1.60001) + (xy -2.928787 -1.6002) + (xy -2.557368 -1.6002) + (xy -2.543926 -1.626194) + (xy -2.51481 -1.674484) + (xy -2.474778 -1.729431) + (xy -2.426694 -1.787854) + (xy -2.373427 -1.846573) + (xy -2.31784 -1.902408) + (xy -2.262802 -1.952178) + (xy -2.218266 -1.987577) + (xy -2.189503 -2.008846) + (xy -2.165621 -2.026783) + (xy -2.150156 -2.03872) + (xy -2.146723 -2.041568) + (xy -2.153846 -2.042526) + (xy -2.176354 -2.04341) + (xy -2.212698 -2.044218) + (xy -2.261328 -2.04495) + (xy -2.320696 -2.045601) + (xy -2.389254 -2.046172) + (xy -2.465453 -2.046659) + (xy -2.547743 -2.047061) + (xy -2.634577 -2.047376) + (xy -2.724405 -2.047602) + (xy -2.815678 -2.047736) + (xy -2.906849 -2.047778) + (xy -2.996367 -2.047725) + (xy -3.082685 -2.047575) + (xy -3.164254 -2.047326) + (xy -3.239524 -2.046976) + (xy -3.306947 -2.046523) + (xy -3.364975 -2.045966) + (xy -3.412059 -2.045302) + (xy -3.446649 -2.04453) + (xy -3.467197 -2.043647) + (xy -3.471333 -2.043233) + (xy -3.607139 -2.015922) + (xy -3.730586 -1.979007) + (xy -3.843994 -1.931327) + (xy -3.949682 -1.871721) + (xy -4.04997 -1.799027) + (xy -4.147178 -1.712084) + (xy -4.161793 -1.697584) + (xy -4.250062 -1.597065) + (xy -4.324498 -1.486964) + (xy -4.384819 -1.367857) + (xy -4.43074 -1.240322) + (xy -4.461979 -1.104935) + (xy -4.466061 -1.0795) + (xy -4.46764 -1.067226) + (xy -4.469085 -1.051862) + (xy -4.470404 -1.032678) + (xy -4.471601 -1.008942) + (xy -4.472681 -0.979925) + (xy -4.473652 -0.944894) + (xy -4.474518 -0.903119) + (xy -4.475285 -0.853868) + (xy -4.475958 -0.796411) + (xy -4.476544 -0.730016) + (xy -4.477048 -0.653953) + (xy -4.477475 -0.56749) + (xy -4.477831 -0.469897) + (xy -4.478122 -0.360442) + (xy -4.478354 -0.238394) + (xy -4.478532 -0.103023) + (xy -4.478661 0.046403) + (xy -4.478748 0.210615) + (xy -4.478798 0.390344) + (xy -4.478817 0.573616) + (xy -4.478866 2.142066) + (xy -4.237786 2.142067) + (xy -3.996705 2.142067) + (xy -3.994136 0.60325) + ) + + (stroke (width 0.01) (type solid)) (fill solid) (layer "B.SilkS") (tstamp b0c18d09-b59a-4c52-bb86-e84cea7ad62b)) + (fp_poly + (pts + (xy 3.114164 1.14419) + (xy 3.215798 1.134623) + (xy 3.303365 1.117251) + (xy 3.408359 1.081606) + (xy 3.511246 1.031064) + (xy 3.608776 0.967625) + (xy 3.697698 0.893287) + (xy 3.743371 0.846711) + (xy 3.768697 0.817402) + (xy 3.796732 0.782606) + (xy 3.825493 0.745074) + (xy 3.853 0.707556) + (xy 3.877271 0.672802) + (xy 3.896324 0.643565) + (xy 3.908177 0.622593) + (xy 3.911151 0.613833) + (xy 3.904392 0.60536) + (xy 3.886868 0.591919) + (xy 3.86691 0.579185) + (xy 3.845585 0.56655) + (xy 3.812862 0.547155) + (xy 3.771909 0.522876) + (xy 3.725893 0.495593) + (xy 3.67798 0.467182) + (xy 3.677676 0.467002) + (xy 3.632932 0.440696) + (xy 3.592978 0.417641) + (xy 3.560154 0.399149) + (xy 3.536795 0.386536) + (xy 3.525239 0.381112) + (xy 3.524638 0.381) + (xy 3.516873 0.387704) + (xy 3.502764 0.405668) + (xy 3.484742 0.431673) + (xy 3.475068 0.446616) + (xy 3.419171 0.523591) + (xy 3.358555 0.584875) + (xy 3.292148 0.631313) + (xy 3.218877 0.66375) + (xy 3.188038 0.672832) + (xy 3.147163 0.680012) + (xy 3.095686 0.684255) + (xy 3.039697 0.685474) + (xy 2.985286 0.683584) + (xy 2.938542 0.678498) + (xy 2.927767 0.676512) + (xy 2.862925 0.656639) + (xy 2.798973 0.62528) + (xy 2.739373 0.584998) + (xy 2.687587 0.538357) + (xy 2.647076 0.487919) + (xy 2.628821 0.455172) + (xy 2.603199 0.381587) + (xy 2.594066 0.309607) + (xy 2.601294 0.240197) + (xy 2.624758 0.17432) + (xy 2.664329 0.11294) + (xy 2.675743 0.099507) + (xy 2.707467 0.067504) + (xy 2.744722 0.037172) + (xy 2.789409 0.007417) + (xy 2.84343 -0.022855) + (xy 2.908687 -0.054738) + (xy 2.987082 -0.089325) + (xy 3.048 -0.114596) + (xy 3.094629 -0.133572) + (xy 3.148932 -0.155684) + (xy 3.202902 -0.17767) + (xy 3.234267 -0.190453) + (xy 3.372428 -0.251581) + (xy 3.494996 -0.316087) + (xy 3.603087 -0.384619) + (xy 3.697821 -0.457821) + (xy 3.699933 -0.459635) + (xy 3.779873 -0.536843) + (xy 3.846203 -0.619815) + (xy 3.900162 -0.710694) + (xy 3.94299 -0.81162) + (xy 3.975927 -0.924735) + (xy 3.980346 -0.944033) + (xy 3.985969 -0.981619) + (xy 3.989648 -1.031821) + (xy 3.991422 -1.090442) + (xy 3.991333 -1.153282) + (xy 3.989422 -1.216142) + (xy 3.985729 -1.274822) + (xy 3.980295 -1.325125) + (xy 3.976417 -1.348528) + (xy 3.946383 -1.466717) + (xy 3.904258 -1.575324) + (xy 3.848894 -1.676382) + (xy 3.779145 -1.77192) + (xy 3.693864 -1.863971) + (xy 3.675539 -1.881489) + (xy 3.577784 -1.961777) + (xy 3.470553 -2.028054) + (xy 3.353997 -2.080237) + (xy 3.246967 -2.113638) + (xy 3.214106 -2.12153) + (xy 3.183689 -2.127403) + (xy 3.15201 -2.131623) + (xy 3.115359 -2.134556) + (xy 3.070028 -2.136571) + (xy 3.012309 -2.138032) + (xy 2.9972 -2.138323) + (xy 2.916475 -2.13899) + (xy 2.851281 -2.137671) + (xy 2.800326 -2.134319) + (xy 2.7686 -2.130081) + (xy 2.641266 -2.099573) + (xy 2.523289 -2.055068) + (xy 2.414863 -1.996677) + (xy 2.316183 -1.92451) + (xy 2.227442 -1.838679) + (xy 2.196916 -1.803175) + (xy 2.148364 -1.74383) + (xy 2.193688 -1.695298) + (xy 2.215736 -1.671825) + (xy 2.233291 -1.653383) + (xy 2.243183 -1.643297) + (xy 2.244012 -1.642534) + (xy 2.258542 -1.627333) + (xy 2.280215 -1.601046) + (xy 2.306805 -1.566691) + (xy 2.336087 -1.527289) + (xy 2.365833 -1.485858) + (xy 2.393819 -1.445416) + (xy 2.417818 -1.408983) + (xy 2.426597 -1.394908) + (xy 2.483485 -1.30157) + (xy 2.50182 -1.355635) + (xy 2.521239 -1.407653) + (xy 2.541578 -1.449535) + (xy 2.566285 -1.487889) + (xy 2.580873 -1.507196) + (xy 2.640645 -1.569934) + (xy 2.710954 -1.619765) + (xy 2.790935 -1.6563) + (xy 2.879725 -1.679153) + (xy 2.976461 -1.687937) + (xy 2.9845 -1.68802) + (xy 3.051364 -1.685888) + (xy 3.108655 -1.677841) + (xy 3.163133 -1.662428) + (xy 3.22156 -1.638198) + (xy 3.2258 -1.636216) + (xy 3.27747 -1.605656) + (xy 3.330277 -1.563558) + (xy 3.379656 -1.514327) + (xy 3.421043 -1.46237) + (xy 3.44287 -1.426633) + (xy 3.477278 -1.343954) + (xy 3.497776 -1.25607) + (xy 3.504274 -1.16611) + (xy 3.496678 -1.077203) + (xy 3.474897 -0.992479) + (xy 3.456925 -0.948981) + (xy 3.418868 -0.88664) + (xy 3.365375 -0.825697) + (xy 3.297944 -0.767354) + (xy 3.218072 -0.712813) + (xy 3.127256 -0.663276) + (xy 3.067043 -0.635994) + (xy 3.032129 -0.621282) + (xy 2.98591 -0.601776) + (xy 2.93267 -0.579286) + (xy 2.876697 -0.555623) + (xy 2.827867 -0.534965) + (xy 2.671233 -0.46867) + (xy 2.665167 -0.3784) + (xy 2.64586 -0.21006) + (xy 2.610868 -0.047859) + (xy 2.559985 0.108817) + (xy 2.493004 0.260579) + (xy 2.40972 0.408037) + (xy 2.388988 0.440266) + (xy 2.360686 0.481744) + (xy 2.329642 0.52474) + (xy 2.300067 0.563539) + (xy 2.280742 0.587195) + (xy 2.255786 0.616391) + (xy 2.232769 0.643498) + (xy 2.215592 0.663916) + (xy 2.211821 0.668461) + (xy 2.192676 0.6917) + (xy 2.226567 0.741667) + (xy 2.25908 0.784334) + (xy 2.301407 0.832193) + (xy 2.349341 0.880934) + (xy 2.398679 0.926251) + (xy 2.4384 0.958722) + (xy 2.476827 0.984826) + (xy 2.526025 1.01368) + (xy 2.580737 1.042568) + (xy 2.635706 1.068772) + (xy 2.685676 1.089579) + (xy 2.704663 1.096303) + (xy 2.798004 1.120866) + (xy 2.900528 1.137146) + (xy 3.007494 1.144976) + (xy 3.114164 1.14419) + ) + + (stroke (width 0.01) (type solid)) (fill solid) (layer "B.SilkS") (tstamp bc38241c-27ec-4249-9e88-f145a54ded6e)) + (fp_poly + (pts + (xy 0.972904 1.14064) + (xy 1.128819 1.130628) + (xy 1.274394 1.108828) + (xy 1.412098 1.074524) + (xy 1.5444 1.027005) + (xy 1.67377 0.965555) + (xy 1.769617 0.910356) + (xy 1.804477 0.888563) + (xy 1.832676 0.870067) + (xy 1.858436 0.851793) + (xy 1.885976 0.830666) + (xy 1.919516 0.803611) + (xy 1.94594 0.78188) + (xy 2.077036 0.664245) + (xy 2.192331 0.540691) + (xy 2.292004 0.410901) + (xy 2.376231 0.274562) + (xy 2.445192 0.131359) + (xy 2.499064 -0.019022) + (xy 2.538024 -0.176896) + (xy 2.557443 -0.299404) + (xy 2.562855 -0.363251) + (xy 2.56528 -0.438707) + (xy 2.564898 -0.521238) + (xy 2.561886 -0.606309) + (xy 2.556425 -0.689384) + (xy 2.548692 -0.765929) + (xy 2.538867 -0.831409) + (xy 2.535865 -0.846667) + (xy 2.496759 -0.998654) + (xy 2.444679 -1.141723) + (xy 2.378808 -1.277404) + (xy 2.298329 -1.40723) + (xy 2.202422 -1.532731) + (xy 2.120687 -1.624087) + (xy 1.997918 -1.741862) + (xy 1.867829 -1.844485) + (xy 1.729928 -1.932227) + (xy 1.583725 -2.005356) + (xy 1.428728 -2.064142) + (xy 1.264445 -2.108854) + (xy 1.2192 -2.118396) + (xy 1.186507 -2.124548) + (xy 1.156224 -2.129258) + (xy 1.125326 -2.132714) + (xy 1.090787 -2.135103) + (xy 1.049581 -2.136613) + (xy 0.998683 -2.137429) + (xy 0.935068 -2.137739) + (xy 0.905934 -2.137764) + (xy 0.821585 -2.137282) + (xy 0.750732 -2.135547) + (xy 0.689959 -2.132156) + (xy 0.63585 -2.126707) + (xy 0.58499 -2.118796) + (xy 0.533963 -2.108023) + (xy 0.479352 -2.093984) + (xy 0.440267 -2.082903) + (xy 0.288664 -2.030257) + (xy 0.140935 -1.962126) + (xy -0.000532 -1.879894) + (xy -0.133347 -1.784943) + (xy -0.251145 -1.682485) + (xy -0.320256 -1.616218) + (xy -0.279205 -1.529892) + (xy -0.258526 -1.483075) + (xy -0.237564 -1.430071) + (xy -0.219608 -1.379404) + (xy -0.212974 -1.358253) + (xy -0.199816 -1.308431) + (xy -0.187342 -1.251758) + (xy -0.176385 -1.193035) + (xy -0.167777 -1.137064) + (xy -0.162354 -1.088644) + (xy -0.160866 -1.058077) + (xy -0.158975 -1.033688) + (xy -0.153494 -1.025686) + (xy -0.144714 -1.034187) + (xy -0.137376 -1.048618) + (xy -0.118736 -1.083855) + (xy -0.090951 -1.127586) + (xy -0.056684 -1.176169) + (xy -0.0186 -1.225963) + (xy 0.020637 -1.273325) + (xy 0.053459 -1.309528) + (xy 0.158954 -1.410005) + (xy 0.268354 -1.494425) + (xy 0.382786 -1.563436) + (xy 0.503378 -1.617684) + (xy 0.631256 -1.657817) + (xy 0.679588 -1.668997) + (xy 0.746284 -1.679466) + (xy 0.823982 -1.685804) + (xy 0.907249 -1.687958) + (xy 0.990652 -1.68587) + (xy 1.068758 -1.679487) + (xy 1.111817 -1.673403) + (xy 1.243928 -1.642469) + (xy 1.370762 -1.596007) + (xy 1.491125 -1.534925) + (xy 1.603824 -1.460129) + (xy 1.707666 -1.372525) + (xy 1.801456 -1.273019) + (xy 1.884002 -1.162517) + (xy 1.95411 -1.041927) + (xy 1.960709 -1.0287) + (xy 2.007841 -0.918793) + (xy 2.042086 -0.80604) + (xy 2.064095 -0.687446) + (xy 2.074518 -0.560014) + (xy 2.075602 -0.499534) + (xy 2.068219 -0.352123) + (xy 2.04592 -0.21262) + (xy 2.00859 -0.080704) + (xy 1.956111 0.043943) + (xy 1.888368 0.161644) + (xy 1.805244 0.272717) + (xy 1.788579 0.2921) + (xy 1.688699 0.393776) + (xy 1.580274 0.480842) + (xy 1.463177 0.553372) + (xy 1.337284 0.611441) + (xy 1.202467 0.655124) + (xy 1.159934 0.665509) + (xy 1.117339 0.672616) + (xy 1.06218 0.678075) + (xy 0.998756 0.681802) + (xy 0.931364 0.683718) + (xy 0.8643 0.683739) + (xy 0.801862 0.681783) + (xy 0.748348 0.67777) + (xy 0.719667 0.673896) + (xy 0.583232 0.643372) + (xy 0.457351 0.600273) + (xy 0.340338 0.54373) + (xy 0.230509 0.472871) + (xy 0.126178 0.386826) + (xy 0.08188 0.344232) + (xy -0.011917 0.239381) + (xy -0.090045 0.128622) + (xy -0.15301 0.011062) + (xy -0.201317 -0.114194) + (xy -0.224475 -0.197552) + (xy -0.233049 -0.235347) + (xy -0.240188 -0.272105) + (xy -0.246029 -0.309844) + (xy -0.250703 -0.350585) + (xy -0.254344 -0.396348) + (xy -0.257088 -0.449153) + (xy -0.259066 -0.51102) + (xy -0.260414 -0.583968) + (xy -0.261264 -0.670017) + (xy -0.261713 -0.75992) + (xy -0.262104 -0.845947) + (xy -0.262684 -0.91722) + (xy -0.263549 -0.97592) + (xy -0.264792 -1.024226) + (xy -0.266507 -1.064317) + (xy -0.268789 -1.098373) + (xy -0.271733 -1.128575) + (xy -0.275432 -1.157101) + (xy -0.27998 -1.186131) + (xy -0.280207 -1.187487) + (xy -0.311115 -1.32563) + (xy -0.35601 -1.454279) + (xy -0.414986 -1.573618) + (xy -0.488137 -1.683834) + (xy -0.575556 -1.785111) + (xy -0.588889 -1.798538) + (xy -0.697015 -1.894494) + (xy -0.811983 -1.974965) + (xy -0.933851 -2.03998) + (xy -1.062676 -2.08957) + (xy -1.198516 -2.123764) + (xy -1.231647 -2.129599) + (xy -1.27369 -2.134511) + (xy -1.327903 -2.138062) + (xy -1.38964 -2.140212) + (xy -1.454253 -2.140924) + (xy -1.517095 -2.140159) + (xy -1.573519 -2.137879) + (xy -1.61888 -2.134046) + (xy -1.627832 -2.132858) + (xy -1.755099 -2.107665) + (xy -1.873747 -2.07007) + (xy -1.986722 -2.018829) + (xy -2.096971 -1.952698) + (xy -2.15849 -1.908793) + (xy -2.263949 -1.819057) + (xy -2.356729 -1.718652) + (xy -2.436146 -1.608649) + (xy -2.501517 -1.490118) + (xy -2.552159 -1.364128) + (xy -2.585766 -1.239648) + (xy -2.590256 -1.21697) + (xy -2.594285 -1.193457) + (xy -2.59788 -1.168123) + (xy -2.601063 -1.139982) + (xy -2.603859 -1.10805) + (xy -2.606294 -1.07134) + (xy -2.60839 -1.028868) + (xy -2.610174 -0.979649) + (xy -2.611669 -0.922696) + (xy -2.612899 -0.857024) + (xy -2.613889 -0.781649) + (xy -2.614665 -0.695584) + (xy -2.615249 -0.597845) + (xy -2.615667 -0.487446) + (xy -2.615942 -0.363401) + (xy -2.616101 -0.224725) + (xy -2.616166 -0.070433) + (xy -2.616171 -0.014817) + (xy -2.6162 0.956733) + (xy -2.125133 0.956733) + (xy -2.125133 0.000777) + (xy -2.125108 -0.150307) + (xy -2.125025 -0.285462) + (xy -2.124872 -0.40569) + (xy -2.124634 -0.511996) + (xy -2.1243 -0.605382) + (xy -2.123856 -0.686854) + (xy -2.12329 -0.757413) + (xy -2.12259 -0.818064) + (xy -2.121741 -0.869811) + (xy -2.120732 -0.913656) + (xy -2.119549 -0.950604) + (xy -2.11818 -0.981658) + (xy -2.116612 -1.007821) + (xy -2.114833 -1.030098) + (xy -2.112828 -1.049491) + (xy -2.111601 -1.059481) + (xy -2.093293 -1.168757) + (xy -2.068522 -1.263174) + (xy -2.036976 -1.343652) + (xy -1.998346 -1.411109) + (xy -1.987099 -1.426633) + (xy -1.916226 -1.506592) + (xy -1.835976 -1.572453) + (xy -1.746451 -1.62415) + (xy -1.647756 -1.661618) + (xy -1.604433 -1.672904) + (xy -1.542982 -1.682828) + (xy -1.471762 -1.687737) + (xy -1.397179 -1.687632) + (xy -1.325637 -1.682512) + (xy -1.265766 -1.672881) + (xy -1.167461 -1.64262) + (xy -1.076954 -1.597993) + (xy -0.995535 -1.54025) + (xy -0.924489 -1.470637) + (xy -0.865102 -1.390403) + (xy -0.818663 -1.300797) + (xy -0.788061 -1.20951) + (xy -0.778734 -1.171071) + (xy -0.771054 -1.134617) + (xy -0.76485 -1.097929) + (xy -0.75995 -1.058786) + (xy -0.756182 -1.014966) + (xy -0.753375 -0.964248) + (xy -0.751358 -0.904412) + (xy -0.74996 -0.833238) + (xy -0.74901 -0.748503) + (xy -0.748636 -0.6985) + (xy -0.748002 -0.624002) + (xy -0.747123 -0.55205) + (xy -0.746047 -0.485085) + (xy -0.744824 -0.425548) + (xy -0.743504 -0.375878) + (xy -0.742136 -0.338516) + (xy -0.740911 -0.3175) + (xy -0.719901 -0.166599) + (xy -0.682612 -0.017773) + (xy -0.629683 0.12764) + (xy -0.561752 0.268305) + (xy -0.479457 0.402886) + (xy -0.383436 0.530047) + (xy -0.283891 0.638966) + (xy -0.166521 0.748446) + (xy -0.048378 0.842386) + (xy 0.072627 0.922127) + (xy 0.198587 0.989009) + (xy 0.331593 1.044374) + (xy 0.3683 1.057291) + (xy 0.473789 1.089696) + (xy 0.576304 1.113761) + (xy 0.68004 1.130063) + (xy 0.789196 1.139182) + (xy 0.907969 1.141696) + (xy 0.972904 1.14064) + ) + + (stroke (width 0.01) (type solid)) (fill solid) (layer "B.SilkS") (tstamp 6fe847c7-4133-438d-8e5b-c220ebfd4097)) ) - (gr_circle (center 44.9 159.279) (end 45.2 159.279) (layer F.SilkS) (width 0.7) (tstamp 5A8DF5BB)) - (gr_circle (center 44.011 159.025) (end 44.481 159.025) (layer B.SilkS) (width 0.9)) - (dimension 24.511 (width 0.3) (layer Cmts.User) - (gr_text "24,511 mm" (at 23.053828 148.0395 90) (layer Cmts.User) - (effects (font (size 1.5 1.5) (thickness 0.3))) + (footprint "Common_Footprint:D_SOD-323F" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c6d5323) + (at 34.5876 147.4934) + (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") + (tags "SOD-323F") + (path "/00000000-0000-0000-0000-00005c64666c") + (attr smd) + (fp_text reference "D4" (at 0 1.85) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 3a964681-0093-454d-9349-b0258026ac8d) + ) + (fp_text value "D_Zener" (at 0.1 -1.9) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp b93dfc87-84f1-43c5-9553-f29a0eea538b) + ) + (fp_text user "${REFERENCE}" (at 0 1.016) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp 4536ff65-b184-4b61-9f81-227d5f5d7896) + ) + (fp_line (start -1.5 -0.85) (end 1.05 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp a932093b-0ebd-45a3-a3fa-8fb6f3e5e927)) + (fp_line (start -1.5 0.85) (end -1.5 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 903ff9f9-22f7-479a-8e79-d048950818ee)) + (fp_line (start -1.5 0.85) (end 1.05 0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 6960dec4-380c-4a40-83e4-01dc06a7f609)) + (fp_line (start -1.6 -0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 412a176f-6579-4986-9e48-5048341c33a6)) + (fp_line (start -1.6 0.95) (end -1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 1291d446-45f6-498d-95ab-460f56226b6d)) + (fp_line (start -1.6 0.95) (end 1.6 0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 73e78393-7450-4305-9420-b426115bd2b0)) + (fp_line (start 1.6 0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 8b57f0c5-826d-487f-ad9e-67f273727105)) + (fp_line (start -0.9 -0.7) (end -0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 68c78dbd-f530-4cdc-b41d-988b7f41d47b)) + (fp_line (start -0.9 0.7) (end 0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 212cea35-adf1-439f-8586-0307a3a93220)) + (fp_line (start -0.3 0) (end -0.5 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp ea51636c-8a31-4100-8dc4-c4236da4d8cc)) + (fp_line (start -0.3 0) (end 0.2 0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 00449a07-b11f-4498-8446-c366999660d3)) + (fp_line (start -0.3 0.35) (end -0.3 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 51b91c0d-46e2-48b2-bd61-66fdc3955d5e)) + (fp_line (start 0.2 -0.35) (end -0.3 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 956add95-a068-4bba-9dce-fdd1414950d7)) + (fp_line (start 0.2 0) (end 0.45 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 348653cd-2b55-4961-b288-4fb52d189399)) + (fp_line (start 0.2 0.35) (end 0.2 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp ffbe1d3e-70bd-4153-84d2-11f9906fbb05)) + (fp_line (start 0.9 -0.7) (end -0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 59a61447-7fce-408f-8174-cb46e738e653)) + (fp_line (start 0.9 0.7) (end 0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp c96b747b-18bb-4b04-8a64-33b1ac57604e)) + (pad "1" smd rect (at -1.1 0) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 23 "/PTPB") (tstamp dcf2f84f-39f4-468d-b4e6-26c429472fc0)) + (pad "2" smd rect (at 1.1 0) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 67a05ee2-27f3-4fc1-9284-d6479f9edcec)) + (model "${KISYS3DMOD}/SOD-323F.STEP" + (offset (xyz -1.099999983 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) ) - (feature1 (pts (xy 27.755 135.784) (xy 21.703828 135.784))) - (feature2 (pts (xy 27.755 160.295) (xy 21.703828 160.295))) - (crossbar (pts (xy 24.403828 160.295) (xy 24.403828 135.784))) - (arrow1a (pts (xy 24.403828 135.784) (xy 24.990249 136.910504))) - (arrow1b (pts (xy 24.403828 135.784) (xy 23.817407 136.910504))) - (arrow2a (pts (xy 24.403828 160.295) (xy 24.990249 159.168496))) - (arrow2b (pts (xy 24.403828 160.295) (xy 23.817407 159.168496))) ) - (dimension 20.32 (width 0.3) (layer Cmts.User) - (gr_text "20,320 mm" (at 37.915 165.455) (layer Cmts.User) - (effects (font (size 1.5 1.5) (thickness 0.3))) + + (footprint "Common_Footprint:D_SOD-323F" (layer "B.Cu") + (tstamp 00000000-0000-0000-0000-00005c6d533a) + (at 34.5876 145.7154 180) + (descr "SOD-323F http://www.nxp.com/documents/outline_drawing/SOD323F.pdf") + (tags "SOD-323F") + (path "/00000000-0000-0000-0000-00005c647283") + (attr smd) + (fp_text reference "D5" (at 0 1.85 180) (layer "B.SilkS") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp d4ef6a25-9f44-4e75-931f-5a4aa51d5a84) + ) + (fp_text value "D_Zener" (at 0.1 -1.9 180) (layer "B.Fab") hide + (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) + (tstamp 70c4d0a5-11b4-457d-8a13-70c6cf66681e) + ) + (fp_text user "${REFERENCE}" (at 0 1.016 180) (layer "B.Fab") + (effects (font (size 0.4 0.4) (thickness 0.1)) (justify mirror)) + (tstamp 83c05df3-1078-4b3c-8b02-74e21009257b) + ) + (fp_line (start -1.5 -0.85) (end 1.05 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 321606f2-6c87-4fab-9de6-0572ac47cb81)) + (fp_line (start -1.5 0.85) (end -1.5 -0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp 0441bd52-e959-492f-83da-6ec337778d1a)) + (fp_line (start -1.5 0.85) (end 1.05 0.85) + (stroke (width 0.12) (type solid)) (layer "B.SilkS") (tstamp d7390f90-e50c-44b0-8513-c838c75afe8f)) + (fp_line (start -1.6 -0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 9476b820-2581-40ef-9aef-0fd422056119)) + (fp_line (start -1.6 0.95) (end -1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 3c9cd61c-f981-447e-b0ae-ac41b60732cd)) + (fp_line (start -1.6 0.95) (end 1.6 0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp a6e7fb6c-1b95-4332-8152-888ae69556f4)) + (fp_line (start 1.6 0.95) (end 1.6 -0.95) + (stroke (width 0.05) (type solid)) (layer "B.CrtYd") (tstamp 537e2acd-b086-4acd-b524-5101062af9c4)) + (fp_line (start -0.9 -0.7) (end -0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp aa355f8b-5cbb-4186-9ee7-1c1571216f83)) + (fp_line (start -0.9 0.7) (end 0.9 0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 4af2a1f1-821b-48cc-9d11-5c34488523f8)) + (fp_line (start -0.3 0) (end -0.5 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a175e50a-8a06-4eaf-99ab-fcdf68333e2b)) + (fp_line (start -0.3 0) (end 0.2 0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 923bc3ca-5af5-4cfb-bb7b-d4fdfcbd5242)) + (fp_line (start -0.3 0.35) (end -0.3 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 1e4b56a7-c266-48d7-9af2-1e736f4e2413)) + (fp_line (start 0.2 -0.35) (end -0.3 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 92084649-a621-476c-abc6-ef81644c6695)) + (fp_line (start 0.2 0) (end 0.45 0) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 3c7d0468-52d2-4436-9747-a2ed1fe78cab)) + (fp_line (start 0.2 0.35) (end 0.2 -0.35) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp afe1f315-5755-4bf4-b64c-b79c4e07cd0d)) + (fp_line (start 0.9 -0.7) (end -0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp a65b04cd-3f13-4706-99b1-e32cbbca7337)) + (fp_line (start 0.9 0.7) (end 0.9 -0.7) + (stroke (width 0.1) (type solid)) (layer "B.Fab") (tstamp 91922edb-ab5b-483b-85ba-665fb9f6975c)) + (pad "1" smd rect (at -1.1 0 180) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 21 "/PTPA") (tstamp f63f316c-ede5-4709-9fc3-d2ec27af5351)) + (pad "2" smd rect (at 1.1 0 180) (size 0.5 0.5) (layers "B.Cu" "B.Paste" "B.Mask") + (net 25 "GND") (tstamp 362e3836-64aa-4f10-bb2a-7a9a8e38b43d)) + (model "${KISYS3DMOD}/SOD-323F.STEP" + (offset (xyz -1.099999983 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) ) - (feature1 (pts (xy 48.075 160.295) (xy 48.075 166.805))) - (feature2 (pts (xy 27.755 160.295) (xy 27.755 166.805))) - (crossbar (pts (xy 27.755 164.105) (xy 48.075 164.105))) - (arrow1a (pts (xy 48.075 164.105) (xy 46.948496 164.691421))) - (arrow1b (pts (xy 48.075 164.105) (xy 46.948496 163.518579))) - (arrow2a (pts (xy 27.755 164.105) (xy 28.881504 164.691421))) - (arrow2b (pts (xy 27.755 164.105) (xy 28.881504 163.518579))) ) - (gr_text 5 (at 30.3 148.9) (layer B.SilkS) (tstamp 5A79B3C7) + + (gr_circle (center 44.011 159.025) (end 44.481 159.025) + (stroke (width 0.9) (type solid)) (fill none) (layer "B.SilkS") (tstamp 60df33db-f86a-4aea-bf16-15a8fee34fcd)) + (gr_circle (center 44.9 159.279) (end 45.2 159.279) + (stroke (width 0.7) (type solid)) (fill none) (layer "F.SilkS") (tstamp 00000000-0000-0000-0000-00005a8df5bb)) + (gr_line (start 48.05 138.714214) (end 48.05 159.3) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 0b96cd60-4d01-4283-b2d0-9f2b6c525fbc)) + (gr_arc (start 27.75 138.714214) (mid 27.82612 138.331531) (end 28.042893 138.007107) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 0e118bce-b7b3-4a27-8c09-2957d08374ee)) + (gr_circle (center 44.9 139) (end 46 139) + (stroke (width 0.1) (type solid)) (fill none) (layer "Edge.Cuts") (tstamp 29eff60b-c805-401c-b44f-a86ed6240c59)) + (gr_line (start 28.75 160.3) (end 47.05 160.3) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 35c1ad2f-90f9-4c24-8ca2-d1dd8a461189)) + (gr_line (start 47.757106 138.007107) (end 45.842893 136.092894) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 5ac61d63-e6cf-4869-b314-debccf6098d3)) + (gr_arc (start 47.757107 138.007107) (mid 47.97388 138.33153) (end 48.05 138.714214) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 67b8d2a5-577d-4035-992c-b335bec5f9c4)) + (gr_arc (start 29.957106 136.092893) (mid 30.281529 135.87612) (end 30.664213 135.8) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 72c1ddb0-720a-4b4f-b12a-e9e46b3c0e17)) + (gr_line (start 29.957106 136.092894) (end 28.042893 138.007107) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp 87d79c79-e06d-4620-a050-3a5d60f92a56)) + (gr_circle (center 30.9 139) (end 32 139) + (stroke (width 0.1) (type solid)) (fill none) (layer "Edge.Cuts") (tstamp 933dad59-279b-45d2-8563-e8499e2ef176)) + (gr_arc (start 45.135787 135.8) (mid 45.51847 135.876121) (end 45.842893 136.092894) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp a71d00cb-7495-4dd6-a1d7-35a88b3dc501)) + (gr_circle (center 37.9 146.5) (end 39 146.5) + (stroke (width 0.1) (type solid)) (fill none) (layer "Edge.Cuts") (tstamp ad2b1fac-6a91-4b76-9cbb-61d25d855fb5)) + (gr_arc (start 48.05 159.3) (mid 47.757107 160.007107) (end 47.05 160.3) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp b668d0c4-e8c4-42a0-b94b-6c2efcb2d238)) + (gr_arc (start 28.75 160.3) (mid 28.042893 160.007107) (end 27.75 159.3) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp c3bf38e8-6ae2-421c-88ff-0c9944c43b89)) + (gr_line (start 30.664213 135.8) (end 45.135786 135.8) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp c95d37b7-0963-44cd-b1f4-934f9af039e7)) + (gr_line (start 27.75 138.714214) (end 27.75 159.3) + (stroke (width 0.1) (type solid)) (layer "Edge.Cuts") (tstamp e3547269-f27e-40d2-8824-4e2a10ed460f)) + (gr_text "3v3" (at 44.8 148.9) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a78330a) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text "Rev. 0.2.1" (at 34.867 159.4695) (layer B.SilkS) + (gr_text "GND" (at 31.1 146.4) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a783311) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 9 (at 30.3 159.1) (layer B.SilkS) (tstamp 5A7833EF) + (gr_text "1" (at 45.4 159) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a783338) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 8 (at 30.3 156.5) (layer B.SilkS) (tstamp 5A7833E5) + (gr_text "2" (at 45.4 156.5) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a78334d) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 7 (at 30.3 154) (layer B.SilkS) (tstamp 5A7833DC) + (gr_text "3" (at 45.4 153.9) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a78335a) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 6 (at 30.3 151.4) (layer B.SilkS) (tstamp 5A7833C5) + (gr_text "4" (at 45.4 151.4) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a783367) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 4 (at 45.4 151.4) (layer B.SilkS) (tstamp 5A783367) + (gr_text "6" (at 30.3 151.4) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a7833c5) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 3 (at 45.4 153.9) (layer B.SilkS) (tstamp 5A78335A) + (gr_text "7" (at 30.3 154) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a7833dc) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 2 (at 45.4 156.5) (layer B.SilkS) (tstamp 5A78334D) + (gr_text "8" (at 30.3 156.5) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a7833e5) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 1 (at 45.4 159) (layer B.SilkS) (tstamp 5A783338) + (gr_text "9" (at 30.3 159.1) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a7833ef) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text GND (at 31.1 146.4) (layer B.SilkS) (tstamp 5A783311) + (gr_text "5" (at 30.3 148.9) (layer "B.SilkS") (tstamp 00000000-0000-0000-0000-00005a79b3c7) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text 3v3 (at 44.8 148.9) (layer B.SilkS) (tstamp 5A78330A) + (gr_text "Vin" (at 45 146.3) (layer "B.SilkS") (tstamp 65e1b4cf-3cfc-446e-8e21-fd49e1f0abc2) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_text Vin (at 45 146.3) (layer B.SilkS) + (gr_text "Rev. 0.2.1" (at 34.867 159.4695) (layer "B.SilkS") (tstamp 993f369a-90f1-4499-8547-69b7fff15607) (effects (font (size 0.75 0.75) (thickness 0.125)) (justify mirror)) ) - (gr_circle (center 37.9 146.5) (end 39 146.5) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 45.135786 136.8) (end 45.842893 136.092894) (angle -45) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 47.05 159.3) (end 47.05 160.3) (angle -90) (layer Edge.Cuts) (width 0.1)) - (gr_circle (center 44.9 139) (end 46 139) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 27.75 138.714214) (end 27.75 159.3) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 28.75 160.3) (end 47.05 160.3) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 47.05 138.714214) (end 48.05 138.714214) (angle -45) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 28.75 159.3) (end 27.75 159.3) (angle -90) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 30.664213 135.8) (end 45.135786 135.8) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 47.757106 138.007107) (end 45.842893 136.092894) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 30.664213 136.8) (end 30.664213 135.8) (angle -45) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 48.05 138.714214) (end 48.05 159.3) (layer Edge.Cuts) (width 0.1)) - (gr_line (start 29.957106 136.092894) (end 28.042893 138.007107) (layer Edge.Cuts) (width 0.1)) - (gr_arc (start 28.75 138.714214) (end 28.042893 138.007107) (angle -45) (layer Edge.Cuts) (width 0.1)) - (gr_circle (center 30.9 139) (end 32 139) (layer Edge.Cuts) (width 0.1)) - - (segment (start 38.165 149.3) (end 38.165 148.151467) (width 0.15) (layer B.Cu) (net 19)) - (via (at 38.188551 148.127916) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 19)) - (segment (start 38.165 148.151467) (end 38.188551 148.127916) (width 0.15) (layer B.Cu) (net 19)) - (segment (start 35.576 146.594) (end 37.033496 148.051496) (width 0.15) (layer F.Cu) (net 19)) - (segment (start 35.121 146.594) (end 35.576 146.594) (width 0.15) (layer F.Cu) (net 19)) - (segment (start 38.112131 148.051496) (end 38.188551 148.127916) (width 0.15) (layer F.Cu) (net 19)) - (segment (start 37.033496 148.051496) (end 38.112131 148.051496) (width 0.15) (layer F.Cu) (net 19)) - (via (at 36.68999 148.512666) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 20)) - (segment (start 36.665 149.3) (end 36.665 148.537656) (width 0.15) (layer B.Cu) (net 20)) - (segment (start 32.581 146.594) (end 32.581 147.174) (width 0.15) (layer F.Cu) (net 20)) - (segment (start 34.442202 149.035202) (end 36.521007 149.035202) (width 0.15) (layer F.Cu) (net 20)) - (segment (start 36.665 148.537656) (end 36.68999 148.512666) (width 0.15) (layer B.Cu) (net 20)) - (segment (start 32.581 147.174) (end 34.442202 149.035202) (width 0.15) (layer F.Cu) (net 20)) - (segment (start 36.68999 148.866219) (end 36.68999 148.512666) (width 0.15) (layer F.Cu) (net 20)) - (segment (start 36.521007 149.035202) (end 36.68999 148.866219) (width 0.15) (layer F.Cu) (net 20)) - (segment (start 35.7126 146.307) (end 35.7126 145.7154) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 36.4672 147.0616) (end 35.7126 146.307) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 36.4672 147.214) (end 36.4672 147.0616) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 37.165 147.9118) (end 36.4672 147.214) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 37.165 149.3) (end 37.165 147.9118) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 35.7126 145.6572) (end 35.7126 145.7154) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 36.5434 144.8264) (end 35.7126 145.6572) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 37.0332 144.8264) (end 36.5434 144.8264) (width 0.15) (layer B.Cu) (net 21)) - (segment (start 37.665 148.530496) (end 37.661 148.526496) (width 0.15) (layer B.Cu) (net 22)) - (segment (start 37.665 149.3) (end 37.665 148.530496) (width 0.15) (layer B.Cu) (net 22)) - (via (at 37.661 148.526496) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 22)) - (segment (start 33.472213 149.335213) (end 31.311 147.174) (width 0.15) (layer F.Cu) (net 22)) - (segment (start 36.852283 149.335213) (end 33.472213 149.335213) (width 0.15) (layer F.Cu) (net 22)) - (segment (start 31.311 147.174) (end 31.311 146.594) (width 0.15) (layer F.Cu) (net 22)) - (segment (start 37.661 148.526496) (end 36.852283 149.335213) (width 0.15) (layer F.Cu) (net 22)) - (segment (start 34.0126 147.4934) (end 33.4626 147.4934) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 34.2834 147.4934) (end 34.0126 147.4934) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 35.665 148.875) (end 34.2834 147.4934) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 35.665 149.3) (end 35.665 148.875) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 32.6318 148.3062) (end 33.4446 147.4934) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 33.4446 147.4934) (end 33.4626 147.4934) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 32.073 148.3062) (end 32.6318 148.3062) (width 0.15) (layer B.Cu) (net 23)) - (segment (start 35.9592 148.484) (end 36.0354 148.5602) (width 0.15) (layer F.Cu) (net 24)) - (segment (start 35.161 148.484) (end 35.9592 148.484) (width 0.15) (layer F.Cu) (net 24)) - (segment (start 33.851 146.594) (end 33.851 147.174) (width 0.15) (layer F.Cu) (net 24)) - (segment (start 36.165 148.6898) (end 36.0354 148.5602) (width 0.15) (layer B.Cu) (net 24)) - (via (at 36.0354 148.5602) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 24)) - (segment (start 33.851 147.174) (end 35.161 148.484) (width 0.15) (layer F.Cu) (net 24)) - (segment (start 36.165 149.3) (end 36.165 148.6898) (width 0.15) (layer B.Cu) (net 24)) - (via (at 38.0166 152.1162) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 25)) - (via (at 36.1116 150.9478) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 25)) - (via (at 42.614 148.103) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 25)) - (via (at 35.51216 153.5894) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 25)) - (segment (start 32.581 151.644) (end 32.581 153.0759) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 32.581 153.0759) (end 32.3524 153.3045) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 32.581 150.7065) (end 30.5236 148.6491) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 32.581 151.644) (end 32.581 150.7065) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 30.5236 148.6491) (end 30.5236 145.2764) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 30.5236 145.2764) (end 31.200001 144.599999) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 31.200001 144.599999) (end 31.8 144) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 32.675001 144.875001) (end 36.513729 144.875001) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 31.8 144) (end 32.675001 144.875001) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 36.513729 144.875001) (end 38.34033 143.0484) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 38.34033 143.0484) (end 41.0484 143.0484) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 41.0484 143.0484) (end 41.400001 143.400001) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 41.400001 143.400001) (end 42 144) (width 0.15) (layer F.Cu) (net 26)) - (segment (start 42.570736 139.975) (end 42.995 139.975) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 33.8 142) (end 35.825 139.975) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 35.825 139.975) (end 42.570736 139.975) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 44 142) (end 44 140.98) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 43.294999 140.274999) (end 42.995 139.975) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 44 140.98) (end 43.294999 140.274999) (width 0.15) (layer B.Cu) (net 27)) - (via (at 42.995 139.975) (size 0.6) (drill 0.3) (layers F.Cu B.Cu) (net 27)) - (segment (start 33.851 151.644) (end 33.851 153.2029) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 33.851 153.2029) (end 33.7494 153.3045) (width 0.15) (layer F.Cu) (net 27)) - (via (at 31.057 148.357) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 27)) - (segment (start 33.851 151.644) (end 33.851 151.064) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 33.851 151.064) (end 31.144 148.357) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 33.8 142) (end 32.835 142.965) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 32.835 142.965) (end 31.3436 142.965) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 31.144 148.357) (end 31.057 148.357) (width 0.15) (layer F.Cu) (net 27)) - (segment (start 31.3436 142.965) (end 30.807001 143.501599) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 30.807001 148.107001) (end 31.057 148.357) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 30.807001 143.501599) (end 30.807001 148.107001) (width 0.15) (layer B.Cu) (net 27)) - (segment (start 45.027 157.461718) (end 43.796282 156.231) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 45.027 159.406) (end 45.027 157.461718) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 43.796282 156.231) (end 43.187547 156.231) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 43.187547 156.231) (end 42.7283 155.771753) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.7283 155.771753) (end 42.7283 155.4182) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 40.074 159.406) (end 45.027 159.406) (width 0.15) (layer B.Cu) (net 28)) - (via (at 45.027 159.406) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 28)) - (segment (start 36.73 156.993) (end 36.73 157.69939) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 36.73 157.69939) (end 36.7786 157.74799) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 35.121 151.644) (end 35.576 151.644) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 36.47399 152.54199) (end 36.47399 157.44338) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 36.528601 157.497991) (end 36.7786 157.74799) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 36.47399 157.44338) (end 36.528601 157.497991) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 35.576 151.644) (end 36.47399 152.54199) (width 0.15) (layer F.Cu) (net 28)) - (via (at 36.7786 157.74799) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 28)) - (segment (start 42.6961 155.425) (end 42.7283 155.3928) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 41.29 155.425) (end 42.6961 155.425) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 44.265 152.425) (end 43.965 152.425) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 43.965 152.425) (end 42.7283 153.6617) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.7283 155.039247) (end 42.7283 155.3928) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.7283 153.6617) (end 42.7283 155.039247) (width 0.15) (layer F.Cu) (net 28)) - (via (at 42.7283 155.4182) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 28)) - (segment (start 41.767 148.5514) (end 43.2396 150.024) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 41.767 148.357) (end 41.767 148.5514) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 43.2396 150.024) (end 43.503 150.024) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 43.503 150.024) (end 43.503 149.246) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.709 156.094) (end 40.709 156.908) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.665 156.05) (end 40.709 156.094) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.709 156.908) (end 40.624 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 36.78 156.993) (end 37.255001 157.468001) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 36.73 156.993) (end 36.78 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 37.255001 157.468001) (end 39.852999 157.468001) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 39.852999 157.468001) (end 40.328 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.328 156.993) (end 40.624 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 43.503 149.246) (end 43.064 149.685) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 43.064 149.685) (end 42.614 149.685) (width 0.15) (layer F.Cu) (net 28)) - (via (at 43.503 149.246) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 28)) - (segment (start 36.665 156.05) (end 36.665 156.928) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 36.665 156.928) (end 36.73 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 41.29 155.425) (end 40.665 156.05) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.624 156.993) (end 41.683 156.993) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.665 149.3) (end 40.965 149.3) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 40.965 149.3) (end 41.767 148.498) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 41.767 148.498) (end 41.767 148.357) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 43.394 150.365) (end 42.714 149.685) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 44.265 150.365) (end 43.394 150.365) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.714 149.685) (end 42.614 149.685) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.614 149.685) (end 42.059 149.685) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 42.059 149.685) (end 41.609 150.135) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 44.265 150.365) (end 44.265 149.715) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 44.265 149.715) (end 45.115 148.865) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 45.115 148.865) (end 45.72737 148.865) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 45.72737 148.865) (end 46.805 148.865) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 44.265 152.425) (end 44.265 150.365) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 33.851477 149.925) (end 33.7367 149.810223) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 34.54 149.925) (end 33.851477 149.925) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 33.131 149.2968) (end 33.181 149.2968) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 35.121 151.064) (end 33.867223 149.810223) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 35.121 151.644) (end 35.121 151.064) (width 0.15) (layer F.Cu) (net 28)) - (via (at 33.7367 149.810223) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 28)) - (segment (start 33.867223 149.810223) (end 33.7367 149.810223) (width 0.15) (layer F.Cu) (net 28)) - (segment (start 33.181 149.2968) (end 33.694423 149.810223) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 33.694423 149.810223) (end 33.7367 149.810223) (width 0.15) (layer B.Cu) (net 28)) - (segment (start 38.6135 158.348) (end 32.658 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 32.658 158.348) (end 32.455 158.145) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 46.805 146.325) (end 46.6653 146.1853) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 46.6653 146.1853) (end 40.979698 146.1853) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.979698 146.1853) (end 36.899 150.265998) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 36.899 150.265998) (end 36.899 156.9803) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 36.899 156.9803) (end 38.2667 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 38.2667 158.348) (end 38.8167 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.336 158.3472) (end 40.3368 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.336 158.1401) (end 40.336 158.3472) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.3368 158.348) (end 40.5439 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 41.809 146.579) (end 46.551 146.579) (width 0.3) (layer B.Cu) (net 29)) - (segment (start 46.551 146.579) (end 46.805 146.325) (width 0.3) (layer B.Cu) (net 29)) - (segment (start 45.72737 146.325) (end 46.805 146.325) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.336 156.553) (end 40.336 158.1401) (width 0.25) (layer F.Cu) (net 29)) - (segment (start 39.6803 158.348) (end 40.5439 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 38.8167 158.348) (end 39.6803 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 38.7747 158.39) (end 38.8167 158.348) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 40.5439 158.348) (end 41.35628 159.16038) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 41.35628 159.16038) (end 41.35628 159.44664) (width 0.3) (layer F.Cu) (net 29)) - (segment (start 35.8 144) (end 35.8109 144.0109) (width 0.5) (layer F.Cu) (net 29)) - (segment (start 29.8 142) (end 29.8 142.02) (width 0.5) (layer B.Cu) (net 29)) - (segment (start 38.665 148.62) (end 38.665 148.875) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 38.665 148.875) (end 38.665 149.3) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 38.874988 144.520269) (end 40.252009 145.89729) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 37.25 139.925) (end 37.25 142.119719) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 40.252009 145.89729) (end 40.252009 147.032991) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 40.252009 147.032991) (end 38.665 148.62) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 37.25 142.119719) (end 38.874988 143.744707) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 38.874988 143.744707) (end 38.874988 144.520269) (width 0.15) (layer B.Cu) (net 30)) - (segment (start 39.174999 144.396001) (end 40.582 145.803002) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 39.174999 143.603999) (end 39.174999 144.396001) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 37.9 139.925) (end 37.9 142.329) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 37.9 142.329) (end 39.174999 143.603999) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 40.582 145.803002) (end 40.582 147.214) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 39.165 148.875) (end 39.165 149.3) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 40.582 147.214) (end 39.165 148.631) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 39.165 148.631) (end 39.165 148.875) (width 0.15) (layer B.Cu) (net 31)) - (segment (start 46.0938 150.6938) (end 46.805 151.405) (width 0.15) (layer B.Cu) (net 32)) - (segment (start 41.29 150.925) (end 41.318 150.897) (width 0.15) (layer B.Cu) (net 32)) - (segment (start 41.318 150.897) (end 41.852 150.897) (width 0.15) (layer B.Cu) (net 32)) - (segment (start 41.852 150.897) (end 42.0552 150.6938) (width 0.15) (layer B.Cu) (net 32)) - (segment (start 42.0552 150.6938) (end 46.0938 150.6938) (width 0.15) (layer B.Cu) (net 32)) - (segment (start 41.979 151.278) (end 42.18699 151.07001) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 41.852 151.405) (end 41.956001 151.300999) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 42.18699 151.07001) (end 44.94601 151.07001) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 41.29 151.425) (end 41.31 151.405) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 41.31 151.405) (end 41.852 151.405) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 44.94601 151.07001) (end 46.805 152.929) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 46.805 152.929) (end 46.805 153.945) (width 0.15) (layer B.Cu) (net 33)) - (segment (start 45.662 155.342) (end 46.043001 155.723001) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 45.662 152.552998) (end 45.662 155.342) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 42.232279 151.448999) (end 44.558001 151.448999) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 44.558001 151.448999) (end 45.662 152.552998) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 41.29 151.925) (end 41.756278 151.925) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 41.756278 151.925) (end 42.232279 151.448999) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 46.043001 155.723001) (end 46.805 156.485) (width 0.15) (layer B.Cu) (net 34)) - (segment (start 36.165 156.475) (end 36.160593 156.479407) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 36.165 156.05) (end 36.165 156.475) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 36.160593 156.479407) (end 36.160593 158.159593) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 36.160593 158.159593) (end 36.518 158.517) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 36.518 158.517) (end 46.297 158.517) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 46.297 158.517) (end 46.805 159.025) (width 0.15) (layer B.Cu) (net 35)) - (segment (start 30.10263 159.025) (end 29.025 159.025) (width 0.15) (layer B.Cu) (net 36)) - (segment (start 35.665 156.948802) (end 33.588802 159.025) (width 0.15) (layer B.Cu) (net 36)) - (segment (start 33.588802 159.025) (end 30.10263 159.025) (width 0.15) (layer B.Cu) (net 36)) - (segment (start 35.665 156.05) (end 35.665 156.948802) (width 0.15) (layer B.Cu) (net 36)) - (segment (start 33.2454 152.925) (end 29.6854 156.485) (width 0.15) (layer B.Cu) (net 37)) - (segment (start 34.54 152.925) (end 33.2454 152.925) (width 0.15) (layer B.Cu) (net 37)) - (segment (start 29.6854 156.485) (end 29.025 156.485) (width 0.15) (layer B.Cu) (net 37)) - (segment (start 32.3484 152.425) (end 31.0824 153.691) (width 0.15) (layer B.Cu) (net 38)) - (segment (start 34.54 152.425) (end 32.3484 152.425) (width 0.15) (layer B.Cu) (net 38)) - (segment (start 31.0824 153.691) (end 29.279 153.691) (width 0.15) (layer B.Cu) (net 38)) - (segment (start 29.279 153.691) (end 29.025 153.945) (width 0.15) (layer B.Cu) (net 38)) - (segment (start 34.54 151.425) (end 29.045 151.425) (width 0.15) (layer B.Cu) (net 39)) - (segment (start 29.045 151.425) (end 29.025 151.405) (width 0.15) (layer B.Cu) (net 39)) - (segment (start 30.2188 148.865) (end 32.2788 150.925) (width 0.15) (layer B.Cu) (net 40)) - (segment (start 29.025 148.865) (end 30.2188 148.865) (width 0.15) (layer B.Cu) (net 40)) - (segment (start 32.2788 150.925) (end 34.54 150.925) (width 0.15) (layer B.Cu) (net 40)) - (segment (start 42.36 153.0052) (end 42.7537 152.6115) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.36 153.368) (end 42.36 153.0052) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.7537 152.6115) (end 42.7537 152.1233) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.7537 152.1233) (end 42.853 152.024) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 41.29 153.425) (end 42.303 153.425) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.303 153.425) (end 42.36 153.368) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.46 153.495) (end 42.36 153.495) (width 0.15) (layer B.Cu) (net 41)) - (segment (start 42.295 153.425) (end 42.299 153.421) (width 0.15) (layer B.Cu) (net 41)) - (via (at 39.4644 145.893202) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 42)) - (segment (start 39.214401 145.643203) (end 39.4644 145.893202) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 39.609 146.579) (end 39.609 146.037802) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 39.609 146.037802) (end 39.4644 145.893202) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 38.574977 145.003779) (end 39.214401 145.643203) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 36.6 139.925) (end 36.6 140.75) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 36.772 142.065998) (end 38.574977 143.868975) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 36.772 140.922) (end 36.772 142.065998) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 36.6 140.75) (end 36.772 140.922) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 38.574977 143.868975) (end 38.574977 145.003779) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 41.068601 145.685999) (end 41.3186 145.436) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 39.921602 145.436) (end 40.965047 145.436) (width 0.15) (layer F.Cu) (net 42)) - (segment (start 40.965047 145.436) (end 41.3186 145.436) (width 0.15) (layer F.Cu) (net 42)) - (segment (start 41.068601 146.833603) (end 41.068601 145.685999) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 43.9166 147.595) (end 41.829998 147.595) (width 0.15) (layer B.Cu) (net 42)) - (segment (start 39.4644 145.893202) (end 39.921602 145.436) (width 0.15) (layer F.Cu) (net 42)) - (segment (start 41.829998 147.595) (end 41.068601 146.833603) (width 0.15) (layer B.Cu) (net 42)) - (via (at 41.3186 145.436) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 42)) - (segment (start 45.6112 149.6778) (end 45.6112 152.783802) (width 0.15) (layer F.Cu) (net 43)) - (segment (start 45.008804 153.386198) (end 44.529653 153.386198) (width 0.15) (layer F.Cu) (net 43)) - (segment (start 44.529653 153.386198) (end 44.1761 153.386198) (width 0.15) (layer F.Cu) (net 43)) - (segment (start 44.153 152.024) (end 44.1761 152.0471) (width 0.15) (layer B.Cu) (net 43)) - (segment (start 44.1761 153.032645) (end 44.1761 153.386198) (width 0.15) (layer B.Cu) (net 43)) - (segment (start 44.1761 152.0471) (end 44.1761 153.032645) (width 0.15) (layer B.Cu) (net 43)) - (segment (start 45.6112 152.783802) (end 45.008804 153.386198) (width 0.15) (layer F.Cu) (net 43)) - (via (at 44.1761 153.386198) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 43)) - (via (at 45.6112 149.6778) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 43)) - (segment (start 44.8166 148.8832) (end 45.6112 149.6778) (width 0.15) (layer B.Cu) (net 43)) - (segment (start 44.8166 147.595) (end 44.8166 148.8832) (width 0.15) (layer B.Cu) (net 43)) - (segment (start 38.59572 155.47084) (end 38.59572 154.00472) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 38.59572 154.00472) (end 38.282 153.691) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 39.836 152.353) (end 39.836 153.037) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 39.836 153.037) (end 39.182 153.691) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 39.182 153.691) (end 38.282 153.691) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 39.836 152.353) (end 39.836 150.162) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 39.836 150.162) (end 39.809 150.135) (width 0.15) (layer F.Cu) (net 44)) - (segment (start 38.77156 156.795) (end 39.594 156.795) (width 0.15) (layer F.Cu) (net 45)) - (segment (start 38.59572 156.97084) (end 38.77156 156.795) (width 0.15) (layer F.Cu) (net 45)) - (segment (start 39.594 156.795) (end 39.836 156.553) (width 0.15) (layer F.Cu) (net 45)) - (segment (start 43.02252 159.44664) (end 42.25628 159.44664) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 40.836 156.553) (end 40.836 157.408002) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 40.836 157.408002) (end 41.068901 157.640903) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 41.068901 157.640903) (end 41.068901 158.159261) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 41.068901 158.159261) (end 42.25628 159.34664) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 42.25628 159.34664) (end 42.25628 159.44664) (width 0.15) (layer F.Cu) (net 46)) - (segment (start 41.336 156.553) (end 41.336 157.503) (width 0.15) (layer F.Cu) (net 47)) - (segment (start 41.336 157.503) (end 42.05536 158.22236) (width 0.15) (layer F.Cu) (net 47)) - (segment (start 42.05536 158.22236) (end 42.28428 158.22236) (width 0.15) (layer F.Cu) (net 47)) - (segment (start 42.28428 158.22236) (end 42.83428 158.22236) (width 0.15) (layer F.Cu) (net 47)) - (segment (start 41.836 156.553) (end 42.31328 156.553) (width 0.15) (layer F.Cu) (net 48)) - (segment (start 42.31328 156.553) (end 42.67708 156.9168) (width 0.15) (layer F.Cu) (net 48)) - (segment (start 42.614 150.585) (end 42.614 151.463) (width 0.15) (layer F.Cu) (net 50)) - (segment (start 41.336 152.353) (end 41.336 151.403) (width 0.15) (layer F.Cu) (net 50)) - (segment (start 41.336 151.403) (end 41.411001 151.327999) (width 0.15) (layer F.Cu) (net 50)) - (segment (start 41.411001 151.327999) (end 42.478999 151.327999) (width 0.15) (layer F.Cu) (net 50)) - (segment (start 42.478999 151.327999) (end 42.614 151.463) (width 0.15) (layer F.Cu) (net 50)) - (segment (start 40.836 149.06312) (end 40.33012 148.55724) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 40.836 152.353) (end 40.836 149.06312) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 40.33012 148.55724) (end 40.33012 148.54496) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 40.33012 148.54496) (end 39.66704 148.54496) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 39.66704 148.54496) (end 38.804 149.408) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 38.804 149.408) (end 38.804 149.458) (width 0.15) (layer F.Cu) (net 51)) - (segment (start 41.23012 147.87398) (end 41.8781 147.226) (width 0.15) (layer F.Cu) (net 52)) - (segment (start 41.23012 148.54496) (end 41.23012 147.87398) (width 0.15) (layer F.Cu) (net 52)) - (segment (start 41.8781 147.226) (end 42.614 147.226) (width 0.15) (layer F.Cu) (net 52)) - (segment (start 33.7494 154.8213) (end 34.1457 154.425) (width 0.15) (layer B.Cu) (net 53)) - (segment (start 34.1457 154.425) (end 34.54 154.425) (width 0.15) (layer B.Cu) (net 53)) - (segment (start 33.7494 154.2045) (end 33.7494 154.8213) (width 0.15) (layer F.Cu) (net 53)) - (via (at 33.7494 154.8213) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 53)) - (segment (start 32.5048 154.8467) (end 33.4265 153.925) (width 0.15) (layer B.Cu) (net 54)) - (segment (start 33.4265 153.925) (end 34.54 153.925) (width 0.15) (layer B.Cu) (net 54)) - (segment (start 32.3524 154.6943) (end 32.5048 154.8467) (width 0.15) (layer F.Cu) (net 54)) - (segment (start 32.3524 154.2045) (end 32.3524 154.6943) (width 0.15) (layer F.Cu) (net 54)) - (via (at 32.5048 154.8467) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 54)) - (segment (start 32.455 157.245) (end 32.455 156.445) (width 0.15) (layer F.Cu) (net 55)) - (via (at 34.4606 156.4596) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 55)) - (segment (start 35.165 156.05) (end 34.865 156.05) (width 0.15) (layer B.Cu) (net 55)) - (segment (start 34.4606 156.4544) (end 34.4606 156.4596) (width 0.15) (layer B.Cu) (net 55)) - (segment (start 34.865 156.05) (end 34.4606 156.4544) (width 0.15) (layer B.Cu) (net 55)) - (segment (start 32.455 157.245) (end 33.6752 157.245) (width 0.15) (layer F.Cu) (net 55)) - (segment (start 33.6752 157.245) (end 34.210601 156.709599) (width 0.15) (layer F.Cu) (net 55)) - (segment (start 34.210601 156.709599) (end 34.4606 156.4596) (width 0.15) (layer F.Cu) (net 55)) - (segment (start 35.243999 159.198009) (end 34.994 158.94801) (width 0.15) (layer B.Cu) (net 56)) - (segment (start 35.45199 159.406) (end 35.243999 159.198009) (width 0.15) (layer B.Cu) (net 56)) - (segment (start 38.474 159.406) (end 35.45199 159.406) (width 0.15) (layer B.Cu) (net 56)) - (via (at 34.994 158.94801) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 56)) - (via (at 31.565 157.043799) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 56)) - (segment (start 32.4485 157.0438) (end 31.918553 157.043799) (width 0.15) (layer B.Cu) (net 56)) - (segment (start 31.565 157.397352) (end 31.565 157.043799) (width 0.15) (layer F.Cu) (net 56)) - (segment (start 34.994 158.94801) (end 32.263008 158.94801) (width 0.15) (layer F.Cu) (net 56)) - (segment (start 31.565 158.250002) (end 31.565 157.397352) (width 0.15) (layer F.Cu) (net 56)) - (segment (start 31.918553 157.043799) (end 31.565 157.043799) (width 0.15) (layer B.Cu) (net 56)) - (segment (start 32.263008 158.94801) (end 31.565 158.250002) (width 0.15) (layer F.Cu) (net 56)) - (segment (start 34.54 155.425) (end 34.415 155.425) (width 0.15) (layer B.Cu) (net 57)) - (segment (start 34.415 155.425) (end 33.3485 156.4915) (width 0.15) (layer B.Cu) (net 57)) - (segment (start 33.3485 157.0438) (end 33.3485 156.4915) (width 0.15) (layer B.Cu) (net 57)) - (segment (start 31.8 142) (end 33.8 144) (width 0.15) (layer F.Cu) (net 58)) - (segment (start 33.200001 144.599999) (end 32.782001 144.599999) (width 0.15) (layer B.Cu) (net 58)) - (segment (start 33.8 144) (end 33.200001 144.599999) (width 0.15) (layer B.Cu) (net 58)) - (segment (start 32.073 145.309) (end 32.073 147.4062) (width 0.15) (layer B.Cu) (net 58)) - (segment (start 32.782001 144.599999) (end 32.073 145.309) (width 0.15) (layer B.Cu) (net 58)) - (segment (start 42 142) (end 44 144) (width 0.15) (layer F.Cu) (net 59)) - (segment (start 44 144) (end 43.066644 144.933356) (width 0.15) (layer F.Cu) (net 59)) - (segment (start 38.918123 144.933356) (end 38.099967 144.1152) (width 0.15) (layer F.Cu) (net 59)) - (segment (start 43.066644 144.933356) (end 38.918123 144.933356) (width 0.15) (layer F.Cu) (net 59)) - (via (at 38.099967 144.1152) (size 0.5) (drill 0.2) (layers F.Cu B.Cu) (net 59)) - (segment (start 37.9332 144.281967) (end 38.099967 144.1152) (width 0.15) (layer B.Cu) (net 59)) - (segment (start 37.9332 144.8264) (end 37.9332 144.281967) (width 0.15) (layer B.Cu) (net 59)) - - (zone (net 29) (net_name /Vin) (layer F.Cu) (tstamp 0) (hatch edge 0.508) - (connect_pads yes (clearance 0.254)) - (min_thickness 0.254) - (fill yes (arc_segments 16) (thermal_gap 0.127) (thermal_bridge_width 0.508)) - (polygon - (pts - (xy 27.755 145.055) (xy 27.755 138.705) (xy 30.295 136.165) (xy 45.535 136.165) (xy 48.075 138.705) - (xy 48.075 145.055) (xy 48.075 147.595) (xy 45.535 147.595) (xy 45.535 145.055) - ) + (dimension (type aligned) (layer "Cmts.User") (tstamp 17517d2d-905e-4536-b1c2-3ed8673edce4) + (pts (xy 27.755 135.784) (xy 27.755 160.295)) + (height 3.351172) + (gr_text "24.5110 mm" (at 22.603828 148.0395 90) (layer "Cmts.User") (tstamp 17517d2d-905e-4536-b1c2-3ed8673edce4) + (effects (font (size 1.5 1.5) (thickness 0.3))) ) - (filled_polygon - (pts - (xy 45.56815 136.427676) (xy 47.42233 138.281857) (xy 47.567886 138.499697) (xy 47.619 138.756665) (xy 47.619 147.468) - (xy 45.662 147.468) (xy 45.662 145.055) (xy 45.652333 145.006399) (xy 45.624803 144.965197) (xy 45.583601 144.937667) - (xy 45.535 144.928) (xy 44.323087 144.928) (xy 44.555692 144.831652) (xy 44.831652 144.555692) (xy 44.981 144.195133) - (xy 44.981 143.804867) (xy 44.831652 143.444308) (xy 44.555692 143.168348) (xy 44.195133 143.019) (xy 43.804867 143.019) - (xy 43.705175 143.060294) (xy 43.49932 142.854439) (xy 43.804867 142.981) (xy 44.195133 142.981) (xy 44.555692 142.831652) - (xy 44.831652 142.555692) (xy 44.981 142.195133) (xy 44.981 141.804867) (xy 45.019 141.804867) (xy 45.019 142.195133) - (xy 45.168348 142.555692) (xy 45.444308 142.831652) (xy 45.804867 142.981) (xy 46.195133 142.981) (xy 46.555692 142.831652) - (xy 46.831652 142.555692) (xy 46.981 142.195133) (xy 46.981 141.804867) (xy 46.831652 141.444308) (xy 46.555692 141.168348) - (xy 46.195133 141.019) (xy 45.804867 141.019) (xy 45.444308 141.168348) (xy 45.168348 141.444308) (xy 45.019 141.804867) - (xy 44.981 141.804867) (xy 44.831652 141.444308) (xy 44.555692 141.168348) (xy 44.195133 141.019) (xy 43.804867 141.019) - (xy 43.444308 141.168348) (xy 43.168348 141.444308) (xy 43.019 141.804867) (xy 43.019 142.195133) (xy 43.145561 142.50068) - (xy 42.939706 142.294825) (xy 42.981 142.195133) (xy 42.981 141.804867) (xy 42.831652 141.444308) (xy 42.555692 141.168348) - (xy 42.195133 141.019) (xy 41.804867 141.019) (xy 41.444308 141.168348) (xy 41.168348 141.444308) (xy 41.019 141.804867) - (xy 41.019 142.195133) (xy 41.168348 142.555692) (xy 41.241969 142.629313) (xy 41.226322 142.618858) (xy 41.093309 142.5924) - (xy 41.093304 142.5924) (xy 41.0484 142.583468) (xy 41.003496 142.5924) (xy 38.385234 142.5924) (xy 38.34033 142.583468) - (xy 38.295426 142.5924) (xy 38.295421 142.5924) (xy 38.162408 142.618858) (xy 38.162406 142.618859) (xy 38.162407 142.618859) - (xy 38.049644 142.694204) (xy 38.049642 142.694206) (xy 38.011573 142.719643) (xy 37.986136 142.757712) (xy 36.324848 144.419001) - (xy 34.688271 144.419001) (xy 34.781 144.195133) (xy 34.781 143.804867) (xy 34.631652 143.444308) (xy 34.355692 143.168348) - (xy 33.995133 143.019) (xy 33.604867 143.019) (xy 33.505175 143.060294) (xy 33.29932 142.854439) (xy 33.604867 142.981) - (xy 33.995133 142.981) (xy 34.355692 142.831652) (xy 34.631652 142.555692) (xy 34.781 142.195133) (xy 34.781 141.804867) - (xy 34.739706 141.705175) (xy 34.945562 141.499319) (xy 34.819 141.804867) (xy 34.819 142.195133) (xy 34.968348 142.555692) - (xy 35.244308 142.831652) (xy 35.604867 142.981) (xy 35.995133 142.981) (xy 36.355692 142.831652) (xy 36.631652 142.555692) - (xy 36.781 142.195133) (xy 36.781 141.804867) (xy 36.631652 141.444308) (xy 36.355692 141.168348) (xy 35.995133 141.019) - (xy 35.604867 141.019) (xy 35.299319 141.145562) (xy 36.013881 140.431) (xy 42.48792 140.431) (xy 42.609244 140.552324) - (xy 42.859541 140.656) (xy 43.130459 140.656) (xy 43.380756 140.552324) (xy 43.572324 140.360756) (xy 43.676 140.110459) - (xy 43.676 139.906239) (xy 43.803277 140.096723) (xy 44.306458 140.432937) (xy 44.9 140.551) (xy 45.493542 140.432937) - (xy 45.996723 140.096723) (xy 46.332937 139.593542) (xy 46.451 139) (xy 46.332937 138.406458) (xy 45.996723 137.903277) - (xy 45.493542 137.567063) (xy 44.9 137.449) (xy 44.306458 137.567063) (xy 43.803277 137.903277) (xy 43.467063 138.406458) - (xy 43.349 139) (xy 43.439859 139.456779) (xy 43.380756 139.397676) (xy 43.130459 139.294) (xy 42.859541 139.294) - (xy 42.609244 139.397676) (xy 42.48792 139.519) (xy 35.869903 139.519) (xy 35.824999 139.510068) (xy 35.780095 139.519) - (xy 35.780091 139.519) (xy 35.647078 139.545458) (xy 35.496243 139.646243) (xy 35.470804 139.684315) (xy 34.094825 141.060294) - (xy 33.995133 141.019) (xy 33.604867 141.019) (xy 33.244308 141.168348) (xy 32.968348 141.444308) (xy 32.819 141.804867) - (xy 32.819 142.195133) (xy 32.945561 142.50068) (xy 32.739706 142.294825) (xy 32.781 142.195133) (xy 32.781 141.804867) - (xy 32.631652 141.444308) (xy 32.355692 141.168348) (xy 31.995133 141.019) (xy 31.604867 141.019) (xy 31.244308 141.168348) - (xy 30.968348 141.444308) (xy 30.819 141.804867) (xy 30.819 142.195133) (xy 30.968348 142.555692) (xy 31.244308 142.831652) - (xy 31.604867 142.981) (xy 31.995133 142.981) (xy 32.094825 142.939706) (xy 32.30068 143.145561) (xy 31.995133 143.019) - (xy 31.604867 143.019) (xy 31.244308 143.168348) (xy 30.968348 143.444308) (xy 30.819 143.804867) (xy 30.819 144.195133) - (xy 30.860294 144.294825) (xy 30.654438 144.500681) (xy 30.781 144.195133) (xy 30.781 143.804867) (xy 30.631652 143.444308) - (xy 30.355692 143.168348) (xy 29.995133 143.019) (xy 29.604867 143.019) (xy 29.244308 143.168348) (xy 28.968348 143.444308) - (xy 28.819 143.804867) (xy 28.819 144.195133) (xy 28.968348 144.555692) (xy 29.244308 144.831652) (xy 29.476913 144.928) - (xy 28.181 144.928) (xy 28.181 139) (xy 29.349 139) (xy 29.467063 139.593542) (xy 29.803277 140.096723) - (xy 30.306458 140.432937) (xy 30.9 140.551) (xy 31.493542 140.432937) (xy 31.996723 140.096723) (xy 32.332937 139.593542) - (xy 32.451 139) (xy 32.332937 138.406458) (xy 31.996723 137.903277) (xy 31.493542 137.567063) (xy 30.9 137.449) - (xy 30.306458 137.567063) (xy 29.803277 137.903277) (xy 29.467063 138.406458) (xy 29.349 139) (xy 28.181 139) - (xy 28.181 138.756666) (xy 28.232114 138.499697) (xy 28.377674 138.281851) (xy 30.231856 136.42767) (xy 30.434901 136.292) - (xy 45.365096 136.292) - ) + (format (prefix "") (suffix "") (units 2) (units_format 1) (precision 4)) + (style (thickness 0.3) (arrow_length 1.27) (text_position_mode 0) (extension_height 0.58642) (extension_offset 0) keep_text_aligned) + ) + (dimension (type aligned) (layer "Cmts.User") (tstamp b60aa9fe-9b4d-4c7b-a437-de66a6ac60ea) + (pts (xy 48.075 160.295) (xy 27.755 160.295)) + (height -3.81) + (gr_text "20.3200 mm" (at 37.915 162.305) (layer "Cmts.User") (tstamp b60aa9fe-9b4d-4c7b-a437-de66a6ac60ea) + (effects (font (size 1.5 1.5) (thickness 0.3))) ) + (format (prefix "") (suffix "") (units 2) (units_format 1) (precision 4)) + (style (thickness 0.3) (arrow_length 1.27) (text_position_mode 0) (extension_height 0.58642) (extension_offset 0) keep_text_aligned) ) - (zone (net 25) (net_name GND) (layer F.Cu) (tstamp 0) (hatch edge 0.508) + + (segment (start 35.121 146.594) (end 35.576 146.594) (width 0.15) (layer "F.Cu") (net 19) (tstamp 14e64598-39a8-4bd6-8854-bd0a4111f166)) + (segment (start 37.033496 148.051496) (end 38.112131 148.051496) (width 0.15) (layer "F.Cu") (net 19) (tstamp 1fd76bea-77e1-46ff-a06f-df89320a3e78)) + (segment (start 38.112131 148.051496) (end 38.188551 148.127916) (width 0.15) (layer "F.Cu") (net 19) (tstamp 379396db-bade-4017-ae26-87babe3c98ea)) + (segment (start 35.576 146.594) (end 37.033496 148.051496) (width 0.15) (layer "F.Cu") (net 19) (tstamp 4543123f-c6d5-427e-9474-f9fe386c7e96)) + (via (at 38.188551 148.127916) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 19) (tstamp a4766afa-8390-4226-829b-20caa138577b)) + (segment (start 38.165 149.3) (end 38.165 148.151467) (width 0.15) (layer "B.Cu") (net 19) (tstamp 2d23b110-0f2a-4315-a31f-3834c08b0056)) + (segment (start 38.165 148.151467) (end 38.188551 148.127916) (width 0.15) (layer "B.Cu") (net 19) (tstamp c82c3944-c432-4598-a12b-7435beac073f)) + (segment (start 32.581 146.594) (end 32.581 147.174) (width 0.15) (layer "F.Cu") (net 20) (tstamp 3a5c320a-2770-4426-bc6a-4719d05fabd4)) + (segment (start 32.581 147.174) (end 34.442202 149.035202) (width 0.15) (layer "F.Cu") (net 20) (tstamp 4d91ff55-5ad7-4b7f-9834-8f7566ff891b)) + (segment (start 34.442202 149.035202) (end 36.521007 149.035202) (width 0.15) (layer "F.Cu") (net 20) (tstamp 6c0cc2b8-5961-488b-ad29-f34c8e4a56ad)) + (segment (start 36.68999 148.866219) (end 36.68999 148.512666) (width 0.15) (layer "F.Cu") (net 20) (tstamp 8d855cf6-8124-40bf-8b5c-9240230e2109)) + (segment (start 36.521007 149.035202) (end 36.68999 148.866219) (width 0.15) (layer "F.Cu") (net 20) (tstamp b1d5769b-259a-4027-abc4-3c6fc9ae5913)) + (via (at 36.68999 148.512666) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 20) (tstamp 77d7b43b-a94d-404b-bddc-46c2302049f4)) + (segment (start 36.665 148.537656) (end 36.68999 148.512666) (width 0.15) (layer "B.Cu") (net 20) (tstamp 1bcf69c8-2bfa-41a5-9eb4-ae0a78a3367a)) + (segment (start 36.665 149.3) (end 36.665 148.537656) (width 0.15) (layer "B.Cu") (net 20) (tstamp 673442b9-9c40-4747-af1d-11c6bff3cce9)) + (segment (start 37.165 149.3) (end 37.165 147.9118) (width 0.15) (layer "B.Cu") (net 21) (tstamp 036d5008-5d2f-4536-8464-17ba95311873)) + (segment (start 36.5434 144.8264) (end 35.7126 145.6572) (width 0.15) (layer "B.Cu") (net 21) (tstamp 05a775b8-a55a-45e2-a21e-583d5300e2d6)) + (segment (start 36.4672 147.0616) (end 35.7126 146.307) (width 0.15) (layer "B.Cu") (net 21) (tstamp 5c571c60-c2d5-4b24-94ea-702e0db3b8f9)) + (segment (start 37.165 147.9118) (end 36.4672 147.214) (width 0.15) (layer "B.Cu") (net 21) (tstamp 803a1872-5cfb-41f5-90fb-627a7a05b4fd)) + (segment (start 36.4672 147.214) (end 36.4672 147.0616) (width 0.15) (layer "B.Cu") (net 21) (tstamp 94592c0c-b7e1-4090-a940-316b51c8f7b9)) + (segment (start 35.7126 146.307) (end 35.7126 145.7154) (width 0.15) (layer "B.Cu") (net 21) (tstamp bc5b8f6e-9143-4be7-bdf8-caef12277d4e)) + (segment (start 37.0332 144.8264) (end 36.5434 144.8264) (width 0.15) (layer "B.Cu") (net 21) (tstamp c4adc945-bf14-477a-bb41-f95ced9d2007)) + (segment (start 35.7126 145.6572) (end 35.7126 145.7154) (width 0.15) (layer "B.Cu") (net 21) (tstamp d8201034-7a80-4515-90f0-ecfad22ec9cb)) + (segment (start 33.472213 149.335213) (end 31.311 147.174) (width 0.15) (layer "F.Cu") (net 22) (tstamp 09cfc9ea-8b17-4a14-b41b-80488c9444b4)) + (segment (start 37.661 148.526496) (end 36.852283 149.335213) (width 0.15) (layer "F.Cu") (net 22) (tstamp 652b3a77-6f51-4edb-933c-17a0a0e092f6)) + (segment (start 36.852283 149.335213) (end 33.472213 149.335213) (width 0.15) (layer "F.Cu") (net 22) (tstamp a6539d6f-7f66-466b-9957-ac114f180ba9)) + (segment (start 31.311 147.174) (end 31.311 146.594) (width 0.15) (layer "F.Cu") (net 22) (tstamp d772e9cd-3751-4f92-b7d0-28cb6fec1218)) + (via (at 37.661 148.526496) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 22) (tstamp b16de7be-06c4-4340-b623-e9de82fbc52d)) + (segment (start 37.665 148.530496) (end 37.661 148.526496) (width 0.15) (layer "B.Cu") (net 22) (tstamp 55000ad2-7e3a-4991-be30-914748d69c6a)) + (segment (start 37.665 149.3) (end 37.665 148.530496) (width 0.15) (layer "B.Cu") (net 22) (tstamp b8b435cb-a599-4033-a09b-3f7b97c15925)) + (segment (start 34.0126 147.4934) (end 33.4626 147.4934) (width 0.15) (layer "B.Cu") (net 23) (tstamp 053aff88-81fb-47da-a1fd-3d0e5fafb280)) + (segment (start 35.665 149.3) (end 35.665 148.875) (width 0.15) (layer "B.Cu") (net 23) (tstamp 47240156-823a-49c0-843a-61043e90835f)) + (segment (start 35.665 148.875) (end 34.2834 147.4934) (width 0.15) (layer "B.Cu") (net 23) (tstamp 667eeaf2-2487-4144-8b2e-e15e687040ae)) + (segment (start 32.6318 148.3062) (end 33.4446 147.4934) (width 0.15) (layer "B.Cu") (net 23) (tstamp 6a7e80b0-186f-46a4-a3a2-8901a63affdd)) + (segment (start 32.073 148.3062) (end 32.6318 148.3062) (width 0.15) (layer "B.Cu") (net 23) (tstamp cb547f47-e881-400a-8ca5-63b20e4dc715)) + (segment (start 34.2834 147.4934) (end 34.0126 147.4934) (width 0.15) (layer "B.Cu") (net 23) (tstamp e366aac0-0bdc-46aa-b880-1c3840e7882c)) + (segment (start 33.4446 147.4934) (end 33.4626 147.4934) (width 0.15) (layer "B.Cu") (net 23) (tstamp f8e1c276-b095-4051-815f-b46ecac23f20)) + (segment (start 33.851 147.174) (end 35.161 148.484) (width 0.15) (layer "F.Cu") (net 24) (tstamp 312e7eeb-d90d-4dfb-bfe7-d826f0df8a07)) + (segment (start 35.161 148.484) (end 35.9592 148.484) (width 0.15) (layer "F.Cu") (net 24) (tstamp 4e778a6a-9c75-4616-b396-6330f52a4f84)) + (segment (start 33.851 146.594) (end 33.851 147.174) (width 0.15) (layer "F.Cu") (net 24) (tstamp 53ecd570-38a6-4384-9390-544dee6b163d)) + (segment (start 35.9592 148.484) (end 36.0354 148.5602) (width 0.15) (layer "F.Cu") (net 24) (tstamp c7988741-63af-49a8-82bd-0cdbc3328d45)) + (via (at 36.0354 148.5602) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 24) (tstamp 6e624a74-99ed-4245-bba8-2502949f1ef5)) + (segment (start 36.165 148.6898) (end 36.0354 148.5602) (width 0.15) (layer "B.Cu") (net 24) (tstamp adbcee96-ebd8-4661-964a-8f4baceb4b34)) + (segment (start 36.165 149.3) (end 36.165 148.6898) (width 0.15) (layer "B.Cu") (net 24) (tstamp bc8a9ac0-19ee-4ee0-af81-45327a8b79ad)) + (via (at 36.1116 150.9478) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 25) (tstamp 369192b9-3f98-4f2a-8ad7-714d355b66f9)) + (via (at 42.614 148.103) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 25) (tstamp 3d64ee73-6cb0-4576-910e-1e03c0f704a8)) + (via (at 38.0166 152.1162) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 25) (tstamp 65e105e9-bdec-4aea-b6d7-d851e0a90a12)) + (via (at 35.51216 153.5894) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 25) (tstamp b9456388-3170-4dd5-8cbc-f99e6853e8d3)) + (segment (start 32.581 151.644) (end 32.581 153.0759) (width 0.15) (layer "F.Cu") (net 26) (tstamp 083477b6-6eac-4e1f-b42f-2eb5e134c1a1)) + (segment (start 41.400001 143.400001) (end 42 144) (width 0.15) (layer "F.Cu") (net 26) (tstamp 0fe4ea53-0260-4635-a03b-c6d4498df7aa)) + (segment (start 41.0484 143.0484) (end 41.400001 143.400001) (width 0.15) (layer "F.Cu") (net 26) (tstamp 132275e1-70c0-44c4-99f5-c954dfa63de0)) + (segment (start 36.513729 144.875001) (end 38.34033 143.0484) (width 0.15) (layer "F.Cu") (net 26) (tstamp 24f4e910-6c8d-4c91-b061-4763c4b40b19)) + (segment (start 32.581 153.0759) (end 32.3524 153.3045) (width 0.15) (layer "F.Cu") (net 26) (tstamp 29a3756f-6152-462b-9e4b-68df91af7922)) + (segment (start 30.5236 145.2764) (end 31.200001 144.599999) (width 0.15) (layer "F.Cu") (net 26) (tstamp 2a720b64-6985-4bea-a0ac-46f7b07eca48)) + (segment (start 31.8 144) (end 32.675001 144.875001) (width 0.15) (layer "F.Cu") (net 26) (tstamp 41d4951b-63ad-40b8-9e3c-3d6a9e252627)) + (segment (start 38.34033 143.0484) (end 41.0484 143.0484) (width 0.15) (layer "F.Cu") (net 26) (tstamp 46db39ba-e25b-4ec7-822b-83b4de6a7168)) + (segment (start 31.200001 144.599999) (end 31.8 144) (width 0.15) (layer "F.Cu") (net 26) (tstamp 7f3e2eff-df7e-45f9-87c3-7bf39dda4e5b)) + (segment (start 32.581 151.644) (end 32.581 150.7065) (width 0.15) (layer "F.Cu") (net 26) (tstamp 91d6a5df-c4e8-4d96-a91d-56377bdf59c1)) + (segment (start 30.5236 148.6491) (end 30.5236 145.2764) (width 0.15) (layer "F.Cu") (net 26) (tstamp 997c3d96-046c-4b97-a1a8-b60695c58e44)) + (segment (start 32.675001 144.875001) (end 36.513729 144.875001) (width 0.15) (layer "F.Cu") (net 26) (tstamp db081782-e71b-4377-a80b-2c11f936208c)) + (segment (start 32.581 150.7065) (end 30.5236 148.6491) (width 0.15) (layer "F.Cu") (net 26) (tstamp ebbe74d0-e0fd-4663-a522-a00d9b61c846)) + (segment (start 33.8 142) (end 35.825 139.975) (width 0.15) (layer "F.Cu") (net 27) (tstamp 0254924a-7a2b-458f-b2ee-588ea1b14871)) + (segment (start 42.570736 139.975) (end 42.995 139.975) (width 0.15) (layer "F.Cu") (net 27) (tstamp 04313394-03fa-41bf-9bda-54613b1c9f55)) + (segment (start 31.144 148.357) (end 31.057 148.357) (width 0.15) (layer "F.Cu") (net 27) (tstamp 0883ce92-a345-456e-b095-58bdb20ea457)) + (segment (start 33.851 151.644) (end 33.851 151.064) (width 0.15) (layer "F.Cu") (net 27) (tstamp 544d2a6c-9a11-434d-8faa-2738672575b3)) + (segment (start 33.851 153.2029) (end 33.7494 153.3045) (width 0.15) (layer "F.Cu") (net 27) (tstamp 63d92e37-1012-4390-b040-5d41dcd02767)) + (segment (start 33.851 151.644) (end 33.851 153.2029) (width 0.15) (layer "F.Cu") (net 27) (tstamp 7a5774dd-5b0b-4796-9384-7f0896018d78)) + (segment (start 35.825 139.975) (end 42.570736 139.975) (width 0.15) (layer "F.Cu") (net 27) (tstamp 8d6241ed-6d0b-4f78-9aa6-e2b0c42354d8)) + (segment (start 33.851 151.064) (end 31.144 148.357) (width 0.15) (layer "F.Cu") (net 27) (tstamp ff6bf97f-06d7-4dca-a53a-e9cfc06a92cd)) + (via (at 42.995 139.975) (size 0.6) (drill 0.3) (layers "F.Cu" "B.Cu") (net 27) (tstamp 8d7df9f9-eb78-4961-bb0a-0e20dbf153f3)) + (via (at 31.057 148.357) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 27) (tstamp ea380dfa-81fd-4b0e-a45f-4f7604c8f014)) + (segment (start 43.294999 140.274999) (end 42.995 139.975) (width 0.15) (layer "B.Cu") (net 27) (tstamp 0f2778bc-1ef4-489b-971c-a0c026b3adb1)) + (segment (start 32.835 142.965) (end 31.3436 142.965) (width 0.15) (layer "B.Cu") (net 27) (tstamp 23592d1a-a1ab-4e6e-9017-21af286108a2)) + (segment (start 33.8 142) (end 32.835 142.965) (width 0.15) (layer "B.Cu") (net 27) (tstamp 2466ea99-29d2-469c-b561-8c5298b23662)) + (segment (start 44 140.98) (end 43.294999 140.274999) (width 0.15) (layer "B.Cu") (net 27) (tstamp 255708f6-898e-4798-82db-983d1a6f1b4a)) + (segment (start 44 142) (end 44 140.98) (width 0.15) (layer "B.Cu") (net 27) (tstamp 33c3ef3c-f6f4-4c10-b2b7-406eda483b83)) + (segment (start 30.807001 148.107001) (end 31.057 148.357) (width 0.15) (layer "B.Cu") (net 27) (tstamp c84d2349-a48e-47a9-aca9-fb8c51b8d02b)) + (segment (start 31.3436 142.965) (end 30.807001 143.501599) (width 0.15) (layer "B.Cu") (net 27) (tstamp d75b81be-dd1b-468a-9f35-771fcddd0e7b)) + (segment (start 30.807001 143.501599) (end 30.807001 148.107001) (width 0.15) (layer "B.Cu") (net 27) (tstamp de9ceabd-9e96-4507-83d3-8ff758bb7850)) + (segment (start 43.394 150.365) (end 42.714 149.685) (width 0.15) (layer "F.Cu") (net 28) (tstamp 00aa221b-886c-4c18-8248-9549315a6b4e)) + (segment (start 45.72737 148.865) (end 46.805 148.865) (width 0.15) (layer "F.Cu") (net 28) (tstamp 129ca601-0f08-45f3-8896-1c2625ccd5e1)) + (segment (start 43.796282 156.231) (end 43.187547 156.231) (width 0.15) (layer "F.Cu") (net 28) (tstamp 2076dcd4-14ec-4721-a135-1f2e123ed658)) + (segment (start 43.503 149.246) (end 43.064 149.685) (width 0.15) (layer "F.Cu") (net 28) (tstamp 2b624b86-99b9-4874-82ab-d316c1608270)) + (segment (start 36.47399 157.44338) (end 36.528601 157.497991) (width 0.15) (layer "F.Cu") (net 28) (tstamp 3d7a9f3e-42ac-4462-995b-65401d1f7468)) + (segment (start 35.576 151.644) (end 36.47399 152.54199) (width 0.15) (layer "F.Cu") (net 28) (tstamp 4d135105-ecc6-49df-8c08-816a55ace084)) + (segment (start 42.7283 155.771753) (end 42.7283 155.4182) (width 0.15) (layer "F.Cu") (net 28) (tstamp 57c78bfa-ade4-45c5-af38-32fd119a40c5)) + (segment (start 35.121 151.064) (end 33.867223 149.810223) (width 0.15) (layer "F.Cu") (net 28) (tstamp 599bf431-a4e0-460e-a5d0-fc294b9089f0)) + (segment (start 44.265 152.425) (end 43.965 152.425) (width 0.15) (layer "F.Cu") (net 28) (tstamp 5bad6fdb-84ca-44be-9389-2a22cf30cfa0)) + (segment (start 35.121 151.644) (end 35.576 151.644) (width 0.15) (layer "F.Cu") (net 28) (tstamp 5f0f865a-2e6d-4b91-ac6d-a922094d878b)) + (segment (start 36.47399 152.54199) (end 36.47399 157.44338) (width 0.15) (layer "F.Cu") (net 28) (tstamp 604b27fa-6931-492e-bb7f-465044bc2a98)) + (segment (start 45.027 159.406) (end 45.027 157.461718) (width 0.15) (layer "F.Cu") (net 28) (tstamp 66fdced7-a7f0-4110-8777-bba8ecb7a96e)) + (segment (start 44.265 150.365) (end 44.265 149.715) (width 0.15) (layer "F.Cu") (net 28) (tstamp 6838489a-4865-4954-9e52-ea6c3eb16590)) + (segment (start 44.265 149.715) (end 45.115 148.865) (width 0.15) (layer "F.Cu") (net 28) (tstamp 87b5ce6e-33b4-4475-adaf-b124f1c96bac)) + (segment (start 36.528601 157.497991) (end 36.7786 157.74799) (width 0.15) (layer "F.Cu") (net 28) (tstamp 88ba38c2-cfd7-44b0-b8dc-25a416bd10e9)) + (segment (start 45.115 148.865) (end 45.72737 148.865) (width 0.15) (layer "F.Cu") (net 28) (tstamp 953ec347-f445-47d5-904c-7790ce72dc91)) + (segment (start 33.867223 149.810223) (end 33.7367 149.810223) (width 0.15) (layer "F.Cu") (net 28) (tstamp 9a459a22-e7e4-4689-820d-6a40895dc6e1)) + (segment (start 45.027 157.461718) (end 43.796282 156.231) (width 0.15) (layer "F.Cu") (net 28) (tstamp ac16dadd-ef2e-48f5-bb4e-b0bebad47e24)) + (segment (start 44.265 152.425) (end 44.265 150.365) (width 0.15) (layer "F.Cu") (net 28) (tstamp bb241076-3cd1-4553-80fe-643413e629dd)) + (segment (start 44.265 150.365) (end 43.394 150.365) (width 0.15) (layer "F.Cu") (net 28) (tstamp be2a5dcc-8b18-4892-9008-a1f88b78fdaf)) + (segment (start 35.121 151.644) (end 35.121 151.064) (width 0.15) (layer "F.Cu") (net 28) (tstamp c63cd40d-6f4a-40a4-a549-9ba80dca951f)) + (segment (start 42.714 149.685) (end 42.614 149.685) (width 0.15) (layer "F.Cu") (net 28) (tstamp c700c640-a074-4ee4-ae07-6926607f2a2e)) + (segment (start 43.064 149.685) (end 42.614 149.685) (width 0.15) (layer "F.Cu") (net 28) (tstamp d0a738fd-e50f-407e-b596-681ade21602e)) + (segment (start 43.187547 156.231) (end 42.7283 155.771753) (width 0.15) (layer "F.Cu") (net 28) (tstamp d0daee53-b9bc-4f08-a860-0b6417cbf29a)) + (segment (start 42.059 149.685) (end 41.609 150.135) (width 0.15) (layer "F.Cu") (net 28) (tstamp d6a95788-97c6-410b-9767-a91def94a932)) + (segment (start 42.7283 155.039247) (end 42.7283 155.3928) (width 0.15) (layer "F.Cu") (net 28) (tstamp d9948fba-8a69-467a-90a4-306c4a8bdc61)) + (segment (start 42.7283 153.6617) (end 42.7283 155.039247) (width 0.15) (layer "F.Cu") (net 28) (tstamp dfa43525-cabb-4dd3-99a7-360816c469aa)) + (segment (start 43.965 152.425) (end 42.7283 153.6617) (width 0.15) (layer "F.Cu") (net 28) (tstamp e765d28c-9e3e-4cfa-b546-730823dcd859)) + (segment (start 42.614 149.685) (end 42.059 149.685) (width 0.15) (layer "F.Cu") (net 28) (tstamp e7bd1bbc-1f67-4b1f-808c-e2103cd5e460)) + (via (at 33.7367 149.810223) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 28) (tstamp 363eb79e-4d83-403a-ab02-39eb5052362d)) + (via (at 43.503 149.246) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 28) (tstamp aa36c580-8915-4a43-baef-bb306ef2cdd5)) + (via (at 42.7283 155.4182) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 28) (tstamp b38ce09e-13cd-4911-b813-209aa86dc089)) + (via (at 36.7786 157.74799) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 28) (tstamp cc259d4f-5b59-407d-9a95-919baabc2e03)) + (via (at 45.027 159.406) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 28) (tstamp f2771631-ba6c-4b89-b949-23c59bd67ca7)) + (segment (start 40.709 156.908) (end 40.624 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp 04b8c75e-5958-435b-a462-7e6ef1ca6e1d)) + (segment (start 41.767 148.5514) (end 43.2396 150.024) (width 0.15) (layer "B.Cu") (net 28) (tstamp 0da47523-fc73-4fd3-b5df-f49a816b8f37)) + (segment (start 36.73 156.993) (end 36.73 157.69939) (width 0.15) (layer "B.Cu") (net 28) (tstamp 101aae96-03db-47ff-9612-4a7f83ec75c0)) + (segment (start 41.767 148.357) (end 41.767 148.5514) (width 0.15) (layer "B.Cu") (net 28) (tstamp 13218319-a81a-4b57-8941-0e950e776525)) + (segment (start 33.694423 149.810223) (end 33.7367 149.810223) (width 0.15) (layer "B.Cu") (net 28) (tstamp 29db896c-0b80-4291-a310-e7233739cdb3)) + (segment (start 33.851477 149.925) (end 33.7367 149.810223) (width 0.15) (layer "B.Cu") (net 28) (tstamp 2e3d6a81-f490-47bf-850f-8ea7bd9b6468)) + (segment (start 40.665 149.3) (end 40.965 149.3) (width 0.15) (layer "B.Cu") (net 28) (tstamp 40cc697c-8e6c-425f-aa1a-f501a267e72a)) + (segment (start 41.29 155.425) (end 42.6961 155.425) (width 0.15) (layer "B.Cu") (net 28) (tstamp 448f51d7-eeb8-47e6-8900-ad75f31a4932)) + (segment (start 43.2396 150.024) (end 43.503 150.024) (width 0.15) (layer "B.Cu") (net 28) (tstamp 53fc7205-f7e2-4fdf-b249-e7361d010b79)) + (segment (start 40.709 156.094) (end 40.709 156.908) (width 0.15) (layer "B.Cu") (net 28) (tstamp 573e551d-5117-4a4a-b169-3da1db756c56)) + (segment (start 33.181 149.2968) (end 33.694423 149.810223) (width 0.15) (layer "B.Cu") (net 28) (tstamp 592ee075-ef05-470a-b5ae-620171afb859)) + (segment (start 43.503 150.024) (end 43.503 149.246) (width 0.15) (layer "B.Cu") (net 28) (tstamp 64388e3c-2214-4cdd-a075-105e7a724eb4)) + (segment (start 36.78 156.993) (end 37.255001 157.468001) (width 0.15) (layer "B.Cu") (net 28) (tstamp 6e5a1f47-7586-4f4d-9c1a-187b17d83f57)) + (segment (start 34.54 149.925) (end 33.851477 149.925) (width 0.15) (layer "B.Cu") (net 28) (tstamp 702975d2-8efa-44c1-aef1-ffd96a7f31ad)) + (segment (start 36.665 156.928) (end 36.73 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp 77511896-5cdd-4f93-ad1b-90e24cd463c1)) + (segment (start 40.965 149.3) (end 41.767 148.498) (width 0.15) (layer "B.Cu") (net 28) (tstamp 88c8b6dd-ddf3-4338-9410-d27ca706a126)) + (segment (start 36.665 156.05) (end 36.665 156.928) (width 0.15) (layer "B.Cu") (net 28) (tstamp 8c9310ef-d3c4-4513-bc8a-7d5bb118d1ef)) + (segment (start 40.665 156.05) (end 40.709 156.094) (width 0.15) (layer "B.Cu") (net 28) (tstamp 8df7530f-3dc3-4fce-9e41-1e347ddea63a)) + (segment (start 36.73 157.69939) (end 36.7786 157.74799) (width 0.15) (layer "B.Cu") (net 28) (tstamp 907a6442-103b-4ea9-9d96-c4b1f7244177)) + (segment (start 33.131 149.2968) (end 33.181 149.2968) (width 0.15) (layer "B.Cu") (net 28) (tstamp 9cb381a3-333d-4fd5-b77a-8742b03aaa14)) + (segment (start 40.328 156.993) (end 40.624 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp ae1dab98-aa9a-409e-8c20-89068e6e3904)) + (segment (start 37.255001 157.468001) (end 39.852999 157.468001) (width 0.15) (layer "B.Cu") (net 28) (tstamp b6d71dfa-2884-4ea8-8cda-b41015d57f0d)) + (segment (start 39.852999 157.468001) (end 40.328 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp ceef168d-f7d6-4f00-a984-26a7c9b50501)) + (segment (start 40.624 156.993) (end 41.683 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp dac7c086-ef4c-4385-8e39-84c4e5f5bdb2)) + (segment (start 42.6961 155.425) (end 42.7283 155.3928) (width 0.15) (layer "B.Cu") (net 28) (tstamp db533ecd-c9d4-4e6d-b1ac-603094db6a61)) + (segment (start 41.767 148.498) (end 41.767 148.357) (width 0.15) (layer "B.Cu") (net 28) (tstamp db9f6933-f514-4fd5-9771-ca9da49d92df)) + (segment (start 36.73 156.993) (end 36.78 156.993) (width 0.15) (layer "B.Cu") (net 28) (tstamp dbc8ee0b-58c7-46db-875e-bc2548adb49b)) + (segment (start 41.29 155.425) (end 40.665 156.05) (width 0.15) (layer "B.Cu") (net 28) (tstamp e75bd851-e049-437b-87e5-598001dd911d)) + (segment (start 40.074 159.406) (end 45.027 159.406) (width 0.15) (layer "B.Cu") (net 28) (tstamp f7cdd025-15ce-44a0-afef-9ee337f4a2e2)) + (segment (start 39.6803 158.348) (end 40.5439 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp 0317898d-afcc-4da1-b703-715fb54e1a34)) + (segment (start 41.35628 159.16038) (end 41.35628 159.44664) (width 0.3) (layer "F.Cu") (net 29) (tstamp 0cfa45d4-23f5-408a-a478-06807e9afb53)) + (segment (start 45.72737 146.325) (end 46.805 146.325) (width 0.3) (layer "F.Cu") (net 29) (tstamp 20193404-811d-4e0b-bb81-7b58e385e23b)) + (segment (start 40.336 158.3472) (end 40.3368 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp 2b77a0ff-03c3-4df1-a15b-75c34621e44d)) + (segment (start 38.2667 158.348) (end 38.8167 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp 2ee923a0-3162-4acd-bbf4-d47488199343)) + (segment (start 36.899 156.9803) (end 38.2667 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp 4b89e55e-2749-4939-83fa-19334f8a5385)) + (segment (start 46.805 146.325) (end 46.6653 146.1853) (width 0.3) (layer "F.Cu") (net 29) (tstamp 54f53900-5280-4555-9705-ea80d11cc0be)) + (segment (start 35.8 144) (end 35.8109 144.0109) (width 0.5) (layer "F.Cu") (net 29) (tstamp 59530671-1c69-42fb-8987-7954e5d1c7b7)) + (segment (start 40.5439 158.348) (end 41.35628 159.16038) (width 0.3) (layer "F.Cu") (net 29) (tstamp 5b4e6855-4ad9-48bc-b696-5c4266d20658)) + (segment (start 40.3368 158.348) (end 40.5439 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp 60e7eeda-f9fb-45fa-9a3c-3ff798a5a38b)) + (segment (start 32.658 158.348) (end 32.455 158.145) (width 0.3) (layer "F.Cu") (net 29) (tstamp 784206c2-502b-44b9-b56e-19244b8e87cb)) + (segment (start 46.6653 146.1853) (end 40.979698 146.1853) (width 0.3) (layer "F.Cu") (net 29) (tstamp c150c8b4-5194-4f1c-a50e-b618299dbee0)) + (segment (start 38.6135 158.348) (end 32.658 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp d3965972-89d3-4ab0-aff6-7ffafdb93b7d)) + (segment (start 36.899 150.265998) (end 36.899 156.9803) (width 0.3) (layer "F.Cu") (net 29) (tstamp d918368e-ffc4-4624-8b59-64135c6a8231)) + (segment (start 38.7747 158.39) (end 38.8167 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp db85a789-f589-4842-ae25-a9da511e7188)) + (segment (start 40.336 158.1401) (end 40.336 158.3472) (width 0.3) (layer "F.Cu") (net 29) (tstamp f0dabe93-9d8b-43dd-8db3-5f11887d1130)) + (segment (start 40.979698 146.1853) (end 36.899 150.265998) (width 0.3) (layer "F.Cu") (net 29) (tstamp f46b52b2-78e9-4ad1-b5d5-546744bf2d64)) + (segment (start 38.8167 158.348) (end 39.6803 158.348) (width 0.3) (layer "F.Cu") (net 29) (tstamp fb3fb6ee-e8f7-4b80-8d03-667273db273d)) + (segment (start 40.336 156.553) (end 40.336 158.1401) (width 0.25) (layer "F.Cu") (net 29) (tstamp fb4feebe-8084-4b85-9078-d470d49b0265)) + (segment (start 29.8 142) (end 29.8 142.02) (width 0.5) (layer "B.Cu") (net 29) (tstamp 2b8af595-2ce8-49f8-b73a-c8b3ec712eaf)) + (segment (start 46.551 146.579) (end 46.805 146.325) (width 0.3) (layer "B.Cu") (net 29) (tstamp 45809dc5-cd0a-4b10-ab43-46c7dd6a6fe5)) + (segment (start 41.809 146.579) (end 46.551 146.579) (width 0.3) (layer "B.Cu") (net 29) (tstamp 757ebda6-d7c5-46b9-8f54-180be219b9c8)) + (segment (start 38.874988 144.520269) (end 40.252009 145.89729) (width 0.15) (layer "B.Cu") (net 30) (tstamp 2b8a4e7a-7aec-4b8a-9c1a-7481df819c8d)) + (segment (start 40.252009 145.89729) (end 40.252009 147.032991) (width 0.15) (layer "B.Cu") (net 30) (tstamp 54d36e56-7048-4776-b821-ca25337deb78)) + (segment (start 38.874988 143.744707) (end 38.874988 144.520269) (width 0.15) (layer "B.Cu") (net 30) (tstamp 736498b2-53b1-4cc6-b37a-e87b9746850d)) + (segment (start 38.665 148.62) (end 38.665 148.875) (width 0.15) (layer "B.Cu") (net 30) (tstamp 9848fa3a-4509-4bed-8017-14680a48e105)) + (segment (start 37.25 139.925) (end 37.25 142.119719) (width 0.15) (layer "B.Cu") (net 30) (tstamp a627ab57-0088-4e40-a42f-74bcffd5920a)) + (segment (start 40.252009 147.032991) (end 38.665 148.62) (width 0.15) (layer "B.Cu") (net 30) (tstamp c3386185-fbcf-4c12-8be2-fbce3383d6d5)) + (segment (start 37.25 142.119719) (end 38.874988 143.744707) (width 0.15) (layer "B.Cu") (net 30) (tstamp e4785b72-b588-4683-947f-ce9b11f025e0)) + (segment (start 38.665 148.875) (end 38.665 149.3) (width 0.15) (layer "B.Cu") (net 30) (tstamp fcccd632-ee92-48e4-846a-84bbe22595fa)) + (segment (start 37.9 139.925) (end 37.9 142.329) (width 0.15) (layer "B.Cu") (net 31) (tstamp 3d20a2fe-a72a-492e-a4d0-ee3399e82880)) + (segment (start 39.165 148.875) (end 39.165 149.3) (width 0.15) (layer "B.Cu") (net 31) (tstamp 5acf7930-d68d-4b5d-9dec-e95a53cb9248)) + (segment (start 39.174999 144.396001) (end 40.582 145.803002) (width 0.15) (layer "B.Cu") (net 31) (tstamp 88e5c4de-d00b-4434-b4e8-6344b770e694)) + (segment (start 40.582 147.214) (end 39.165 148.631) (width 0.15) (layer "B.Cu") (net 31) (tstamp 9dbe587a-4b5c-40f0-9f51-0ae4889f890c)) + (segment (start 40.582 145.803002) (end 40.582 147.214) (width 0.15) (layer "B.Cu") (net 31) (tstamp a302eb54-1091-4f4e-8e6e-53c409467d57)) + (segment (start 37.9 142.329) (end 39.174999 143.603999) (width 0.15) (layer "B.Cu") (net 31) (tstamp af1da3ce-87ac-4f67-9eb8-4b0139bef7ee)) + (segment (start 39.165 148.631) (end 39.165 148.875) (width 0.15) (layer "B.Cu") (net 31) (tstamp c8bc3949-5b59-49bb-ba27-109dbd941a4d)) + (segment (start 39.174999 143.603999) (end 39.174999 144.396001) (width 0.15) (layer "B.Cu") (net 31) (tstamp f22a7256-6ac9-4991-9b3c-04c3256f5d25)) + (segment (start 42.0552 150.6938) (end 46.0938 150.6938) (width 0.15) (layer "B.Cu") (net 32) (tstamp 0beb0c97-4b03-403f-a2ff-4aa8e203353a)) + (segment (start 41.29 150.925) (end 41.318 150.897) (width 0.15) (layer "B.Cu") (net 32) (tstamp 590d820a-258b-4c1a-b377-dc54384e69f6)) + (segment (start 46.0938 150.6938) (end 46.805 151.405) (width 0.15) (layer "B.Cu") (net 32) (tstamp 7aa0c395-e00e-44aa-bebc-d507ae76296d)) + (segment (start 41.318 150.897) (end 41.852 150.897) (width 0.15) (layer "B.Cu") (net 32) (tstamp a2986911-5941-4ef9-a75b-0fd9f412d751)) + (segment (start 41.852 150.897) (end 42.0552 150.6938) (width 0.15) (layer "B.Cu") (net 32) (tstamp db52aea3-39e6-402d-9190-6fc35d9e05a5)) + (segment (start 42.18699 151.07001) (end 44.94601 151.07001) (width 0.15) (layer "B.Cu") (net 33) (tstamp 02296819-9331-46cf-9cd6-75ec48a076a1)) + (segment (start 41.979 151.278) (end 42.18699 151.07001) (width 0.15) (layer "B.Cu") (net 33) (tstamp 142fb306-e424-4b1f-ac77-0062741177ff)) + (segment (start 41.852 151.405) (end 41.956001 151.300999) (width 0.15) (layer "B.Cu") (net 33) (tstamp 1e35e1fb-2f5b-44ac-a3e9-c4c1c81f262e)) + (segment (start 41.29 151.425) (end 41.31 151.405) (width 0.15) (layer "B.Cu") (net 33) (tstamp 97d2cc91-7674-42ae-b64c-4cf2c2fb792f)) + (segment (start 44.94601 151.07001) (end 46.805 152.929) (width 0.15) (layer "B.Cu") (net 33) (tstamp b5550ec6-14db-4af1-8549-356b2068a66f)) + (segment (start 46.805 152.929) (end 46.805 153.945) (width 0.15) (layer "B.Cu") (net 33) (tstamp d0f3d503-c8e1-4c74-8566-224d70ae3c1f)) + (segment (start 41.31 151.405) (end 41.852 151.405) (width 0.15) (layer "B.Cu") (net 33) (tstamp de8328c8-21c6-4c60-95bf-aa374d1572c6)) + (segment (start 41.756278 151.925) (end 42.232279 151.448999) (width 0.15) (layer "B.Cu") (net 34) (tstamp 2a95b794-1d72-46d0-8ad1-f3b60de6c757)) + (segment (start 46.043001 155.723001) (end 46.805 156.485) (width 0.15) (layer "B.Cu") (net 34) (tstamp 3641b9c5-1abb-4684-9e8c-699dbad1ca88)) + (segment (start 45.662 155.342) (end 46.043001 155.723001) (width 0.15) (layer "B.Cu") (net 34) (tstamp 62c5f513-b8d3-41a0-aa58-19ad0e6be447)) + (segment (start 42.232279 151.448999) (end 44.558001 151.448999) (width 0.15) (layer "B.Cu") (net 34) (tstamp 6e99b9c8-0e66-4796-a7d7-d6cf2f1b3bd9)) + (segment (start 45.662 152.552998) (end 45.662 155.342) (width 0.15) (layer "B.Cu") (net 34) (tstamp 77a7748b-c8c6-48e6-8884-e01149663258)) + (segment (start 41.29 151.925) (end 41.756278 151.925) (width 0.15) (layer "B.Cu") (net 34) (tstamp e199196e-886c-4d57-acb2-2e244b6a52ef)) + (segment (start 44.558001 151.448999) (end 45.662 152.552998) (width 0.15) (layer "B.Cu") (net 34) (tstamp f81c555a-b4cc-4d86-9b7d-4d79f763029f)) + (segment (start 46.297 158.517) (end 46.805 159.025) (width 0.15) (layer "B.Cu") (net 35) (tstamp 043e6cec-4846-465f-a5c4-44a0b48ed791)) + (segment (start 36.518 158.517) (end 46.297 158.517) (width 0.15) (layer "B.Cu") (net 35) (tstamp 75037185-8879-4691-abfc-b535b6fea231)) + (segment (start 36.165 156.475) (end 36.160593 156.479407) (width 0.15) (layer "B.Cu") (net 35) (tstamp 954e6a3f-e357-4252-a6b8-3949283d28f8)) + (segment (start 36.160593 156.479407) (end 36.160593 158.159593) (width 0.15) (layer "B.Cu") (net 35) (tstamp c69ed1ef-4301-405a-83aa-759e8b9c4be7)) + (segment (start 36.160593 158.159593) (end 36.518 158.517) (width 0.15) (layer "B.Cu") (net 35) (tstamp cbda096d-503a-4e01-a367-31a428754472)) + (segment (start 36.165 156.05) (end 36.165 156.475) (width 0.15) (layer "B.Cu") (net 35) (tstamp f47d88c8-4eb5-42d8-af40-f79dda0a8187)) + (segment (start 33.588802 159.025) (end 30.10263 159.025) (width 0.15) (layer "B.Cu") (net 36) (tstamp 39781840-985b-4b16-9d56-f4bf45d76054)) + (segment (start 35.665 156.948802) (end 33.588802 159.025) (width 0.15) (layer "B.Cu") (net 36) (tstamp 47899f7a-6155-4261-8722-ffef6eec4620)) + (segment (start 35.665 156.05) (end 35.665 156.948802) (width 0.15) (layer "B.Cu") (net 36) (tstamp 48b56712-3ba8-4fab-9ff9-0469bdc2eeee)) + (segment (start 30.10263 159.025) (end 29.025 159.025) (width 0.15) (layer "B.Cu") (net 36) (tstamp 7f78b1e9-4a32-413b-9912-162f2242d9ba)) + (segment (start 34.54 152.925) (end 33.2454 152.925) (width 0.15) (layer "B.Cu") (net 37) (tstamp cfbc573b-8bcf-4b88-9077-edaeb5cac6bd)) + (segment (start 33.2454 152.925) (end 29.6854 156.485) (width 0.15) (layer "B.Cu") (net 37) (tstamp d1b79583-6508-40f7-9646-bb0a49ca0094)) + (segment (start 29.6854 156.485) (end 29.025 156.485) (width 0.15) (layer "B.Cu") (net 37) (tstamp e454e496-49ca-4dc9-aa13-5359ae3060f6)) + (segment (start 34.54 152.425) (end 32.3484 152.425) (width 0.15) (layer "B.Cu") (net 38) (tstamp 05521c4b-049e-4539-ac8c-c98f0c79024b)) + (segment (start 29.279 153.691) (end 29.025 153.945) (width 0.15) (layer "B.Cu") (net 38) (tstamp 3705822d-dbd2-4a55-990a-2f975735588a)) + (segment (start 31.0824 153.691) (end 29.279 153.691) (width 0.15) (layer "B.Cu") (net 38) (tstamp 531472f6-4452-4fa1-82de-4256a2894f45)) + (segment (start 32.3484 152.425) (end 31.0824 153.691) (width 0.15) (layer "B.Cu") (net 38) (tstamp c0c2d9c6-dfc3-4eda-99a3-a62e587978c7)) + (segment (start 34.54 151.425) (end 29.045 151.425) (width 0.15) (layer "B.Cu") (net 39) (tstamp 06f468a8-57e0-4b54-92bc-97b839c6f15c)) + (segment (start 29.045 151.425) (end 29.025 151.405) (width 0.15) (layer "B.Cu") (net 39) (tstamp b28dfb62-0bee-47a2-b4e8-d1a1db13720d)) + (segment (start 30.2188 148.865) (end 32.2788 150.925) (width 0.15) (layer "B.Cu") (net 40) (tstamp 4650100d-736e-4166-bfb6-19c8508899fb)) + (segment (start 32.2788 150.925) (end 34.54 150.925) (width 0.15) (layer "B.Cu") (net 40) (tstamp d2a67a77-966d-4ad7-881d-b38df691478b)) + (segment (start 29.025 148.865) (end 30.2188 148.865) (width 0.15) (layer "B.Cu") (net 40) (tstamp f565ffc1-9c37-4d75-a254-5e8c5c6a388c)) + (segment (start 42.36 153.0052) (end 42.7537 152.6115) (width 0.15) (layer "B.Cu") (net 41) (tstamp 084526bd-7ce9-4caa-97eb-0c701c073eba)) + (segment (start 42.36 153.368) (end 42.36 153.0052) (width 0.15) (layer "B.Cu") (net 41) (tstamp 0c4ac176-eb1a-41f7-86ec-3fb15e9c5982)) + (segment (start 42.7537 152.1233) (end 42.853 152.024) (width 0.15) (layer "B.Cu") (net 41) (tstamp 5225da5e-eb23-45d0-93ee-6cb8ab4de671)) + (segment (start 42.7537 152.6115) (end 42.7537 152.1233) (width 0.15) (layer "B.Cu") (net 41) (tstamp 6ca1641b-2032-4717-a4fb-492e090658b6)) + (segment (start 42.295 153.425) (end 42.299 153.421) (width 0.15) (layer "B.Cu") (net 41) (tstamp 79dad8e1-1abb-4378-9f03-ef0e833b7325)) + (segment (start 42.303 153.425) (end 42.36 153.368) (width 0.15) (layer "B.Cu") (net 41) (tstamp aefde1e5-0843-493a-bc82-987b396c93db)) + (segment (start 42.46 153.495) (end 42.36 153.495) (width 0.15) (layer "B.Cu") (net 41) (tstamp ebf9acc4-eb44-4bac-93dd-7ea2ccf26481)) + (segment (start 41.29 153.425) (end 42.303 153.425) (width 0.15) (layer "B.Cu") (net 41) (tstamp f62459dd-1298-4dc6-b6dd-d7fd1c74e80e)) + (segment (start 39.921602 145.436) (end 40.965047 145.436) (width 0.15) (layer "F.Cu") (net 42) (tstamp 5341bd09-8a47-47a4-9d1a-1c6c636de71b)) + (segment (start 39.4644 145.893202) (end 39.921602 145.436) (width 0.15) (layer "F.Cu") (net 42) (tstamp 63d96caa-1ed2-47a5-a456-174749166708)) + (segment (start 40.965047 145.436) (end 41.3186 145.436) (width 0.15) (layer "F.Cu") (net 42) (tstamp d061b89d-9f53-4d19-a101-b08949ba954a)) + (via (at 39.4644 145.893202) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 42) (tstamp 47d67ced-fbb2-40d2-943e-426fa9e64e78)) + (via (at 41.3186 145.436) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 42) (tstamp d4f4a59a-ccfb-4b68-9d24-965c7e4d3289)) + (segment (start 36.6 140.75) (end 36.772 140.922) (width 0.15) (layer "B.Cu") (net 42) (tstamp 00c137bc-52d5-4eec-bdad-0ea16782085c)) + (segment (start 36.772 140.922) (end 36.772 142.065998) (width 0.15) (layer "B.Cu") (net 42) (tstamp 1eb2e0f8-3b36-4015-bf95-ba03f9c7e01a)) + (segment (start 41.068601 146.833603) (end 41.068601 145.685999) (width 0.15) (layer "B.Cu") (net 42) (tstamp 54c8fcb6-65ee-498c-883c-9d30b8f04eed)) + (segment (start 36.772 142.065998) (end 38.574977 143.868975) (width 0.15) (layer "B.Cu") (net 42) (tstamp 59ed5f57-1f38-4795-b191-25a81ef349f2)) + (segment (start 41.829998 147.595) (end 41.068601 146.833603) (width 0.15) (layer "B.Cu") (net 42) (tstamp 741af251-1fdd-4ad7-b44c-18d52c24c810)) + (segment (start 39.609 146.037802) (end 39.4644 145.893202) (width 0.15) (layer "B.Cu") (net 42) (tstamp 89fcd615-2fde-4fab-a3bd-8161afdcd813)) + (segment (start 39.609 146.579) (end 39.609 146.037802) (width 0.15) (layer "B.Cu") (net 42) (tstamp a18d051c-666a-4e5c-95b1-ac02f94331fd)) + (segment (start 39.214401 145.643203) (end 39.4644 145.893202) (width 0.15) (layer "B.Cu") (net 42) (tstamp c0b6af29-fe48-456e-a91e-3bd026ec9ee7)) + (segment (start 41.068601 145.685999) (end 41.3186 145.436) (width 0.15) (layer "B.Cu") (net 42) (tstamp e10b0bcd-2a03-4e95-9cd8-d2b818ea819f)) + (segment (start 38.574977 145.003779) (end 39.214401 145.643203) (width 0.15) (layer "B.Cu") (net 42) (tstamp e26b0d89-8345-47b9-8dfb-03b493e31540)) + (segment (start 38.574977 143.868975) (end 38.574977 145.003779) (width 0.15) (layer "B.Cu") (net 42) (tstamp e39486ef-ff97-4bc4-855c-ca45c2e52437)) + (segment (start 36.6 139.925) (end 36.6 140.75) (width 0.15) (layer "B.Cu") (net 42) (tstamp e8d2b289-fed0-4303-a7da-cd1736f841f1)) + (segment (start 43.9166 147.595) (end 41.829998 147.595) (width 0.15) (layer "B.Cu") (net 42) (tstamp fcdb612f-2752-4aaa-8b10-4292d26dd4cf)) + (segment (start 45.6112 149.6778) (end 45.6112 152.783802) (width 0.15) (layer "F.Cu") (net 43) (tstamp 279900d3-4dbc-452b-82e1-0b14714b6154)) + (segment (start 45.008804 153.386198) (end 44.529653 153.386198) (width 0.15) (layer "F.Cu") (net 43) (tstamp 4fb6aa8b-8127-4cdf-b865-e0993c87fc80)) + (segment (start 45.6112 152.783802) (end 45.008804 153.386198) (width 0.15) (layer "F.Cu") (net 43) (tstamp 6cbd01d0-9628-4767-bdf8-06b053b98176)) + (segment (start 44.529653 153.386198) (end 44.1761 153.386198) (width 0.15) (layer "F.Cu") (net 43) (tstamp 87eef95b-5e09-432d-b73d-c1841d53d15a)) + (via (at 44.1761 153.386198) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 43) (tstamp ab018943-e526-4356-a7e2-14d74cd87569)) + (via (at 45.6112 149.6778) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 43) (tstamp deed6125-b96c-48d4-9fde-62b9febcf776)) + (segment (start 44.8166 147.595) (end 44.8166 148.8832) (width 0.15) (layer "B.Cu") (net 43) (tstamp 006c2494-199a-48d1-ae83-960d54815b79)) + (segment (start 44.1761 153.032645) (end 44.1761 153.386198) (width 0.15) (layer "B.Cu") (net 43) (tstamp 04e1515f-ffcc-45ed-92b9-0f9e9f49efed)) + (segment (start 44.8166 148.8832) (end 45.6112 149.6778) (width 0.15) (layer "B.Cu") (net 43) (tstamp 8e3863c9-5b29-4a80-99bb-79f89b70b321)) + (segment (start 44.153 152.024) (end 44.1761 152.0471) (width 0.15) (layer "B.Cu") (net 43) (tstamp 9ce51472-be33-4ff8-b374-465367b298d4)) + (segment (start 44.1761 152.0471) (end 44.1761 153.032645) (width 0.15) (layer "B.Cu") (net 43) (tstamp bfee3a71-7170-445d-933e-4d7881421b88)) + (segment (start 39.836 153.037) (end 39.182 153.691) (width 0.15) (layer "F.Cu") (net 44) (tstamp 1b36ffc6-0add-40e4-b36e-6ec79086bc2b)) + (segment (start 39.836 152.353) (end 39.836 153.037) (width 0.15) (layer "F.Cu") (net 44) (tstamp 5e02ecc9-1fcb-4c48-854f-98fe3fee84dc)) + (segment (start 39.836 152.353) (end 39.836 150.162) (width 0.15) (layer "F.Cu") (net 44) (tstamp 61cd819d-4843-46e9-8817-aca1ce6eb2f8)) + (segment (start 39.836 150.162) (end 39.809 150.135) (width 0.15) (layer "F.Cu") (net 44) (tstamp 99c55856-6293-4b25-af65-79d609c82253)) + (segment (start 38.59572 154.00472) (end 38.282 153.691) (width 0.15) (layer "F.Cu") (net 44) (tstamp a9580e75-4a0f-4599-91bb-1ea01dbc7884)) + (segment (start 39.182 153.691) (end 38.282 153.691) (width 0.15) (layer "F.Cu") (net 44) (tstamp cb0655ef-3702-4f64-93c1-909426037339)) + (segment (start 38.59572 155.47084) (end 38.59572 154.00472) (width 0.15) (layer "F.Cu") (net 44) (tstamp cb0c2065-b38f-4282-b1f9-290f7604c43f)) + (segment (start 38.77156 156.795) (end 39.594 156.795) (width 0.15) (layer "F.Cu") (net 45) (tstamp 308cd0e9-7a7e-456f-b52a-a02bc11fb540)) + (segment (start 38.59572 156.97084) (end 38.77156 156.795) (width 0.15) (layer "F.Cu") (net 45) (tstamp 8d70c5eb-1836-43d6-91d9-d060723091c6)) + (segment (start 39.594 156.795) (end 39.836 156.553) (width 0.15) (layer "F.Cu") (net 45) (tstamp 9232d515-4063-4c07-b9b5-c3fd5fb402e7)) + (segment (start 43.02252 159.44664) (end 42.25628 159.44664) (width 0.15) (layer "F.Cu") (net 46) (tstamp 05e4623c-5e1f-49d9-a3dd-561f94d8df4c)) + (segment (start 42.25628 159.34664) (end 42.25628 159.44664) (width 0.15) (layer "F.Cu") (net 46) (tstamp 20bb058c-2edd-4738-9ee0-624c4ed929bf)) + (segment (start 41.068901 157.640903) (end 41.068901 158.159261) (width 0.15) (layer "F.Cu") (net 46) (tstamp 5af99591-7072-4236-9e1c-840b1597bf20)) + (segment (start 41.068901 158.159261) (end 42.25628 159.34664) (width 0.15) (layer "F.Cu") (net 46) (tstamp 6f09dc89-770a-441a-8bc5-a1c9f2c158e7)) + (segment (start 40.836 157.408002) (end 41.068901 157.640903) (width 0.15) (layer "F.Cu") (net 46) (tstamp 73b3e059-0a35-4b3b-b36d-71093140ebcc)) + (segment (start 40.836 156.553) (end 40.836 157.408002) (width 0.15) (layer "F.Cu") (net 46) (tstamp af770410-c1b3-4fd2-b8bb-1c00f800d7a7)) + (segment (start 41.336 157.503) (end 42.05536 158.22236) (width 0.15) (layer "F.Cu") (net 47) (tstamp 1668b5f2-2cb2-486d-92e6-22e56427286a)) + (segment (start 42.05536 158.22236) (end 42.28428 158.22236) (width 0.15) (layer "F.Cu") (net 47) (tstamp 2e5c227f-cc21-4cee-926d-128c1e49a507)) + (segment (start 41.336 156.553) (end 41.336 157.503) (width 0.15) (layer "F.Cu") (net 47) (tstamp b2d51587-3e56-4941-93f3-99de19d09ff7)) + (segment (start 42.28428 158.22236) (end 42.83428 158.22236) (width 0.15) (layer "F.Cu") (net 47) (tstamp f3038395-e041-40c0-b34a-4c7ca9c6a214)) + (segment (start 41.836 156.553) (end 42.31328 156.553) (width 0.15) (layer "F.Cu") (net 48) (tstamp 7a38a32f-7e04-4712-8ab2-c22e2a0bcaeb)) + (segment (start 42.31328 156.553) (end 42.67708 156.9168) (width 0.15) (layer "F.Cu") (net 48) (tstamp 9fccc20d-1557-4e0d-ba64-9ed1bb75685a)) + (segment (start 41.336 151.403) (end 41.411001 151.327999) (width 0.15) (layer "F.Cu") (net 50) (tstamp 3207550e-bda1-486d-a68d-2ea0b742004d)) + (segment (start 42.478999 151.327999) (end 42.614 151.463) (width 0.15) (layer "F.Cu") (net 50) (tstamp 5bfa9fd4-5a6b-471b-8d4f-2ff8119a1088)) + (segment (start 42.614 150.585) (end 42.614 151.463) (width 0.15) (layer "F.Cu") (net 50) (tstamp a104a114-6f9c-427b-a516-24724e0a4435)) + (segment (start 41.411001 151.327999) (end 42.478999 151.327999) (width 0.15) (layer "F.Cu") (net 50) (tstamp db82c176-5a0e-49be-8094-fccfae20693b)) + (segment (start 41.336 152.353) (end 41.336 151.403) (width 0.15) (layer "F.Cu") (net 50) (tstamp e98206bd-0599-48da-8d91-8c5fe7d4dc59)) + (segment (start 40.836 152.353) (end 40.836 149.06312) (width 0.15) (layer "F.Cu") (net 51) (tstamp 2c270f75-729f-423e-ad0d-0b1ef6d68262)) + (segment (start 40.836 149.06312) (end 40.33012 148.55724) (width 0.15) (layer "F.Cu") (net 51) (tstamp 59a4ab35-29e1-4788-a108-091845c69943)) + (segment (start 40.33012 148.54496) (end 39.66704 148.54496) (width 0.15) (layer "F.Cu") (net 51) (tstamp 7dfd49de-be7e-459e-9530-16167d91ecec)) + (segment (start 38.804 149.408) (end 38.804 149.458) (width 0.15) (layer "F.Cu") (net 51) (tstamp 930a8a47-91b2-471b-b041-d44641b6ca0c)) + (segment (start 40.33012 148.55724) (end 40.33012 148.54496) (width 0.15) (layer "F.Cu") (net 51) (tstamp a6d08a90-71c0-4184-95d5-d7ecabe95249)) + (segment (start 39.66704 148.54496) (end 38.804 149.408) (width 0.15) (layer "F.Cu") (net 51) (tstamp d79a2036-d1b3-4773-b5c1-fbc0529d140d)) + (segment (start 41.23012 147.87398) (end 41.8781 147.226) (width 0.15) (layer "F.Cu") (net 52) (tstamp 05603eb0-27be-4612-918f-eac1530f1b80)) + (segment (start 41.8781 147.226) (end 42.614 147.226) (width 0.15) (layer "F.Cu") (net 52) (tstamp 3295e7c9-f395-4813-bf41-287a4cfd1538)) + (segment (start 41.23012 148.54496) (end 41.23012 147.87398) (width 0.15) (layer "F.Cu") (net 52) (tstamp 8bfd5a95-fc22-4215-b522-370e26cb6450)) + (segment (start 33.7494 154.2045) (end 33.7494 154.8213) (width 0.15) (layer "F.Cu") (net 53) (tstamp c2091e97-a6a6-407a-bff2-221931730696)) + (via (at 33.7494 154.8213) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 53) (tstamp 9ddd4912-5d92-496c-b6bb-38afdb663805)) + (segment (start 34.1457 154.425) (end 34.54 154.425) (width 0.15) (layer "B.Cu") (net 53) (tstamp 5216f6bc-e502-4917-adba-6b73896aeb8f)) + (segment (start 33.7494 154.8213) (end 34.1457 154.425) (width 0.15) (layer "B.Cu") (net 53) (tstamp 98184af0-ec05-4197-acc3-1c7f650dc372)) + (segment (start 32.3524 154.6943) (end 32.5048 154.8467) (width 0.15) (layer "F.Cu") (net 54) (tstamp 90d63031-6445-462b-be37-a4209e917e01)) + (segment (start 32.3524 154.2045) (end 32.3524 154.6943) (width 0.15) (layer "F.Cu") (net 54) (tstamp a285c7ea-3a57-4e92-a733-d1d3c6b6dc58)) + (via (at 32.5048 154.8467) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 54) (tstamp 302baff6-40f2-4f02-bc20-30de756eae87)) + (segment (start 32.5048 154.8467) (end 33.4265 153.925) (width 0.15) (layer "B.Cu") (net 54) (tstamp 03ba0412-79e4-41fe-866c-cc6e85e54b95)) + (segment (start 33.4265 153.925) (end 34.54 153.925) (width 0.15) (layer "B.Cu") (net 54) (tstamp a47c810d-0fed-4588-ab38-57150b4809d8)) + (segment (start 34.210601 156.709599) (end 34.4606 156.4596) (width 0.15) (layer "F.Cu") (net 55) (tstamp 2451ff8a-b12f-462f-8561-d7353d0488c0)) + (segment (start 33.6752 157.245) (end 34.210601 156.709599) (width 0.15) (layer "F.Cu") (net 55) (tstamp 84973bc6-9acb-4ed6-be93-7c5e163faf99)) + (segment (start 32.455 157.245) (end 33.6752 157.245) (width 0.15) (layer "F.Cu") (net 55) (tstamp e3811046-1493-4ab6-bafc-9a4470d597b6)) + (segment (start 32.455 157.245) (end 32.455 156.445) (width 0.15) (layer "F.Cu") (net 55) (tstamp ed0c2db8-ad54-4235-b543-66487b98b34c)) + (via (at 34.4606 156.4596) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 55) (tstamp f29d47b3-652f-4ec5-872f-a956e61742a9)) + (segment (start 34.4606 156.4544) (end 34.4606 156.4596) (width 0.15) (layer "B.Cu") (net 55) (tstamp 12b49a72-20d4-4480-a959-7ea2dfab2420)) + (segment (start 34.865 156.05) (end 34.4606 156.4544) (width 0.15) (layer "B.Cu") (net 55) (tstamp 52de3553-800c-4a9b-85bd-2ed92d3265b6)) + (segment (start 35.165 156.05) (end 34.865 156.05) (width 0.15) (layer "B.Cu") (net 55) (tstamp a974b0d6-19bb-4ee0-b692-29f5621dcc13)) + (segment (start 32.263008 158.94801) (end 31.565 158.250002) (width 0.15) (layer "F.Cu") (net 56) (tstamp 138e84e3-21b6-4de2-ae30-334002c56b54)) + (segment (start 31.565 158.250002) (end 31.565 157.397352) (width 0.15) (layer "F.Cu") (net 56) (tstamp 3febf24a-2c15-42fb-a226-2fbc751bba3a)) + (segment (start 34.994 158.94801) (end 32.263008 158.94801) (width 0.15) (layer "F.Cu") (net 56) (tstamp 8175d348-8abe-4777-8d79-e038c58ac0d7)) + (segment (start 31.565 157.397352) (end 31.565 157.043799) (width 0.15) (layer "F.Cu") (net 56) (tstamp dae9bc6f-955c-40e6-8ac8-748cbcbc7537)) + (via (at 34.994 158.94801) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 56) (tstamp 5c23e06d-29c9-424c-9065-3c713d57b8a2)) + (via (at 31.565 157.043799) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 56) (tstamp 94ad41cf-c421-440e-b655-78936aec27c4)) + (segment (start 38.474 159.406) (end 35.45199 159.406) (width 0.15) (layer "B.Cu") (net 56) (tstamp 0def6984-56c9-466c-bc32-4a9d8e75b2ac)) + (segment (start 35.45199 159.406) (end 35.243999 159.198009) (width 0.15) (layer "B.Cu") (net 56) (tstamp 2338b25a-d715-4e6c-9f2b-7cec274120f3)) + (segment (start 35.243999 159.198009) (end 34.994 158.94801) (width 0.15) (layer "B.Cu") (net 56) (tstamp 39a89144-b475-4041-ae19-edbc2b311183)) + (segment (start 32.4485 157.0438) (end 31.918553 157.043799) (width 0.15) (layer "B.Cu") (net 56) (tstamp 4ca4eafc-a4ce-4898-b830-058d3d787e7e)) + (segment (start 31.918553 157.043799) (end 31.565 157.043799) (width 0.15) (layer "B.Cu") (net 56) (tstamp 7216b52b-ce74-4db1-9c9c-1cd38d909b43)) + (segment (start 33.3485 157.0438) (end 33.3485 156.4915) (width 0.15) (layer "B.Cu") (net 57) (tstamp 95914212-9580-4439-a651-f734bd24b41e)) + (segment (start 34.54 155.425) (end 34.415 155.425) (width 0.15) (layer "B.Cu") (net 57) (tstamp c96c4d0d-b326-482d-859e-f0e63cd29941)) + (segment (start 34.415 155.425) (end 33.3485 156.4915) (width 0.15) (layer "B.Cu") (net 57) (tstamp c98895db-e629-49c4-9afb-a3c0a2a7acde)) + (segment (start 31.8 142) (end 33.8 144) (width 0.15) (layer "F.Cu") (net 58) (tstamp 42f80ed6-2d6b-4690-9957-420f041d6a55)) + (segment (start 33.8 144) (end 33.200001 144.599999) (width 0.15) (layer "B.Cu") (net 58) (tstamp 256e0596-c862-4d7f-8f7f-db195587db7c)) + (segment (start 33.200001 144.599999) (end 32.782001 144.599999) (width 0.15) (layer "B.Cu") (net 58) (tstamp 31db8745-ae2c-4f5d-9112-643aab6c0cb7)) + (segment (start 32.782001 144.599999) (end 32.073 145.309) (width 0.15) (layer "B.Cu") (net 58) (tstamp 4d99eebc-9934-4a51-99b0-35c8f9096c38)) + (segment (start 32.073 145.309) (end 32.073 147.4062) (width 0.15) (layer "B.Cu") (net 58) (tstamp 53449cb2-cab8-4e0d-b6e2-2dd8a4582ed6)) + (segment (start 38.918123 144.933356) (end 38.099967 144.1152) (width 0.15) (layer "F.Cu") (net 59) (tstamp 157acb5b-021e-45eb-b9ef-f33ae13bb077)) + (segment (start 43.066644 144.933356) (end 38.918123 144.933356) (width 0.15) (layer "F.Cu") (net 59) (tstamp 2f258d39-ca49-4a58-8c4f-0358a35ad733)) + (segment (start 44 144) (end 43.066644 144.933356) (width 0.15) (layer "F.Cu") (net 59) (tstamp 3a125d3e-5429-4fc2-a166-75a1005efb41)) + (segment (start 42 142) (end 44 144) (width 0.15) (layer "F.Cu") (net 59) (tstamp 97d06dbc-7b9a-4a4a-bb43-fc00d3689fa9)) + (via (at 38.099967 144.1152) (size 0.5) (drill 0.2) (layers "F.Cu" "B.Cu") (net 59) (tstamp b9a08713-bf53-461e-b904-b4844ac06c14)) + (segment (start 37.9332 144.8264) (end 37.9332 144.281967) (width 0.15) (layer "B.Cu") (net 59) (tstamp 20789808-95f1-46fd-a4af-df0d8a8ad917)) + (segment (start 37.9332 144.281967) (end 38.099967 144.1152) (width 0.15) (layer "B.Cu") (net 59) (tstamp f1059c8f-8452-404f-8502-83b2b4ab5ccc)) + + (zone (net 25) (net_name "GND") (layer "F.Cu") (tstamp 870007ad-adee-4af6-ab30-8525ac5abd8d) (hatch edge 0.508) (connect_pads yes (clearance 0.15)) - (min_thickness 0.127) - (fill yes (arc_segments 16) (thermal_gap 0.127) (thermal_bridge_width 0.254)) + (min_thickness 0.127) (filled_areas_thickness no) + (fill yes (thermal_gap 0.127) (thermal_bridge_width 0.254)) (polygon (pts - (xy 27.755 160.295) (xy 27.755 145.309) (xy 45.281 145.309) (xy 45.281 147.849) (xy 48.075 147.849) + (xy 27.755 160.295) + (xy 27.755 145.309) + (xy 45.281 145.309) + (xy 45.281 147.849) + (xy 48.075 147.849) (xy 48.075 160.295) ) ) (filled_polygon + (layer "F.Cu") (pts - (xy 30.2351 148.620687) (xy 30.229448 148.6491) (xy 30.2351 148.677513) (xy 30.251839 148.761666) (xy 30.315603 148.857097) - (xy 30.339694 148.873194) (xy 32.101848 150.635349) (xy 32.074888 150.675697) (xy 32.058318 150.759) (xy 32.058318 152.529) - (xy 32.074888 152.612303) (xy 32.122076 152.682924) (xy 32.192697 152.730112) (xy 32.276 152.746682) (xy 32.292501 152.746682) - (xy 32.292501 152.886818) (xy 32.0524 152.886818) (xy 31.969097 152.903388) (xy 31.898476 152.950576) (xy 31.851288 153.021197) - (xy 31.834718 153.1045) (xy 31.834718 153.5045) (xy 31.851288 153.587803) (xy 31.898476 153.658424) (xy 31.969097 153.705612) - (xy 32.0524 153.722182) (xy 32.6524 153.722182) (xy 32.735703 153.705612) (xy 32.806324 153.658424) (xy 32.853512 153.587803) - (xy 32.870082 153.5045) (xy 32.870082 153.1045) (xy 32.869773 153.102944) (xy 32.875152 153.075901) (xy 32.8695 153.047488) - (xy 32.8695 152.746682) (xy 32.886 152.746682) (xy 32.969303 152.730112) (xy 33.039924 152.682924) (xy 33.087112 152.612303) - (xy 33.103682 152.529) (xy 33.103682 150.759) (xy 33.095161 150.716161) (xy 33.328318 150.949318) (xy 33.328318 152.529) - (xy 33.344888 152.612303) (xy 33.392076 152.682924) (xy 33.462697 152.730112) (xy 33.546 152.746682) (xy 33.562501 152.746682) - (xy 33.562501 152.886818) (xy 33.4494 152.886818) (xy 33.366097 152.903388) (xy 33.295476 152.950576) (xy 33.248288 153.021197) - (xy 33.231718 153.1045) (xy 33.231718 153.5045) (xy 33.248288 153.587803) (xy 33.295476 153.658424) (xy 33.366097 153.705612) - (xy 33.4494 153.722182) (xy 34.0494 153.722182) (xy 34.132703 153.705612) (xy 34.203324 153.658424) (xy 34.250512 153.587803) - (xy 34.267082 153.5045) (xy 34.267082 153.1045) (xy 34.250512 153.021197) (xy 34.203324 152.950576) (xy 34.1395 152.90793) - (xy 34.1395 152.746682) (xy 34.156 152.746682) (xy 34.239303 152.730112) (xy 34.309924 152.682924) (xy 34.357112 152.612303) - (xy 34.373682 152.529) (xy 34.373682 150.759) (xy 34.365161 150.716161) (xy 34.598318 150.949318) (xy 34.598318 152.529) - (xy 34.614888 152.612303) (xy 34.662076 152.682924) (xy 34.732697 152.730112) (xy 34.816 152.746682) (xy 35.426 152.746682) - (xy 35.509303 152.730112) (xy 35.579924 152.682924) (xy 35.627112 152.612303) (xy 35.643682 152.529) (xy 35.643682 152.119682) - (xy 36.18549 152.661491) (xy 36.185491 157.414962) (xy 36.179838 157.44338) (xy 36.20223 157.555947) (xy 36.242067 157.615567) - (xy 36.265994 157.651377) (xy 36.290082 157.667472) (xy 36.3151 157.69249) (xy 36.3151 157.840186) (xy 36.354166 157.9345) - (xy 33.021573 157.9345) (xy 33.003211 157.842188) (xy 32.944973 157.755027) (xy 32.857812 157.696789) (xy 32.755 157.676338) - (xy 32.155 157.676338) (xy 32.052188 157.696789) (xy 31.965027 157.755027) (xy 31.906789 157.842188) (xy 31.886338 157.945) - (xy 31.886338 158.16334) (xy 31.8535 158.130502) (xy 31.8535 157.410788) (xy 31.937318 157.32697) (xy 31.937318 157.445) - (xy 31.953888 157.528303) (xy 32.001076 157.598924) (xy 32.071697 157.646112) (xy 32.155 157.662682) (xy 32.755 157.662682) - (xy 32.838303 157.646112) (xy 32.908924 157.598924) (xy 32.952639 157.5335) (xy 33.646787 157.5335) (xy 33.6752 157.539152) - (xy 33.703613 157.5335) (xy 33.703614 157.5335) (xy 33.787767 157.516761) (xy 33.883197 157.452997) (xy 33.899294 157.428906) - (xy 34.4051 156.9231) (xy 34.552796 156.9231) (xy 34.723152 156.852537) (xy 34.853537 156.722152) (xy 34.9241 156.551796) - (xy 34.9241 156.367404) (xy 34.853537 156.197048) (xy 34.723152 156.066663) (xy 34.552796 155.9961) (xy 34.368404 155.9961) - (xy 34.198048 156.066663) (xy 34.067663 156.197048) (xy 33.9971 156.367404) (xy 33.9971 156.5151) (xy 33.5557 156.9565) - (xy 32.952639 156.9565) (xy 32.908924 156.891076) (xy 32.839967 156.845) (xy 32.908924 156.798924) (xy 32.956112 156.728303) - (xy 32.972682 156.645) (xy 32.972682 156.245) (xy 32.956112 156.161697) (xy 32.908924 156.091076) (xy 32.838303 156.043888) - (xy 32.755 156.027318) (xy 32.155 156.027318) (xy 32.071697 156.043888) (xy 32.001076 156.091076) (xy 31.953888 156.161697) - (xy 31.937318 156.245) (xy 31.937318 156.645) (xy 31.953888 156.728303) (xy 32.001076 156.798924) (xy 32.070033 156.845) - (xy 32.002919 156.889844) (xy 31.957937 156.781247) (xy 31.827552 156.650862) (xy 31.657196 156.580299) (xy 31.472804 156.580299) - (xy 31.302448 156.650862) (xy 31.172063 156.781247) (xy 31.1015 156.951603) (xy 31.1015 157.135995) (xy 31.172063 157.306351) - (xy 31.2765 157.410788) (xy 31.2765 157.425765) (xy 31.276501 157.42577) (xy 31.2765 158.221588) (xy 31.270848 158.250002) - (xy 31.2765 158.278415) (xy 31.293239 158.362568) (xy 31.357003 158.457999) (xy 31.381094 158.474096) (xy 32.038914 159.131916) - (xy 32.055011 159.156007) (xy 32.150441 159.219771) (xy 32.234594 159.23651) (xy 32.234598 159.23651) (xy 32.263007 159.242161) - (xy 32.291416 159.23651) (xy 34.627011 159.23651) (xy 34.731448 159.340947) (xy 34.901804 159.41151) (xy 35.086196 159.41151) - (xy 35.256552 159.340947) (xy 35.386937 159.210562) (xy 35.4575 159.040206) (xy 35.4575 158.855814) (xy 35.418434 158.7615) - (xy 38.12243 158.7615) (xy 38.173527 158.837973) (xy 38.260688 158.896211) (xy 38.3635 158.916662) (xy 38.8635 158.916662) - (xy 38.966312 158.896211) (xy 39.0453 158.843434) (xy 39.124288 158.896211) (xy 39.2271 158.916662) (xy 39.7271 158.916662) - (xy 39.829912 158.896211) (xy 39.9089 158.843434) (xy 39.987888 158.896211) (xy 40.0907 158.916662) (xy 40.527786 158.916662) - (xy 40.887618 159.276495) (xy 40.887618 159.74664) (xy 40.908069 159.849452) (xy 40.966307 159.936613) (xy 41.053468 159.994851) - (xy 41.15628 160.015302) (xy 41.55628 160.015302) (xy 41.659092 159.994851) (xy 41.746253 159.936613) (xy 41.804491 159.849452) - (xy 41.824942 159.74664) (xy 41.824942 159.323302) (xy 41.838598 159.336958) (xy 41.838598 159.74664) (xy 41.855168 159.829943) - (xy 41.902356 159.900564) (xy 41.972977 159.947752) (xy 42.05628 159.964322) (xy 42.45628 159.964322) (xy 42.539583 159.947752) - (xy 42.610204 159.900564) (xy 42.6394 159.85687) (xy 42.668596 159.900564) (xy 42.739217 159.947752) (xy 42.82252 159.964322) - (xy 43.22252 159.964322) (xy 43.305823 159.947752) (xy 43.376444 159.900564) (xy 43.423632 159.829943) (xy 43.440202 159.74664) - (xy 43.440202 159.14664) (xy 43.423632 159.063337) (xy 43.376444 158.992716) (xy 43.305823 158.945528) (xy 43.22252 158.928958) - (xy 42.82252 158.928958) (xy 42.739217 158.945528) (xy 42.668596 158.992716) (xy 42.6394 159.03641) (xy 42.610204 158.992716) - (xy 42.539583 158.945528) (xy 42.45628 158.928958) (xy 42.246598 158.928958) (xy 41.357401 158.039761) (xy 41.357401 157.932401) - (xy 41.831268 158.406269) (xy 41.847363 158.430357) (xy 41.871451 158.446452) (xy 41.942793 158.494121) (xy 42.05536 158.516512) - (xy 42.083774 158.51086) (xy 42.216598 158.51086) (xy 42.216598 158.59736) (xy 42.233168 158.680663) (xy 42.280356 158.751284) - (xy 42.350977 158.798472) (xy 42.43428 158.815042) (xy 43.23428 158.815042) (xy 43.317583 158.798472) (xy 43.388204 158.751284) - (xy 43.435392 158.680663) (xy 43.451962 158.59736) (xy 43.451962 157.84736) (xy 43.435392 157.764057) (xy 43.388204 157.693436) - (xy 43.317583 157.646248) (xy 43.23428 157.629678) (xy 42.43428 157.629678) (xy 42.350977 157.646248) (xy 42.280356 157.693436) - (xy 42.233168 157.764057) (xy 42.216598 157.84736) (xy 42.216598 157.93386) (xy 42.174861 157.93386) (xy 41.811682 157.570682) - (xy 41.986 157.570682) (xy 42.069303 157.554112) (xy 42.139924 157.506924) (xy 42.187112 157.436303) (xy 42.203682 157.353) - (xy 42.203682 156.851402) (xy 42.259398 156.907118) (xy 42.259398 157.2168) (xy 42.275968 157.300103) (xy 42.323156 157.370724) - (xy 42.393777 157.417912) (xy 42.47708 157.434482) (xy 42.87708 157.434482) (xy 42.960383 157.417912) (xy 43.031004 157.370724) - (xy 43.078192 157.300103) (xy 43.094762 157.2168) (xy 43.094762 156.6168) (xy 43.078192 156.533497) (xy 43.04368 156.481847) - (xy 43.07498 156.502761) (xy 43.159133 156.5195) (xy 43.159137 156.5195) (xy 43.187546 156.525151) (xy 43.215955 156.5195) - (xy 43.676782 156.5195) (xy 44.738501 157.581219) (xy 44.7385 159.039011) (xy 44.634063 159.143448) (xy 44.5635 159.313804) - (xy 44.5635 159.498196) (xy 44.634063 159.668552) (xy 44.764448 159.798937) (xy 44.934804 159.8695) (xy 45.119196 159.8695) - (xy 45.289552 159.798937) (xy 45.419937 159.668552) (xy 45.4905 159.498196) (xy 45.4905 159.313804) (xy 45.419937 159.143448) - (xy 45.3155 159.039011) (xy 45.3155 157.49013) (xy 45.321152 157.461717) (xy 45.303052 157.370724) (xy 45.298761 157.349151) - (xy 45.234997 157.253721) (xy 45.210906 157.237624) (xy 44.020376 156.047094) (xy 44.004279 156.023003) (xy 43.908849 155.959239) - (xy 43.824696 155.9425) (xy 43.824695 155.9425) (xy 43.796282 155.936848) (xy 43.767869 155.9425) (xy 43.307047 155.9425) - (xy 43.083268 155.718721) (xy 43.121237 155.680752) (xy 43.1918 155.510396) (xy 43.1918 155.326004) (xy 43.121237 155.155648) - (xy 43.0168 155.051211) (xy 43.0168 153.7812) (xy 43.655319 153.142682) (xy 43.775278 153.142682) (xy 43.7126 153.294002) - (xy 43.7126 153.478394) (xy 43.783163 153.64875) (xy 43.913548 153.779135) (xy 44.083904 153.849698) (xy 44.268296 153.849698) - (xy 44.438652 153.779135) (xy 44.543089 153.674698) (xy 44.980391 153.674698) (xy 45.008804 153.68035) (xy 45.037217 153.674698) - (xy 45.037218 153.674698) (xy 45.121371 153.657959) (xy 45.216801 153.594195) (xy 45.232898 153.570104) (xy 45.795109 153.007894) - (xy 45.819197 152.991799) (xy 45.882961 152.896369) (xy 45.888623 152.867904) (xy 45.905352 152.783802) (xy 45.8997 152.755388) - (xy 45.8997 151.998472) (xy 45.903408 152.007424) (xy 46.202576 152.306592) (xy 46.593457 152.4685) (xy 47.016543 152.4685) - (xy 47.407424 152.306592) (xy 47.706592 152.007424) (xy 47.786501 151.814507) (xy 47.786501 153.535493) (xy 47.706592 153.342576) - (xy 47.407424 153.043408) (xy 47.016543 152.8815) (xy 46.593457 152.8815) (xy 46.202576 153.043408) (xy 45.903408 153.342576) - (xy 45.7415 153.733457) (xy 45.7415 154.156543) (xy 45.903408 154.547424) (xy 46.202576 154.846592) (xy 46.593457 155.0085) - (xy 47.016543 155.0085) (xy 47.407424 154.846592) (xy 47.706592 154.547424) (xy 47.786501 154.354507) (xy 47.786501 156.075493) - (xy 47.706592 155.882576) (xy 47.407424 155.583408) (xy 47.016543 155.4215) (xy 46.593457 155.4215) (xy 46.202576 155.583408) - (xy 45.903408 155.882576) (xy 45.7415 156.273457) (xy 45.7415 156.696543) (xy 45.903408 157.087424) (xy 46.202576 157.386592) - (xy 46.593457 157.5485) (xy 47.016543 157.5485) (xy 47.407424 157.386592) (xy 47.706592 157.087424) (xy 47.786501 156.894507) - (xy 47.786501 158.615494) (xy 47.706592 158.422576) (xy 47.407424 158.123408) (xy 47.016543 157.9615) (xy 46.593457 157.9615) - (xy 46.202576 158.123408) (xy 45.903408 158.422576) (xy 45.7415 158.813457) (xy 45.7415 159.236543) (xy 45.903408 159.627424) - (xy 46.202576 159.926592) (xy 46.467918 160.0365) (xy 29.362082 160.0365) (xy 29.627424 159.926592) (xy 29.926592 159.627424) - (xy 30.0885 159.236543) (xy 30.0885 158.813457) (xy 29.926592 158.422576) (xy 29.627424 158.123408) (xy 29.236543 157.9615) - (xy 28.813457 157.9615) (xy 28.422576 158.123408) (xy 28.123408 158.422576) (xy 28.0135 158.687918) (xy 28.0135 156.822082) - (xy 28.123408 157.087424) (xy 28.422576 157.386592) (xy 28.813457 157.5485) (xy 29.236543 157.5485) (xy 29.627424 157.386592) - (xy 29.926592 157.087424) (xy 30.0885 156.696543) (xy 30.0885 156.273457) (xy 29.926592 155.882576) (xy 29.627424 155.583408) - (xy 29.236543 155.4215) (xy 28.813457 155.4215) (xy 28.422576 155.583408) (xy 28.123408 155.882576) (xy 28.0135 156.147918) - (xy 28.0135 154.282082) (xy 28.123408 154.547424) (xy 28.422576 154.846592) (xy 28.813457 155.0085) (xy 29.236543 155.0085) - (xy 29.627424 154.846592) (xy 29.926592 154.547424) (xy 30.0885 154.156543) (xy 30.0885 154.0045) (xy 31.834718 154.0045) - (xy 31.834718 154.4045) (xy 31.851288 154.487803) (xy 31.898476 154.558424) (xy 31.969097 154.605612) (xy 32.0524 154.622182) - (xy 32.063901 154.622182) (xy 32.063901 154.665882) (xy 32.058248 154.6943) (xy 32.06084 154.70733) (xy 32.0413 154.754504) - (xy 32.0413 154.938896) (xy 32.111863 155.109252) (xy 32.242248 155.239637) (xy 32.412604 155.3102) (xy 32.596996 155.3102) - (xy 32.767352 155.239637) (xy 32.897737 155.109252) (xy 32.9683 154.938896) (xy 32.9683 154.754504) (xy 32.897737 154.584148) - (xy 32.832636 154.519047) (xy 32.853512 154.487803) (xy 32.870082 154.4045) (xy 32.870082 154.0045) (xy 33.231718 154.0045) - (xy 33.231718 154.4045) (xy 33.248288 154.487803) (xy 33.295476 154.558424) (xy 33.343348 154.590411) (xy 33.2859 154.729104) - (xy 33.2859 154.913496) (xy 33.356463 155.083852) (xy 33.486848 155.214237) (xy 33.657204 155.2848) (xy 33.841596 155.2848) - (xy 34.011952 155.214237) (xy 34.142337 155.083852) (xy 34.2129 154.913496) (xy 34.2129 154.729104) (xy 34.155452 154.590411) - (xy 34.203324 154.558424) (xy 34.250512 154.487803) (xy 34.267082 154.4045) (xy 34.267082 154.0045) (xy 34.250512 153.921197) - (xy 34.203324 153.850576) (xy 34.132703 153.803388) (xy 34.0494 153.786818) (xy 33.4494 153.786818) (xy 33.366097 153.803388) - (xy 33.295476 153.850576) (xy 33.248288 153.921197) (xy 33.231718 154.0045) (xy 32.870082 154.0045) (xy 32.853512 153.921197) - (xy 32.806324 153.850576) (xy 32.735703 153.803388) (xy 32.6524 153.786818) (xy 32.0524 153.786818) (xy 31.969097 153.803388) - (xy 31.898476 153.850576) (xy 31.851288 153.921197) (xy 31.834718 154.0045) (xy 30.0885 154.0045) (xy 30.0885 153.733457) - (xy 29.926592 153.342576) (xy 29.627424 153.043408) (xy 29.236543 152.8815) (xy 28.813457 152.8815) (xy 28.422576 153.043408) - (xy 28.123408 153.342576) (xy 28.0135 153.607918) (xy 28.0135 151.742082) (xy 28.123408 152.007424) (xy 28.422576 152.306592) - (xy 28.813457 152.4685) (xy 29.236543 152.4685) (xy 29.627424 152.306592) (xy 29.926592 152.007424) (xy 30.0885 151.616543) - (xy 30.0885 151.193457) (xy 29.926592 150.802576) (xy 29.627424 150.503408) (xy 29.236543 150.3415) (xy 28.813457 150.3415) - (xy 28.422576 150.503408) (xy 28.123408 150.802576) (xy 28.0135 151.067918) (xy 28.0135 149.202082) (xy 28.123408 149.467424) - (xy 28.422576 149.766592) (xy 28.813457 149.9285) (xy 29.236543 149.9285) (xy 29.627424 149.766592) (xy 29.926592 149.467424) - (xy 30.0885 149.076543) (xy 30.0885 148.653457) (xy 29.926592 148.262576) (xy 29.627424 147.963408) (xy 29.236543 147.8015) - (xy 28.813457 147.8015) (xy 28.422576 147.963408) (xy 28.123408 148.262576) (xy 28.0135 148.527918) (xy 28.0135 145.3725) - (xy 30.235101 145.3725) + (xy 30.269432 145.31908) + (xy 30.292863 145.346121) + (xy 30.298601 145.3725) + (xy 30.2986 148.620687) + (xy 30.29738 148.633076) + (xy 30.294192 148.6491) + (xy 30.311654 148.736889) + (xy 30.361384 148.811316) + (xy 30.374973 148.820396) + (xy 30.384595 148.828293) + (xy 32.146749 150.590448) + (xy 32.163897 150.621851) + (xy 32.161344 150.65754) + (xy 32.154646 150.670628) + (xy 32.134703 150.700473) + (xy 32.121818 150.765254) + (xy 32.121818 152.522745) + (xy 32.134703 152.587526) + (xy 32.167856 152.637143) + (xy 32.217473 152.670296) + (xy 32.282255 152.683182) + (xy 32.292501 152.683182) + (xy 32.326832 152.693262) + (xy 32.350263 152.720303) + (xy 32.356001 152.746682) + (xy 32.356001 152.886818) + (xy 32.345921 152.921149) + (xy 32.31888 152.94458) + (xy 32.292501 152.950318) + (xy 32.058655 152.950318) + (xy 31.993873 152.963203) + (xy 31.944256 152.996356) + (xy 31.911103 153.045973) + (xy 31.898218 153.110754) + (xy 31.898218 153.498245) + (xy 31.911103 153.563026) + (xy 31.944256 153.612643) + (xy 31.993873 153.645796) + (xy 32.058655 153.658682) + (xy 32.646145 153.658682) + (xy 32.710926 153.645796) + (xy 32.760543 153.612643) + (xy 32.793696 153.563026) + (xy 32.806582 153.498245) + (xy 32.806582 153.1045) + (xy 32.807491 153.1045) + (xy 32.807493 153.090556) + (xy 32.810408 153.075901) + (xy 32.80722 153.059877) + (xy 32.806 153.047488) + (xy 32.806 152.746682) + (xy 32.81608 152.712351) + (xy 32.843121 152.68892) + (xy 32.8695 152.683182) + (xy 32.879745 152.683182) + (xy 32.944526 152.670296) + (xy 32.994143 152.637143) + (xy 33.027296 152.587526) + (xy 33.040182 152.522745) + (xy 33.040182 150.765254) + (xy 33.032881 150.728549) + (xy 33.03607 150.692911) + (xy 33.058021 150.664655) + (xy 33.091763 150.652752) + (xy 33.126583 150.660981) + (xy 33.140062 150.67126) + (xy 33.373219 150.904417) + (xy 33.390367 150.93582) + (xy 33.391818 150.949318) + (xy 33.391818 152.522745) + (xy 33.404703 152.587526) + (xy 33.437856 152.637143) + (xy 33.487473 152.670296) + (xy 33.552255 152.683182) + (xy 33.562501 152.683182) + (xy 33.596832 152.693262) + (xy 33.620263 152.720303) + (xy 33.626001 152.746682) + (xy 33.626001 152.886818) + (xy 33.615921 152.921149) + (xy 33.58888 152.94458) + (xy 33.562501 152.950318) + (xy 33.455655 152.950318) + (xy 33.390873 152.963203) + (xy 33.341256 152.996356) + (xy 33.308103 153.045973) + (xy 33.295218 153.110754) + (xy 33.295218 153.498245) + (xy 33.308103 153.563026) + (xy 33.341256 153.612643) + (xy 33.390873 153.645796) + (xy 33.455655 153.658682) + (xy 34.043145 153.658682) + (xy 34.107926 153.645796) + (xy 34.157543 153.612643) + (xy 34.190696 153.563026) + (xy 34.203582 153.498245) + (xy 34.203582 153.110754) + (xy 34.190696 153.045973) + (xy 34.157543 152.996356) + (xy 34.104221 152.960728) + (xy 34.081277 152.933274) + (xy 34.076 152.90793) + (xy 34.076 152.746682) + (xy 34.08608 152.712351) + (xy 34.113121 152.68892) + (xy 34.1395 152.683182) + (xy 34.149745 152.683182) + (xy 34.214526 152.670296) + (xy 34.264143 152.637143) + (xy 34.297296 152.587526) + (xy 34.310182 152.522745) + (xy 34.310182 150.765254) + (xy 34.302881 150.728549) + (xy 34.30607 150.692911) + (xy 34.328021 150.664655) + (xy 34.361763 150.652752) + (xy 34.396583 150.660981) + (xy 34.410062 150.67126) + (xy 34.643219 150.904417) + (xy 34.660367 150.93582) + (xy 34.661818 150.949318) + (xy 34.661818 152.522745) + (xy 34.674703 152.587526) + (xy 34.707856 152.637143) + (xy 34.757473 152.670296) + (xy 34.822255 152.683182) + (xy 35.419745 152.683182) + (xy 35.484526 152.670296) + (xy 35.534143 152.637143) + (xy 35.567296 152.587526) + (xy 35.580182 152.522745) + (xy 35.580182 152.119682) + (xy 35.590262 152.085351) + (xy 35.617303 152.06192) + (xy 35.652719 152.056828) + (xy 35.685266 152.071692) + (xy 35.688583 152.074781) + (xy 36.230391 152.61659) + (xy 36.247539 152.647993) + (xy 36.24899 152.661491) + (xy 36.248991 157.414962) + (xy 36.247771 157.427351) + (xy 36.244582 157.44338) + (xy 36.262046 157.531171) + (xy 36.311774 157.605596) + (xy 36.325361 157.614674) + (xy 36.334983 157.622571) + (xy 36.360001 157.647589) + (xy 36.377149 157.678992) + (xy 36.3786 157.69249) + (xy 36.3786 157.827556) + (xy 36.412832 157.9102) + (xy 36.416657 157.945775) + (xy 36.400641 157.97777) + (xy 36.36987 157.996028) + (xy 36.354166 157.998) + (xy 33.021573 157.998) + (xy 32.987242 157.98792) + (xy 32.963811 157.960879) + (xy 32.959293 157.946888) + (xy 32.943395 157.866964) + (xy 32.899191 157.800808) + (xy 32.833035 157.756604) + (xy 32.748745 157.739838) + (xy 32.161255 157.739838) + (xy 32.076964 157.756604) + (xy 32.010808 157.800808) + (xy 31.966604 157.866964) + (xy 31.949838 157.951254) + (xy 31.949838 158.16334) + (xy 31.939758 158.197671) + (xy 31.912717 158.221102) + (xy 31.877301 158.226194) + (xy 31.844754 158.21133) + (xy 31.841437 158.208241) + (xy 31.808599 158.175403) + (xy 31.791451 158.144) + (xy 31.79 158.130502) + (xy 31.79 157.410788) + (xy 31.80008 157.376457) + (xy 31.808599 157.365887) + (xy 31.892417 157.282069) + (xy 31.92382 157.264921) + (xy 31.959509 157.267474) + (xy 31.988152 157.288916) + (xy 32.000656 157.32244) + (xy 32.000818 157.32697) + (xy 32.000818 157.438745) + (xy 32.013703 157.503526) + (xy 32.046856 157.553143) + (xy 32.096473 157.586296) + (xy 32.161255 157.599182) + (xy 32.748745 157.599182) + (xy 32.813526 157.586296) + (xy 32.863143 157.553143) + (xy 32.899841 157.498221) + (xy 32.927295 157.475277) + (xy 32.952639 157.47) + (xy 33.646787 157.47) + (xy 33.659176 157.47122) + (xy 33.6752 157.474407) + (xy 33.762991 157.456945) + (xy 33.837416 157.407216) + (xy 33.846496 157.393627) + (xy 33.854393 157.384005) + (xy 34.360199 156.878199) + (xy 34.391602 156.861051) + (xy 34.4051 156.8596) + (xy 34.540166 156.8596) + (xy 34.687182 156.798704) + (xy 34.799704 156.686182) + (xy 34.8606 156.539166) + (xy 34.8606 156.380033) + (xy 34.799704 156.233017) + (xy 34.687182 156.120495) + (xy 34.540166 156.0596) + (xy 34.381034 156.0596) + (xy 34.234017 156.120495) + (xy 34.121495 156.233017) + (xy 34.0606 156.380033) + (xy 34.0606 156.5151) + (xy 34.05052 156.549431) + (xy 34.042001 156.560001) + (xy 33.600601 157.001401) + (xy 33.569198 157.018549) + (xy 33.5557 157.02) + (xy 32.952639 157.02) + (xy 32.918308 157.00992) + (xy 32.899841 156.991779) + (xy 32.863143 156.936856) + (xy 32.804688 156.897798) + (xy 32.781744 156.870343) + (xy 32.777285 156.834842) + (xy 32.792727 156.802566) + (xy 32.804688 156.792202) + (xy 32.863143 156.753143) + (xy 32.896296 156.703526) + (xy 32.909182 156.638745) + (xy 32.909182 156.251254) + (xy 32.896296 156.186473) + (xy 32.863143 156.136856) + (xy 32.813526 156.103703) + (xy 32.748745 156.090818) + (xy 32.161255 156.090818) + (xy 32.096473 156.103703) + (xy 32.046856 156.136856) + (xy 32.013703 156.186473) + (xy 32.000818 156.251254) + (xy 32.000818 156.638745) + (xy 32.013703 156.703526) + (xy 32.046856 156.753143) + (xy 32.105312 156.792202) + (xy 32.128256 156.819657) + (xy 32.132715 156.855158) + (xy 32.117273 156.887434) + (xy 32.105312 156.897798) + (xy 32.038198 156.942642) + (xy 32.004052 156.953334) + (xy 31.969547 156.943868) + (xy 31.945637 156.91725) + (xy 31.944253 156.914144) + (xy 31.904104 156.817216) + (xy 31.791582 156.704694) + (xy 31.644566 156.643799) + (xy 31.485434 156.643799) + (xy 31.338417 156.704694) + (xy 31.225895 156.817216) + (xy 31.165 156.964232) + (xy 31.165 157.123365) + (xy 31.225895 157.270381) + (xy 31.321401 157.365887) + (xy 31.338549 157.39729) + (xy 31.34 157.410788) + (xy 31.34 158.221588) + (xy 31.33878 158.233976) + (xy 31.335592 158.250002) + (xy 31.353054 158.337791) + (xy 31.402784 158.412218) + (xy 31.416373 158.421298) + (xy 31.425995 158.429195) + (xy 32.083815 159.087015) + (xy 32.091712 159.096637) + (xy 32.100791 159.110226) + (xy 32.175216 159.159954) + (xy 32.263006 159.177416) + (xy 32.279028 159.17423) + (xy 32.291416 159.17301) + (xy 34.627011 159.17301) + (xy 34.661342 159.18309) + (xy 34.671912 159.191609) + (xy 34.767417 159.287114) + (xy 34.914434 159.34801) + (xy 35.073566 159.34801) + (xy 35.220582 159.287114) + (xy 35.333104 159.174592) + (xy 35.394 159.027576) + (xy 35.394 158.868443) + (xy 35.359768 158.7858) + (xy 35.355943 158.750225) + (xy 35.371959 158.71823) + (xy 35.40273 158.699972) + (xy 35.418434 158.698) + (xy 38.12243 158.698) + (xy 38.156761 158.70808) + (xy 38.175229 158.726222) + (xy 38.219308 158.792191) + (xy 38.285464 158.836395) + (xy 38.369755 158.853162) + (xy 38.857245 158.853162) + (xy 38.941535 158.836395) + (xy 39.010022 158.790635) + (xy 39.044167 158.779944) + (xy 39.078672 158.78941) + (xy 39.080578 158.790635) + (xy 39.149064 158.836395) + (xy 39.233355 158.853162) + (xy 39.720845 158.853162) + (xy 39.805135 158.836395) + (xy 39.873622 158.790635) + (xy 39.907767 158.779944) + (xy 39.942272 158.78941) + (xy 39.944178 158.790635) + (xy 40.012664 158.836395) + (xy 40.096955 158.853162) + (xy 40.527786 158.853162) + (xy 40.562117 158.863242) + (xy 40.572687 158.871761) + (xy 40.932519 159.231594) + (xy 40.949667 159.262997) + (xy 40.951118 159.276495) + (xy 40.951118 159.740385) + (xy 40.967884 159.824675) + (xy 41.012088 159.890831) + (xy 41.078244 159.935035) + (xy 41.162535 159.951802) + (xy 41.550025 159.951802) + (xy 41.634315 159.935035) + (xy 41.700471 159.890831) + (xy 41.744675 159.824675) + (xy 41.761442 159.740385) + (xy 41.761442 159.323302) + (xy 41.771522 159.288971) + (xy 41.798563 159.26554) + (xy 41.833979 159.260448) + (xy 41.866526 159.275312) + (xy 41.869843 159.278401) + (xy 41.883499 159.292057) + (xy 41.900647 159.32346) + (xy 41.902098 159.336958) + (xy 41.902098 159.740385) + (xy 41.914983 159.805166) + (xy 41.948136 159.854783) + (xy 41.997753 159.887936) + (xy 42.062535 159.900822) + (xy 42.450025 159.900822) + (xy 42.514806 159.887936) + (xy 42.564423 159.854783) + (xy 42.586602 159.821591) + (xy 42.614057 159.798646) + (xy 42.649558 159.794188) + (xy 42.681834 159.80963) + (xy 42.692198 159.821591) + (xy 42.714376 159.854783) + (xy 42.763993 159.887936) + (xy 42.828775 159.900822) + (xy 43.216265 159.900822) + (xy 43.281046 159.887936) + (xy 43.330663 159.854783) + (xy 43.363816 159.805166) + (xy 43.376702 159.740385) + (xy 43.376702 159.152894) + (xy 43.363816 159.088113) + (xy 43.330663 159.038496) + (xy 43.281046 159.005343) + (xy 43.216265 158.992458) + (xy 42.828775 158.992458) + (xy 42.763993 159.005343) + (xy 42.714376 159.038496) + (xy 42.692198 159.071689) + (xy 42.664743 159.094634) + (xy 42.629242 159.099092) + (xy 42.596966 159.08365) + (xy 42.586602 159.071689) + (xy 42.564423 159.038496) + (xy 42.514806 159.005343) + (xy 42.450025 158.992458) + (xy 42.246598 158.992458) + (xy 42.212267 158.982378) + (xy 42.201697 158.973859) + (xy 41.3125 158.084662) + (xy 41.295352 158.053259) + (xy 41.293901 158.039761) + (xy 41.293901 157.932401) + (xy 41.303981 157.89807) + (xy 41.331022 157.874639) + (xy 41.366438 157.869547) + (xy 41.398985 157.884411) + (xy 41.402302 157.8875) + (xy 41.876169 158.361368) + (xy 41.884066 158.37099) + (xy 41.893143 158.384576) + (xy 41.967568 158.434305) + (xy 42.055359 158.451767) + (xy 42.071386 158.44858) + (xy 42.083774 158.44736) + (xy 42.216598 158.44736) + (xy 42.250929 158.45744) + (xy 42.27436 158.484481) + (xy 42.280098 158.51086) + (xy 42.280098 158.591105) + (xy 42.292983 158.655886) + (xy 42.326136 158.705503) + (xy 42.375753 158.738656) + (xy 42.440535 158.751542) + (xy 43.228025 158.751542) + (xy 43.292806 158.738656) + (xy 43.342423 158.705503) + (xy 43.375576 158.655886) + (xy 43.388462 158.591105) + (xy 43.388462 157.853614) + (xy 43.375576 157.788833) + (xy 43.342423 157.739216) + (xy 43.292806 157.706063) + (xy 43.228025 157.693178) + (xy 42.440535 157.693178) + (xy 42.375753 157.706063) + (xy 42.326136 157.739216) + (xy 42.292983 157.788833) + (xy 42.280098 157.853614) + (xy 42.280098 157.93386) + (xy 42.270018 157.968191) + (xy 42.242977 157.991622) + (xy 42.216598 157.99736) + (xy 42.174861 157.99736) + (xy 42.14053 157.98728) + (xy 42.12996 157.978761) + (xy 41.766781 157.615583) + (xy 41.749633 157.58418) + (xy 41.752186 157.548491) + (xy 41.773628 157.519848) + (xy 41.807152 157.507344) + (xy 41.811682 157.507182) + (xy 41.979745 157.507182) + (xy 42.044526 157.494296) + (xy 42.094143 157.461143) + (xy 42.127296 157.411526) + (xy 42.140182 157.346745) + (xy 42.140182 156.851402) + (xy 42.150262 156.817071) + (xy 42.177303 156.79364) + (xy 42.212719 156.788548) + (xy 42.245266 156.803412) + (xy 42.248583 156.806501) + (xy 42.304299 156.862217) + (xy 42.321447 156.89362) + (xy 42.322898 156.907118) + (xy 42.322898 157.210545) + (xy 42.335783 157.275326) + (xy 42.368936 157.324943) + (xy 42.418553 157.358096) + (xy 42.483335 157.370982) + (xy 42.870825 157.370982) + (xy 42.935606 157.358096) + (xy 42.985223 157.324943) + (xy 43.018376 157.275326) + (xy 43.031262 157.210545) + (xy 43.031262 156.623054) + (xy 43.018376 156.558273) + (xy 42.990882 156.517126) + (xy 42.98019 156.482981) + (xy 42.981163 156.479432) + (xy 42.958956 156.48303) + (xy 42.942409 156.476856) + (xy 42.870825 156.462618) + (xy 42.567398 156.462618) + (xy 42.533067 156.452538) + (xy 42.522497 156.444019) + (xy 42.492473 156.413995) + (xy 42.484576 156.404373) + (xy 42.475496 156.390783) + (xy 42.401071 156.341054) + (xy 42.31328 156.323592) + (xy 42.297256 156.32678) + (xy 42.284867 156.328) + (xy 42.203682 156.328) + (xy 42.169351 156.31792) + (xy 42.14592 156.290879) + (xy 42.140182 156.2645) + (xy 42.140182 155.759254) + (xy 42.127296 155.694473) + (xy 42.094143 155.644856) + (xy 42.044526 155.611703) + (xy 41.979745 155.598818) + (xy 41.692255 155.598818) + (xy 41.627475 155.611703) + (xy 41.62128 155.615843) + (xy 41.587135 155.626535) + (xy 41.552629 155.617069) + (xy 41.55072 155.615843) + (xy 41.544524 155.611703) + (xy 41.479745 155.598818) + (xy 41.192255 155.598818) + (xy 41.127475 155.611703) + (xy 41.12128 155.615843) + (xy 41.087135 155.626535) + (xy 41.052629 155.617069) + (xy 41.05072 155.615843) + (xy 41.044524 155.611703) + (xy 40.979745 155.598818) + (xy 40.692256 155.598818) + (xy 40.658705 155.605492) + (xy 40.623067 155.602303) + (xy 40.611037 155.59601) + (xy 40.564035 155.564604) + (xy 40.479745 155.547838) + (xy 40.192255 155.547838) + (xy 40.107964 155.564604) + (xy 40.060963 155.59601) + (xy 40.026817 155.606702) + (xy 40.013295 155.605492) + (xy 39.979744 155.598818) + (xy 39.692255 155.598818) + (xy 39.627473 155.611703) + (xy 39.577856 155.644856) + (xy 39.544703 155.694473) + (xy 39.531818 155.759254) + (xy 39.531818 156.5065) + (xy 39.521738 156.540831) + (xy 39.494697 156.564262) + (xy 39.468318 156.57) + (xy 39.063402 156.57) + (xy 39.029071 156.55992) + (xy 39.00564 156.532879) + (xy 38.999902 156.5065) + (xy 38.999902 156.477094) + (xy 38.987016 156.412313) + (xy 38.953863 156.362696) + (xy 38.904246 156.329543) + (xy 38.839465 156.316658) + (xy 38.351975 156.316658) + (xy 38.287193 156.329543) + (xy 38.237576 156.362696) + (xy 38.204423 156.412313) + (xy 38.191538 156.477094) + (xy 38.191538 157.064585) + (xy 38.204423 157.129366) + (xy 38.237576 157.178983) + (xy 38.287193 157.212136) + (xy 38.351975 157.225022) + (xy 38.839465 157.225022) + (xy 38.904246 157.212136) + (xy 38.953863 157.178983) + (xy 38.987016 157.129366) + (xy 38.998604 157.071112) + (xy 39.015189 157.039407) + (xy 39.046281 157.021702) + (xy 39.060884 157.02) + (xy 39.468318 157.02) + (xy 39.502649 157.03008) + (xy 39.52608 157.057121) + (xy 39.531818 157.0835) + (xy 39.531818 157.346745) + (xy 39.544703 157.411526) + (xy 39.577856 157.461143) + (xy 39.627473 157.494296) + (xy 39.692255 157.507182) + (xy 39.947501 157.507182) + (xy 39.981832 157.517262) + (xy 40.005263 157.544303) + (xy 40.011001 157.570682) + (xy 40.011001 157.826774) + (xy 40.000921 157.861105) + (xy 39.982779 157.879573) + (xy 39.944178 157.905365) + (xy 39.910033 157.916056) + (xy 39.875528 157.90659) + (xy 39.873622 157.905365) + (xy 39.805135 157.859604) + (xy 39.720845 157.842838) + (xy 39.233355 157.842838) + (xy 39.149064 157.859604) + (xy 39.080578 157.905365) + (xy 39.046433 157.916056) + (xy 39.011928 157.90659) + (xy 39.010022 157.905365) + (xy 38.941535 157.859604) + (xy 38.857245 157.842838) + (xy 38.369756 157.842838) + (xy 38.308591 157.855005) + (xy 38.272953 157.851816) + (xy 38.251301 157.837626) + (xy 37.267599 156.853925) + (xy 37.250451 156.822522) + (xy 37.249 156.809024) + (xy 37.249 150.437274) + (xy 37.25908 150.402943) + (xy 37.267599 150.392373) + (xy 38.291417 149.368556) + (xy 38.32282 149.351408) + (xy 38.358509 149.353961) + (xy 38.387152 149.375403) + (xy 38.399656 149.408927) + (xy 38.399818 149.413457) + (xy 38.399818 149.751745) + (xy 38.412703 149.816526) + (xy 38.445856 149.866143) + (xy 38.495473 149.899296) + (xy 38.560255 149.912182) + (xy 39.047745 149.912182) + (xy 39.112526 149.899296) + (xy 39.156039 149.870222) + (xy 39.190184 149.85953) + (xy 39.22469 149.868996) + (xy 39.248599 149.895614) + (xy 39.254818 149.92302) + (xy 39.254818 150.928745) + (xy 39.267703 150.993526) + (xy 39.300856 151.043143) + (xy 39.350473 151.076296) + (xy 39.415255 151.089182) + (xy 39.547501 151.089182) + (xy 39.581832 151.099262) + (xy 39.605263 151.126303) + (xy 39.611001 151.152682) + (xy 39.611 151.38877) + (xy 39.600919 151.423101) + (xy 39.582779 151.441568) + (xy 39.577856 151.444856) + (xy 39.544703 151.494473) + (xy 39.531818 151.559254) + (xy 39.531818 152.996681) + (xy 39.521738 153.031012) + (xy 39.513219 153.041582) + (xy 39.294583 153.260219) + (xy 39.26318 153.277367) + (xy 39.227491 153.274814) + (xy 39.198848 153.253372) + (xy 39.186344 153.219848) + (xy 39.186182 153.215318) + (xy 39.186182 152.897254) + (xy 39.173296 152.832473) + (xy 39.140143 152.782856) + (xy 39.090526 152.749703) + (xy 39.025745 152.736818) + (xy 37.538255 152.736818) + (xy 37.473473 152.749703) + (xy 37.423856 152.782856) + (xy 37.390703 152.832473) + (xy 37.377818 152.897254) + (xy 37.377818 154.484745) + (xy 37.390703 154.549526) + (xy 37.423856 154.599143) + (xy 37.473473 154.632296) + (xy 37.538255 154.645182) + (xy 38.307221 154.645182) + (xy 38.341552 154.655262) + (xy 38.364983 154.682303) + (xy 38.370721 154.708682) + (xy 38.37072 155.160816) + (xy 38.36064 155.195147) + (xy 38.333599 155.218578) + (xy 38.319608 155.223096) + (xy 38.287193 155.229543) + (xy 38.237576 155.262696) + (xy 38.204423 155.312313) + (xy 38.191538 155.377094) + (xy 38.191538 155.964585) + (xy 38.204423 156.029366) + (xy 38.237576 156.078983) + (xy 38.287193 156.112136) + (xy 38.351975 156.125022) + (xy 38.839465 156.125022) + (xy 38.904246 156.112136) + (xy 38.953863 156.078983) + (xy 38.987016 156.029366) + (xy 38.999902 155.964585) + (xy 38.999902 155.377094) + (xy 38.987016 155.312313) + (xy 38.953863 155.262696) + (xy 38.904246 155.229543) + (xy 38.871832 155.223096) + (xy 38.840127 155.206511) + (xy 38.822422 155.175419) + (xy 38.82072 155.160816) + (xy 38.82072 154.708682) + (xy 38.8308 154.674351) + (xy 38.857841 154.65092) + (xy 38.88422 154.645182) + (xy 39.025745 154.645182) + (xy 39.090526 154.632296) + (xy 39.140143 154.599143) + (xy 39.173296 154.549526) + (xy 39.186182 154.484745) + (xy 39.186182 153.971689) + (xy 39.196262 153.937358) + (xy 39.223303 153.913927) + (xy 39.237294 153.909409) + (xy 39.269791 153.902945) + (xy 39.344216 153.853216) + (xy 39.353296 153.839627) + (xy 39.361193 153.830005) + (xy 39.865418 153.325781) + (xy 39.896821 153.308633) + (xy 39.910319 153.307182) + (xy 39.979745 153.307182) + (xy 40.044526 153.294296) + (xy 40.094143 153.261143) + (xy 40.127296 153.211526) + (xy 40.140182 153.146745) + (xy 40.140182 151.559254) + (xy 40.127296 151.494473) + (xy 40.094143 151.444856) + (xy 40.089221 151.441568) + (xy 40.066277 151.414114) + (xy 40.061 151.38877) + (xy 40.061 151.152682) + (xy 40.07108 151.118351) + (xy 40.098121 151.09492) + (xy 40.1245 151.089182) + (xy 40.202745 151.089182) + (xy 40.267526 151.076296) + (xy 40.317143 151.043143) + (xy 40.350296 150.993526) + (xy 40.363182 150.928745) + (xy 40.363182 149.341254) + (xy 40.350296 149.276473) + (xy 40.317143 149.226856) + (xy 40.267526 149.193703) + (xy 40.202745 149.180818) + (xy 39.502683 149.180818) + (xy 39.468352 149.170738) + (xy 39.444921 149.143697) + (xy 39.439829 149.108281) + (xy 39.454693 149.075734) + (xy 39.457782 149.072417) + (xy 39.74164 148.788559) + (xy 39.773043 148.771411) + (xy 39.786541 148.76996) + (xy 39.912438 148.76996) + (xy 39.946769 148.78004) + (xy 39.9702 148.807081) + (xy 39.975938 148.83346) + (xy 39.975938 148.838705) + (xy 39.988823 148.903486) + (xy 40.021976 148.953103) + (xy 40.071593 148.986256) + (xy 40.136375 148.999142) + (xy 40.427522 148.999142) + (xy 40.461853 149.009222) + (xy 40.472423 149.017741) + (xy 40.592402 149.13772) + (xy 40.60955 149.169123) + (xy 40.611001 149.182621) + (xy 40.611 151.38877) + (xy 40.60092 151.423101) + (xy 40.582779 151.441568) + (xy 40.577856 151.444856) + (xy 40.544703 151.494473) + (xy 40.531818 151.559254) + (xy 40.531818 153.146745) + (xy 40.544703 153.211526) + (xy 40.577856 153.261143) + (xy 40.627473 153.294296) + (xy 40.692255 153.307182) + (xy 40.979745 153.307182) + (xy 41.044524 153.294296) + (xy 41.05072 153.290157) + (xy 41.084865 153.279465) + (xy 41.119371 153.288931) + (xy 41.12128 153.290157) + (xy 41.127475 153.294296) + (xy 41.192255 153.307182) + (xy 41.479745 153.307182) + (xy 41.544524 153.294296) + (xy 41.55072 153.290157) + (xy 41.584865 153.279465) + (xy 41.619371 153.288931) + (xy 41.62128 153.290157) + (xy 41.627475 153.294296) + (xy 41.692255 153.307182) + (xy 41.979745 153.307182) + (xy 42.044526 153.294296) + (xy 42.094143 153.261143) + (xy 42.127296 153.211526) + (xy 42.140182 153.146745) + (xy 42.140182 151.846061) + (xy 42.150262 151.81173) + (xy 42.177303 151.788299) + (xy 42.212719 151.783207) + (xy 42.238961 151.793263) + (xy 42.255473 151.804296) + (xy 42.320255 151.817182) + (xy 42.907745 151.817182) + (xy 42.972526 151.804296) + (xy 43.022143 151.771143) + (xy 43.055296 151.721526) + (xy 43.068182 151.656745) + (xy 43.068182 151.269254) + (xy 43.055296 151.204473) + (xy 43.022143 151.154856) + (xy 42.972526 151.121703) + (xy 42.907745 151.108818) + (xy 42.9025 151.108818) + (xy 42.868169 151.098738) + (xy 42.844738 151.071697) + (xy 42.839 151.045318) + (xy 42.839 151.002682) + (xy 42.84908 150.968351) + (xy 42.876121 150.94492) + (xy 42.9025 150.939182) + (xy 42.907745 150.939182) + (xy 42.972526 150.926296) + (xy 43.022143 150.893143) + (xy 43.055296 150.843526) + (xy 43.068182 150.778745) + (xy 43.068182 150.510682) + (xy 43.078262 150.476351) + (xy 43.105303 150.45292) + (xy 43.140719 150.447828) + (xy 43.173266 150.462692) + (xy 43.176583 150.465781) + (xy 43.214807 150.504005) + (xy 43.222704 150.513627) + (xy 43.231784 150.527217) + (xy 43.282596 150.561168) + (xy 43.305541 150.588622) + (xy 43.310818 150.613966) + (xy 43.310818 150.858745) + (xy 43.323703 150.923526) + (xy 43.356856 150.973143) + (xy 43.406473 151.006296) + (xy 43.471255 151.019182) + (xy 43.976501 151.019182) + (xy 44.010832 151.029262) + (xy 44.034263 151.056303) + (xy 44.040001 151.082682) + (xy 44.04 151.707318) + (xy 44.02992 151.741649) + (xy 44.002879 151.76508) + (xy 43.9765 151.770818) + (xy 43.471255 151.770818) + (xy 43.406473 151.783703) + (xy 43.356856 151.816856) + (xy 43.323703 151.866473) + (xy 43.310818 151.931254) + (xy 43.310818 152.734681) + (xy 43.300738 152.769012) + (xy 43.292219 152.779582) + (xy 42.589295 153.482507) + (xy 42.579673 153.490404) + (xy 42.566084 153.499483) + (xy 42.516354 153.57391) + (xy 42.498892 153.661699) + (xy 42.50208 153.677724) + (xy 42.5033 153.690113) + (xy 42.5033 155.051211) + (xy 42.49322 155.085542) + (xy 42.484701 155.096112) + (xy 42.389195 155.191617) + (xy 42.3283 155.338633) + (xy 42.3283 155.497766) + (xy 42.389195 155.644782) + (xy 42.480982 155.736569) + (xy 42.49813 155.767972) + (xy 42.498361 155.769082) + (xy 42.516354 155.859542) + (xy 42.566084 155.933969) + (xy 42.579673 155.943049) + (xy 42.589295 155.950946) + (xy 43.008354 156.370005) + (xy 43.016253 156.37963) + (xy 43.019673 156.384749) + (xy 43.030363 156.418895) + (xy 43.02939 156.42244) + (xy 43.051593 156.418842) + (xy 43.078959 156.429049) + (xy 43.099755 156.442945) + (xy 43.187545 156.460406) + (xy 43.203567 156.45722) + (xy 43.215955 156.456) + (xy 43.676782 156.456) + (xy 43.711113 156.46608) + (xy 43.721683 156.474599) + (xy 44.783402 157.536318) + (xy 44.80055 157.567721) + (xy 44.802001 157.581219) + (xy 44.802 159.039011) + (xy 44.79192 159.073342) + (xy 44.783401 159.083912) + (xy 44.687895 159.179417) + (xy 44.627 159.326433) + (xy 44.627 159.485566) + (xy 44.687895 159.632582) + (xy 44.800417 159.745104) + (xy 44.947434 159.806) + (xy 45.106566 159.806) + (xy 45.253582 159.745104) + (xy 45.366104 159.632582) + (xy 45.427 159.485566) + (xy 45.427 159.326433) + (xy 45.366104 159.179417) + (xy 45.270599 159.083912) + (xy 45.253451 159.052509) + (xy 45.252 159.039011) + (xy 45.252 157.49013) + (xy 45.25322 157.477741) + (xy 45.256407 157.461716) + (xy 45.238945 157.373927) + (xy 45.189216 157.299501) + (xy 45.175627 157.290422) + (xy 45.166005 157.282525) + (xy 43.975475 156.091995) + (xy 43.967578 156.082373) + (xy 43.958498 156.068783) + (xy 43.884073 156.019054) + (xy 43.796282 156.001592) + (xy 43.780258 156.00478) + (xy 43.767869 156.006) + (xy 43.307047 156.006) + (xy 43.272716 155.99592) + (xy 43.262146 155.987401) + (xy 43.038367 155.763622) + (xy 43.021219 155.732219) + (xy 43.023772 155.69653) + (xy 43.038367 155.67382) + (xy 43.067404 155.644782) + (xy 43.1283 155.497766) + (xy 43.1283 155.338633) + (xy 43.067404 155.191617) + (xy 42.971899 155.096112) + (xy 42.954751 155.064709) + (xy 42.9533 155.051211) + (xy 42.9533 153.7812) + (xy 42.96338 153.746869) + (xy 42.971899 153.736299) + (xy 43.610418 153.097781) + (xy 43.641821 153.080633) + (xy 43.655319 153.079182) + (xy 43.775278 153.079182) + (xy 43.809609 153.089262) + (xy 43.83304 153.116303) + (xy 43.838132 153.151719) + (xy 43.833944 153.166982) + (xy 43.7761 153.306631) + (xy 43.7761 153.465764) + (xy 43.836995 153.61278) + (xy 43.949517 153.725302) + (xy 44.096534 153.786198) + (xy 44.255666 153.786198) + (xy 44.402682 153.725302) + (xy 44.498188 153.629797) + (xy 44.529591 153.612649) + (xy 44.543089 153.611198) + (xy 44.980391 153.611198) + (xy 44.99278 153.612418) + (xy 45.008804 153.615605) + (xy 45.096595 153.598143) + (xy 45.17102 153.548414) + (xy 45.1801 153.534825) + (xy 45.187997 153.525203) + (xy 45.750208 152.962993) + (xy 45.75983 152.955096) + (xy 45.773416 152.946018) + (xy 45.823145 152.871593) + (xy 45.840607 152.783802) + (xy 45.83742 152.767776) + (xy 45.8362 152.755388) + (xy 45.8362 151.998472) + (xy 45.84628 151.964141) + (xy 45.873321 151.94071) + (xy 45.908737 151.935618) + (xy 45.941284 151.950482) + (xy 45.95425 151.968464) + (xy 46.238545 152.252759) + (xy 46.606087 152.405) + (xy 47.003913 152.405) + (xy 47.371454 152.252759) + (xy 47.652759 151.971454) + (xy 47.727835 151.790207) + (xy 47.750286 151.762347) + (xy 47.784235 151.751047) + (xy 47.818903 151.759896) + (xy 47.843284 151.786083) + (xy 47.850001 151.814507) + (xy 47.850001 153.535493) + (xy 47.839921 153.569824) + (xy 47.81288 153.593255) + (xy 47.777464 153.598347) + (xy 47.744917 153.583483) + (xy 47.727835 153.559793) + (xy 47.652759 153.378545) + (xy 47.371454 153.09724) + (xy 47.003913 152.945) + (xy 46.606087 152.945) + (xy 46.238545 153.09724) + (xy 45.95724 153.378545) + (xy 45.805 153.746086) + (xy 45.805 154.143913) + (xy 45.95724 154.511454) + (xy 46.238545 154.792759) + (xy 46.606087 154.945) + (xy 47.003913 154.945) + (xy 47.371454 154.792759) + (xy 47.652759 154.511454) + (xy 47.727835 154.330207) + (xy 47.750286 154.302347) + (xy 47.784235 154.291047) + (xy 47.818903 154.299896) + (xy 47.843284 154.326083) + (xy 47.850001 154.354507) + (xy 47.850001 156.075493) + (xy 47.839921 156.109824) + (xy 47.81288 156.133255) + (xy 47.777464 156.138347) + (xy 47.744917 156.123483) + (xy 47.727835 156.099793) + (xy 47.652759 155.918545) + (xy 47.371454 155.63724) + (xy 47.003913 155.485) + (xy 46.606087 155.485) + (xy 46.238545 155.63724) + (xy 45.95724 155.918545) + (xy 45.805 156.286086) + (xy 45.805 156.683913) + (xy 45.95724 157.051454) + (xy 46.238545 157.332759) + (xy 46.606087 157.485) + (xy 47.003913 157.485) + (xy 47.371454 157.332759) + (xy 47.652759 157.051454) + (xy 47.727835 156.870207) + (xy 47.750286 156.842347) + (xy 47.784235 156.831047) + (xy 47.818903 156.839896) + (xy 47.843284 156.866083) + (xy 47.850001 156.894507) + (xy 47.850001 158.615494) + (xy 47.839921 158.649825) + (xy 47.81288 158.673256) + (xy 47.777464 158.678348) + (xy 47.744917 158.663484) + (xy 47.727835 158.639794) + (xy 47.652759 158.458545) + (xy 47.371454 158.17724) + (xy 47.003913 158.025) + (xy 46.606087 158.025) + (xy 46.238545 158.17724) + (xy 45.95724 158.458545) + (xy 45.805 158.826086) + (xy 45.805 159.223913) + (xy 45.95724 159.591454) + (xy 46.238545 159.872759) + (xy 46.492218 159.977834) + (xy 46.520078 160.000284) + (xy 46.531378 160.034233) + (xy 46.522529 160.068902) + (xy 46.496342 160.093283) + (xy 46.467918 160.1) + (xy 29.362082 160.1) + (xy 29.327751 160.08992) + (xy 29.30432 160.062879) + (xy 29.299228 160.027463) + (xy 29.314092 159.994916) + (xy 29.337782 159.977834) + (xy 29.591454 159.872759) + (xy 29.872759 159.591454) + (xy 30.025 159.223913) + (xy 30.025 158.826086) + (xy 29.872759 158.458545) + (xy 29.591454 158.17724) + (xy 29.223913 158.025) + (xy 28.826087 158.025) + (xy 28.458545 158.17724) + (xy 28.17724 158.458545) + (xy 28.072166 158.712218) + (xy 28.049716 158.740078) + (xy 28.015767 158.751378) + (xy 27.981098 158.742529) + (xy 27.956717 158.716342) + (xy 27.95 158.687918) + (xy 27.95 156.822082) + (xy 27.96008 156.787751) + (xy 27.987121 156.76432) + (xy 28.022537 156.759228) + (xy 28.055084 156.774092) + (xy 28.072166 156.797782) + (xy 28.17724 157.051454) + (xy 28.458545 157.332759) + (xy 28.826087 157.485) + (xy 29.223913 157.485) + (xy 29.591454 157.332759) + (xy 29.872759 157.051454) + (xy 30.025 156.683913) + (xy 30.025 156.286086) + (xy 29.872759 155.918545) + (xy 29.591454 155.63724) + (xy 29.223913 155.485) + (xy 28.826087 155.485) + (xy 28.458545 155.63724) + (xy 28.17724 155.918545) + (xy 28.072166 156.172218) + (xy 28.049716 156.200078) + (xy 28.015767 156.211378) + (xy 27.981098 156.202529) + (xy 27.956717 156.176342) + (xy 27.95 156.147918) + (xy 27.95 154.282082) + (xy 27.96008 154.247751) + (xy 27.987121 154.22432) + (xy 28.022537 154.219228) + (xy 28.055084 154.234092) + (xy 28.072166 154.257782) + (xy 28.17724 154.511454) + (xy 28.458545 154.792759) + (xy 28.826087 154.945) + (xy 29.223913 154.945) + (xy 29.591454 154.792759) + (xy 29.872759 154.511454) + (xy 29.919652 154.398245) + (xy 31.898218 154.398245) + (xy 31.911103 154.463026) + (xy 31.944256 154.512643) + (xy 31.993873 154.545796) + (xy 32.058655 154.558682) + (xy 32.063901 154.558682) + (xy 32.098232 154.568762) + (xy 32.121663 154.595803) + (xy 32.127401 154.622182) + (xy 32.127401 154.665882) + (xy 32.126181 154.678271) + (xy 32.122992 154.694299) + (xy 32.12312 154.694941) + (xy 32.119931 154.730579) + (xy 32.119506 154.73163) + (xy 32.1048 154.767133) + (xy 32.1048 154.926266) + (xy 32.165695 155.073282) + (xy 32.278217 155.185804) + (xy 32.425234 155.2467) + (xy 32.584366 155.2467) + (xy 32.731382 155.185804) + (xy 32.843904 155.073282) + (xy 32.9048 154.926266) + (xy 32.9048 154.767133) + (xy 32.843904 154.620117) + (xy 32.787735 154.563948) + (xy 32.770587 154.532545) + (xy 32.77314 154.496856) + (xy 32.779837 154.483769) + (xy 32.793696 154.463026) + (xy 32.806582 154.398245) + (xy 33.295218 154.398245) + (xy 33.308103 154.463026) + (xy 33.341256 154.512643) + (xy 33.378627 154.537613) + (xy 33.401571 154.565067) + (xy 33.40603 154.600568) + (xy 33.402014 154.614711) + (xy 33.3494 154.741733) + (xy 33.3494 154.900866) + (xy 33.410295 155.047882) + (xy 33.522817 155.160404) + (xy 33.669834 155.2213) + (xy 33.828966 155.2213) + (xy 33.975982 155.160404) + (xy 34.088504 155.047882) + (xy 34.1494 154.900866) + (xy 34.1494 154.741733) + (xy 34.096786 154.614711) + (xy 34.092961 154.579136) + (xy 34.108977 154.547141) + (xy 34.120173 154.537613) + (xy 34.157543 154.512643) + (xy 34.190696 154.463026) + (xy 34.203582 154.398245) + (xy 34.203582 154.010754) + (xy 34.190696 153.945973) + (xy 34.157543 153.896356) + (xy 34.107926 153.863203) + (xy 34.043145 153.850318) + (xy 33.455655 153.850318) + (xy 33.390873 153.863203) + (xy 33.341256 153.896356) + (xy 33.308103 153.945973) + (xy 33.295218 154.010754) + (xy 33.295218 154.398245) + (xy 32.806582 154.398245) + (xy 32.806582 154.010754) + (xy 32.793696 153.945973) + (xy 32.760543 153.896356) + (xy 32.710926 153.863203) + (xy 32.646145 153.850318) + (xy 32.058655 153.850318) + (xy 31.993873 153.863203) + (xy 31.944256 153.896356) + (xy 31.911103 153.945973) + (xy 31.898218 154.010754) + (xy 31.898218 154.398245) + (xy 29.919652 154.398245) + (xy 30.025 154.143913) + (xy 30.025 153.746086) + (xy 29.872759 153.378545) + (xy 29.591454 153.09724) + (xy 29.223913 152.945) + (xy 28.826087 152.945) + (xy 28.458545 153.09724) + (xy 28.17724 153.378545) + (xy 28.072166 153.632218) + (xy 28.049716 153.660078) + (xy 28.015767 153.671378) + (xy 27.981098 153.662529) + (xy 27.956717 153.636342) + (xy 27.95 153.607918) + (xy 27.95 151.742082) + (xy 27.96008 151.707751) + (xy 27.987121 151.68432) + (xy 28.022537 151.679228) + (xy 28.055084 151.694092) + (xy 28.072166 151.717782) + (xy 28.17724 151.971454) + (xy 28.458545 152.252759) + (xy 28.826087 152.405) + (xy 29.223913 152.405) + (xy 29.591454 152.252759) + (xy 29.872759 151.971454) + (xy 30.025 151.603913) + (xy 30.025 151.206086) + (xy 29.872759 150.838545) + (xy 29.591454 150.55724) + (xy 29.223913 150.405) + (xy 28.826087 150.405) + (xy 28.458545 150.55724) + (xy 28.17724 150.838545) + (xy 28.072166 151.092218) + (xy 28.049716 151.120078) + (xy 28.015767 151.131378) + (xy 27.981098 151.122529) + (xy 27.956717 151.096342) + (xy 27.95 151.067918) + (xy 27.95 149.202082) + (xy 27.96008 149.167751) + (xy 27.987121 149.14432) + (xy 28.022537 149.139228) + (xy 28.055084 149.154092) + (xy 28.072166 149.177782) + (xy 28.17724 149.431454) + (xy 28.458545 149.712759) + (xy 28.826087 149.865) + (xy 29.223913 149.865) + (xy 29.591454 149.712759) + (xy 29.872759 149.431454) + (xy 30.025 149.063913) + (xy 30.025 148.666086) + (xy 29.872759 148.298545) + (xy 29.591454 148.01724) + (xy 29.223913 147.865) + (xy 28.826087 147.865) + (xy 28.458545 148.01724) + (xy 28.17724 148.298545) + (xy 28.072166 148.552218) + (xy 28.049716 148.580078) + (xy 28.015767 148.591378) + (xy 27.981098 148.582529) + (xy 27.956717 148.556342) + (xy 27.95 148.527918) + (xy 27.95 145.3725) + (xy 27.96008 145.338169) + (xy 27.987121 145.314738) + (xy 28.0135 145.309) + (xy 30.235101 145.309) ) ) (filled_polygon + (layer "F.Cu") (pts - (xy 39.912438 148.84496) (xy 39.929008 148.928263) (xy 39.976196 148.998884) (xy 40.046817 149.046072) (xy 40.13012 149.062642) - (xy 40.427522 149.062642) (xy 40.547501 149.182621) (xy 40.5475 151.38877) (xy 40.532076 151.399076) (xy 40.484888 151.469697) - (xy 40.468318 151.553) (xy 40.468318 153.153) (xy 40.484888 153.236303) (xy 40.532076 153.306924) (xy 40.602697 153.354112) - (xy 40.686 153.370682) (xy 40.986 153.370682) (xy 41.069303 153.354112) (xy 41.086 153.342955) (xy 41.102697 153.354112) - (xy 41.186 153.370682) (xy 41.486 153.370682) (xy 41.569303 153.354112) (xy 41.586 153.342955) (xy 41.602697 153.354112) - (xy 41.686 153.370682) (xy 41.986 153.370682) (xy 42.069303 153.354112) (xy 42.139924 153.306924) (xy 42.187112 153.236303) - (xy 42.203682 153.153) (xy 42.203682 151.846061) (xy 42.230697 151.864112) (xy 42.314 151.880682) (xy 42.914 151.880682) - (xy 42.997303 151.864112) (xy 43.067924 151.816924) (xy 43.115112 151.746303) (xy 43.131682 151.663) (xy 43.131682 151.263) - (xy 43.115112 151.179697) (xy 43.067924 151.109076) (xy 42.997303 151.061888) (xy 42.914 151.045318) (xy 42.9025 151.045318) - (xy 42.9025 151.002682) (xy 42.914 151.002682) (xy 42.997303 150.986112) (xy 43.067924 150.938924) (xy 43.115112 150.868303) - (xy 43.131682 150.785) (xy 43.131682 150.510682) (xy 43.169906 150.548906) (xy 43.186003 150.572997) (xy 43.247318 150.613966) - (xy 43.247318 150.865) (xy 43.263888 150.948303) (xy 43.311076 151.018924) (xy 43.381697 151.066112) (xy 43.465 151.082682) - (xy 43.976501 151.082682) (xy 43.9765 151.707318) (xy 43.465 151.707318) (xy 43.381697 151.723888) (xy 43.311076 151.771076) - (xy 43.263888 151.841697) (xy 43.247318 151.925) (xy 43.247318 152.734681) (xy 42.544394 153.437606) (xy 42.520303 153.453703) - (xy 42.456539 153.549134) (xy 42.440644 153.629044) (xy 42.434148 153.6617) (xy 42.4398 153.690113) (xy 42.439801 155.010829) - (xy 42.4398 155.010834) (xy 42.4398 155.051211) (xy 42.335363 155.155648) (xy 42.2648 155.326004) (xy 42.2648 155.510396) - (xy 42.335363 155.680752) (xy 42.436081 155.78147) (xy 42.4398 155.800166) (xy 42.456539 155.884319) (xy 42.520303 155.97975) - (xy 42.544394 155.995847) (xy 42.963453 156.414906) (xy 42.966873 156.420025) (xy 42.960383 156.415688) (xy 42.87708 156.399118) - (xy 42.567398 156.399118) (xy 42.537374 156.369094) (xy 42.521277 156.345003) (xy 42.425847 156.281239) (xy 42.341694 156.2645) - (xy 42.341693 156.2645) (xy 42.31328 156.258848) (xy 42.284867 156.2645) (xy 42.203682 156.2645) (xy 42.203682 155.753) - (xy 42.187112 155.669697) (xy 42.139924 155.599076) (xy 42.069303 155.551888) (xy 41.986 155.535318) (xy 41.686 155.535318) - (xy 41.602697 155.551888) (xy 41.586 155.563045) (xy 41.569303 155.551888) (xy 41.486 155.535318) (xy 41.186 155.535318) - (xy 41.102697 155.551888) (xy 41.086 155.563045) (xy 41.069303 155.551888) (xy 40.986 155.535318) (xy 40.686 155.535318) - (xy 40.646316 155.543212) (xy 40.588812 155.504789) (xy 40.486 155.484338) (xy 40.186 155.484338) (xy 40.083188 155.504789) - (xy 40.025684 155.543212) (xy 39.986 155.535318) (xy 39.686 155.535318) (xy 39.602697 155.551888) (xy 39.532076 155.599076) - (xy 39.484888 155.669697) (xy 39.468318 155.753) (xy 39.468318 156.5065) (xy 39.063402 156.5065) (xy 39.063402 156.47084) - (xy 39.046832 156.387537) (xy 38.999644 156.316916) (xy 38.929023 156.269728) (xy 38.84572 156.253158) (xy 38.34572 156.253158) - (xy 38.262417 156.269728) (xy 38.191796 156.316916) (xy 38.144608 156.387537) (xy 38.128038 156.47084) (xy 38.128038 157.07084) - (xy 38.144608 157.154143) (xy 38.191796 157.224764) (xy 38.262417 157.271952) (xy 38.34572 157.288522) (xy 38.84572 157.288522) - (xy 38.929023 157.271952) (xy 38.999644 157.224764) (xy 39.046832 157.154143) (xy 39.060884 157.0835) (xy 39.468318 157.0835) - (xy 39.468318 157.353) (xy 39.484888 157.436303) (xy 39.532076 157.506924) (xy 39.602697 157.554112) (xy 39.686 157.570682) - (xy 39.947501 157.570682) (xy 39.947501 157.826774) (xy 39.9089 157.852566) (xy 39.829912 157.799789) (xy 39.7271 157.779338) - (xy 39.2271 157.779338) (xy 39.124288 157.799789) (xy 39.0453 157.852566) (xy 38.966312 157.799789) (xy 38.8635 157.779338) - (xy 38.3635 157.779338) (xy 38.296202 157.792725) (xy 37.3125 156.809024) (xy 37.3125 150.437274) (xy 38.336318 149.413457) - (xy 38.336318 149.758) (xy 38.352888 149.841303) (xy 38.400076 149.911924) (xy 38.470697 149.959112) (xy 38.554 149.975682) - (xy 39.054 149.975682) (xy 39.137303 149.959112) (xy 39.191318 149.92302) (xy 39.191318 150.935) (xy 39.207888 151.018303) - (xy 39.255076 151.088924) (xy 39.325697 151.136112) (xy 39.409 151.152682) (xy 39.547501 151.152682) (xy 39.5475 151.38877) - (xy 39.532076 151.399076) (xy 39.484888 151.469697) (xy 39.468318 151.553) (xy 39.468318 152.996681) (xy 39.249682 153.215318) - (xy 39.249682 152.891) (xy 39.233112 152.807697) (xy 39.185924 152.737076) (xy 39.115303 152.689888) (xy 39.032 152.673318) - (xy 37.532 152.673318) (xy 37.448697 152.689888) (xy 37.378076 152.737076) (xy 37.330888 152.807697) (xy 37.314318 152.891) - (xy 37.314318 154.491) (xy 37.330888 154.574303) (xy 37.378076 154.644924) (xy 37.448697 154.692112) (xy 37.532 154.708682) - (xy 38.307221 154.708682) (xy 38.30722 155.160816) (xy 38.262417 155.169728) (xy 38.191796 155.216916) (xy 38.144608 155.287537) - (xy 38.128038 155.37084) (xy 38.128038 155.97084) (xy 38.144608 156.054143) (xy 38.191796 156.124764) (xy 38.262417 156.171952) - (xy 38.34572 156.188522) (xy 38.84572 156.188522) (xy 38.929023 156.171952) (xy 38.999644 156.124764) (xy 39.046832 156.054143) - (xy 39.063402 155.97084) (xy 39.063402 155.37084) (xy 39.046832 155.287537) (xy 38.999644 155.216916) (xy 38.929023 155.169728) - (xy 38.88422 155.160816) (xy 38.88422 154.708682) (xy 39.032 154.708682) (xy 39.115303 154.692112) (xy 39.185924 154.644924) - (xy 39.233112 154.574303) (xy 39.249682 154.491) (xy 39.249682 153.971689) (xy 39.294567 153.962761) (xy 39.389997 153.898997) - (xy 39.406094 153.874906) (xy 39.910319 153.370682) (xy 39.986 153.370682) (xy 40.069303 153.354112) (xy 40.139924 153.306924) - (xy 40.187112 153.236303) (xy 40.203682 153.153) (xy 40.203682 151.553) (xy 40.187112 151.469697) (xy 40.139924 151.399076) - (xy 40.1245 151.38877) (xy 40.1245 151.152682) (xy 40.209 151.152682) (xy 40.292303 151.136112) (xy 40.362924 151.088924) - (xy 40.410112 151.018303) (xy 40.426682 150.935) (xy 40.426682 149.335) (xy 40.410112 149.251697) (xy 40.362924 149.181076) - (xy 40.292303 149.133888) (xy 40.209 149.117318) (xy 39.502683 149.117318) (xy 39.786541 148.83346) (xy 39.912438 148.83346) + (xy 37.02353 149.53604) + (xy 37.04744 149.562659) + (xy 37.053163 149.597978) + (xy 37.038882 149.630785) + (xy 37.035059 149.634965) + (xy 36.68031 149.989714) + (xy 36.670688 149.997611) + (xy 36.646664 150.013662) + (xy 36.569307 150.129435) + (xy 36.542145 150.265997) + (xy 36.54778 150.294327) + (xy 36.549 150.306715) + (xy 36.549 152.1455) + (xy 36.53892 152.179831) + (xy 36.511879 152.203262) + (xy 36.476463 152.208354) + (xy 36.443916 152.19349) + (xy 36.440599 152.190401) + (xy 35.755193 151.504995) + (xy 35.747296 151.495373) + (xy 35.738216 151.481783) + (xy 35.663791 151.432054) + (xy 35.631294 151.425591) + (xy 35.599589 151.409007) + (xy 35.581884 151.377914) + (xy 35.580182 151.363311) + (xy 35.580182 150.765254) + (xy 35.567296 150.700473) + (xy 35.534143 150.650856) + (xy 35.484526 150.617703) + (xy 35.419745 150.604818) + (xy 35.006318 150.604818) + (xy 34.971987 150.594738) + (xy 34.961417 150.586219) + (xy 34.155299 149.780101) + (xy 34.138151 149.748698) + (xy 34.1367 149.7352) + (xy 34.1367 149.730656) + (xy 34.102468 149.648013) + (xy 34.098643 149.612438) + (xy 34.114659 149.580443) + (xy 34.14543 149.562185) + (xy 34.161134 149.560213) + (xy 36.82387 149.560213) + (xy 36.836259 149.561433) + (xy 36.852283 149.56462) + (xy 36.940073 149.547158) + (xy 36.95488 149.537265) + (xy 36.989025 149.526574) ) ) (filled_polygon + (layer "F.Cu") + (pts + (xy 45.251831 146.54538) + (xy 45.275262 146.572421) + (xy 45.281 146.5988) + (xy 45.281 147.842743) + (xy 45.282038 147.847961) + (xy 45.287256 147.849) + (xy 46.325479 147.849) + (xy 46.35981 147.85908) + (xy 46.383241 147.886121) + (xy 46.388333 147.921537) + (xy 46.373469 147.954084) + (xy 46.349779 147.971166) + (xy 46.238545 148.01724) + (xy 45.95724 148.298545) + (xy 45.832043 148.6008) + (xy 45.809593 148.62866) + (xy 45.775644 148.63996) + (xy 45.773377 148.64) + (xy 45.143414 148.64) + (xy 45.131026 148.63878) + (xy 45.114999 148.635592) + (xy 45.027208 148.653054) + (xy 44.952783 148.702783) + (xy 44.943706 148.71637) + (xy 44.935809 148.725992) + (xy 44.125993 149.535809) + (xy 44.116371 149.543706) + (xy 44.102784 149.552783) + (xy 44.053055 149.627209) + (xy 44.046591 149.659707) + (xy 44.030006 149.691411) + (xy 43.998913 149.709116) + (xy 43.984311 149.710818) + (xy 43.745318 149.710818) + (xy 43.710987 149.700738) + (xy 43.687556 149.673697) + (xy 43.682464 149.638281) + (xy 43.697328 149.605734) + (xy 43.721018 149.588651) + (xy 43.729584 149.585102) + (xy 43.842104 149.472582) + (xy 43.903 149.325566) + (xy 43.903 149.166433) + (xy 43.842104 149.019417) + (xy 43.729582 148.906895) + (xy 43.582566 148.846) + (xy 43.423434 148.846) + (xy 43.276417 148.906895) + (xy 43.163895 149.019417) + (xy 43.103 149.166433) + (xy 43.103 149.3015) + (xy 43.09292 149.335831) + (xy 43.084398 149.346405) + (xy 43.078053 149.352749) + (xy 43.046648 149.369894) + (xy 43.010959 149.367339) + (xy 42.997876 149.360642) + (xy 42.972526 149.343703) + (xy 42.907745 149.330818) + (xy 42.320255 149.330818) + (xy 42.255473 149.343703) + (xy 42.253457 149.345051) + (xy 42.219311 149.355742) + (xy 42.184806 149.346275) + (xy 42.160897 149.319657) + (xy 42.155899 149.30464) + (xy 42.150296 149.276473) + (xy 42.117143 149.226856) + (xy 42.067526 149.193703) + (xy 42.002745 149.180818) + (xy 41.215255 149.180818) + (xy 41.138085 149.196168) + (xy 41.137731 149.19439) + (xy 41.12564 149.198178) + (xy 41.091134 149.188716) + (xy 41.067221 149.1621) + (xy 41.061 149.134688) + (xy 41.061 149.091528) + (xy 41.06222 149.07914) + (xy 41.067871 149.050731) + (xy 41.069912 149.051137) + (xy 41.07096 149.039407) + (xy 41.092903 149.011145) + (xy 41.126642 148.999234) + (xy 41.130056 148.999142) + (xy 41.423865 148.999142) + (xy 41.488646 148.986256) + (xy 41.538263 148.953103) + (xy 41.571416 148.903486) + (xy 41.584302 148.838705) + (xy 41.584302 148.251214) + (xy 41.571416 148.186433) + (xy 41.538263 148.136816) + (xy 41.483341 148.100119) + (xy 41.460397 148.072665) + (xy 41.45512 148.047321) + (xy 41.45512 147.99348) + (xy 41.4652 147.959149) + (xy 41.473719 147.948579) + (xy 41.873561 147.548737) + (xy 41.904964 147.531589) + (xy 41.940653 147.534142) + (xy 41.969296 147.555584) + (xy 41.97126 147.558359) + (xy 42.003856 147.607143) + (xy 42.053473 147.640296) + (xy 42.118255 147.653182) + (xy 42.855745 147.653182) + (xy 42.920526 147.640296) + (xy 42.970143 147.607143) + (xy 43.003296 147.557526) + (xy 43.016182 147.492745) + (xy 43.016182 146.705254) + (xy 43.003296 146.640473) + (xy 42.999023 146.634078) + (xy 42.988332 146.599933) + (xy 42.997798 146.565428) + (xy 43.024417 146.541518) + (xy 43.051822 146.5353) + (xy 45.2175 146.5353) + ) + ) + ) + (zone (net 29) (net_name "/Vin") (layer "F.Cu") (tstamp c5680d26-9ab8-4e61-90c3-a7339ec54536) (hatch edge 0.508) + (connect_pads yes (clearance 0.254)) + (min_thickness 0.254) (filled_areas_thickness no) + (fill yes (thermal_gap 0.127) (thermal_bridge_width 0.508)) + (polygon (pts - (xy 36.635409 149.944813) (xy 36.600884 149.967882) (xy 36.509492 150.10466) (xy 36.4855 150.225277) (xy 36.4855 150.225281) - (xy 36.477401 150.265998) (xy 36.4855 150.306715) (xy 36.4855 152.1455) (xy 35.800094 151.460094) (xy 35.783997 151.436003) - (xy 35.688567 151.372239) (xy 35.643682 151.363311) (xy 35.643682 150.759) (xy 35.627112 150.675697) (xy 35.579924 150.605076) - (xy 35.509303 150.557888) (xy 35.426 150.541318) (xy 35.006318 150.541318) (xy 34.2002 149.7352) (xy 34.2002 149.718027) - (xy 34.161134 149.623713) (xy 36.82387 149.623713) (xy 36.852283 149.629365) (xy 36.880696 149.623713) (xy 36.880697 149.623713) - (xy 36.96485 149.606974) (xy 36.990158 149.590064) + (xy 27.755 145.055) + (xy 27.755 138.705) + (xy 30.295 136.165) + (xy 45.535 136.165) + (xy 48.075 138.705) + (xy 48.075 145.055) + (xy 48.075 147.595) + (xy 45.535 147.595) + (xy 45.535 145.055) ) ) (filled_polygon + (layer "F.Cu") (pts - (xy 45.2175 147.849) (xy 45.222334 147.8733) (xy 45.236099 147.893901) (xy 45.2567 147.907666) (xy 45.281 147.9125) - (xy 46.325479 147.9125) (xy 46.202576 147.963408) (xy 45.903408 148.262576) (xy 45.773377 148.5765) (xy 45.143414 148.5765) - (xy 45.115 148.570848) (xy 45.011598 148.591416) (xy 45.002433 148.593239) (xy 44.907003 148.657003) (xy 44.890908 148.681091) - (xy 44.081092 149.490908) (xy 44.057004 149.507003) (xy 44.040909 149.531091) (xy 44.040908 149.531092) (xy 43.99324 149.602433) - (xy 43.984311 149.647318) (xy 43.745318 149.647318) (xy 43.765552 149.638937) (xy 43.895937 149.508552) (xy 43.9665 149.338196) - (xy 43.9665 149.153804) (xy 43.895937 148.983448) (xy 43.765552 148.853063) (xy 43.595196 148.7825) (xy 43.410804 148.7825) - (xy 43.240448 148.853063) (xy 43.110063 148.983448) (xy 43.0395 149.153804) (xy 43.0395 149.3015) (xy 43.033155 149.307844) - (xy 42.997303 149.283888) (xy 42.914 149.267318) (xy 42.314 149.267318) (xy 42.230697 149.283888) (xy 42.218179 149.292252) - (xy 42.210112 149.251697) (xy 42.162924 149.181076) (xy 42.092303 149.133888) (xy 42.009 149.117318) (xy 41.209 149.117318) - (xy 41.125697 149.133888) (xy 41.1245 149.134688) (xy 41.1245 149.091528) (xy 41.130151 149.063119) (xy 41.130056 149.062642) - (xy 41.43012 149.062642) (xy 41.513423 149.046072) (xy 41.584044 148.998884) (xy 41.631232 148.928263) (xy 41.647802 148.84496) - (xy 41.647802 148.24496) (xy 41.631232 148.161657) (xy 41.584044 148.091036) (xy 41.51862 148.047321) (xy 41.51862 147.99348) - (xy 41.918462 147.593638) (xy 41.958076 147.652924) (xy 42.028697 147.700112) (xy 42.112 147.716682) (xy 42.862 147.716682) - (xy 42.945303 147.700112) (xy 43.015924 147.652924) (xy 43.063112 147.582303) (xy 43.079682 147.499) (xy 43.079682 146.699) - (xy 43.063112 146.615697) (xy 43.051822 146.5988) (xy 45.2175 146.5988) + (xy 45.413697 136.174667) + (xy 45.435653 136.186403) + (xy 45.638707 136.322079) + (xy 45.657953 136.337873) + (xy 47.512133 138.192054) + (xy 47.527927 138.2113) + (xy 47.673483 138.42914) + (xy 47.692446 138.474921) + (xy 47.74356 138.731889) + (xy 47.746 138.756665) + (xy 47.746 147.468) + (xy 47.736333 147.516601) + (xy 47.708803 147.557803) + (xy 47.667601 147.585333) + (xy 47.619 147.595) + (xy 45.662 147.595) + (xy 45.613399 147.585333) + (xy 45.572197 147.557803) + (xy 45.544667 147.516601) + (xy 45.535 147.468) + (xy 45.535 145.067508) + (xy 45.532924 145.057075) + (xy 45.522491 145.055) + (xy 44.323087 145.055) + (xy 44.274486 145.045333) + (xy 44.233284 145.017803) + (xy 44.205754 144.976601) + (xy 44.196087 144.928) + (xy 44.205754 144.879399) + (xy 44.233284 144.838197) + (xy 44.274486 144.810667) + (xy 44.483751 144.723986) + (xy 44.723986 144.483751) + (xy 44.854 144.16987) + (xy 44.854 143.830129) + (xy 44.723986 143.516248) + (xy 44.483751 143.276013) + (xy 44.16987 143.146) + (xy 43.83013 143.146) + (xy 43.753776 143.177627) + (xy 43.705175 143.187294) + (xy 43.656574 143.177627) + (xy 43.615373 143.150097) + (xy 43.615372 143.150097) + (xy 43.409517 142.944242) + (xy 43.381987 142.90304) + (xy 43.37232 142.854439) + (xy 43.381987 142.805838) + (xy 43.409517 142.764636) + (xy 43.450719 142.737106) + (xy 43.49932 142.727439) + (xy 43.547921 142.737106) + (xy 43.83013 142.854) + (xy 44.16987 142.854) + (xy 44.483751 142.723986) + (xy 44.723986 142.483751) + (xy 44.854 142.16987) + (xy 45.146 142.16987) + (xy 45.276013 142.483751) + (xy 45.516248 142.723986) + (xy 45.83013 142.854) + (xy 46.16987 142.854) + (xy 46.483751 142.723986) + (xy 46.723986 142.483751) + (xy 46.854 142.16987) + (xy 46.854 141.830129) + (xy 46.723986 141.516248) + (xy 46.483751 141.276013) + (xy 46.16987 141.146) + (xy 45.83013 141.146) + (xy 45.516248 141.276013) + (xy 45.276013 141.516248) + (xy 45.146 141.830129) + (xy 45.146 142.16987) + (xy 44.854 142.16987) + (xy 44.854 141.830129) + (xy 44.723986 141.516248) + (xy 44.483751 141.276013) + (xy 44.16987 141.146) + (xy 43.83013 141.146) + (xy 43.516248 141.276013) + (xy 43.276013 141.516248) + (xy 43.146 141.830129) + (xy 43.146 142.16987) + (xy 43.262894 142.452079) + (xy 43.272561 142.50068) + (xy 43.262894 142.549281) + (xy 43.235363 142.590483) + (xy 43.194162 142.618013) + (xy 43.145561 142.62768) + (xy 43.09696 142.618013) + (xy 43.055758 142.590483) + (xy 42.849903 142.384628) + (xy 42.822373 142.343426) + (xy 42.812706 142.294825) + (xy 42.822373 142.246224) + (xy 42.854 142.16987) + (xy 42.854 141.830129) + (xy 42.723986 141.516248) + (xy 42.483751 141.276013) + (xy 42.16987 141.146) + (xy 41.83013 141.146) + (xy 41.516248 141.276013) + (xy 41.276013 141.516248) + (xy 41.146 141.830129) + (xy 41.146 142.16987) + (xy 41.276013 142.483751) + (xy 41.331772 142.53951) + (xy 41.359302 142.580712) + (xy 41.368969 142.629313) + (xy 41.359302 142.677914) + (xy 41.331772 142.719116) + (xy 41.29057 142.746646) + (xy 41.241969 142.756313) + (xy 41.193368 142.746646) + (xy 41.178903 142.738914) + (xy 41.0484 142.712956) + (xy 41.028273 142.71696) + (xy 41.003496 142.7194) + (xy 38.385234 142.7194) + (xy 38.360457 142.71696) + (xy 38.340329 142.712956) + (xy 38.211959 142.73849) + (xy 38.103136 142.811204) + (xy 38.091733 142.82827) + (xy 38.075939 142.847515) + (xy 36.414651 144.508804) + (xy 36.373449 144.536334) + (xy 36.324848 144.546001) + (xy 34.688271 144.546001) + (xy 34.63967 144.536334) + (xy 34.598468 144.508804) + (xy 34.570938 144.467602) + (xy 34.561271 144.419001) + (xy 34.570938 144.3704) + (xy 34.654 144.16987) + (xy 34.654 143.830129) + (xy 34.523986 143.516248) + (xy 34.283751 143.276013) + (xy 33.96987 143.146) + (xy 33.63013 143.146) + (xy 33.553776 143.177627) + (xy 33.505175 143.187294) + (xy 33.456574 143.177627) + (xy 33.415373 143.150097) + (xy 33.415372 143.150097) + (xy 33.209517 142.944242) + (xy 33.181987 142.90304) + (xy 33.17232 142.854439) + (xy 33.181987 142.805838) + (xy 33.209517 142.764636) + (xy 33.250719 142.737106) + (xy 33.29932 142.727439) + (xy 33.347921 142.737106) + (xy 33.63013 142.854) + (xy 33.96987 142.854) + (xy 34.283751 142.723986) + (xy 34.523986 142.483751) + (xy 34.654 142.16987) + (xy 34.654 141.830129) + (xy 34.622373 141.753776) + (xy 34.612706 141.705175) + (xy 34.622373 141.656574) + (xy 34.649903 141.615373) + (xy 34.649903 141.615372) + (xy 34.855759 141.409516) + (xy 34.896961 141.381986) + (xy 34.945562 141.372319) + (xy 34.994163 141.381986) + (xy 35.035365 141.409516) + (xy 35.062895 141.450718) + (xy 35.072562 141.499319) + (xy 35.062895 141.54792) + (xy 34.946 141.830129) + (xy 34.946 142.16987) + (xy 35.076013 142.483751) + (xy 35.316248 142.723986) + (xy 35.63013 142.854) + (xy 35.96987 142.854) + (xy 36.283751 142.723986) + (xy 36.523986 142.483751) + (xy 36.654 142.16987) + (xy 36.654 141.830129) + (xy 36.523986 141.516248) + (xy 36.283751 141.276013) + (xy 35.96987 141.146) + (xy 35.63013 141.146) + (xy 35.34792 141.262895) + (xy 35.299319 141.272562) + (xy 35.250718 141.262895) + (xy 35.209516 141.235365) + (xy 35.181986 141.194163) + (xy 35.172319 141.145562) + (xy 35.181986 141.096961) + (xy 35.209516 141.055759) + (xy 35.924078 140.341197) + (xy 35.96528 140.313667) + (xy 36.013881 140.304) + (xy 42.48792 140.304) + (xy 42.536521 140.313667) + (xy 42.577723 140.341197) + (xy 42.681184 140.444658) + (xy 42.884804 140.529) + (xy 43.105196 140.529) + (xy 43.308815 140.444658) + (xy 43.464658 140.288815) + (xy 43.549 140.085196) + (xy 43.549 139.906239) + (xy 43.558667 139.857638) + (xy 43.586197 139.816436) + (xy 43.627399 139.788906) + (xy 43.676 139.779239) + (xy 43.724601 139.788906) + (xy 43.765803 139.816436) + (xy 43.781597 139.835682) + (xy 43.894838 140.005161) + (xy 44.35601 140.313305) + (xy 44.9 140.421511) + (xy 45.443989 140.313305) + (xy 45.905161 140.005161) + (xy 46.213305 139.543989) + (xy 46.321511 139) + (xy 46.213305 138.45601) + (xy 45.905161 137.994838) + (xy 45.443989 137.686694) + (xy 44.9 137.578488) + (xy 44.35601 137.686694) + (xy 43.894838 137.994838) + (xy 43.586694 138.45601) + (xy 43.478488 139) + (xy 43.564419 139.432003) + (xy 43.564419 139.481555) + (xy 43.545456 139.527336) + (xy 43.510416 139.562376) + (xy 43.464635 139.581339) + (xy 43.415083 139.581339) + (xy 43.369302 139.562376) + (xy 43.350056 139.546582) + (xy 43.308815 139.505341) + (xy 43.105196 139.421) + (xy 42.884804 139.421) + (xy 42.681184 139.505341) + (xy 42.577723 139.608803) + (xy 42.536521 139.636333) + (xy 42.48792 139.646) + (xy 35.869903 139.646) + (xy 35.845126 139.64356) + (xy 35.824998 139.639556) + (xy 35.696632 139.665089) + (xy 35.587805 139.737805) + (xy 35.576401 139.754873) + (xy 35.560607 139.774118) + (xy 34.184628 141.150097) + (xy 34.143426 141.177627) + (xy 34.094825 141.187294) + (xy 34.046224 141.177627) + (xy 33.96987 141.146) + (xy 33.63013 141.146) + (xy 33.316248 141.276013) + (xy 33.076013 141.516248) + (xy 32.946 141.830129) + (xy 32.946 142.16987) + (xy 33.062894 142.452079) + (xy 33.072561 142.50068) + (xy 33.062894 142.549281) + (xy 33.035363 142.590483) + (xy 32.994162 142.618013) + (xy 32.945561 142.62768) + (xy 32.89696 142.618013) + (xy 32.855758 142.590483) + (xy 32.649903 142.384628) + (xy 32.622373 142.343426) + (xy 32.612706 142.294825) + (xy 32.622373 142.246224) + (xy 32.654 142.16987) + (xy 32.654 141.830129) + (xy 32.523986 141.516248) + (xy 32.283751 141.276013) + (xy 31.96987 141.146) + (xy 31.63013 141.146) + (xy 31.316248 141.276013) + (xy 31.076013 141.516248) + (xy 30.946 141.830129) + (xy 30.946 142.16987) + (xy 31.076013 142.483751) + (xy 31.316248 142.723986) + (xy 31.63013 142.854) + (xy 31.96987 142.854) + (xy 32.046224 142.822373) + (xy 32.094825 142.812706) + (xy 32.143426 142.822373) + (xy 32.184627 142.849903) + (xy 32.184628 142.849903) + (xy 32.390483 143.055758) + (xy 32.418013 143.09696) + (xy 32.42768 143.145561) + (xy 32.418013 143.194162) + (xy 32.390483 143.235364) + (xy 32.349281 143.262894) + (xy 32.30068 143.272561) + (xy 32.252079 143.262894) + (xy 31.96987 143.146) + (xy 31.63013 143.146) + (xy 31.316248 143.276013) + (xy 31.076013 143.516248) + (xy 30.946 143.830129) + (xy 30.946 144.16987) + (xy 30.977627 144.246224) + (xy 30.987294 144.294825) + (xy 30.977627 144.343426) + (xy 30.950097 144.384627) + (xy 30.950097 144.384628) + (xy 30.744241 144.590484) + (xy 30.703039 144.618014) + (xy 30.654438 144.627681) + (xy 30.605837 144.618014) + (xy 30.564635 144.590484) + (xy 30.537105 144.549282) + (xy 30.527438 144.500681) + (xy 30.537105 144.45208) + (xy 30.654 144.16987) + (xy 30.654 143.830129) + (xy 30.523986 143.516248) + (xy 30.283751 143.276013) + (xy 29.96987 143.146) + (xy 29.63013 143.146) + (xy 29.316248 143.276013) + (xy 29.076013 143.516248) + (xy 28.946 143.830129) + (xy 28.946 144.16987) + (xy 29.076013 144.483751) + (xy 29.316248 144.723986) + (xy 29.525514 144.810667) + (xy 29.566716 144.838197) + (xy 29.594246 144.879399) + (xy 29.603913 144.928) + (xy 29.594246 144.976601) + (xy 29.566716 145.017803) + (xy 29.525514 145.045333) + (xy 29.476913 145.055) + (xy 28.181 145.055) + (xy 28.132399 145.045333) + (xy 28.091197 145.017803) + (xy 28.063667 144.976601) + (xy 28.054 144.928) + (xy 28.054 139) + (xy 29.478488 139) + (xy 29.586694 139.543989) + (xy 29.894838 140.005161) + (xy 30.35601 140.313305) + (xy 30.9 140.421511) + (xy 31.443989 140.313305) + (xy 31.905161 140.005161) + (xy 32.213305 139.543989) + (xy 32.321511 139) + (xy 32.213305 138.45601) + (xy 31.905161 137.994838) + (xy 31.443989 137.686694) + (xy 30.9 137.578488) + (xy 30.35601 137.686694) + (xy 29.894838 137.994838) + (xy 29.586694 138.45601) + (xy 29.478488 139) + (xy 28.054 139) + (xy 28.054 138.756666) + (xy 28.05644 138.73189) + (xy 28.107554 138.474921) + (xy 28.126517 138.42914) + (xy 28.272077 138.211294) + (xy 28.287871 138.192048) + (xy 30.142053 136.337867) + (xy 30.161299 136.322073) + (xy 30.364344 136.186403) + (xy 30.410125 136.16744) + (xy 30.434901 136.165) + (xy 45.365096 136.165) ) ) ) - (zone (net 25) (net_name GND) (layer B.Cu) (tstamp 0) (hatch edge 0.508) + (zone (net 25) (net_name "GND") (layer "B.Cu") (tstamp f3181cad-0c99-4976-9c55-eeb378abf20e) (hatch edge 0.508) (connect_pads yes (clearance 0.15)) - (min_thickness 0.127) - (fill yes (arc_segments 16) (thermal_gap 0.127) (thermal_bridge_width 0.254)) + (min_thickness 0.127) (filled_areas_thickness no) + (fill yes (thermal_gap 0.127) (thermal_bridge_width 0.254)) (polygon (pts - (xy 27.755 160.295) (xy 27.755 138.705) (xy 30.295 136.165) (xy 45.535 136.165) (xy 48.075 138.705) + (xy 27.755 160.295) + (xy 27.755 138.705) + (xy 30.295 136.165) + (xy 45.535 136.165) + (xy 48.075 138.705) (xy 48.075 160.295) ) ) (filled_polygon + (layer "B.Cu") (pts - (xy 47.728431 138.448233) (xy 47.7865 138.740166) (xy 47.7865 145.784835) (xy 47.74898 145.694253) (xy 47.435747 145.38102) - (xy 47.026489 145.2115) (xy 46.583511 145.2115) (xy 46.174253 145.38102) (xy 45.86102 145.694253) (xy 45.6915 146.103511) - (xy 45.6915 146.1655) (xy 42.266661 146.1655) (xy 42.248973 146.139027) (xy 42.161812 146.080789) (xy 42.059 146.060338) - (xy 41.559 146.060338) (xy 41.456188 146.080789) (xy 41.369027 146.139027) (xy 41.357101 146.156876) (xy 41.357101 145.8995) - (xy 41.410796 145.8995) (xy 41.581152 145.828937) (xy 41.711537 145.698552) (xy 41.7821 145.528196) (xy 41.7821 145.343804) - (xy 41.711537 145.173448) (xy 41.581152 145.043063) (xy 41.410796 144.9725) (xy 41.226404 144.9725) (xy 41.056048 145.043063) - (xy 40.925663 145.173448) (xy 40.8551 145.343804) (xy 40.8551 145.486241) (xy 40.84451 145.50209) (xy 40.844509 145.502091) - (xy 40.796841 145.573432) (xy 40.791964 145.597949) (xy 40.789997 145.595005) (xy 40.765909 145.57891) (xy 39.463499 144.276501) - (xy 39.463499 143.838185) (xy 41.1865 143.838185) (xy 41.1865 144.161815) (xy 41.310348 144.460811) (xy 41.539189 144.689652) - (xy 41.838185 144.8135) (xy 42.161815 144.8135) (xy 42.460811 144.689652) (xy 42.689652 144.460811) (xy 42.8135 144.161815) - (xy 42.8135 143.838185) (xy 43.1865 143.838185) (xy 43.1865 144.161815) (xy 43.310348 144.460811) (xy 43.539189 144.689652) - (xy 43.838185 144.8135) (xy 44.161815 144.8135) (xy 44.460811 144.689652) (xy 44.689652 144.460811) (xy 44.8135 144.161815) - (xy 44.8135 143.838185) (xy 44.809381 143.828239) (xy 45.1365 143.828239) (xy 45.1365 144.171761) (xy 45.26796 144.489133) - (xy 45.510867 144.73204) (xy 45.828239 144.8635) (xy 46.171761 144.8635) (xy 46.489133 144.73204) (xy 46.73204 144.489133) - (xy 46.8635 144.171761) (xy 46.8635 143.828239) (xy 46.73204 143.510867) (xy 46.489133 143.26796) (xy 46.171761 143.1365) - (xy 45.828239 143.1365) (xy 45.510867 143.26796) (xy 45.26796 143.510867) (xy 45.1365 143.828239) (xy 44.809381 143.828239) - (xy 44.689652 143.539189) (xy 44.460811 143.310348) (xy 44.161815 143.1865) (xy 43.838185 143.1865) (xy 43.539189 143.310348) - (xy 43.310348 143.539189) (xy 43.1865 143.838185) (xy 42.8135 143.838185) (xy 42.689652 143.539189) (xy 42.460811 143.310348) - (xy 42.161815 143.1865) (xy 41.838185 143.1865) (xy 41.539189 143.310348) (xy 41.310348 143.539189) (xy 41.1865 143.838185) - (xy 39.463499 143.838185) (xy 39.463499 143.632413) (xy 39.469151 143.603999) (xy 39.44676 143.491431) (xy 39.399091 143.42009) - (xy 39.382996 143.396002) (xy 39.358908 143.379907) (xy 38.1885 142.2095) (xy 38.1885 141.828239) (xy 39.1365 141.828239) - (xy 39.1365 142.171761) (xy 39.26796 142.489133) (xy 39.510867 142.73204) (xy 39.828239 142.8635) (xy 40.171761 142.8635) - (xy 40.489133 142.73204) (xy 40.73204 142.489133) (xy 40.8635 142.171761) (xy 40.8635 141.838185) (xy 41.1865 141.838185) - (xy 41.1865 142.161815) (xy 41.310348 142.460811) (xy 41.539189 142.689652) (xy 41.838185 142.8135) (xy 42.161815 142.8135) - (xy 42.460811 142.689652) (xy 42.689652 142.460811) (xy 42.8135 142.161815) (xy 42.8135 141.838185) (xy 42.689652 141.539189) - (xy 42.460811 141.310348) (xy 42.161815 141.1865) (xy 41.838185 141.1865) (xy 41.539189 141.310348) (xy 41.310348 141.539189) - (xy 41.1865 141.838185) (xy 40.8635 141.838185) (xy 40.8635 141.828239) (xy 40.73204 141.510867) (xy 40.489133 141.26796) - (xy 40.171761 141.1365) (xy 39.828239 141.1365) (xy 39.510867 141.26796) (xy 39.26796 141.510867) (xy 39.1365 141.828239) - (xy 38.1885 141.828239) (xy 38.1885 140.797639) (xy 38.225 140.773251) (xy 38.266697 140.801112) (xy 38.35 140.817682) - (xy 38.75 140.817682) (xy 38.833303 140.801112) (xy 38.903924 140.753924) (xy 38.951112 140.683303) (xy 38.967682 140.6) - (xy 38.967682 139.872859) (xy 42.4815 139.872859) (xy 42.4815 140.077141) (xy 42.559676 140.265874) (xy 42.704126 140.410324) - (xy 42.892859 140.4885) (xy 43.097141 140.4885) (xy 43.099515 140.487516) (xy 43.11109 140.499091) (xy 43.111093 140.499093) - (xy 43.711501 141.099502) (xy 43.711501 141.238974) (xy 43.539189 141.310348) (xy 43.310348 141.539189) (xy 43.1865 141.838185) - (xy 43.1865 142.161815) (xy 43.310348 142.460811) (xy 43.539189 142.689652) (xy 43.838185 142.8135) (xy 44.161815 142.8135) - (xy 44.460811 142.689652) (xy 44.689652 142.460811) (xy 44.8135 142.161815) (xy 44.8135 141.838185) (xy 44.689652 141.539189) - (xy 44.460811 141.310348) (xy 44.2885 141.238975) (xy 44.2885 141.008413) (xy 44.294152 140.98) (xy 44.2885 140.951586) - (xy 44.271761 140.867433) (xy 44.207997 140.772003) (xy 44.183909 140.755908) (xy 43.519093 140.091093) (xy 43.519091 140.09109) - (xy 43.507516 140.079515) (xy 43.5085 140.077141) (xy 43.5085 139.872859) (xy 43.430324 139.684126) (xy 43.285874 139.539676) - (xy 43.097141 139.4615) (xy 42.892859 139.4615) (xy 42.704126 139.539676) (xy 42.559676 139.684126) (xy 42.4815 139.872859) - (xy 38.967682 139.872859) (xy 38.967682 139.25) (xy 38.951112 139.166697) (xy 38.903924 139.096076) (xy 38.833303 139.048888) - (xy 38.75 139.032318) (xy 38.35 139.032318) (xy 38.266697 139.048888) (xy 38.225 139.076749) (xy 38.183303 139.048888) - (xy 38.1 139.032318) (xy 37.7 139.032318) (xy 37.616697 139.048888) (xy 37.575 139.076749) (xy 37.533303 139.048888) - (xy 37.45 139.032318) (xy 37.05 139.032318) (xy 36.966697 139.048888) (xy 36.925 139.076749) (xy 36.883303 139.048888) - (xy 36.8 139.032318) (xy 36.4 139.032318) (xy 36.316697 139.048888) (xy 36.246076 139.096076) (xy 36.198888 139.166697) - (xy 36.182318 139.25) (xy 36.182318 140.6) (xy 36.198888 140.683303) (xy 36.246076 140.753924) (xy 36.315911 140.800587) - (xy 36.32824 140.862567) (xy 36.367952 140.922) (xy 36.392004 140.957997) (xy 36.416092 140.974092) (xy 36.4835 141.0415) - (xy 36.483501 142.03758) (xy 36.477848 142.065998) (xy 36.496908 142.161815) (xy 36.50024 142.178565) (xy 36.564004 142.273995) - (xy 36.588092 142.29009) (xy 37.966709 143.668708) (xy 37.837415 143.722263) (xy 37.70703 143.852648) (xy 37.636467 144.023004) - (xy 37.636467 144.207396) (xy 37.648232 144.235799) (xy 37.639048 144.281967) (xy 37.644701 144.310385) (xy 37.644701 144.32876) - (xy 37.579276 144.372476) (xy 37.532088 144.443097) (xy 37.515518 144.5264) (xy 37.515518 145.1264) (xy 37.528257 145.190444) - (xy 37.43443 145.209108) (xy 37.450882 145.1264) (xy 37.450882 144.5264) (xy 37.434312 144.443097) (xy 37.387124 144.372476) - (xy 37.316503 144.325288) (xy 37.2332 144.308718) (xy 36.8332 144.308718) (xy 36.749897 144.325288) (xy 36.679276 144.372476) - (xy 36.632088 144.443097) (xy 36.615518 144.5264) (xy 36.615518 144.5379) (xy 36.571814 144.5379) (xy 36.5434 144.532248) - (xy 36.514986 144.5379) (xy 36.475399 144.545774) (xy 36.53204 144.489133) (xy 36.6635 144.171761) (xy 36.6635 143.828239) - (xy 36.53204 143.510867) (xy 36.289133 143.26796) (xy 35.971761 143.1365) (xy 35.628239 143.1365) (xy 35.310867 143.26796) - (xy 35.06796 143.510867) (xy 34.9365 143.828239) (xy 34.9365 144.171761) (xy 35.06796 144.489133) (xy 35.310867 144.73204) - (xy 35.628239 144.8635) (xy 35.971761 144.8635) (xy 36.187775 144.774024) (xy 35.714082 145.247718) (xy 35.4376 145.247718) - (xy 35.354297 145.264288) (xy 35.283676 145.311476) (xy 35.236488 145.382097) (xy 35.219918 145.4654) (xy 35.219918 145.9654) - (xy 35.236488 146.048703) (xy 35.283676 146.119324) (xy 35.354297 146.166512) (xy 35.4241 146.180397) (xy 35.4241 146.278586) - (xy 35.418448 146.307) (xy 35.4241 146.335413) (xy 35.440839 146.419566) (xy 35.504603 146.514997) (xy 35.528694 146.531094) - (xy 36.1787 147.181101) (xy 36.1787 147.185587) (xy 36.173048 147.214) (xy 36.1787 147.242413) (xy 36.195439 147.326566) - (xy 36.259203 147.421997) (xy 36.283294 147.438094) (xy 36.876501 148.031301) (xy 36.876501 148.088232) (xy 36.782186 148.049166) - (xy 36.597794 148.049166) (xy 36.427438 148.119729) (xy 36.338928 148.208239) (xy 36.297952 148.167263) (xy 36.127596 148.0967) - (xy 35.943204 148.0967) (xy 35.772848 148.167263) (xy 35.642463 148.297648) (xy 35.599462 148.401462) (xy 34.507494 147.309494) - (xy 34.491397 147.285403) (xy 34.395967 147.221639) (xy 34.311814 147.2049) (xy 34.311813 147.2049) (xy 34.2834 147.199248) - (xy 34.254987 147.2049) (xy 33.947624 147.2049) (xy 33.938712 147.160097) (xy 33.891524 147.089476) (xy 33.820903 147.042288) - (xy 33.7376 147.025718) (xy 33.2376 147.025718) (xy 33.154297 147.042288) (xy 33.083676 147.089476) (xy 33.036488 147.160097) - (xy 33.019918 147.2434) (xy 33.019918 147.510081) (xy 32.547272 147.982728) (xy 32.526924 147.952276) (xy 32.456303 147.905088) - (xy 32.373 147.888518) (xy 31.773 147.888518) (xy 31.689697 147.905088) (xy 31.619076 147.952276) (xy 31.571888 148.022897) - (xy 31.555318 148.1062) (xy 31.555318 148.5062) (xy 31.571888 148.589503) (xy 31.619076 148.660124) (xy 31.689697 148.707312) - (xy 31.773 148.723882) (xy 32.373 148.723882) (xy 32.456303 148.707312) (xy 32.526924 148.660124) (xy 32.570639 148.5947) - (xy 32.603387 148.5947) (xy 32.6318 148.600352) (xy 32.660213 148.5947) (xy 32.660214 148.5947) (xy 32.744367 148.577961) - (xy 32.839797 148.514197) (xy 32.855894 148.490106) (xy 33.384919 147.961082) (xy 33.7376 147.961082) (xy 33.820903 147.944512) - (xy 33.891524 147.897324) (xy 33.938712 147.826703) (xy 33.947624 147.7819) (xy 34.1639 147.7819) (xy 35.189318 148.807318) - (xy 35.015 148.807318) (xy 34.931697 148.823888) (xy 34.861076 148.871076) (xy 34.813888 148.941697) (xy 34.797318 149.025) - (xy 34.797318 149.557318) (xy 34.265 149.557318) (xy 34.181697 149.573888) (xy 34.149428 149.59545) (xy 34.129637 149.547671) - (xy 33.999252 149.417286) (xy 33.828896 149.346723) (xy 33.648682 149.346723) (xy 33.648682 149.0468) (xy 33.632112 148.963497) - (xy 33.584924 148.892876) (xy 33.514303 148.845688) (xy 33.431 148.829118) (xy 32.831 148.829118) (xy 32.747697 148.845688) - (xy 32.677076 148.892876) (xy 32.629888 148.963497) (xy 32.613318 149.0468) (xy 32.613318 149.5468) (xy 32.629888 149.630103) - (xy 32.677076 149.700724) (xy 32.747697 149.747912) (xy 32.831 149.764482) (xy 33.240681 149.764482) (xy 33.2732 149.797001) - (xy 33.2732 149.902419) (xy 33.343763 150.072775) (xy 33.474148 150.20316) (xy 33.644504 150.273723) (xy 33.828896 150.273723) - (xy 33.974289 150.2135) (xy 34.10077 150.2135) (xy 34.111076 150.228924) (xy 34.181697 150.276112) (xy 34.265 150.292682) - (xy 34.815 150.292682) (xy 34.898303 150.276112) (xy 34.968924 150.228924) (xy 35.016112 150.158303) (xy 35.032682 150.075) - (xy 35.032682 149.792682) (xy 35.315 149.792682) (xy 35.398303 149.776112) (xy 35.415 149.764955) (xy 35.431697 149.776112) - (xy 35.515 149.792682) (xy 35.815 149.792682) (xy 35.898303 149.776112) (xy 35.915 149.764955) (xy 35.931697 149.776112) - (xy 36.015 149.792682) (xy 36.315 149.792682) (xy 36.398303 149.776112) (xy 36.415 149.764955) (xy 36.431697 149.776112) - (xy 36.515 149.792682) (xy 36.815 149.792682) (xy 36.898303 149.776112) (xy 36.915 149.764955) (xy 36.931697 149.776112) - (xy 37.015 149.792682) (xy 37.315 149.792682) (xy 37.398303 149.776112) (xy 37.415 149.764955) (xy 37.431697 149.776112) - (xy 37.515 149.792682) (xy 37.815 149.792682) (xy 37.898303 149.776112) (xy 37.915 149.764955) (xy 37.931697 149.776112) - (xy 38.015 149.792682) (xy 38.315 149.792682) (xy 38.398303 149.776112) (xy 38.415 149.764955) (xy 38.431697 149.776112) - (xy 38.515 149.792682) (xy 38.815 149.792682) (xy 38.898303 149.776112) (xy 38.915 149.764955) (xy 38.931697 149.776112) - (xy 39.015 149.792682) (xy 39.315 149.792682) (xy 39.398303 149.776112) (xy 39.415 149.764955) (xy 39.431697 149.776112) - (xy 39.515 149.792682) (xy 39.815 149.792682) (xy 39.898303 149.776112) (xy 39.968924 149.728924) (xy 40.016112 149.658303) - (xy 40.032682 149.575) (xy 40.032682 149.025) (xy 40.016112 148.941697) (xy 39.968924 148.871076) (xy 39.898303 148.823888) - (xy 39.815 148.807318) (xy 39.515 148.807318) (xy 39.4535 148.819551) (xy 39.4535 148.7505) (xy 40.765909 147.438092) - (xy 40.789997 147.421997) (xy 40.853761 147.326567) (xy 40.865093 147.269597) (xy 40.876152 147.214) (xy 40.8705 147.185586) - (xy 40.8705 147.048212) (xy 40.884695 147.057697) (xy 41.605906 147.778909) (xy 41.622001 147.802997) (xy 41.717431 147.866761) - (xy 41.801584 147.8835) (xy 41.801585 147.8835) (xy 41.829998 147.889152) (xy 41.858411 147.8835) (xy 43.498918 147.8835) - (xy 43.498918 147.895) (xy 43.515488 147.978303) (xy 43.562676 148.048924) (xy 43.633297 148.096112) (xy 43.7166 148.112682) - (xy 44.1166 148.112682) (xy 44.199903 148.096112) (xy 44.270524 148.048924) (xy 44.317712 147.978303) (xy 44.334282 147.895) - (xy 44.334282 147.295) (xy 44.317712 147.211697) (xy 44.270524 147.141076) (xy 44.199903 147.093888) (xy 44.1166 147.077318) - (xy 43.7166 147.077318) (xy 43.633297 147.093888) (xy 43.562676 147.141076) (xy 43.515488 147.211697) (xy 43.498918 147.295) - (xy 43.498918 147.3065) (xy 41.949499 147.3065) (xy 41.740661 147.097662) (xy 42.059 147.097662) (xy 42.161812 147.077211) - (xy 42.248973 147.018973) (xy 42.266661 146.9925) (xy 45.897773 146.9925) (xy 46.174253 147.26898) (xy 46.583511 147.4385) - (xy 47.026489 147.4385) (xy 47.435747 147.26898) (xy 47.74898 146.955747) (xy 47.7865 146.865165) (xy 47.7865 148.455492) - (xy 47.706592 148.262576) (xy 47.407424 147.963408) (xy 47.016543 147.8015) (xy 46.593457 147.8015) (xy 46.202576 147.963408) - (xy 45.903408 148.262576) (xy 45.7415 148.653457) (xy 45.7415 149.076543) (xy 45.81827 149.261882) (xy 45.703396 149.2143) - (xy 45.5557 149.2143) (xy 45.1051 148.7637) (xy 45.1051 148.092639) (xy 45.170524 148.048924) (xy 45.217712 147.978303) - (xy 45.234282 147.895) (xy 45.234282 147.295) (xy 45.217712 147.211697) (xy 45.170524 147.141076) (xy 45.099903 147.093888) - (xy 45.0166 147.077318) (xy 44.6166 147.077318) (xy 44.533297 147.093888) (xy 44.462676 147.141076) (xy 44.415488 147.211697) - (xy 44.398918 147.295) (xy 44.398918 147.895) (xy 44.415488 147.978303) (xy 44.462676 148.048924) (xy 44.5281 148.09264) - (xy 44.528101 148.854782) (xy 44.522448 148.8832) (xy 44.54484 148.995767) (xy 44.580348 149.048908) (xy 44.608604 149.091197) - (xy 44.632692 149.107292) (xy 45.1477 149.6223) (xy 45.1477 149.769996) (xy 45.218263 149.940352) (xy 45.348648 150.070737) - (xy 45.519004 150.1413) (xy 45.703396 150.1413) (xy 45.873752 150.070737) (xy 46.004137 149.940352) (xy 46.0747 149.769996) - (xy 46.0747 149.638716) (xy 46.202576 149.766592) (xy 46.593457 149.9285) (xy 47.016543 149.9285) (xy 47.407424 149.766592) - (xy 47.706592 149.467424) (xy 47.786501 149.274508) (xy 47.786501 150.995493) (xy 47.706592 150.802576) (xy 47.407424 150.503408) - (xy 47.016543 150.3415) (xy 46.593457 150.3415) (xy 46.280092 150.4713) (xy 46.206367 150.422039) (xy 46.122214 150.4053) - (xy 46.122213 150.4053) (xy 46.0938 150.399648) (xy 46.065387 150.4053) (xy 43.837856 150.4053) (xy 43.844082 150.374) - (xy 43.844082 149.674) (xy 43.827512 149.590697) (xy 43.822016 149.582473) (xy 43.895937 149.508552) (xy 43.9665 149.338196) - (xy 43.9665 149.153804) (xy 43.895937 148.983448) (xy 43.765552 148.853063) (xy 43.595196 148.7825) (xy 43.410804 148.7825) - (xy 43.240448 148.853063) (xy 43.110063 148.983448) (xy 43.0395 149.153804) (xy 43.0395 149.338196) (xy 43.094443 149.470843) - (xy 42.275709 148.652109) (xy 42.284682 148.607) (xy 42.284682 148.107) (xy 42.268112 148.023697) (xy 42.220924 147.953076) - (xy 42.150303 147.905888) (xy 42.067 147.889318) (xy 41.467 147.889318) (xy 41.383697 147.905888) (xy 41.313076 147.953076) - (xy 41.265888 148.023697) (xy 41.249318 148.107) (xy 41.249318 148.607) (xy 41.249431 148.607569) (xy 40.975733 148.881267) - (xy 40.968924 148.871076) (xy 40.898303 148.823888) (xy 40.815 148.807318) (xy 40.515 148.807318) (xy 40.431697 148.823888) - (xy 40.361076 148.871076) (xy 40.313888 148.941697) (xy 40.297318 149.025) (xy 40.297318 149.575) (xy 40.313888 149.658303) - (xy 40.361076 149.728924) (xy 40.431697 149.776112) (xy 40.515 149.792682) (xy 40.797318 149.792682) (xy 40.797318 150.075) - (xy 40.813888 150.158303) (xy 40.825045 150.175) (xy 40.813888 150.191697) (xy 40.797318 150.275) (xy 40.797318 150.575) - (xy 40.813888 150.658303) (xy 40.825045 150.675) (xy 40.813888 150.691697) (xy 40.797318 150.775) (xy 40.797318 151.075) - (xy 40.813888 151.158303) (xy 40.825045 151.175) (xy 40.813888 151.191697) (xy 40.797318 151.275) (xy 40.797318 151.575) - (xy 40.813888 151.658303) (xy 40.825045 151.675) (xy 40.813888 151.691697) (xy 40.797318 151.775) (xy 40.797318 152.075) - (xy 40.813888 152.158303) (xy 40.825045 152.175) (xy 40.813888 152.191697) (xy 40.797318 152.275) (xy 40.797318 152.575) - (xy 40.813888 152.658303) (xy 40.825045 152.675) (xy 40.813888 152.691697) (xy 40.797318 152.775) (xy 40.797318 153.075) - (xy 40.813888 153.158303) (xy 40.825045 153.175) (xy 40.813888 153.191697) (xy 40.797318 153.275) (xy 40.797318 153.575) - (xy 40.813888 153.658303) (xy 40.825045 153.675) (xy 40.813888 153.691697) (xy 40.797318 153.775) (xy 40.797318 154.075) - (xy 40.813888 154.158303) (xy 40.825045 154.175) (xy 40.813888 154.191697) (xy 40.797318 154.275) (xy 40.797318 154.575) - (xy 40.813888 154.658303) (xy 40.861076 154.728924) (xy 40.931697 154.776112) (xy 41.015 154.792682) (xy 41.565 154.792682) - (xy 41.648303 154.776112) (xy 41.718924 154.728924) (xy 41.766112 154.658303) (xy 41.782682 154.575) (xy 41.782682 154.275) - (xy 41.766112 154.191697) (xy 41.754955 154.175) (xy 41.766112 154.158303) (xy 41.782682 154.075) (xy 41.782682 153.775) - (xy 41.770449 153.7135) (xy 41.866503 153.7135) (xy 41.906076 153.772724) (xy 41.976697 153.819912) (xy 42.06 153.836482) - (xy 42.66 153.836482) (xy 42.743303 153.819912) (xy 42.813924 153.772724) (xy 42.861112 153.702103) (xy 42.877682 153.6188) - (xy 42.877682 153.2188) (xy 42.861112 153.135497) (xy 42.813924 153.064876) (xy 42.750622 153.022578) (xy 42.937609 152.835592) - (xy 42.961697 152.819497) (xy 42.991429 152.775) (xy 43.025461 152.724068) (xy 43.047852 152.6115) (xy 43.0422 152.583086) - (xy 43.0422 152.578594) (xy 43.059703 152.575112) (xy 43.130324 152.527924) (xy 43.177512 152.457303) (xy 43.194082 152.374) - (xy 43.194082 151.737499) (xy 43.608718 151.737499) (xy 43.608718 152.374) (xy 43.625288 152.457303) (xy 43.672476 152.527924) - (xy 43.743097 152.575112) (xy 43.8264 152.591682) (xy 43.887601 152.591682) (xy 43.887601 153.004227) (xy 43.8876 153.004232) - (xy 43.8876 153.019209) (xy 43.783163 153.123646) (xy 43.7126 153.294002) (xy 43.7126 153.478394) (xy 43.783163 153.64875) - (xy 43.913548 153.779135) (xy 44.083904 153.849698) (xy 44.268296 153.849698) (xy 44.438652 153.779135) (xy 44.569037 153.64875) - (xy 44.6396 153.478394) (xy 44.6396 153.294002) (xy 44.569037 153.123646) (xy 44.4646 153.019209) (xy 44.4646 152.476627) - (xy 44.477512 152.457303) (xy 44.494082 152.374) (xy 44.494082 151.79308) (xy 45.3735 152.672498) (xy 45.373501 155.313582) - (xy 45.367848 155.342) (xy 45.39024 155.454567) (xy 45.427544 155.510396) (xy 45.454004 155.549997) (xy 45.478092 155.566092) - (xy 45.859092 155.947093) (xy 45.859095 155.947095) (xy 45.871532 155.959532) (xy 45.7415 156.273457) (xy 45.7415 156.696543) - (xy 45.903408 157.087424) (xy 46.202576 157.386592) (xy 46.593457 157.5485) (xy 47.016543 157.5485) (xy 47.407424 157.386592) - (xy 47.706592 157.087424) (xy 47.786501 156.894507) (xy 47.786501 158.615494) (xy 47.706592 158.422576) (xy 47.407424 158.123408) - (xy 47.016543 157.9615) (xy 46.593457 157.9615) (xy 46.202576 158.123408) (xy 46.097484 158.2285) (xy 36.637501 158.2285) - (xy 36.573884 158.164883) (xy 36.686404 158.21149) (xy 36.870796 158.21149) (xy 37.041152 158.140927) (xy 37.171537 158.010542) - (xy 37.2421 157.840186) (xy 37.2421 157.759587) (xy 37.255001 157.762153) (xy 37.283415 157.756501) (xy 39.824586 157.756501) - (xy 39.852999 157.762153) (xy 39.881412 157.756501) (xy 39.881413 157.756501) (xy 39.965566 157.739762) (xy 40.060996 157.675998) - (xy 40.077093 157.651907) (xy 40.268318 157.460682) (xy 40.67 157.460682) (xy 40.753303 157.444112) (xy 40.823924 157.396924) - (xy 40.871112 157.326303) (xy 40.880024 157.2815) (xy 41.172976 157.2815) (xy 41.181888 157.326303) (xy 41.229076 157.396924) - (xy 41.299697 157.444112) (xy 41.383 157.460682) (xy 41.983 157.460682) (xy 42.066303 157.444112) (xy 42.136924 157.396924) - (xy 42.184112 157.326303) (xy 42.200682 157.243) (xy 42.200682 156.743) (xy 42.184112 156.659697) (xy 42.136924 156.589076) - (xy 42.066303 156.541888) (xy 41.983 156.525318) (xy 41.383 156.525318) (xy 41.299697 156.541888) (xy 41.229076 156.589076) - (xy 41.181888 156.659697) (xy 41.172976 156.7045) (xy 40.9975 156.7045) (xy 40.9975 156.436157) (xy 41.016112 156.408303) - (xy 41.032682 156.325) (xy 41.032682 156.090318) (xy 41.330318 155.792682) (xy 41.565 155.792682) (xy 41.648303 155.776112) - (xy 41.718924 155.728924) (xy 41.72923 155.7135) (xy 42.368111 155.7135) (xy 42.465748 155.811137) (xy 42.636104 155.8817) - (xy 42.820496 155.8817) (xy 42.990852 155.811137) (xy 43.121237 155.680752) (xy 43.1918 155.510396) (xy 43.1918 155.326004) - (xy 43.121237 155.155648) (xy 42.990852 155.025263) (xy 42.820496 154.9547) (xy 42.636104 154.9547) (xy 42.465748 155.025263) - (xy 42.354511 155.1365) (xy 41.72923 155.1365) (xy 41.718924 155.121076) (xy 41.648303 155.073888) (xy 41.565 155.057318) - (xy 41.015 155.057318) (xy 40.931697 155.073888) (xy 40.861076 155.121076) (xy 40.813888 155.191697) (xy 40.797318 155.275) - (xy 40.797318 155.509682) (xy 40.749682 155.557318) (xy 40.515 155.557318) (xy 40.431697 155.573888) (xy 40.415 155.585045) - (xy 40.398303 155.573888) (xy 40.315 155.557318) (xy 40.015 155.557318) (xy 39.931697 155.573888) (xy 39.915 155.585045) - (xy 39.898303 155.573888) (xy 39.815 155.557318) (xy 39.515 155.557318) (xy 39.431697 155.573888) (xy 39.415 155.585045) - (xy 39.398303 155.573888) (xy 39.315 155.557318) (xy 39.015 155.557318) (xy 38.931697 155.573888) (xy 38.915 155.585045) - (xy 38.898303 155.573888) (xy 38.815 155.557318) (xy 38.515 155.557318) (xy 38.431697 155.573888) (xy 38.415 155.585045) - (xy 38.398303 155.573888) (xy 38.315 155.557318) (xy 38.015 155.557318) (xy 37.931697 155.573888) (xy 37.915 155.585045) - (xy 37.898303 155.573888) (xy 37.815 155.557318) (xy 37.515 155.557318) (xy 37.431697 155.573888) (xy 37.361076 155.621076) - (xy 37.313888 155.691697) (xy 37.297318 155.775) (xy 37.297318 156.325) (xy 37.313888 156.408303) (xy 37.361076 156.478924) - (xy 37.431697 156.526112) (xy 37.515 156.542682) (xy 37.815 156.542682) (xy 37.898303 156.526112) (xy 37.915 156.514955) - (xy 37.931697 156.526112) (xy 38.015 156.542682) (xy 38.315 156.542682) (xy 38.398303 156.526112) (xy 38.415 156.514955) - (xy 38.431697 156.526112) (xy 38.515 156.542682) (xy 38.815 156.542682) (xy 38.898303 156.526112) (xy 38.915 156.514955) - (xy 38.931697 156.526112) (xy 39.015 156.542682) (xy 39.315 156.542682) (xy 39.398303 156.526112) (xy 39.415 156.514955) - (xy 39.431697 156.526112) (xy 39.515 156.542682) (xy 39.815 156.542682) (xy 39.898303 156.526112) (xy 39.915 156.514955) - (xy 39.931697 156.526112) (xy 39.998853 156.53947) (xy 39.986697 156.541888) (xy 39.916076 156.589076) (xy 39.868888 156.659697) - (xy 39.852318 156.743) (xy 39.852318 157.060682) (xy 39.733499 157.179501) (xy 37.374502 157.179501) (xy 37.247682 157.052681) - (xy 37.247682 156.743) (xy 37.231112 156.659697) (xy 37.183924 156.589076) (xy 37.113303 156.541888) (xy 37.03 156.525318) - (xy 36.9535 156.525318) (xy 36.9535 156.48923) (xy 36.968924 156.478924) (xy 37.016112 156.408303) (xy 37.032682 156.325) - (xy 37.032682 155.775) (xy 37.016112 155.691697) (xy 36.968924 155.621076) (xy 36.898303 155.573888) (xy 36.815 155.557318) - (xy 36.515 155.557318) (xy 36.431697 155.573888) (xy 36.415 155.585045) (xy 36.398303 155.573888) (xy 36.315 155.557318) - (xy 36.015 155.557318) (xy 35.931697 155.573888) (xy 35.915 155.585045) (xy 35.898303 155.573888) (xy 35.815 155.557318) - (xy 35.515 155.557318) (xy 35.431697 155.573888) (xy 35.415 155.585045) (xy 35.398303 155.573888) (xy 35.315 155.557318) - (xy 35.032682 155.557318) (xy 35.032682 155.275) (xy 35.016112 155.191697) (xy 35.004955 155.175) (xy 35.016112 155.158303) - (xy 35.032682 155.075) (xy 35.032682 154.775) (xy 35.016112 154.691697) (xy 35.004955 154.675) (xy 35.016112 154.658303) - (xy 35.032682 154.575) (xy 35.032682 154.275) (xy 35.016112 154.191697) (xy 35.004955 154.175) (xy 35.016112 154.158303) - (xy 35.032682 154.075) (xy 35.032682 153.775) (xy 35.016112 153.691697) (xy 35.004955 153.675) (xy 35.016112 153.658303) - (xy 35.032682 153.575) (xy 35.032682 153.275) (xy 35.016112 153.191697) (xy 35.004955 153.175) (xy 35.016112 153.158303) - (xy 35.032682 153.075) (xy 35.032682 152.775) (xy 35.016112 152.691697) (xy 35.004955 152.675) (xy 35.016112 152.658303) - (xy 35.032682 152.575) (xy 35.032682 152.275) (xy 35.016112 152.191697) (xy 35.004955 152.175) (xy 35.016112 152.158303) - (xy 35.032682 152.075) (xy 35.032682 151.775) (xy 35.016112 151.691697) (xy 35.004955 151.675) (xy 35.016112 151.658303) - (xy 35.032682 151.575) (xy 35.032682 151.275) (xy 35.016112 151.191697) (xy 35.004955 151.175) (xy 35.016112 151.158303) - (xy 35.032682 151.075) (xy 35.032682 150.775) (xy 35.016112 150.691697) (xy 34.968924 150.621076) (xy 34.898303 150.573888) - (xy 34.815 150.557318) (xy 34.265 150.557318) (xy 34.181697 150.573888) (xy 34.111076 150.621076) (xy 34.10077 150.6365) - (xy 32.398301 150.6365) (xy 30.442894 148.681094) (xy 30.426797 148.657003) (xy 30.331367 148.593239) (xy 30.247214 148.5765) - (xy 30.247213 148.5765) (xy 30.2188 148.570848) (xy 30.190387 148.5765) (xy 30.056623 148.5765) (xy 29.926592 148.262576) - (xy 29.627424 147.963408) (xy 29.236543 147.8015) (xy 28.813457 147.8015) (xy 28.422576 147.963408) (xy 28.123408 148.262576) - (xy 28.0135 148.527918) (xy 28.0135 143.501599) (xy 30.512849 143.501599) (xy 30.518501 143.530012) (xy 30.518502 148.078583) - (xy 30.512849 148.107001) (xy 30.535241 148.219568) (xy 30.582305 148.290004) (xy 30.5935 148.306759) (xy 30.5935 148.449196) - (xy 30.664063 148.619552) (xy 30.794448 148.749937) (xy 30.964804 148.8205) (xy 31.149196 148.8205) (xy 31.319552 148.749937) - (xy 31.449937 148.619552) (xy 31.5205 148.449196) (xy 31.5205 148.264804) (xy 31.449937 148.094448) (xy 31.319552 147.964063) - (xy 31.149196 147.8935) (xy 31.095501 147.8935) (xy 31.095501 147.2062) (xy 31.555318 147.2062) (xy 31.555318 147.6062) - (xy 31.571888 147.689503) (xy 31.619076 147.760124) (xy 31.689697 147.807312) (xy 31.773 147.823882) (xy 32.373 147.823882) - (xy 32.456303 147.807312) (xy 32.526924 147.760124) (xy 32.574112 147.689503) (xy 32.590682 147.6062) (xy 32.590682 147.2062) - (xy 32.574112 147.122897) (xy 32.526924 147.052276) (xy 32.456303 147.005088) (xy 32.373 146.988518) (xy 32.3615 146.988518) - (xy 32.3615 145.4285) (xy 32.901502 144.888499) (xy 33.171588 144.888499) (xy 33.200001 144.894151) (xy 33.228414 144.888499) - (xy 33.228415 144.888499) (xy 33.312568 144.87176) (xy 33.407998 144.807996) (xy 33.424095 144.783905) (xy 33.465874 144.742126) - (xy 33.638185 144.8135) (xy 33.961815 144.8135) (xy 34.260811 144.689652) (xy 34.489652 144.460811) (xy 34.6135 144.161815) - (xy 34.6135 143.838185) (xy 34.489652 143.539189) (xy 34.260811 143.310348) (xy 33.961815 143.1865) (xy 33.638185 143.1865) - (xy 33.339189 143.310348) (xy 33.110348 143.539189) (xy 32.9865 143.838185) (xy 32.9865 144.161815) (xy 33.048501 144.311499) - (xy 32.810415 144.311499) (xy 32.782001 144.305847) (xy 32.669433 144.328238) (xy 32.603227 144.372476) (xy 32.574004 144.392002) - (xy 32.557909 144.41609) (xy 31.889094 145.084906) (xy 31.865003 145.101003) (xy 31.801239 145.196434) (xy 31.791038 145.247718) - (xy 31.778848 145.309) (xy 31.7845 145.337413) (xy 31.784501 146.988518) (xy 31.773 146.988518) (xy 31.689697 147.005088) - (xy 31.619076 147.052276) (xy 31.571888 147.122897) (xy 31.555318 147.2062) (xy 31.095501 147.2062) (xy 31.095501 144.424967) - (xy 31.110348 144.460811) (xy 31.339189 144.689652) (xy 31.638185 144.8135) (xy 31.961815 144.8135) (xy 32.260811 144.689652) - (xy 32.489652 144.460811) (xy 32.6135 144.161815) (xy 32.6135 143.838185) (xy 32.489652 143.539189) (xy 32.260811 143.310348) - (xy 32.123568 143.2535) (xy 32.806587 143.2535) (xy 32.835 143.259152) (xy 32.863413 143.2535) (xy 32.863414 143.2535) - (xy 32.947567 143.236761) (xy 33.042997 143.172997) (xy 33.059094 143.148906) (xy 33.465874 142.742126) (xy 33.638185 142.8135) - (xy 33.961815 142.8135) (xy 34.260811 142.689652) (xy 34.489652 142.460811) (xy 34.6135 142.161815) (xy 34.6135 141.838185) - (xy 34.489652 141.539189) (xy 34.260811 141.310348) (xy 33.961815 141.1865) (xy 33.638185 141.1865) (xy 33.339189 141.310348) - (xy 33.110348 141.539189) (xy 32.9865 141.838185) (xy 32.9865 142.161815) (xy 33.057874 142.334126) (xy 32.7155 142.6765) - (xy 32.273963 142.6765) (xy 32.489652 142.460811) (xy 32.6135 142.161815) (xy 32.6135 141.838185) (xy 32.489652 141.539189) - (xy 32.260811 141.310348) (xy 31.961815 141.1865) (xy 31.638185 141.1865) (xy 31.339189 141.310348) (xy 31.110348 141.539189) - (xy 30.9865 141.838185) (xy 30.9865 142.161815) (xy 31.110348 142.460811) (xy 31.324237 142.6747) (xy 31.315186 142.6765) - (xy 31.231033 142.693239) (xy 31.135603 142.757003) (xy 31.119508 142.781091) (xy 30.623095 143.277505) (xy 30.599004 143.293602) - (xy 30.53524 143.389033) (xy 30.523003 143.450555) (xy 30.512849 143.501599) (xy 28.0135 143.501599) (xy 28.0135 141.828239) - (xy 28.9365 141.828239) (xy 28.9365 142.171761) (xy 29.06796 142.489133) (xy 29.310867 142.73204) (xy 29.628239 142.8635) - (xy 29.971761 142.8635) (xy 30.289133 142.73204) (xy 30.53204 142.489133) (xy 30.6635 142.171761) (xy 30.6635 141.828239) - (xy 30.53204 141.510867) (xy 30.289133 141.26796) (xy 29.971761 141.1365) (xy 29.628239 141.1365) (xy 29.310867 141.26796) - (xy 29.06796 141.510867) (xy 28.9365 141.828239) (xy 28.0135 141.828239) (xy 28.0135 139) (xy 29.5165 139) - (xy 29.621813 139.529443) (xy 29.921718 139.978282) (xy 30.370557 140.278187) (xy 30.9 140.3835) (xy 31.429443 140.278187) - (xy 31.878282 139.978282) (xy 32.178187 139.529443) (xy 32.2835 139) (xy 43.5165 139) (xy 43.621813 139.529443) - (xy 43.921718 139.978282) (xy 44.370557 140.278187) (xy 44.9 140.3835) (xy 45.429443 140.278187) (xy 45.878282 139.978282) - (xy 46.178187 139.529443) (xy 46.2835 139) (xy 46.178187 138.470557) (xy 45.878282 138.021718) (xy 45.429443 137.721813) - (xy 44.9 137.6165) (xy 44.370557 137.721813) (xy 43.921718 138.021718) (xy 43.621813 138.470557) (xy 43.5165 139) - (xy 32.2835 139) (xy 32.178187 138.470557) (xy 31.878282 138.021718) (xy 31.429443 137.721813) (xy 30.9 137.6165) - (xy 30.370557 137.721813) (xy 29.921718 138.021718) (xy 29.621813 138.470557) (xy 29.5165 139) (xy 28.0135 139) - (xy 28.0135 138.740166) (xy 28.06412 138.485682) (xy 30.321302 136.2285) (xy 45.508698 136.2285) + (xy 45.543029 136.17508) + (xy 45.553599 136.183599) + (xy 47.773332 138.403332) + (xy 47.79048 138.434735) + (xy 47.790711 138.435845) + (xy 47.84878 138.727778) + (xy 47.85 138.740166) + (xy 47.85 145.784835) + (xy 47.83992 145.819166) + (xy 47.812879 145.842597) + (xy 47.777463 145.847689) + (xy 47.744916 145.832825) + (xy 47.727834 145.809135) + (xy 47.695147 145.730222) + (xy 47.399777 145.434852) + (xy 47.013859 145.275) + (xy 46.596141 145.275) + (xy 46.210222 145.434852) + (xy 45.914852 145.730222) + (xy 45.755 146.11614) + (xy 45.755 146.1655) + (xy 45.74492 146.199831) + (xy 45.717879 146.223262) + (xy 45.6915 146.229) + (xy 42.266661 146.229) + (xy 42.23233 146.21892) + (xy 42.213862 146.200778) + (xy 42.203191 146.184807) + (xy 42.137035 146.140604) + (xy 42.052745 146.123838) + (xy 41.565255 146.123838) + (xy 41.480964 146.140604) + (xy 41.414808 146.184808) + (xy 41.4099 146.192154) + (xy 41.382445 146.215099) + (xy 41.346944 146.219558) + (xy 41.314668 146.204117) + (xy 41.295864 146.173676) + (xy 41.293601 146.156876) + (xy 41.293601 145.8995) + (xy 41.303681 145.865169) + (xy 41.330722 145.841738) + (xy 41.357101 145.836) + (xy 41.398166 145.836) + (xy 41.545182 145.775104) + (xy 41.657704 145.662582) + (xy 41.7186 145.515566) + (xy 41.7186 145.356433) + (xy 41.657704 145.209417) + (xy 41.545182 145.096895) + (xy 41.398166 145.036) + (xy 41.239034 145.036) + (xy 41.092017 145.096895) + (xy 40.979495 145.209417) + (xy 40.9186 145.356433) + (xy 40.9186 145.486241) + (xy 40.90852 145.520572) + (xy 40.907898 145.52152) + (xy 40.856656 145.598207) + (xy 40.854244 145.610338) + (xy 40.837659 145.642042) + (xy 40.806567 145.659747) + (xy 40.770838 145.657832) + (xy 40.755437 145.646726) + (xy 40.754718 145.647803) + (xy 40.73063 145.631708) + (xy 40.721008 145.623811) + (xy 39.418598 144.321402) + (xy 39.40145 144.289999) + (xy 39.399999 144.276501) + (xy 39.399999 144.149185) + (xy 41.25 144.149185) + (xy 41.36418 144.424841) + (xy 41.575158 144.635819) + (xy 41.850815 144.75) + (xy 42.149185 144.75) + (xy 42.424841 144.635819) + (xy 42.635819 144.424841) + (xy 42.75 144.149185) + (xy 43.25 144.149185) + (xy 43.36418 144.424841) + (xy 43.575158 144.635819) + (xy 43.850815 144.75) + (xy 44.149185 144.75) + (xy 44.424841 144.635819) + (xy 44.635819 144.424841) + (xy 44.74588 144.159131) + (xy 45.2 144.159131) + (xy 45.321792 144.453163) + (xy 45.546836 144.678207) + (xy 45.840869 144.8) + (xy 46.159131 144.8) + (xy 46.453163 144.678207) + (xy 46.678207 144.453163) + (xy 46.8 144.159131) + (xy 46.8 143.840868) + (xy 46.678207 143.546836) + (xy 46.453163 143.321792) + (xy 46.159131 143.2) + (xy 45.840869 143.2) + (xy 45.546836 143.321792) + (xy 45.321792 143.546836) + (xy 45.2 143.840868) + (xy 45.2 144.159131) + (xy 44.74588 144.159131) + (xy 44.75 144.149185) + (xy 44.75 143.850814) + (xy 44.635819 143.575158) + (xy 44.424841 143.36418) + (xy 44.149185 143.25) + (xy 43.850815 143.25) + (xy 43.575158 143.36418) + (xy 43.36418 143.575158) + (xy 43.25 143.850814) + (xy 43.25 144.149185) + (xy 42.75 144.149185) + (xy 42.75 143.850814) + (xy 42.635819 143.575158) + (xy 42.424841 143.36418) + (xy 42.149185 143.25) + (xy 41.850815 143.25) + (xy 41.575158 143.36418) + (xy 41.36418 143.575158) + (xy 41.25 143.850814) + (xy 41.25 144.149185) + (xy 39.399999 144.149185) + (xy 39.399999 143.632413) + (xy 39.401219 143.620025) + (xy 39.404406 143.603998) + (xy 39.386944 143.516207) + (xy 39.337215 143.441782) + (xy 39.323629 143.432705) + (xy 39.314007 143.424808) + (xy 38.143599 142.254401) + (xy 38.126451 142.222998) + (xy 38.125 142.2095) + (xy 38.125 142.159131) + (xy 39.2 142.159131) + (xy 39.321792 142.453163) + (xy 39.546836 142.678207) + (xy 39.840869 142.8) + (xy 40.159131 142.8) + (xy 40.453163 142.678207) + (xy 40.678207 142.453163) + (xy 40.8 142.159131) + (xy 40.8 142.149185) + (xy 41.25 142.149185) + (xy 41.36418 142.424841) + (xy 41.575158 142.635819) + (xy 41.850815 142.75) + (xy 42.149185 142.75) + (xy 42.424841 142.635819) + (xy 42.635819 142.424841) + (xy 42.75 142.149185) + (xy 42.75 141.850814) + (xy 42.635819 141.575158) + (xy 42.424841 141.36418) + (xy 42.149185 141.25) + (xy 41.850815 141.25) + (xy 41.575158 141.36418) + (xy 41.36418 141.575158) + (xy 41.25 141.850814) + (xy 41.25 142.149185) + (xy 40.8 142.149185) + (xy 40.8 141.840868) + (xy 40.678207 141.546836) + (xy 40.453163 141.321792) + (xy 40.159131 141.2) + (xy 39.840869 141.2) + (xy 39.546836 141.321792) + (xy 39.321792 141.546836) + (xy 39.2 141.840868) + (xy 39.2 142.159131) + (xy 38.125 142.159131) + (xy 38.125 140.797639) + (xy 38.13508 140.763308) + (xy 38.153222 140.74484) + (xy 38.189722 140.720452) + (xy 38.223867 140.709761) + (xy 38.258372 140.719227) + (xy 38.260279 140.720453) + (xy 38.291472 140.741296) + (xy 38.356255 140.754182) + (xy 38.743745 140.754182) + (xy 38.808526 140.741296) + (xy 38.858143 140.708143) + (xy 38.891296 140.658526) + (xy 38.904182 140.593745) + (xy 38.904182 140.064511) + (xy 42.545 140.064511) + (xy 42.613508 140.229904) + (xy 42.740095 140.356491) + (xy 42.905489 140.425) + (xy 43.097141 140.425) + (xy 43.097141 140.426491) + (xy 43.110775 140.425022) + (xy 43.142774 140.44103) + (xy 43.144416 140.442615) + (xy 43.756402 141.054601) + (xy 43.77355 141.086004) + (xy 43.775001 141.099502) + (xy 43.775001 141.238974) + (xy 43.764921 141.273305) + (xy 43.73788 141.296736) + (xy 43.735801 141.29764) + (xy 43.575158 141.36418) + (xy 43.36418 141.575158) + (xy 43.25 141.850814) + (xy 43.25 142.149185) + (xy 43.36418 142.424841) + (xy 43.575158 142.635819) + (xy 43.850815 142.75) + (xy 44.149185 142.75) + (xy 44.424841 142.635819) + (xy 44.635819 142.424841) + (xy 44.75 142.149185) + (xy 44.75 141.850814) + (xy 44.635819 141.575158) + (xy 44.424841 141.36418) + (xy 44.2642 141.297641) + (xy 44.23634 141.275191) + (xy 44.22504 141.241242) + (xy 44.225 141.238975) + (xy 44.225 141.008413) + (xy 44.22622 140.996024) + (xy 44.229407 140.979999) + (xy 44.211945 140.892208) + (xy 44.162216 140.817783) + (xy 44.14863 140.808706) + (xy 44.139008 140.800809) + (xy 43.462615 140.124416) + (xy 43.445467 140.093013) + (xy 43.446602 140.077141) + (xy 43.445 140.077141) + (xy 43.445 139.885488) + (xy 43.376491 139.720095) + (xy 43.249904 139.593508) + (xy 43.084511 139.525) + (xy 42.905489 139.525) + (xy 42.740095 139.593508) + (xy 42.613508 139.720095) + (xy 42.545 139.885488) + (xy 42.545 140.064511) + (xy 38.904182 140.064511) + (xy 38.904182 139.256254) + (xy 38.891296 139.191473) + (xy 38.858143 139.141856) + (xy 38.808526 139.108703) + (xy 38.743745 139.095818) + (xy 38.356255 139.095818) + (xy 38.291472 139.108703) + (xy 38.260279 139.129547) + (xy 38.226133 139.140239) + (xy 38.191628 139.130773) + (xy 38.189721 139.129547) + (xy 38.158527 139.108703) + (xy 38.093745 139.095818) + (xy 37.706255 139.095818) + (xy 37.641472 139.108703) + (xy 37.610279 139.129547) + (xy 37.576133 139.140239) + (xy 37.541628 139.130773) + (xy 37.539721 139.129547) + (xy 37.508527 139.108703) + (xy 37.443745 139.095818) + (xy 37.056255 139.095818) + (xy 36.991472 139.108703) + (xy 36.960279 139.129547) + (xy 36.926133 139.140239) + (xy 36.891628 139.130773) + (xy 36.889721 139.129547) + (xy 36.858527 139.108703) + (xy 36.793745 139.095818) + (xy 36.406255 139.095818) + (xy 36.341473 139.108703) + (xy 36.291856 139.141856) + (xy 36.258703 139.191473) + (xy 36.245818 139.256254) + (xy 36.245818 140.593745) + (xy 36.258703 140.658526) + (xy 36.291856 140.708143) + (xy 36.35119 140.747789) + (xy 36.374134 140.775244) + (xy 36.378191 140.788198) + (xy 36.388056 140.837791) + (xy 36.437784 140.912216) + (xy 36.451371 140.921294) + (xy 36.460993 140.929191) + (xy 36.528401 140.996599) + (xy 36.545549 141.028002) + (xy 36.547 141.0415) + (xy 36.547001 142.03758) + (xy 36.545781 142.049969) + (xy 36.542592 142.065998) + (xy 36.560056 142.153789) + (xy 36.609784 142.228214) + (xy 36.623371 142.237292) + (xy 36.632993 142.245189) + (xy 38.01161 143.623807) + (xy 38.028758 143.65521) + (xy 38.026205 143.690899) + (xy 38.004763 143.719542) + (xy 37.991009 143.727374) + (xy 37.873384 143.776095) + (xy 37.760862 143.888617) + (xy 37.699967 144.035633) + (xy 37.699967 144.194765) + (xy 37.706898 144.211498) + (xy 37.710723 144.247073) + (xy 37.710512 144.248188) + (xy 37.703792 144.281967) + (xy 37.706981 144.297996) + (xy 37.708201 144.310385) + (xy 37.708201 144.32876) + (xy 37.698121 144.363091) + (xy 37.67998 144.381558) + (xy 37.625056 144.418256) + (xy 37.591903 144.467873) + (xy 37.579018 144.532654) + (xy 37.579018 145.120145) + (xy 37.590537 145.178056) + (xy 37.587348 145.213694) + (xy 37.565398 145.24195) + (xy 37.540646 145.252724) + (xy 37.446819 145.271388) + (xy 37.411181 145.268199) + (xy 37.382925 145.246249) + (xy 37.371021 145.212507) + (xy 37.37215 145.19672) + (xy 37.387382 145.120145) + (xy 37.387382 144.532654) + (xy 37.374496 144.467873) + (xy 37.341343 144.418256) + (xy 37.291726 144.385103) + (xy 37.226945 144.372218) + (xy 36.839455 144.372218) + (xy 36.774673 144.385103) + (xy 36.725056 144.418256) + (xy 36.691903 144.467873) + (xy 36.679018 144.532654) + (xy 36.679018 144.5379) + (xy 36.668938 144.572231) + (xy 36.641897 144.595662) + (xy 36.615518 144.6014) + (xy 36.571814 144.6014) + (xy 36.559426 144.60018) + (xy 36.543399 144.596992) + (xy 36.487787 144.608054) + (xy 36.452149 144.604865) + (xy 36.423893 144.582915) + (xy 36.41199 144.549173) + (xy 36.420219 144.514352) + (xy 36.430498 144.500873) + (xy 36.478207 144.453163) + (xy 36.6 144.159131) + (xy 36.6 143.840868) + (xy 36.478207 143.546836) + (xy 36.253163 143.321792) + (xy 35.959131 143.2) + (xy 35.640869 143.2) + (xy 35.346836 143.321792) + (xy 35.121792 143.546836) + (xy 35 143.840868) + (xy 35 144.159131) + (xy 35.121792 144.453163) + (xy 35.346836 144.678207) + (xy 35.640869 144.8) + (xy 35.959131 144.8) + (xy 36.163475 144.715358) + (xy 36.19905 144.711533) + (xy 36.231045 144.727549) + (xy 36.249303 144.75832) + (xy 36.248025 144.794077) + (xy 36.232676 144.818925) + (xy 35.758983 145.292619) + (xy 35.72758 145.309767) + (xy 35.714082 145.311218) + (xy 35.443855 145.311218) + (xy 35.379073 145.324103) + (xy 35.329456 145.357256) + (xy 35.296303 145.406873) + (xy 35.283418 145.471654) + (xy 35.283418 145.959145) + (xy 35.296303 146.023926) + (xy 35.329456 146.073543) + (xy 35.379072 146.106695) + (xy 35.436489 146.118117) + (xy 35.468193 146.134702) + (xy 35.485898 146.165794) + (xy 35.4876 146.180397) + (xy 35.4876 146.278586) + (xy 35.48638 146.290974) + (xy 35.483192 146.307) + (xy 35.500654 146.394789) + (xy 35.550384 146.469216) + (xy 35.563973 146.478296) + (xy 35.573595 146.486193) + (xy 36.223601 147.1362) + (xy 36.240749 147.167603) + (xy 36.2422 147.181101) + (xy 36.2422 147.185587) + (xy 36.24098 147.197976) + (xy 36.237792 147.214) + (xy 36.255254 147.301789) + (xy 36.304984 147.376216) + (xy 36.318573 147.385296) + (xy 36.328195 147.393193) + (xy 36.921402 147.9864) + (xy 36.93855 148.017803) + (xy 36.940001 148.031301) + (xy 36.940001 148.088232) + (xy 36.929921 148.122563) + (xy 36.90288 148.145994) + (xy 36.867464 148.151086) + (xy 36.852201 148.146898) + (xy 36.769556 148.112666) + (xy 36.610424 148.112666) + (xy 36.463407 148.173561) + (xy 36.383829 148.25314) + (xy 36.352426 148.270288) + (xy 36.316737 148.267735) + (xy 36.294027 148.25314) + (xy 36.261982 148.221095) + (xy 36.114966 148.1602) + (xy 35.955834 148.1602) + (xy 35.808817 148.221095) + (xy 35.696295 148.333617) + (xy 35.658128 148.425762) + (xy 35.635678 148.453622) + (xy 35.601729 148.464922) + (xy 35.56706 148.456073) + (xy 35.554561 148.446363) + (xy 34.462593 147.354395) + (xy 34.454696 147.344773) + (xy 34.445616 147.331183) + (xy 34.371191 147.281454) + (xy 34.2834 147.263992) + (xy 34.267376 147.26718) + (xy 34.254987 147.2684) + (xy 33.947624 147.2684) + (xy 33.913293 147.25832) + (xy 33.889862 147.231279) + (xy 33.885344 147.217288) + (xy 33.878896 147.184873) + (xy 33.845743 147.135256) + (xy 33.796126 147.102103) + (xy 33.731345 147.089218) + (xy 33.243855 147.089218) + (xy 33.179073 147.102103) + (xy 33.129456 147.135256) + (xy 33.096303 147.184873) + (xy 33.083418 147.249654) + (xy 33.083418 147.510081) + (xy 33.073338 147.544412) + (xy 33.064819 147.554982) + (xy 32.592173 148.027629) + (xy 32.56077 148.044777) + (xy 32.525081 148.042224) + (xy 32.496438 148.020782) + (xy 32.494474 148.018007) + (xy 32.481143 147.998056) + (xy 32.431526 147.964903) + (xy 32.366745 147.952018) + (xy 31.779255 147.952018) + (xy 31.714473 147.964903) + (xy 31.664856 147.998056) + (xy 31.631703 148.047673) + (xy 31.618818 148.112454) + (xy 31.618818 148.499945) + (xy 31.631703 148.564726) + (xy 31.664856 148.614343) + (xy 31.714473 148.647496) + (xy 31.779255 148.660382) + (xy 32.366745 148.660382) + (xy 32.431526 148.647496) + (xy 32.481143 148.614343) + (xy 32.517841 148.559421) + (xy 32.545295 148.536477) + (xy 32.570639 148.5312) + (xy 32.603387 148.5312) + (xy 32.615776 148.53242) + (xy 32.6318 148.535607) + (xy 32.719591 148.518145) + (xy 32.794016 148.468416) + (xy 32.803096 148.454827) + (xy 32.810993 148.445205) + (xy 33.340018 147.916181) + (xy 33.371421 147.899033) + (xy 33.384919 147.897582) + (xy 33.731345 147.897582) + (xy 33.796126 147.884696) + (xy 33.845743 147.851543) + (xy 33.878896 147.801926) + (xy 33.885344 147.769512) + (xy 33.901929 147.737807) + (xy 33.933021 147.720102) + (xy 33.947624 147.7184) + (xy 34.1639 147.7184) + (xy 34.198231 147.72848) + (xy 34.208801 147.736999) + (xy 35.234219 148.762417) + (xy 35.251367 148.79382) + (xy 35.248814 148.829509) + (xy 35.227372 148.858152) + (xy 35.193848 148.870656) + (xy 35.189318 148.870818) + (xy 35.021255 148.870818) + (xy 34.956473 148.883703) + (xy 34.906856 148.916856) + (xy 34.873703 148.966473) + (xy 34.860818 149.031254) + (xy 34.860818 149.557318) + (xy 34.850738 149.591649) + (xy 34.823697 149.61508) + (xy 34.797318 149.620818) + (xy 34.271255 149.620818) + (xy 34.206473 149.633703) + (xy 34.184707 149.648248) + (xy 34.150562 149.65894) + (xy 34.116057 149.649474) + (xy 34.092147 149.622856) + (xy 34.090762 149.619751) + (xy 34.075804 149.58364) + (xy 33.963282 149.471118) + (xy 33.816266 149.410223) + (xy 33.648682 149.410223) + (xy 33.614351 149.400143) + (xy 33.59092 149.373102) + (xy 33.585182 149.346723) + (xy 33.585182 149.053054) + (xy 33.572296 148.988273) + (xy 33.539143 148.938656) + (xy 33.489526 148.905503) + (xy 33.424745 148.892618) + (xy 32.837255 148.892618) + (xy 32.772473 148.905503) + (xy 32.722856 148.938656) + (xy 32.689703 148.988273) + (xy 32.676818 149.053054) + (xy 32.676818 149.540545) + (xy 32.689703 149.605326) + (xy 32.722856 149.654943) + (xy 32.772473 149.688096) + (xy 32.837255 149.700982) + (xy 33.240681 149.700982) + (xy 33.275012 149.711062) + (xy 33.285582 149.719581) + (xy 33.318101 149.7521) + (xy 33.335249 149.783503) + (xy 33.3367 149.797001) + (xy 33.3367 149.889789) + (xy 33.397595 150.036805) + (xy 33.510117 150.149327) + (xy 33.657134 150.210223) + (xy 33.816266 150.210223) + (xy 33.949989 150.154834) + (xy 33.974289 150.15) + (xy 34.10077 150.15) + (xy 34.135101 150.16008) + (xy 34.153568 150.178221) + (xy 34.156856 150.183143) + (xy 34.206473 150.216296) + (xy 34.271255 150.229182) + (xy 34.808745 150.229182) + (xy 34.873526 150.216296) + (xy 34.923143 150.183143) + (xy 34.956296 150.133526) + (xy 34.969182 150.068745) + (xy 34.969182 149.792682) + (xy 34.979262 149.758351) + (xy 35.006303 149.73492) + (xy 35.032682 149.729182) + (xy 35.308745 149.729182) + (xy 35.373524 149.716296) + (xy 35.37972 149.712157) + (xy 35.413865 149.701465) + (xy 35.448371 149.710931) + (xy 35.45028 149.712157) + (xy 35.456475 149.716296) + (xy 35.521255 149.729182) + (xy 35.808745 149.729182) + (xy 35.873524 149.716296) + (xy 35.87972 149.712157) + (xy 35.913865 149.701465) + (xy 35.948371 149.710931) + (xy 35.95028 149.712157) + (xy 35.956475 149.716296) + (xy 36.021255 149.729182) + (xy 36.308745 149.729182) + (xy 36.373524 149.716296) + (xy 36.37972 149.712157) + (xy 36.413865 149.701465) + (xy 36.448371 149.710931) + (xy 36.45028 149.712157) + (xy 36.456475 149.716296) + (xy 36.521255 149.729182) + (xy 36.808745 149.729182) + (xy 36.873524 149.716296) + (xy 36.87972 149.712157) + (xy 36.913865 149.701465) + (xy 36.948371 149.710931) + (xy 36.95028 149.712157) + (xy 36.956475 149.716296) + (xy 37.021255 149.729182) + (xy 37.308745 149.729182) + (xy 37.373524 149.716296) + (xy 37.37972 149.712157) + (xy 37.413865 149.701465) + (xy 37.448371 149.710931) + (xy 37.45028 149.712157) + (xy 37.456475 149.716296) + (xy 37.521255 149.729182) + (xy 37.808745 149.729182) + (xy 37.873524 149.716296) + (xy 37.87972 149.712157) + (xy 37.913865 149.701465) + (xy 37.948371 149.710931) + (xy 37.95028 149.712157) + (xy 37.956475 149.716296) + (xy 38.021255 149.729182) + (xy 38.308745 149.729182) + (xy 38.373524 149.716296) + (xy 38.37972 149.712157) + (xy 38.413865 149.701465) + (xy 38.448371 149.710931) + (xy 38.45028 149.712157) + (xy 38.456475 149.716296) + (xy 38.521255 149.729182) + (xy 38.808745 149.729182) + (xy 38.873524 149.716296) + (xy 38.87972 149.712157) + (xy 38.913865 149.701465) + (xy 38.948371 149.710931) + (xy 38.95028 149.712157) + (xy 38.956475 149.716296) + (xy 39.021255 149.729182) + (xy 39.308745 149.729182) + (xy 39.373524 149.716296) + (xy 39.37972 149.712157) + (xy 39.413865 149.701465) + (xy 39.448371 149.710931) + (xy 39.45028 149.712157) + (xy 39.456475 149.716296) + (xy 39.521255 149.729182) + (xy 39.808745 149.729182) + (xy 39.873526 149.716296) + (xy 39.923143 149.683143) + (xy 39.956296 149.633526) + (xy 39.969182 149.568745) + (xy 39.969182 149.031254) + (xy 39.956296 148.966473) + (xy 39.923143 148.916856) + (xy 39.873526 148.883703) + (xy 39.808745 148.870818) + (xy 39.521255 148.870818) + (xy 39.465888 148.881831) + (xy 39.430251 148.878642) + (xy 39.401994 148.856692) + (xy 39.390091 148.82295) + (xy 39.39 148.819551) + (xy 39.39 148.7505) + (xy 39.40008 148.716169) + (xy 39.408599 148.705599) + (xy 40.721008 147.393191) + (xy 40.73063 147.385294) + (xy 40.744216 147.376216) + (xy 40.793945 147.301791) + (xy 40.811407 147.214) + (xy 40.80822 147.197974) + (xy 40.807 147.185586) + (xy 40.807 147.048212) + (xy 40.81708 147.013881) + (xy 40.844121 146.99045) + (xy 40.879537 146.985358) + (xy 40.905779 146.995414) + (xy 40.919974 147.004899) + (xy 40.929596 147.012796) + (xy 41.650807 147.734008) + (xy 41.658704 147.74363) + (xy 41.667781 147.757216) + (xy 41.742206 147.806945) + (xy 41.829997 147.824407) + (xy 41.846022 147.82122) + (xy 41.858411 147.82) + (xy 43.498918 147.82) + (xy 43.533249 147.83008) + (xy 43.55668 147.857121) + (xy 43.562418 147.8835) + (xy 43.562418 147.888745) + (xy 43.575303 147.953526) + (xy 43.608456 148.003143) + (xy 43.658073 148.036296) + (xy 43.722855 148.049182) + (xy 44.110345 148.049182) + (xy 44.175126 148.036296) + (xy 44.224743 148.003143) + (xy 44.257896 147.953526) + (xy 44.270782 147.888745) + (xy 44.270782 147.301254) + (xy 44.257896 147.236473) + (xy 44.224743 147.186856) + (xy 44.175126 147.153703) + (xy 44.110345 147.140818) + (xy 43.722855 147.140818) + (xy 43.658073 147.153703) + (xy 43.608456 147.186856) + (xy 43.575303 147.236473) + (xy 43.562418 147.301254) + (xy 43.562418 147.3065) + (xy 43.552338 147.340831) + (xy 43.525297 147.364262) + (xy 43.498918 147.37) + (xy 41.949499 147.37) + (xy 41.915168 147.35992) + (xy 41.904598 147.351401) + (xy 41.69576 147.142563) + (xy 41.678612 147.11116) + (xy 41.681165 147.075471) + (xy 41.702607 147.046828) + (xy 41.736131 147.034324) + (xy 41.740661 147.034162) + (xy 42.052745 147.034162) + (xy 42.137035 147.017395) + (xy 42.203191 146.973192) + (xy 42.213862 146.957222) + (xy 42.241316 146.934277) + (xy 42.266661 146.929) + (xy 45.897773 146.929) + (xy 45.932104 146.93908) + (xy 45.942674 146.947599) + (xy 46.210222 147.215147) + (xy 46.596141 147.375) + (xy 47.013859 147.375) + (xy 47.399777 147.215147) + (xy 47.695147 146.919777) + (xy 47.727834 146.840865) + (xy 47.750284 146.813005) + (xy 47.784233 146.801705) + (xy 47.818902 146.810554) + (xy 47.843283 146.836741) + (xy 47.85 146.865165) + (xy 47.85 148.455492) + (xy 47.83992 148.489823) + (xy 47.812879 148.513254) + (xy 47.777463 148.518346) + (xy 47.744916 148.503482) + (xy 47.727834 148.479792) + (xy 47.652759 148.298545) + (xy 47.371454 148.01724) + (xy 47.003913 147.865) + (xy 46.606087 147.865) + (xy 46.238545 148.01724) + (xy 45.95724 148.298545) + (xy 45.805 148.666086) + (xy 45.805 149.063913) + (xy 45.876936 149.237582) + (xy 45.880761 149.273157) + (xy 45.864745 149.305152) + (xy 45.833974 149.32341) + (xy 45.798217 149.322132) + (xy 45.79397 149.320548) + (xy 45.690766 149.2778) + (xy 45.5557 149.2778) + (xy 45.521369 149.26772) + (xy 45.510799 149.259201) + (xy 45.060199 148.808601) + (xy 45.043051 148.777198) + (xy 45.0416 148.7637) + (xy 45.0416 148.092639) + (xy 45.05168 148.058308) + (xy 45.069821 148.039841) + (xy 45.124743 148.003143) + (xy 45.157896 147.953526) + (xy 45.170782 147.888745) + (xy 45.170782 147.301254) + (xy 45.157896 147.236473) + (xy 45.124743 147.186856) + (xy 45.075126 147.153703) + (xy 45.010345 147.140818) + (xy 44.622855 147.140818) + (xy 44.558073 147.153703) + (xy 44.508456 147.186856) + (xy 44.475303 147.236473) + (xy 44.462418 147.301254) + (xy 44.462418 147.888745) + (xy 44.475303 147.953526) + (xy 44.508456 148.003143) + (xy 44.563379 148.039842) + (xy 44.586324 148.067297) + (xy 44.5916 148.09264) + (xy 44.591601 148.854782) + (xy 44.590381 148.867171) + (xy 44.587192 148.8832) + (xy 44.604656 148.970991) + (xy 44.654384 149.045416) + (xy 44.667971 149.054494) + (xy 44.677593 149.062391) + (xy 45.192601 149.577399) + (xy 45.209749 149.608802) + (xy 45.2112 149.6223) + (xy 45.2112 149.757366) + (xy 45.272095 149.904382) + (xy 45.384617 150.016904) + (xy 45.531634 150.0778) + (xy 45.690766 150.0778) + (xy 45.837782 150.016904) + (xy 45.950304 149.904382) + (xy 46.0112 149.757366) + (xy 46.0112 149.638716) + (xy 46.02128 149.604385) + (xy 46.048321 149.580954) + (xy 46.083737 149.575862) + (xy 46.116284 149.590726) + (xy 46.119601 149.593815) + (xy 46.238545 149.712759) + (xy 46.606087 149.865) + (xy 47.003913 149.865) + (xy 47.371454 149.712759) + (xy 47.652759 149.431454) + (xy 47.727835 149.250207) + (xy 47.750286 149.222348) + (xy 47.784235 149.211048) + (xy 47.818903 149.219897) + (xy 47.843284 149.246084) + (xy 47.850001 149.274508) + (xy 47.850001 150.995493) + (xy 47.839921 151.029824) + (xy 47.81288 151.053255) + (xy 47.777464 151.058347) + (xy 47.744917 151.043483) + (xy 47.727835 151.019793) + (xy 47.652759 150.838545) + (xy 47.371454 150.55724) + (xy 47.003913 150.405) + (xy 46.606087 150.405) + (xy 46.304392 150.529966) + (xy 46.268817 150.533791) + (xy 46.244814 150.524098) + (xy 46.181592 150.481855) + (xy 46.0938 150.464392) + (xy 46.077776 150.46758) + (xy 46.065387 150.4688) + (xy 43.837856 150.4688) + (xy 43.803525 150.45872) + (xy 43.780094 150.431679) + (xy 43.775002 150.396263) + (xy 43.775576 150.392912) + (xy 43.780582 150.367745) + (xy 43.780582 149.680254) + (xy 43.766288 149.608395) + (xy 43.758526 149.583611) + (xy 43.76799 149.549105) + (xy 43.777115 149.537572) + (xy 43.842104 149.472582) + (xy 43.903 149.325566) + (xy 43.903 149.166433) + (xy 43.842104 149.019417) + (xy 43.729582 148.906895) + (xy 43.582566 148.846) + (xy 43.423434 148.846) + (xy 43.276417 148.906895) + (xy 43.163895 149.019417) + (xy 43.103 149.166433) + (xy 43.103 149.325564) + (xy 43.15311 149.446543) + (xy 43.156934 149.482118) + (xy 43.140918 149.514113) + (xy 43.110146 149.532371) + (xy 43.074389 149.531093) + (xy 43.049542 149.515744) + (xy 42.230808 148.69701) + (xy 42.21366 148.665607) + (xy 42.213429 148.63972) + (xy 42.221182 148.600744) + (xy 42.221182 148.113254) + (xy 42.208296 148.048473) + (xy 42.175143 147.998856) + (xy 42.125526 147.965703) + (xy 42.060745 147.952818) + (xy 41.473255 147.952818) + (xy 41.408473 147.965703) + (xy 41.358856 147.998856) + (xy 41.325703 148.048473) + (xy 41.312818 148.113254) + (xy 41.312818 148.607) + (xy 41.310655 148.607) + (xy 41.308515 148.630836) + (xy 41.294332 148.65247) + (xy 41.020634 148.926168) + (xy 40.989231 148.943316) + (xy 40.953542 148.940763) + (xy 40.924899 148.919321) + (xy 40.923166 148.916872) + (xy 40.873526 148.883703) + (xy 40.808745 148.870818) + (xy 40.521255 148.870818) + (xy 40.456473 148.883703) + (xy 40.406856 148.916856) + (xy 40.373703 148.966473) + (xy 40.360818 149.031254) + (xy 40.360818 149.568745) + (xy 40.373703 149.633526) + (xy 40.406856 149.683143) + (xy 40.456473 149.716296) + (xy 40.521255 149.729182) + (xy 40.797318 149.729182) + (xy 40.831649 149.739262) + (xy 40.85508 149.766303) + (xy 40.860818 149.792682) + (xy 40.860818 150.068745) + (xy 40.873703 150.133524) + (xy 40.877843 150.13972) + (xy 40.888535 150.173865) + (xy 40.879069 150.208371) + (xy 40.877843 150.21028) + (xy 40.873703 150.216475) + (xy 40.860818 150.281254) + (xy 40.860818 150.568745) + (xy 40.873703 150.633524) + (xy 40.877843 150.63972) + (xy 40.888535 150.673865) + (xy 40.879069 150.708371) + (xy 40.877843 150.71028) + (xy 40.873703 150.716475) + (xy 40.860818 150.781254) + (xy 40.860818 151.068745) + (xy 40.873703 151.133524) + (xy 40.877843 151.13972) + (xy 40.888535 151.173865) + (xy 40.879069 151.208371) + (xy 40.877843 151.21028) + (xy 40.873703 151.216475) + (xy 40.860818 151.281254) + (xy 40.860818 151.568745) + (xy 40.873703 151.633524) + (xy 40.877843 151.63972) + (xy 40.888535 151.673865) + (xy 40.879069 151.708371) + (xy 40.877843 151.71028) + (xy 40.873703 151.716475) + (xy 40.860818 151.781254) + (xy 40.860818 152.068745) + (xy 40.873703 152.133524) + (xy 40.877843 152.13972) + (xy 40.888535 152.173865) + (xy 40.879069 152.208371) + (xy 40.877843 152.21028) + (xy 40.873703 152.216475) + (xy 40.860818 152.281254) + (xy 40.860818 152.568745) + (xy 40.873703 152.633524) + (xy 40.877843 152.63972) + (xy 40.888535 152.673865) + (xy 40.879069 152.708371) + (xy 40.877843 152.71028) + (xy 40.873703 152.716475) + (xy 40.860818 152.781254) + (xy 40.860818 153.068745) + (xy 40.873703 153.133524) + (xy 40.877843 153.13972) + (xy 40.888535 153.173865) + (xy 40.879069 153.208371) + (xy 40.877843 153.21028) + (xy 40.873703 153.216475) + (xy 40.860818 153.281254) + (xy 40.860818 153.568745) + (xy 40.873703 153.633524) + (xy 40.877843 153.63972) + (xy 40.888535 153.673865) + (xy 40.879069 153.708371) + (xy 40.877843 153.71028) + (xy 40.873703 153.716475) + (xy 40.860818 153.781254) + (xy 40.860818 154.068745) + (xy 40.873703 154.133524) + (xy 40.877843 154.13972) + (xy 40.888535 154.173865) + (xy 40.879069 154.208371) + (xy 40.877843 154.21028) + (xy 40.873703 154.216475) + (xy 40.860818 154.281254) + (xy 40.860818 154.568745) + (xy 40.873703 154.633526) + (xy 40.906856 154.683143) + (xy 40.956473 154.716296) + (xy 41.021255 154.729182) + (xy 41.558745 154.729182) + (xy 41.623526 154.716296) + (xy 41.673143 154.683143) + (xy 41.706296 154.633526) + (xy 41.719182 154.568745) + (xy 41.719182 154.281254) + (xy 41.706296 154.216475) + (xy 41.702157 154.21028) + (xy 41.691465 154.176135) + (xy 41.700931 154.141629) + (xy 41.702157 154.13972) + (xy 41.706296 154.133524) + (xy 41.719182 154.068745) + (xy 41.719182 153.781254) + (xy 41.708169 153.725888) + (xy 41.711358 153.690251) + (xy 41.733308 153.661994) + (xy 41.76705 153.650091) + (xy 41.770449 153.65) + (xy 41.866503 153.65) + (xy 41.900834 153.66008) + (xy 41.919301 153.678221) + (xy 41.951856 153.726943) + (xy 42.001473 153.760096) + (xy 42.066255 153.772982) + (xy 42.653745 153.772982) + (xy 42.718526 153.760096) + (xy 42.768143 153.726943) + (xy 42.801296 153.677326) + (xy 42.814182 153.612545) + (xy 42.814182 153.225054) + (xy 42.801296 153.160273) + (xy 42.768143 153.110656) + (xy 42.715343 153.075376) + (xy 42.692398 153.047921) + (xy 42.68794 153.01242) + (xy 42.703382 152.980144) + (xy 42.705721 152.977677) + (xy 42.892708 152.790691) + (xy 42.90233 152.782794) + (xy 42.915916 152.773716) + (xy 42.965645 152.699291) + (xy 42.983107 152.6115) + (xy 42.97992 152.595474) + (xy 42.9787 152.583086) + (xy 42.9787 152.578594) + (xy 42.98878 152.544263) + (xy 43.015821 152.520832) + (xy 43.02981 152.516314) + (xy 43.034926 152.515296) + (xy 43.084543 152.482143) + (xy 43.117696 152.432526) + (xy 43.130582 152.367745) + (xy 43.130582 151.737499) + (xy 43.140662 151.703168) + (xy 43.167703 151.679737) + (xy 43.194082 151.673999) + (xy 43.608718 151.673999) + (xy 43.643049 151.684079) + (xy 43.66648 151.71112) + (xy 43.672218 151.737499) + (xy 43.672218 152.367745) + (xy 43.685103 152.432526) + (xy 43.718256 152.482143) + (xy 43.767873 152.515296) + (xy 43.832655 152.528182) + (xy 43.887601 152.528182) + (xy 43.921932 152.538262) + (xy 43.945363 152.565303) + (xy 43.951101 152.591682) + (xy 43.9511 153.019209) + (xy 43.94102 153.05354) + (xy 43.932501 153.06411) + (xy 43.836995 153.159615) + (xy 43.7761 153.306631) + (xy 43.7761 153.465764) + (xy 43.836995 153.61278) + (xy 43.949517 153.725302) + (xy 44.096534 153.786198) + (xy 44.255666 153.786198) + (xy 44.402682 153.725302) + (xy 44.515204 153.61278) + (xy 44.5761 153.465764) + (xy 44.5761 153.306631) + (xy 44.515204 153.159615) + (xy 44.419699 153.06411) + (xy 44.402551 153.032707) + (xy 44.4011 153.019209) + (xy 44.4011 152.476627) + (xy 44.41118 152.442296) + (xy 44.411802 152.441348) + (xy 44.417696 152.432526) + (xy 44.430582 152.367745) + (xy 44.430582 151.79308) + (xy 44.440662 151.758749) + (xy 44.467703 151.735318) + (xy 44.503119 151.730226) + (xy 44.535666 151.74509) + (xy 44.538983 151.748179) + (xy 45.418401 152.627597) + (xy 45.435549 152.659) + (xy 45.437 152.672498) + (xy 45.437001 155.313582) + (xy 45.435781 155.325971) + (xy 45.432592 155.342) + (xy 45.450056 155.429791) + (xy 45.499784 155.504216) + (xy 45.513371 155.513294) + (xy 45.522993 155.521191) + (xy 45.916433 155.914631) + (xy 45.933581 155.946034) + (xy 45.931028 155.981723) + (xy 45.930198 155.983832) + (xy 45.805 156.286086) + (xy 45.805 156.683913) + (xy 45.95724 157.051454) + (xy 46.238545 157.332759) + (xy 46.606087 157.485) + (xy 47.003913 157.485) + (xy 47.371454 157.332759) + (xy 47.652759 157.051454) + (xy 47.727835 156.870207) + (xy 47.750286 156.842347) + (xy 47.784235 156.831047) + (xy 47.818903 156.839896) + (xy 47.843284 156.866083) + (xy 47.850001 156.894507) + (xy 47.850001 158.615494) + (xy 47.839921 158.649825) + (xy 47.81288 158.673256) + (xy 47.777464 158.678348) + (xy 47.744917 158.663484) + (xy 47.727835 158.639794) + (xy 47.652759 158.458545) + (xy 47.371454 158.17724) + (xy 47.003913 158.025) + (xy 46.606087 158.025) + (xy 46.238545 158.17724) + (xy 46.142385 158.273401) + (xy 46.110982 158.290549) + (xy 46.097484 158.292) + (xy 36.637501 158.292) + (xy 36.60317 158.28192) + (xy 36.5926 158.273401) + (xy 36.528983 158.209784) + (xy 36.511835 158.178381) + (xy 36.514388 158.142692) + (xy 36.53583 158.114049) + (xy 36.569354 158.101545) + (xy 36.598184 158.106217) + (xy 36.699034 158.14799) + (xy 36.858166 158.14799) + (xy 37.005182 158.087094) + (xy 37.117704 157.974572) + (xy 37.1786 157.827556) + (xy 37.1786 157.759587) + (xy 37.18868 157.725256) + (xy 37.215721 157.701825) + (xy 37.251137 157.696733) + (xy 37.254487 157.697307) + (xy 37.254999 157.697409) + (xy 37.271027 157.694221) + (xy 37.283415 157.693001) + (xy 39.824586 157.693001) + (xy 39.836975 157.694221) + (xy 39.852999 157.697408) + (xy 39.94079 157.679946) + (xy 40.015215 157.630217) + (xy 40.024295 157.616628) + (xy 40.032192 157.607006) + (xy 40.223417 157.415781) + (xy 40.25482 157.398633) + (xy 40.268318 157.397182) + (xy 40.663745 157.397182) + (xy 40.728526 157.384296) + (xy 40.778143 157.351143) + (xy 40.811296 157.301526) + (xy 40.817744 157.269112) + (xy 40.834329 157.237407) + (xy 40.865421 157.219702) + (xy 40.880024 157.218) + (xy 41.172976 157.218) + (xy 41.207307 157.22808) + (xy 41.230738 157.255121) + (xy 41.235256 157.269112) + (xy 41.241703 157.301526) + (xy 41.274856 157.351143) + (xy 41.324473 157.384296) + (xy 41.389255 157.397182) + (xy 41.976745 157.397182) + (xy 42.041526 157.384296) + (xy 42.091143 157.351143) + (xy 42.124296 157.301526) + (xy 42.137182 157.236745) + (xy 42.137182 156.749254) + (xy 42.124296 156.684473) + (xy 42.091143 156.634856) + (xy 42.041526 156.601703) + (xy 41.976745 156.588818) + (xy 41.389255 156.588818) + (xy 41.324473 156.601703) + (xy 41.274856 156.634856) + (xy 41.241703 156.684473) + (xy 41.235256 156.716888) + (xy 41.218671 156.748593) + (xy 41.187579 156.766298) + (xy 41.172976 156.768) + (xy 40.9975 156.768) + (xy 40.963169 156.75792) + (xy 40.939738 156.730879) + (xy 40.934 156.7045) + (xy 40.934 156.436157) + (xy 40.94408 156.401826) + (xy 40.944702 156.400878) + (xy 40.956296 156.383526) + (xy 40.969182 156.318745) + (xy 40.969182 156.090318) + (xy 40.979262 156.055987) + (xy 40.987781 156.045417) + (xy 41.285417 155.747781) + (xy 41.31682 155.730633) + (xy 41.330318 155.729182) + (xy 41.558745 155.729182) + (xy 41.623526 155.716296) + (xy 41.673143 155.683143) + (xy 41.676432 155.678221) + (xy 41.703886 155.655277) + (xy 41.72923 155.65) + (xy 42.368111 155.65) + (xy 42.402442 155.66008) + (xy 42.413012 155.668599) + (xy 42.501717 155.757304) + (xy 42.648734 155.8182) + (xy 42.807866 155.8182) + (xy 42.954882 155.757304) + (xy 43.067404 155.644782) + (xy 43.1283 155.497766) + (xy 43.1283 155.338633) + (xy 43.067404 155.191617) + (xy 42.954882 155.079095) + (xy 42.807866 155.0182) + (xy 42.648734 155.0182) + (xy 42.501717 155.079095) + (xy 42.399412 155.181401) + (xy 42.368009 155.198549) + (xy 42.354511 155.2) + (xy 41.72923 155.2) + (xy 41.694899 155.18992) + (xy 41.676432 155.171779) + (xy 41.673143 155.166856) + (xy 41.623526 155.133703) + (xy 41.558745 155.120818) + (xy 41.021255 155.120818) + (xy 40.956473 155.133703) + (xy 40.906856 155.166856) + (xy 40.873703 155.216473) + (xy 40.860818 155.281254) + (xy 40.860818 155.509682) + (xy 40.850738 155.544013) + (xy 40.842219 155.554583) + (xy 40.794583 155.602219) + (xy 40.76318 155.619367) + (xy 40.749682 155.620818) + (xy 40.521255 155.620818) + (xy 40.456475 155.633703) + (xy 40.45028 155.637843) + (xy 40.416135 155.648535) + (xy 40.381629 155.639069) + (xy 40.37972 155.637843) + (xy 40.373524 155.633703) + (xy 40.308745 155.620818) + (xy 40.021255 155.620818) + (xy 39.956475 155.633703) + (xy 39.95028 155.637843) + (xy 39.916135 155.648535) + (xy 39.881629 155.639069) + (xy 39.87972 155.637843) + (xy 39.873524 155.633703) + (xy 39.808745 155.620818) + (xy 39.521255 155.620818) + (xy 39.456475 155.633703) + (xy 39.45028 155.637843) + (xy 39.416135 155.648535) + (xy 39.381629 155.639069) + (xy 39.37972 155.637843) + (xy 39.373524 155.633703) + (xy 39.308745 155.620818) + (xy 39.021255 155.620818) + (xy 38.956475 155.633703) + (xy 38.95028 155.637843) + (xy 38.916135 155.648535) + (xy 38.881629 155.639069) + (xy 38.87972 155.637843) + (xy 38.873524 155.633703) + (xy 38.808745 155.620818) + (xy 38.521255 155.620818) + (xy 38.456475 155.633703) + (xy 38.45028 155.637843) + (xy 38.416135 155.648535) + (xy 38.381629 155.639069) + (xy 38.37972 155.637843) + (xy 38.373524 155.633703) + (xy 38.308745 155.620818) + (xy 38.021255 155.620818) + (xy 37.956475 155.633703) + (xy 37.95028 155.637843) + (xy 37.916135 155.648535) + (xy 37.881629 155.639069) + (xy 37.87972 155.637843) + (xy 37.873524 155.633703) + (xy 37.808745 155.620818) + (xy 37.521255 155.620818) + (xy 37.456473 155.633703) + (xy 37.406856 155.666856) + (xy 37.373703 155.716473) + (xy 37.360818 155.781254) + (xy 37.360818 156.318745) + (xy 37.373703 156.383526) + (xy 37.406856 156.433143) + (xy 37.456473 156.466296) + (xy 37.521255 156.479182) + (xy 37.808745 156.479182) + (xy 37.873524 156.466296) + (xy 37.87972 156.462157) + (xy 37.913865 156.451465) + (xy 37.948371 156.460931) + (xy 37.95028 156.462157) + (xy 37.956475 156.466296) + (xy 38.021255 156.479182) + (xy 38.308745 156.479182) + (xy 38.373524 156.466296) + (xy 38.37972 156.462157) + (xy 38.413865 156.451465) + (xy 38.448371 156.460931) + (xy 38.45028 156.462157) + (xy 38.456475 156.466296) + (xy 38.521255 156.479182) + (xy 38.808745 156.479182) + (xy 38.873524 156.466296) + (xy 38.87972 156.462157) + (xy 38.913865 156.451465) + (xy 38.948371 156.460931) + (xy 38.95028 156.462157) + (xy 38.956475 156.466296) + (xy 39.021255 156.479182) + (xy 39.308745 156.479182) + (xy 39.373524 156.466296) + (xy 39.37972 156.462157) + (xy 39.413865 156.451465) + (xy 39.448371 156.460931) + (xy 39.45028 156.462157) + (xy 39.456475 156.466296) + (xy 39.521255 156.479182) + (xy 39.808745 156.479182) + (xy 39.873524 156.466296) + (xy 39.87972 156.462157) + (xy 39.913865 156.451465) + (xy 39.948371 156.460931) + (xy 39.95028 156.462157) + (xy 39.956474 156.466296) + (xy 40.011241 156.47719) + (xy 40.042946 156.493774) + (xy 40.060651 156.524867) + (xy 40.058736 156.560595) + (xy 40.037809 156.589617) + (xy 40.011756 156.601514) + (xy 39.961856 156.634856) + (xy 39.928703 156.684473) + (xy 39.915818 156.749254) + (xy 39.915818 157.060682) + (xy 39.905738 157.095013) + (xy 39.897219 157.105583) + (xy 39.7784 157.224402) + (xy 39.746997 157.24155) + (xy 39.733499 157.243001) + (xy 37.374502 157.243001) + (xy 37.340171 157.232921) + (xy 37.329601 157.224402) + (xy 37.202781 157.097582) + (xy 37.185633 157.066179) + (xy 37.184182 157.052681) + (xy 37.184182 156.749254) + (xy 37.171296 156.684473) + (xy 37.138143 156.634856) + (xy 37.088526 156.601703) + (xy 37.023745 156.588818) + (xy 36.9535 156.588818) + (xy 36.919169 156.578738) + (xy 36.895738 156.551697) + (xy 36.89 156.525318) + (xy 36.89 156.48923) + (xy 36.90008 156.454899) + (xy 36.918221 156.436432) + (xy 36.923143 156.433143) + (xy 36.956296 156.383526) + (xy 36.969182 156.318745) + (xy 36.969182 155.781254) + (xy 36.956296 155.716473) + (xy 36.923143 155.666856) + (xy 36.873526 155.633703) + (xy 36.808745 155.620818) + (xy 36.521255 155.620818) + (xy 36.456475 155.633703) + (xy 36.45028 155.637843) + (xy 36.416135 155.648535) + (xy 36.381629 155.639069) + (xy 36.37972 155.637843) + (xy 36.373524 155.633703) + (xy 36.308745 155.620818) + (xy 36.021255 155.620818) + (xy 35.956475 155.633703) + (xy 35.95028 155.637843) + (xy 35.916135 155.648535) + (xy 35.881629 155.639069) + (xy 35.87972 155.637843) + (xy 35.873524 155.633703) + (xy 35.808745 155.620818) + (xy 35.521255 155.620818) + (xy 35.456475 155.633703) + (xy 35.45028 155.637843) + (xy 35.416135 155.648535) + (xy 35.381629 155.639069) + (xy 35.37972 155.637843) + (xy 35.373524 155.633703) + (xy 35.308745 155.620818) + (xy 35.032682 155.620818) + (xy 34.998351 155.610738) + (xy 34.97492 155.583697) + (xy 34.969182 155.557318) + (xy 34.969182 155.281254) + (xy 34.956296 155.216475) + (xy 34.952157 155.21028) + (xy 34.941465 155.176135) + (xy 34.950931 155.141629) + (xy 34.952157 155.13972) + (xy 34.956296 155.133524) + (xy 34.969182 155.068745) + (xy 34.969182 154.781254) + (xy 34.956296 154.716475) + (xy 34.952157 154.71028) + (xy 34.941465 154.676135) + (xy 34.950931 154.641629) + (xy 34.952157 154.63972) + (xy 34.956296 154.633524) + (xy 34.969182 154.568745) + (xy 34.969182 154.281254) + (xy 34.956296 154.216475) + (xy 34.952157 154.21028) + (xy 34.941465 154.176135) + (xy 34.950931 154.141629) + (xy 34.952157 154.13972) + (xy 34.956296 154.133524) + (xy 34.969182 154.068745) + (xy 34.969182 153.781254) + (xy 34.956296 153.716475) + (xy 34.952157 153.71028) + (xy 34.941465 153.676135) + (xy 34.950931 153.641629) + (xy 34.952157 153.63972) + (xy 34.956296 153.633524) + (xy 34.969182 153.568745) + (xy 34.969182 153.281254) + (xy 34.956296 153.216475) + (xy 34.952157 153.21028) + (xy 34.941465 153.176135) + (xy 34.950931 153.141629) + (xy 34.952157 153.13972) + (xy 34.956296 153.133524) + (xy 34.969182 153.068745) + (xy 34.969182 152.781254) + (xy 34.956296 152.716475) + (xy 34.952157 152.71028) + (xy 34.941465 152.676135) + (xy 34.950931 152.641629) + (xy 34.952157 152.63972) + (xy 34.956296 152.633524) + (xy 34.969182 152.568745) + (xy 34.969182 152.281254) + (xy 34.956296 152.216475) + (xy 34.952157 152.21028) + (xy 34.941465 152.176135) + (xy 34.950931 152.141629) + (xy 34.952157 152.13972) + (xy 34.956296 152.133524) + (xy 34.969182 152.068745) + (xy 34.969182 151.781254) + (xy 34.956296 151.716475) + (xy 34.952157 151.71028) + (xy 34.941465 151.676135) + (xy 34.950931 151.641629) + (xy 34.952157 151.63972) + (xy 34.956296 151.633524) + (xy 34.969182 151.568745) + (xy 34.969182 151.281254) + (xy 34.956296 151.216475) + (xy 34.952157 151.21028) + (xy 34.941465 151.176135) + (xy 34.950931 151.141629) + (xy 34.952157 151.13972) + (xy 34.956296 151.133524) + (xy 34.969182 151.068745) + (xy 34.969182 150.781254) + (xy 34.956296 150.716473) + (xy 34.923143 150.666856) + (xy 34.873526 150.633703) + (xy 34.808745 150.620818) + (xy 34.271255 150.620818) + (xy 34.206473 150.633703) + (xy 34.156856 150.666856) + (xy 34.153568 150.671779) + (xy 34.126114 150.694723) + (xy 34.10077 150.7) + (xy 32.398301 150.7) + (xy 32.36397 150.68992) + (xy 32.3534 150.681401) + (xy 30.397993 148.725995) + (xy 30.390096 148.716373) + (xy 30.381016 148.702783) + (xy 30.306591 148.653054) + (xy 30.2188 148.635592) + (xy 30.202776 148.63878) + (xy 30.190387 148.64) + (xy 30.056623 148.64) + (xy 30.022292 148.62992) + (xy 29.998861 148.602879) + (xy 29.997957 148.6008) + (xy 29.872759 148.298545) + (xy 29.681215 148.107001) + (xy 30.577593 148.107001) + (xy 30.595057 148.194792) + (xy 30.646298 148.27148) + (xy 30.65699 148.305626) + (xy 30.657 148.306759) + (xy 30.657 148.436566) + (xy 30.717895 148.583582) + (xy 30.830417 148.696104) + (xy 30.977434 148.757) + (xy 31.136566 148.757) + (xy 31.283582 148.696104) + (xy 31.396104 148.583582) + (xy 31.457 148.436566) + (xy 31.457 148.277433) + (xy 31.396104 148.130417) + (xy 31.283582 148.017895) + (xy 31.136566 147.957) + (xy 31.095501 147.957) + (xy 31.06117 147.94692) + (xy 31.037739 147.919879) + (xy 31.032001 147.8935) + (xy 31.032001 147.599945) + (xy 31.618818 147.599945) + (xy 31.631703 147.664726) + (xy 31.664856 147.714343) + (xy 31.714473 147.747496) + (xy 31.779255 147.760382) + (xy 32.366745 147.760382) + (xy 32.431526 147.747496) + (xy 32.481143 147.714343) + (xy 32.514296 147.664726) + (xy 32.527182 147.599945) + (xy 32.527182 147.212454) + (xy 32.514296 147.147673) + (xy 32.481143 147.098056) + (xy 32.431526 147.064903) + (xy 32.366745 147.052018) + (xy 32.3615 147.052018) + (xy 32.327169 147.041938) + (xy 32.303738 147.014897) + (xy 32.298 146.988518) + (xy 32.298 145.4285) + (xy 32.30808 145.394169) + (xy 32.316599 145.383599) + (xy 32.856601 144.843598) + (xy 32.888004 144.82645) + (xy 32.901502 144.824999) + (xy 33.171588 144.824999) + (xy 33.183977 144.826219) + (xy 33.200001 144.829406) + (xy 33.287792 144.811944) + (xy 33.362217 144.762215) + (xy 33.371297 144.748626) + (xy 33.379194 144.739004) + (xy 33.420973 144.697225) + (xy 33.452376 144.680077) + (xy 33.488065 144.68263) + (xy 33.490175 144.68346) + (xy 33.650816 144.75) + (xy 33.949185 144.75) + (xy 34.224841 144.635819) + (xy 34.435819 144.424841) + (xy 34.55 144.149185) + (xy 34.55 143.850814) + (xy 34.435819 143.575158) + (xy 34.224841 143.36418) + (xy 33.949185 143.25) + (xy 33.650815 143.25) + (xy 33.375158 143.36418) + (xy 33.16418 143.575158) + (xy 33.05 143.850814) + (xy 33.05 144.149185) + (xy 33.107167 144.287199) + (xy 33.110992 144.322774) + (xy 33.094976 144.354769) + (xy 33.064205 144.373027) + (xy 33.048501 144.374999) + (xy 32.810415 144.374999) + (xy 32.798027 144.373779) + (xy 32.782 144.370591) + (xy 32.694209 144.388053) + (xy 32.619784 144.437782) + (xy 32.610707 144.451369) + (xy 32.60281 144.460991) + (xy 31.933995 145.129807) + (xy 31.924373 145.137704) + (xy 31.910784 145.146783) + (xy 31.861054 145.22121) + (xy 31.843592 145.308999) + (xy 31.84678 145.325024) + (xy 31.848 145.337413) + (xy 31.848001 146.988518) + (xy 31.837921 147.022849) + (xy 31.81088 147.04628) + (xy 31.784501 147.052018) + (xy 31.779255 147.052018) + (xy 31.714473 147.064903) + (xy 31.664856 147.098056) + (xy 31.631703 147.147673) + (xy 31.618818 147.212454) + (xy 31.618818 147.599945) + (xy 31.032001 147.599945) + (xy 31.032001 144.424967) + (xy 31.042081 144.390636) + (xy 31.069122 144.367205) + (xy 31.104538 144.362113) + (xy 31.137085 144.376977) + (xy 31.154167 144.400667) + (xy 31.16418 144.424841) + (xy 31.375158 144.635819) + (xy 31.650815 144.75) + (xy 31.949185 144.75) + (xy 32.224841 144.635819) + (xy 32.435819 144.424841) + (xy 32.55 144.149185) + (xy 32.55 143.850814) + (xy 32.435819 143.575158) + (xy 32.224841 143.36418) + (xy 32.099268 143.312166) + (xy 32.071408 143.289715) + (xy 32.060108 143.255766) + (xy 32.068957 143.221098) + (xy 32.095144 143.196717) + (xy 32.123568 143.19) + (xy 32.806587 143.19) + (xy 32.818976 143.19122) + (xy 32.835 143.194407) + (xy 32.922791 143.176945) + (xy 32.997216 143.127216) + (xy 33.006296 143.113627) + (xy 33.014193 143.104005) + (xy 33.420973 142.697225) + (xy 33.452376 142.680077) + (xy 33.488065 142.68263) + (xy 33.490175 142.68346) + (xy 33.650816 142.75) + (xy 33.949185 142.75) + (xy 34.224841 142.635819) + (xy 34.435819 142.424841) + (xy 34.55 142.149185) + (xy 34.55 141.850814) + (xy 34.435819 141.575158) + (xy 34.224841 141.36418) + (xy 33.949185 141.25) + (xy 33.650815 141.25) + (xy 33.375158 141.36418) + (xy 33.16418 141.575158) + (xy 33.05 141.850814) + (xy 33.05 142.149184) + (xy 33.11654 142.309825) + (xy 33.120365 142.3454) + (xy 33.104349 142.377396) + (xy 33.102775 142.379027) + (xy 32.760401 142.721401) + (xy 32.728998 142.738549) + (xy 32.7155 142.74) + (xy 32.273963 142.74) + (xy 32.239632 142.72992) + (xy 32.216201 142.702879) + (xy 32.211109 142.667463) + (xy 32.225973 142.634916) + (xy 32.229062 142.631599) + (xy 32.435819 142.424841) + (xy 32.55 142.149185) + (xy 32.55 141.850814) + (xy 32.435819 141.575158) + (xy 32.224841 141.36418) + (xy 31.949185 141.25) + (xy 31.650815 141.25) + (xy 31.375158 141.36418) + (xy 31.16418 141.575158) + (xy 31.05 141.850814) + (xy 31.05 142.149185) + (xy 31.16418 142.424841) + (xy 31.369138 142.629799) + (xy 31.386286 142.661202) + (xy 31.383733 142.696891) + (xy 31.362291 142.725534) + (xy 31.336625 142.73698) + (xy 31.255808 142.753054) + (xy 31.181383 142.802783) + (xy 31.172306 142.81637) + (xy 31.164409 142.825992) + (xy 30.667996 143.322406) + (xy 30.658374 143.330303) + (xy 30.644785 143.339382) + (xy 30.595055 143.413809) + (xy 30.577593 143.501598) + (xy 30.580781 143.517623) + (xy 30.582001 143.530012) + (xy 30.582002 148.078583) + (xy 30.580782 148.090972) + (xy 30.577593 148.107001) + (xy 29.681215 148.107001) + (xy 29.591454 148.01724) + (xy 29.223913 147.865) + (xy 28.826087 147.865) + (xy 28.458545 148.01724) + (xy 28.17724 148.298545) + (xy 28.072166 148.552218) + (xy 28.049716 148.580078) + (xy 28.015767 148.591378) + (xy 27.981098 148.582529) + (xy 27.956717 148.556342) + (xy 27.95 148.527918) + (xy 27.95 142.159131) + (xy 29 142.159131) + (xy 29.121792 142.453163) + (xy 29.346836 142.678207) + (xy 29.640869 142.8) + (xy 29.959131 142.8) + (xy 30.253163 142.678207) + (xy 30.478207 142.453163) + (xy 30.6 142.159131) + (xy 30.6 141.840868) + (xy 30.478207 141.546836) + (xy 30.253163 141.321792) + (xy 29.959131 141.2) + (xy 29.640869 141.2) + (xy 29.346836 141.321792) + (xy 29.121792 141.546836) + (xy 29 141.840868) + (xy 29 142.159131) + (xy 27.95 142.159131) + (xy 27.95 139) + (xy 29.581244 139) + (xy 29.681628 139.504666) + (xy 29.967498 139.932501) + (xy 30.395333 140.218371) + (xy 30.9 140.318755) + (xy 31.404666 140.218371) + (xy 31.832501 139.932501) + (xy 32.118371 139.504666) + (xy 32.218755 139) + (xy 43.581244 139) + (xy 43.681628 139.504666) + (xy 43.967498 139.932501) + (xy 44.395333 140.218371) + (xy 44.9 140.318755) + (xy 45.404666 140.218371) + (xy 45.832501 139.932501) + (xy 46.118371 139.504666) + (xy 46.218755 139) + (xy 46.118371 138.495333) + (xy 45.832501 138.067498) + (xy 45.404666 137.781628) + (xy 44.9 137.681244) + (xy 44.395333 137.781628) + (xy 43.967498 138.067498) + (xy 43.681628 138.495333) + (xy 43.581244 139) + (xy 32.218755 139) + (xy 32.118371 138.495333) + (xy 31.832501 138.067498) + (xy 31.404666 137.781628) + (xy 30.9 137.681244) + (xy 30.395333 137.781628) + (xy 29.967498 138.067498) + (xy 29.681628 138.495333) + (xy 29.581244 139) + (xy 27.95 139) + (xy 27.95 138.740166) + (xy 27.95122 138.727778) + (xy 28.00184 138.473294) + (xy 28.018424 138.441589) + (xy 28.019219 138.440781) + (xy 30.276401 136.183599) + (xy 30.307804 136.166451) + (xy 30.321302 136.165) + (xy 45.508698 136.165) ) ) ) diff --git a/examples/hardware/l0/l0.kicad_prl b/examples/hardware/l0/l0.kicad_prl new file mode 100644 index 000000000..6cbadf017 --- /dev/null +++ b/examples/hardware/l0/l0.kicad_prl @@ -0,0 +1,78 @@ +{ + "board": { + "active_layer": 0, + "active_layer_preset": "", + "auto_track_width": true, + "hidden_netclasses": [], + "hidden_nets": [], + "high_contrast_mode": 0, + "net_color_mode": 1, + "opacity": { + "images": 0.6, + "pads": 1.0, + "tracks": 1.0, + "vias": 1.0, + "zones": 0.6 + }, + "selection_filter": { + "dimensions": true, + "footprints": true, + "graphics": true, + "keepouts": true, + "lockedItems": false, + "otherItems": true, + "pads": true, + "text": true, + "tracks": true, + "vias": true, + "zones": true + }, + "visible_items": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 32, + 33, + 34, + 35, + 36, + 39, + 40 + ], + "visible_layers": "0021010_80000001", + "zone_display_mode": 0 + }, + "meta": { + "filename": "l0.kicad_prl", + "version": 3 + }, + "project": { + "files": [] + } +} diff --git a/examples/hardware/l0/l0.kicad_pro b/examples/hardware/l0/l0.kicad_pro new file mode 100644 index 000000000..8e1889055 --- /dev/null +++ b/examples/hardware/l0/l0.kicad_pro @@ -0,0 +1,731 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "board_outline_line_width": 0.15, + "copper_line_width": 0.19999999999999998, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.09999999999999999, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.09999999999999999, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.15, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.125, + "silk_text_upright": false, + "zones": { + "min_clearance": 0.254 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "filename": "board_design_settings.json", + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_type_mismatch": "ignore", + "hole_clearance": "error", + "hole_near_hole": "error", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "warning", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "text_height": "warning", + "text_thickness": "warning", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zones_intersect": "error" + }, + "rules": { + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.049999999999999996, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.19999999999999998, + "min_microvia_drill": 0.09999999999999999, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.7999999999999999, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.19999999999999998, + "min_track_width": 0.15, + "min_via_annular_width": 0.09999999999999999, + "min_via_diameter": 0.5, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 5, + "td_on_pad_in_zone": false, + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "via_dimensions": [], + "zones_allow_external_fillets": false + }, + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "conflicting_netclasses": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "simulation_model_issue": "ignore", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "l0.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12, + "clearance": 0.15, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.15, + "via_diameter": 0.5, + "via_drill": 0.2, + "wire_width": 6 + }, + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Vin", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.3, + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 3 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [ + { + "netclass": "Default", + "pattern": "+3V3" + }, + { + "netclass": "Default", + "pattern": "+5VP" + }, + { + "netclass": "Default", + "pattern": "/A_RS_485_N" + }, + { + "netclass": "Default", + "pattern": "/BOOT0" + }, + { + "netclass": "Default", + "pattern": "/B_RS_485_P" + }, + { + "netclass": "Default", + "pattern": "/D+" + }, + { + "netclass": "Default", + "pattern": "/D-" + }, + { + "netclass": "Default", + "pattern": "/DE" + }, + { + "netclass": "Default", + "pattern": "/MISO/MCK" + }, + { + "netclass": "Default", + "pattern": "/MOSI/SD" + }, + { + "netclass": "Default", + "pattern": "/PTPA" + }, + { + "netclass": "Default", + "pattern": "/PTPA_PRO" + }, + { + "netclass": "Default", + "pattern": "/PTPB" + }, + { + "netclass": "Default", + "pattern": "/PTPB_PRO" + }, + { + "netclass": "Default", + "pattern": "/RE" + }, + { + "netclass": "Default", + "pattern": "/RS485_LVL_DOWN" + }, + { + "netclass": "Default", + "pattern": "/RS485_LVL_UP" + }, + { + "netclass": "Default", + "pattern": "/RX/SDA/TIM2.4" + }, + { + "netclass": "Default", + "pattern": "/RxD" + }, + { + "netclass": "Default", + "pattern": "/SCK/CK" + }, + { + "netclass": "Default", + "pattern": "/TIM2.1/ADC0" + }, + { + "netclass": "Default", + "pattern": "/TIM2.2/ADC1" + }, + { + "netclass": "Default", + "pattern": "/TIM3.3" + }, + { + "netclass": "Default", + "pattern": "/TIM3.4" + }, + { + "netclass": "Default", + "pattern": "/TX/SCL/TIM2.3" + }, + { + "netclass": "Default", + "pattern": "/TxD" + }, + { + "netclass": "Default", + "pattern": "GND" + }, + { + "netclass": "Default", + "pattern": "Net-(C10-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(C11-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(C12-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(C12-Pad2)" + }, + { + "netclass": "Default", + "pattern": "Net-(C9-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(D3-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(J3-Pad4)" + }, + { + "netclass": "Default", + "pattern": "Net-(Q1-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(R10-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(R11-Pad2)" + }, + { + "netclass": "Default", + "pattern": "Net-(R13-Pad2)" + }, + { + "netclass": "Default", + "pattern": "Net-(R5-Pad2)" + }, + { + "netclass": "Default", + "pattern": "Net-(R8-Pad1)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad14)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad17)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad2)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad20)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad25)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad3)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad34)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad37)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad38)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad4)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad42)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad43)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad45)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad46)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad5)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad6)" + }, + { + "netclass": "Default", + "pattern": "Net-(U2-Pad7)" + }, + { + "netclass": "Default", + "pattern": "Net-(U3-Pad6)" + }, + { + "netclass": "Vin", + "pattern": "/Vin" + } + ] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "specctra_dsn": "", + "step": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "drawing": { + "dashed_lines_dash_length_ratio": 12.0, + "dashed_lines_gap_length_ratio": 3.0, + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.25, + "pin_symbol_size": 0.0, + "text_offset_ratio": 0.08 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "page_layout_descr_file": "", + "plot_directory": "", + "spice_adjust_passive_values": false, + "spice_current_sheet_as_root": false, + "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, + "spice_save_all_currents": false, + "spice_save_all_voltages": false, + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "8f61307f-8c40-408d-a3e3-2b693c43d4fa", + "" + ] + ], + "text_variables": {} +} diff --git a/examples/hardware/l0/l0.kicad_sch b/examples/hardware/l0/l0.kicad_sch new file mode 100644 index 000000000..784263a5a --- /dev/null +++ b/examples/hardware/l0/l0.kicad_sch @@ -0,0 +1,4464 @@ +(kicad_sch (version 20230121) (generator eeschema) + + (uuid 8f61307f-8c40-408d-a3e3-2b693c43d4fa) + + (paper "A4") + + (lib_symbols + (symbol "Common_Lib:DF11-8DP-2DS(24)" (pin_numbers hide) (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "J" (at -1.27 11.43 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DF11-8DP-2DS(24)" (at 1.27 -11.43 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:DF11-8DP-2DS(24)" (at 0 15.24 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "https://www.hirose.com/product/en/download_file/key_name/DF11%2D8DP%2D2DS%2824%29/category/Drawing%20(2D)/doc_file_id/39437/?file_category_id=6&item_id=05430535724&is_series=" (at 15.24 -15.24 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 1.27 13.97 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1688360" (at 3.81 16.51 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "DF11-8DP-2DS(24)_0_1" + (rectangle (start -2.54 10.16) (end 3.81 -10.16) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + ) + (symbol "DF11-8DP-2DS(24)_1_1" + (pin input line (at 6.35 8.89 180) (length 2.54) + (name "PS" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 6.35 180) (length 2.54) + (name "GND" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 3.81 180) (length 2.54) + (name "PTP" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 1.27 180) (length 2.54) + (name "4" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 -1.27 180) (length 2.54) + (name "5" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 -3.81 180) (length 2.54) + (name "PTP" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 -6.35 180) (length 2.54) + (name "GND" (effects (font (size 1.27 1.27)))) + (number "7" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 6.35 -8.89 180) (length 2.54) + (name "PS" (effects (font (size 1.27 1.27)))) + (number "8" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:D_Zener" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes) + (property "Reference" "D" (at 0 2.54 0) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "D_Zener" (at 0 -2.54 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at -2.54 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 2.54 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "?" (at 2.54 5.08 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "?" (at 5.08 7.62 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "diode Zener" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Zener diode" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "TO-???* *SingleDiode *_Diode_* *SingleDiode* *:D_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "D_Zener_0_1" + (polyline + (pts + (xy -0.635 -1.27) + (xy -1.27 -1.27) + (xy -1.27 1.27) + (xy -1.905 1.27) + ) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + (polyline + (pts + (xy 1.27 1.27) + (xy 1.27 -1.27) + (xy -1.27 0) + (xy 1.27 1.27) + ) + (stroke (width 0.2032) (type solid)) + (fill (type none)) + ) + ) + (symbol "D_Zener_1_1" + (pin passive line (at -3.81 0 0) (length 2.54) + (name "K" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 3.81 0 180) (length 2.54) + (name "A" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:Header6Contacts" (pin_numbers hide) (pin_names (offset 0.0254)) (in_bom yes) (on_board yes) + (property "Reference" "J" (at 0 7.62 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "Header6Contacts" (at -3.81 0 90) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:826926-6" (at -6.35 1.27 90) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at -2.54 1.27 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 2.54 10.16 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1248144" (at 5.08 12.7 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "Header6Contacts_0_1" + (rectangle (start -2.54 6.35) (end 1.27 -8.89) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + ) + (symbol "Header6Contacts_1_1" + (pin bidirectional line (at 3.81 5.08 180) (length 2.54) + (name "1" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 3.81 2.54 180) (length 2.54) + (name "2" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 3.81 0 180) (length 2.54) + (name "3" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 3.81 -2.54 180) (length 2.54) + (name "4" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 3.81 -5.08 180) (length 2.54) + (name "5" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 3.81 -7.62 180) (length 2.54) + (name "6" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:ST3485ECDR" (pin_numbers hide) (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (at -3.81 7.62 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "ST3485ECDR" (at 0 -7.62 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:SO8" (at 5.08 -15.24 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at -3.81 6.35 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at -1.27 10.16 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1842628" (at 1.27 12.7 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "ST3485ECDR_0_1" + (rectangle (start -5.08 6.35) (end 5.08 -6.35) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + ) + (symbol "ST3485ECDR_1_1" + (pin output line (at 7.62 0 180) (length 2.54) + (name "RO" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 7.62 2.54 180) (length 2.54) + (name "~{RE}" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 7.62 -2.54 180) (length 2.54) + (name "DE" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 7.62 5.08 180) (length 2.54) + (name "DI" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at -7.62 -5.08 0) (length 2.54) + (name "GND" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -7.62 0 0) (length 2.54) + (name "A/Y" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -7.62 3.81 0) (length 2.54) + (name "B/Z" (effects (font (size 1.27 1.27)))) + (number "7" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 7.62 -5.08 180) (length 2.54) + (name "Vcc" (effects (font (size 1.27 1.27)))) + (number "8" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:STM32F072CBU" (pin_numbers hide) (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (at -19.05 22.86 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "STM32F072CBU" (at -11.43 -16.51 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:UFQFPN48" (at 3.81 -21.59 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 5.08 -5.08 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at -13.97 27.94 0) + (effects (font (size 1.27 1.27))) + ) + (property "CodeCommande" "2432095" (at 22.86 24.13 0) + (effects (font (size 1.524 1.524)) hide) + ) + (symbol "STM32F072CBU_1_1" + (rectangle (start -10.16 10.16) (end 7.62 -7.62) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + (pin bidirectional line (at 10.16 7.62 180) (length 2.54) + (name "PB13/PTPB" (effects (font (size 1.27 1.27)))) + (number "26" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 10.16 5.08 180) (length 2.54) + (name "PB14/ROBUS_RE" (effects (font (size 1.27 1.27)))) + (number "27" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 10.16 -2.54 180) (length 2.54) + (name "PB15/ROBUS_DE" (effects (font (size 1.27 1.27)))) + (number "28" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 10.16 -5.08 180) (length 2.54) + (name "PA8/PTPA" (effects (font (size 1.27 1.27)))) + (number "29" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 10.16 2.54 180) (length 2.54) + (name "PA9/ROBUS_TX" (effects (font (size 1.27 1.27)))) + (number "30" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 10.16 0 180) (length 2.54) + (name "PA10/ROBUS_RX" (effects (font (size 1.27 1.27)))) + (number "31" (effects (font (size 1.27 1.27)))) + ) + ) + (symbol "STM32F072CBU_2_1" + (rectangle (start -29.21 -15.24) (end 25.4 13.97) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + (pin bidirectional line (at 27.94 -1.27 180) (length 2.54) + (name "PA0/TIM2_CH1/ADC0" (effects (font (size 1.27 1.27)))) + (number "10" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 27.94 -3.81 180) (length 2.54) + (name "PA1/TIM2_CH2/ADC1" (effects (font (size 1.27 1.27)))) + (number "11" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 27.94 11.43 180) (length 2.54) + (name "PB0/TIM3_CH3" (effects (font (size 1.27 1.27)))) + (number "18" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 27.94 8.89 180) (length 2.54) + (name "PB1/TIM3_CH4" (effects (font (size 1.27 1.27)))) + (number "19" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 5.08 0) (length 2.54) + (name "PB10/I2C2_SCL/USART3_TX/TIM2_CH3" (effects (font (size 1.27 1.27)))) + (number "21" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 2.54 0) (length 2.54) + (name "PB11/I2C2_SDA/USART3_RX/TIM2_CH4" (effects (font (size 1.27 1.27)))) + (number "22" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 10.16 0) (length 2.54) + (name "PA11/USB_DM" (effects (font (size 1.27 1.27)))) + (number "32" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 12.7 0) (length 2.54) + (name "PA12/USB_DP" (effects (font (size 1.27 1.27)))) + (number "33" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 -8.89 0) (length 2.54) + (name "PB3/I2S1_CK/SPI1_SCK" (effects (font (size 1.27 1.27)))) + (number "39" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 -6.35 0) (length 2.54) + (name "PB4/I2S1_MCK/SPI1_MISO" (effects (font (size 1.27 1.27)))) + (number "40" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -31.75 -3.81 0) (length 2.54) + (name "PB5/I2S1_SD/SPI1_MOSI" (effects (font (size 1.27 1.27)))) + (number "41" (effects (font (size 1.27 1.27)))) + ) + ) + (symbol "STM32F072CBU_3_1" + (rectangle (start -13.97 16.51) (end 16.51 -10.16) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + (pin bidirectional line (at 19.05 -8.89 180) (length 2.54) + (name "0" (effects (font (size 1.27 1.27)))) + (number "0" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 19.05 5.08 180) (length 2.54) + (name "VBAT" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 19.05 1.27 180) (length 2.54) + (name "Vss" (effects (font (size 1.27 1.27)))) + (number "23" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 19.05 12.7 180) (length 2.54) + (name "Vdd" (effects (font (size 1.27 1.27)))) + (number "24" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -16.51 -3.81 0) (length 2.54) + (name "PC14/RCC_OSC32_IN" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -16.51 2.54 0) (length 2.54) + (name "PA13/SWDIO" (effects (font (size 1.27 1.27)))) + (number "34" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 19.05 -1.27 180) (length 2.54) + (name "Vss" (effects (font (size 1.27 1.27)))) + (number "35" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 19.05 7.62 180) (length 2.54) + (name "VddIO2" (effects (font (size 1.27 1.27)))) + (number "36" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -16.51 0 0) (length 2.54) + (name "PA14/SWCLK" (effects (font (size 1.27 1.27)))) + (number "37" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -16.51 -8.89 0) (length 2.54) + (name "PC15/RCC_OSC32_OUT" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -16.51 10.16 0) (length 2.54) + (name "BOOT0" (effects (font (size 1.27 1.27)))) + (number "44" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 19.05 -3.81 180) (length 2.54) + (name "Vss" (effects (font (size 1.27 1.27)))) + (number "47" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 19.05 15.24 180) (length 2.54) + (name "Vdd" (effects (font (size 1.27 1.27)))) + (number "48" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -16.51 6.35 0) (length 2.54) + (name "~{RST}" (effects (font (size 1.27 1.27)))) + (number "7" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 19.05 -6.35 180) (length 2.54) + (name "VssA" (effects (font (size 1.27 1.27)))) + (number "8" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at 19.05 10.16 180) (length 2.54) + (name "VddA" (effects (font (size 1.27 1.27)))) + (number "9" (effects (font (size 1.27 1.27)))) + ) + ) + (symbol "STM32F072CBU_4_1" + (rectangle (start -8.89 13.97) (end 5.08 -6.35) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + (pin bidirectional line (at -11.43 12.7 0) (length 2.54) + (name "PA2" (effects (font (size 1.27 1.27)))) + (number "12" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -11.43 10.16 0) (length 2.54) + (name "PA3" (effects (font (size 1.27 1.27)))) + (number "13" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 7.62 0) (length 2.54) + (name "PA4" (effects (font (size 1.27 1.27)))) + (number "14" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 5.08 0) (length 2.54) + (name "PA5" (effects (font (size 1.27 1.27)))) + (number "15" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 2.54 0) (length 2.54) + (name "PA6" (effects (font (size 1.27 1.27)))) + (number "16" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 0 0) (length 2.54) + (name "PA7" (effects (font (size 1.27 1.27)))) + (number "17" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 -5.08 180) (length 2.54) + (name "PC13" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -11.43 -5.08 0) (length 2.54) + (name "PB2" (effects (font (size 1.27 1.27)))) + (number "20" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 2.54 180) (length 2.54) + (name "PB12" (effects (font (size 1.27 1.27)))) + (number "25" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at -11.43 -2.54 0) (length 2.54) + (name "PA15" (effects (font (size 1.27 1.27)))) + (number "38" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 12.7 180) (length 2.54) + (name "PB6" (effects (font (size 1.27 1.27)))) + (number "42" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 10.16 180) (length 2.54) + (name "PB7" (effects (font (size 1.27 1.27)))) + (number "43" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 7.62 180) (length 2.54) + (name "PB8" (effects (font (size 1.27 1.27)))) + (number "45" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 5.08 180) (length 2.54) + (name "PB9" (effects (font (size 1.27 1.27)))) + (number "46" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 7.62 0 180) (length 2.54) + (name "PF0" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 7.62 -2.54 180) (length 2.54) + (name "PF1" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:TPS5401" (pin_numbers hide) (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (at -7.62 7.62 0) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "TPS5401" (at -5.08 -7.62 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "Common_Footprint:S-PDSO-G10" (at 0 -10.16 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at -1.27 -1.27 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at -5.08 10.16 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2769397" (at -2.54 12.7 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "TPS5401_0_1" + (rectangle (start -8.89 6.35) (end 8.89 -6.35) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + ) + (symbol "TPS5401_1_1" + (pin output line (at 11.43 2.54 180) (length 2.54) + (name "BOOT" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 11.43 0 180) (length 2.54) + (name "PH" (effects (font (size 1.27 1.27)))) + (number "10" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 11.43 -7.62 180) (length 2.54) + (name "ThermalPad" (effects (font (size 1.27 1.27)))) + (number "11" (effects (font (size 1.27 1.27)))) + ) + (pin power_in line (at -11.43 5.08 0) (length 2.54) + (name "Vin" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 2.54 0) (length 2.54) + (name "En" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 -2.54 0) (length 2.54) + (name "SS/TR" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 -5.08 0) (length 2.54) + (name "RT/CLK" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 11.43 5.08 180) (length 2.54) + (name "PWRGD" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 11.43 -2.54 180) (length 2.54) + (name "VSENSE" (effects (font (size 1.27 1.27)))) + (number "7" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at -11.43 0 0) (length 2.54) + (name "COMP" (effects (font (size 1.27 1.27)))) + (number "8" (effects (font (size 1.27 1.27)))) + ) + (pin power_out line (at 11.43 -5.08 180) (length 2.54) + (name "GND" (effects (font (size 1.27 1.27)))) + (number "9" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Common_Lib:microUSB_B" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "J" (at 0 -7.62 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "microUSB_B" (at 0 7.62 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:MicroUSB_B" (at -2.54 -10.16 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 0 -7.62 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 5.08 -2.54 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2751674" (at 11.43 7.62 0) + (effects (font (size 1.524 1.524)) hide) + ) + (symbol "microUSB_B_0_1" + (rectangle (start -2.54 6.35) (end 2.54 -6.35) + (stroke (width 0) (type solid)) + (fill (type none)) + ) + ) + (symbol "microUSB_B_1_1" + (pin power_in line (at 5.08 5.08 180) (length 2.54) + (name "5V" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 5.08 2.54 180) (length 2.54) + (name "D-" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 5.08 0 180) (length 2.54) + (name "D+" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin bidirectional line (at 5.08 -2.54 180) (length 2.54) hide + (name "ID" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 5.08 -5.08 180) (length 2.54) + (name "GND" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:C_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "C" (at 0.254 1.778 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "C_Small" (at 0.254 -2.032 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "capacitor cap" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Unpolarized capacitor, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "C_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "C_Small_0_1" + (polyline + (pts + (xy -1.524 -0.508) + (xy 1.524 -0.508) + ) + (stroke (width 0.3302) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy -1.524 0.508) + (xy 1.524 0.508) + ) + (stroke (width 0.3048) (type default)) + (fill (type none)) + ) + ) + (symbol "C_Small_1_1" + (pin passive line (at 0 2.54 270) (length 2.032) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -2.54 90) (length 2.032) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:D_Schottky_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "D" (at -1.27 2.032 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "D_Schottky_Small" (at -7.112 -2.032 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "diode Schottky" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Schottky diode, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "TO-???* *_Diode_* *SingleDiode* D_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "D_Schottky_Small_0_1" + (polyline + (pts + (xy -0.762 0) + (xy 0.762 0) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.762 -1.016) + (xy -0.762 0) + (xy 0.762 1.016) + (xy 0.762 -1.016) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy -1.27 0.762) + (xy -1.27 1.016) + (xy -0.762 1.016) + (xy -0.762 -1.016) + (xy -0.254 -1.016) + (xy -0.254 -0.762) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + ) + (symbol "D_Schottky_Small_1_1" + (pin passive line (at -2.54 0 0) (length 1.778) + (name "K" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 2.54 0 180) (length 1.778) + (name "A" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:D_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "D" (at -1.27 2.032 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "D_Small" (at -3.81 -2.032 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Sim.Device" "D" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Sim.Pins" "1=K 2=A" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "diode" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Diode, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "TO-???* *_Diode_* *SingleDiode* D_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "D_Small_0_1" + (polyline + (pts + (xy -0.762 -1.016) + (xy -0.762 1.016) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy -0.762 0) + (xy 0.762 0) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.762 -1.016) + (xy -0.762 0) + (xy 0.762 1.016) + (xy 0.762 -1.016) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + ) + (symbol "D_Small_1_1" + (pin passive line (at -2.54 0 0) (length 1.778) + (name "K" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 2.54 0 180) (length 1.778) + (name "A" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:LED_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "D" (at -1.27 3.175 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "LED_Small" (at -4.445 -2.54 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "LED diode light-emitting-diode" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Light emitting diode, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "LED_Small_0_1" + (polyline + (pts + (xy -0.762 -1.016) + (xy -0.762 1.016) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 1.016 0) + (xy -0.762 0) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.762 -1.016) + (xy -0.762 0) + (xy 0.762 1.016) + (xy 0.762 -1.016) + ) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0 0.762) + (xy -0.508 1.27) + (xy -0.254 1.27) + (xy -0.508 1.27) + (xy -0.508 1.016) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.508 1.27) + (xy 0 1.778) + (xy 0.254 1.778) + (xy 0 1.778) + (xy 0 1.524) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + ) + (symbol "LED_Small_1_1" + (pin passive line (at -2.54 0 0) (length 1.778) + (name "K" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 2.54 0 180) (length 1.778) + (name "A" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:L_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "L" (at 0.762 1.016 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "L_Small" (at 0.762 -1.016 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "inductor choke coil reactor magnetic" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Inductor, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "Choke_* *Coil* Inductor_* L_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "L_Small_0_1" + (arc (start 0 -2.032) (mid 0.5058 -1.524) (end 0 -1.016) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (arc (start 0 -1.016) (mid 0.5058 -0.508) (end 0 0) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (arc (start 0 0) (mid 0.5058 0.508) (end 0 1.016) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (arc (start 0 1.016) (mid 0.5058 1.524) (end 0 2.032) + (stroke (width 0) (type default)) + (fill (type none)) + ) + ) + (symbol "L_Small_1_1" + (pin passive line (at 0 2.54 270) (length 0.508) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -2.54 90) (length 0.508) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:Q_NPN_BEC" (pin_names (offset 0) hide) (in_bom yes) (on_board yes) + (property "Reference" "Q" (at 5.08 1.27 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "Q_NPN_BEC" (at 5.08 -1.27 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 5.08 2.54 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "transistor NPN" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "NPN transistor, base/emitter/collector" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "Q_NPN_BEC_0_1" + (polyline + (pts + (xy 0.635 0.635) + (xy 2.54 2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.635 -0.635) + (xy 2.54 -2.54) + (xy 2.54 -2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0.635 1.905) + (xy 0.635 -1.905) + (xy 0.635 -1.905) + ) + (stroke (width 0.508) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 1.27 -1.778) + (xy 1.778 -1.27) + (xy 2.286 -2.286) + (xy 1.27 -1.778) + (xy 1.27 -1.778) + ) + (stroke (width 0) (type default)) + (fill (type outline)) + ) + (circle (center 1.27 0) (radius 2.8194) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + ) + (symbol "Q_NPN_BEC_1_1" + (pin input line (at -5.08 0 0) (length 5.715) + (name "B" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 2.54 -5.08 90) (length 2.54) + (name "E" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 2.54 5.08 270) (length 2.54) + (name "C" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:R_Small" (pin_numbers hide) (pin_names (offset 0.254) hide) (in_bom yes) (on_board yes) + (property "Reference" "R" (at 0.762 0.508 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "R_Small" (at 0.762 -1.016 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "R resistor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Resistor, small symbol" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "R_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "R_Small_0_1" + (rectangle (start -0.762 1.778) (end 0.762 -1.778) + (stroke (width 0.2032) (type default)) + (fill (type none)) + ) + ) + (symbol "R_Small_1_1" + (pin passive line (at 0 2.54 270) (length 0.762) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -2.54 90) (length 0.762) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "power:+3.3V" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "#PWR" (at 0 -3.81 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 0 3.556 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "global power" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Power symbol creates a global label with name \"+3.3V\"" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "+3.3V_0_1" + (polyline + (pts + (xy -0.762 1.27) + (xy 0 2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0 0) + (xy 0 2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0 2.54) + (xy 0.762 1.27) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + ) + (symbol "+3.3V_1_1" + (pin power_in line (at 0 0 90) (length 0) hide + (name "+3.3V" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "power:+5VP" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "#PWR" (at 0 -3.81 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+5VP" (at 0 3.556 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "global power" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Power symbol creates a global label with name \"+5VP\"" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "+5VP_0_1" + (polyline + (pts + (xy -0.762 1.27) + (xy 0 2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0 0) + (xy 0 2.54) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy 0 2.54) + (xy 0.762 1.27) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + ) + (symbol "+5VP_1_1" + (pin power_in line (at 0 0 90) (length 0) hide + (name "+5VP" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "#PWR" (at 0 -6.35 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 0 -3.81 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "global power" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) + (xy 0 -1.27) + (xy 1.27 -1.27) + (xy 0 -2.54) + (xy -1.27 -1.27) + (xy 0 -1.27) + ) + (stroke (width 0) (type default)) + (fill (type none)) + ) + ) + (symbol "GND_1_1" + (pin power_in line (at 0 0 270) (length 0) hide + (name "GND" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + ) + ) + ) + + (junction (at 78.74 135.89) (diameter 0) (color 0 0 0 0) + (uuid 03882063-be02-49df-8a4b-5a8c6cd356d1) + ) + (junction (at 102.87 91.44) (diameter 0) (color 0 0 0 0) + (uuid 061ec807-1e1c-4687-8942-1c251d220f0e) + ) + (junction (at 78.74 130.81) (diameter 0) (color 0 0 0 0) + (uuid 064e7025-11da-403c-8e9b-455f4ccf1c41) + ) + (junction (at 85.09 76.2) (diameter 0) (color 0 0 0 0) + (uuid 0aae13ff-2c8a-47ef-872c-d00f05d741eb) + ) + (junction (at 85.09 91.44) (diameter 0) (color 0 0 0 0) + (uuid 0df8fb6c-249e-4cb1-834f-a724a3e087c2) + ) + (junction (at 52.07 185.42) (diameter 0) (color 0 0 0 0) + (uuid 0fa14ce7-00e4-4105-8da8-8934b6170e1a) + ) + (junction (at 124.46 173.99) (diameter 0) (color 0 0 0 0) + (uuid 11b22460-38fa-4bea-8b30-ee49515dff2a) + ) + (junction (at 167.64 81.28) (diameter 0) (color 0 0 0 0) + (uuid 1ead161c-af33-49d2-9d3e-e566c623bf92) + ) + (junction (at 34.29 34.29) (diameter 0) (color 0 0 0 0) + (uuid 26f9d2f1-b0fc-48bd-882b-201deb5193e4) + ) + (junction (at 111.76 91.44) (diameter 0) (color 0 0 0 0) + (uuid 2910c8e7-fa84-47cb-a8bf-7eeeb126ee5a) + ) + (junction (at 62.23 76.2) (diameter 0) (color 0 0 0 0) + (uuid 2d1cb42b-4fe2-4279-9c60-9b6e763d3da7) + ) + (junction (at 77.47 52.07) (diameter 0) (color 0 0 0 0) + (uuid 2f953347-0068-4577-8a57-33de4c49c120) + ) + (junction (at 43.18 49.53) (diameter 0) (color 0 0 0 0) + (uuid 338d4b6f-b701-4994-b225-17accd138245) + ) + (junction (at 176.53 81.28) (diameter 0) (color 0 0 0 0) + (uuid 3449c389-8766-4e9d-bd80-b59e7da01f83) + ) + (junction (at 102.87 81.28) (diameter 0) (color 0 0 0 0) + (uuid 403ee4c5-3339-4fe4-a03f-16b84831b8b6) + ) + (junction (at 78.74 138.43) (diameter 0) (color 0 0 0 0) + (uuid 4fa26844-096d-494c-9f8e-1fda6f2346ba) + ) + (junction (at 77.47 76.2) (diameter 0) (color 0 0 0 0) + (uuid 507d6f31-3bdf-4ec9-a56d-eb393bbd475c) + ) + (junction (at 77.47 114.3) (diameter 0) (color 0 0 0 0) + (uuid 5922e015-c430-44c4-9d30-fc727116f96d) + ) + (junction (at 69.85 76.2) (diameter 0) (color 0 0 0 0) + (uuid 5b6f95ab-2eff-4386-ae4a-63f1c016418c) + ) + (junction (at 92.71 45.72) (diameter 0) (color 0 0 0 0) + (uuid 5f164a88-00b8-42dd-aac4-09396401988b) + ) + (junction (at 167.64 86.36) (diameter 0) (color 0 0 0 0) + (uuid 5f5f9b0f-5844-468f-8eb7-6b3909c9fba2) + ) + (junction (at 85.09 83.82) (diameter 0) (color 0 0 0 0) + (uuid 5f871ea3-18a5-486c-851d-a26320fad8c2) + ) + (junction (at 148.59 88.9) (diameter 0) (color 0 0 0 0) + (uuid 689c70a8-6248-4eeb-accf-87a9b73a32bc) + ) + (junction (at 77.47 91.44) (diameter 0) (color 0 0 0 0) + (uuid 7111a882-4dfc-464c-982a-57fc5cb68bcd) + ) + (junction (at 185.42 81.28) (diameter 0) (color 0 0 0 0) + (uuid 750416f7-795e-4a14-be27-6eb76d78ceb3) + ) + (junction (at 34.29 59.69) (diameter 0) (color 0 0 0 0) + (uuid 7adf5c84-99d9-45c2-8f4a-150e33220514) + ) + (junction (at 71.12 40.64) (diameter 0) (color 0 0 0 0) + (uuid 83686cc5-de6c-4305-b903-b0ad34bbb133) + ) + (junction (at 69.85 91.44) (diameter 0) (color 0 0 0 0) + (uuid 95a1de85-fc6b-43ff-b591-0edcba168c7c) + ) + (junction (at 36.83 86.36) (diameter 0) (color 0 0 0 0) + (uuid a7b35035-b099-49df-8f7a-c02810b5e7a1) + ) + (junction (at 41.91 176.53) (diameter 0) (color 0 0 0 0) + (uuid aa893821-1f43-44d2-87f1-9c8c1131e343) + ) + (junction (at 41.91 185.42) (diameter 0) (color 0 0 0 0) + (uuid b383b6c4-fd86-4f54-9c13-fd53cc9972cf) + ) + (junction (at 156.21 81.28) (diameter 0) (color 0 0 0 0) + (uuid b9d84244-6c00-4abb-a868-3c075dce805d) + ) + (junction (at 31.75 185.42) (diameter 0) (color 0 0 0 0) + (uuid c0d4bd7d-b5e2-48a5-8ecb-70b933df6e87) + ) + (junction (at 78.74 133.35) (diameter 0) (color 0 0 0 0) + (uuid c5b4b004-1fd7-44e1-a0b8-a5a293081be0) + ) + (junction (at 71.12 36.83) (diameter 0) (color 0 0 0 0) + (uuid c628e838-a7a9-44e6-9a26-b100a154d6ce) + ) + (junction (at 176.53 91.44) (diameter 0) (color 0 0 0 0) + (uuid c718b609-a089-4dbe-a014-301547e9c147) + ) + (junction (at 77.47 116.84) (diameter 0) (color 0 0 0 0) + (uuid c7fdd2d5-c56e-491c-9a65-4bf41c6df04b) + ) + (junction (at 44.45 24.13) (diameter 0) (color 0 0 0 0) + (uuid cae09b9a-a95f-4b45-b8af-8e8d5b81a2b1) + ) + (junction (at 93.98 91.44) (diameter 0) (color 0 0 0 0) + (uuid cca1fb91-5de7-4881-9ce2-e21fb9b4cb3b) + ) + (junction (at 77.47 119.38) (diameter 0) (color 0 0 0 0) + (uuid ce1335d9-357d-4b89-8d7d-9c011aa2e846) + ) + (junction (at 52.07 176.53) (diameter 0) (color 0 0 0 0) + (uuid d3717d16-5004-45e8-b706-2825fa94efa6) + ) + (junction (at 31.75 176.53) (diameter 0) (color 0 0 0 0) + (uuid e065c22b-e2d8-471a-ac00-4ca15fa9334c) + ) + (junction (at 77.47 121.92) (diameter 0) (color 0 0 0 0) + (uuid f4af384f-70a3-4c11-ad15-61e4c838c967) + ) + + (no_connect (at 39.37 123.19) (uuid 02684c2a-4e33-433c-82c1-a70a68149daf)) + (no_connect (at 167.64 179.07) (uuid 03f1de69-9ffb-43d2-a221-a0459481df85)) + (no_connect (at 147.32 26.67) (uuid 083d14d5-832d-44d1-94d0-8f88f73991b6)) + (no_connect (at 167.64 184.15) (uuid 19791d69-0e70-41cd-8fc3-9e5b6349ba39)) + (no_connect (at 167.64 181.61) (uuid 2852646e-2b4a-4822-a168-85efc3cd3067)) + (no_connect (at 148.59 191.77) (uuid 2f37f2f9-b0ec-45fd-8fa5-9d7fac29b1bf)) + (no_connect (at 167.64 189.23) (uuid 455d51eb-d419-4487-9d21-9206e6fa57e0)) + (no_connect (at 39.37 129.54) (uuid 59b6a660-2c90-49bc-bb5f-5666869430c2)) + (no_connect (at 39.37 133.35) (uuid 5ac05747-59a0-4377-8160-e409de9812ac)) + (no_connect (at 148.59 179.07) (uuid 5ba4d98f-7c72-4b3b-9dda-f7c70141f8db)) + (no_connect (at 167.64 173.99) (uuid 858ba736-a611-41cc-b9c3-b440bdec9f6e)) + (no_connect (at 167.64 186.69) (uuid 864c4172-7cd0-499a-ae4d-6814cc2d30a2)) + (no_connect (at 167.64 176.53) (uuid 89a50eba-41c4-4827-b42e-c76849d7b1df)) + (no_connect (at 148.59 186.69) (uuid 9431d5ee-14c8-4dcb-bd9e-3cda6baa3b86)) + (no_connect (at 39.37 127) (uuid a73c16ed-4bf1-4efd-943f-e26040c1c6b2)) + (no_connect (at 39.37 138.43) (uuid b5ec8b83-fc94-46f2-b003-06062f0796c3)) + (no_connect (at 167.64 191.77) (uuid eb53a6e1-0435-4d23-a507-19fd879d2ec9)) + (no_connect (at 148.59 189.23) (uuid fd09d044-284f-4229-8a2b-3ec3a3279926)) + + (wire (pts (xy 111.76 91.44) (xy 102.87 91.44)) + (stroke (width 0) (type default)) + (uuid 0127ab47-18d9-4792-a7ba-82ecb03fb1a4) + ) + (wire (pts (xy 34.29 34.29) (xy 53.34 34.29)) + (stroke (width 0) (type default)) + (uuid 01d56d46-d510-4fc7-8a4f-03db7840727d) + ) + (wire (pts (xy 69.85 91.44) (xy 77.47 91.44)) + (stroke (width 0) (type default)) + (uuid 02ec58ff-af91-4782-a2fe-5b8e2e5a538d) + ) + (wire (pts (xy 77.47 119.38) (xy 77.47 121.92)) + (stroke (width 0) (type default)) + (uuid 0439f19b-90f1-4f8c-9e10-0634d9b7af43) + ) + (wire (pts (xy 26.67 24.13) (xy 44.45 24.13)) + (stroke (width 0) (type default)) + (uuid 04d9e08a-378c-42c9-9dbf-7c7611515cd4) + ) + (wire (pts (xy 71.12 52.07) (xy 71.12 54.61)) + (stroke (width 0) (type default)) + (uuid 068b273f-61c7-44a4-b9c4-6e1881966145) + ) + (wire (pts (xy 31.75 185.42) (xy 31.75 187.96)) + (stroke (width 0) (type default)) + (uuid 06a2018c-cc77-44dc-a8cf-b92e363f7a6f) + ) + (wire (pts (xy 34.29 59.69) (xy 54.61 59.69)) + (stroke (width 0) (type default)) + (uuid 08244856-baf7-4195-a5ff-4b608ee7a982) + ) + (wire (pts (xy 60.96 176.53) (xy 60.96 179.07)) + (stroke (width 0) (type default)) + (uuid 0b45dc42-645c-4d7d-8a5a-9923fc7c1cf0) + ) + (wire (pts (xy 176.53 81.28) (xy 185.42 81.28)) + (stroke (width 0) (type default)) + (uuid 0c74ab18-34f2-4a39-a576-c8598ec0cd97) + ) + (wire (pts (xy 52.07 185.42) (xy 52.07 184.15)) + (stroke (width 0) (type default)) + (uuid 0d757bc8-cb26-483e-a1ea-b5a5592e327a) + ) + (wire (pts (xy 74.93 119.38) (xy 77.47 119.38)) + (stroke (width 0) (type default)) + (uuid 0f13b7b1-3ce0-4883-9eb3-4c15f0fda607) + ) + (wire (pts (xy 93.98 91.44) (xy 102.87 91.44)) + (stroke (width 0) (type default)) + (uuid 0f52a72e-22db-4984-ae97-be88a10ac115) + ) + (wire (pts (xy 130.81 186.69) (xy 99.06 186.69)) + (stroke (width 0) (type default)) + (uuid 11a37633-9687-4e7f-b39b-eedaa9cc0a4e) + ) + (wire (pts (xy 62.23 76.2) (xy 69.85 76.2)) + (stroke (width 0) (type default)) + (uuid 12f256f5-ef06-48c7-a37b-6af69d07ab5f) + ) + (wire (pts (xy 67.31 40.64) (xy 71.12 40.64)) + (stroke (width 0) (type default)) + (uuid 1715c500-80a8-4851-920e-9ac6e057ab3d) + ) + (wire (pts (xy 77.47 116.84) (xy 77.47 119.38)) + (stroke (width 0) (type default)) + (uuid 1b31984f-6e63-4d08-b5fe-e64b93602eef) + ) + (wire (pts (xy 156.21 78.74) (xy 156.21 81.28)) + (stroke (width 0) (type default)) + (uuid 1c8f98fc-d503-4c8e-971e-9193db5cdac1) + ) + (wire (pts (xy 158.75 91.44) (xy 152.4 91.44)) + (stroke (width 0) (type default)) + (uuid 1eaa6a9d-7488-41f5-a779-e9e41f9f3fb9) + ) + (wire (pts (xy 44.45 24.13) (xy 45.72 24.13)) + (stroke (width 0) (type default)) + (uuid 1f2be560-84eb-46b3-93f8-6b11cdce244f) + ) + (wire (pts (xy 185.42 81.28) (xy 185.42 83.82)) + (stroke (width 0) (type default)) + (uuid 22eb5e19-4eb3-4fbb-87ba-ced212604c9f) + ) + (wire (pts (xy 62.23 91.44) (xy 69.85 91.44)) + (stroke (width 0) (type default)) + (uuid 23ce6a12-8bfd-448d-bb84-16dfc38806e3) + ) + (wire (pts (xy 125.73 76.2) (xy 85.09 76.2)) + (stroke (width 0) (type default)) + (uuid 2791f188-b18a-4204-86ca-b65f7a576729) + ) + (wire (pts (xy 77.47 110.49) (xy 77.47 114.3)) + (stroke (width 0) (type default)) + (uuid 2881152d-a41d-4183-a2c1-81391ad2dcc6) + ) + (wire (pts (xy 26.67 59.69) (xy 34.29 59.69)) + (stroke (width 0) (type default)) + (uuid 2dfd21d4-a841-4d7f-a5a4-584e5f888a0f) + ) + (wire (pts (xy 26.67 21.59) (xy 34.29 21.59)) + (stroke (width 0) (type default)) + (uuid 37047bc2-0bab-4515-b33f-a405677cd7fc) + ) + (wire (pts (xy 77.47 52.07) (xy 77.47 53.34)) + (stroke (width 0) (type default)) + (uuid 42ae21b2-41b1-40d2-a1c5-fea9989b809a) + ) + (wire (pts (xy 77.47 76.2) (xy 85.09 76.2)) + (stroke (width 0) (type default)) + (uuid 44db0204-d62f-44a0-88cc-1795531f14ca) + ) + (wire (pts (xy 41.91 185.42) (xy 52.07 185.42)) + (stroke (width 0) (type default)) + (uuid 47c97e23-581c-4f94-8b1c-43ff6aa6bb1c) + ) + (wire (pts (xy 125.73 83.82) (xy 111.76 83.82)) + (stroke (width 0) (type default)) + (uuid 4aaa3636-c82f-41f5-b5f6-1489924720b1) + ) + (wire (pts (xy 31.75 176.53) (xy 31.75 179.07)) + (stroke (width 0) (type default)) + (uuid 4b9ce290-b8aa-4462-97ea-7431e714b55f) + ) + (wire (pts (xy 185.42 88.9) (xy 185.42 91.44)) + (stroke (width 0) (type default)) + (uuid 4c454e4b-db3b-4478-9ba8-147eea39ff7f) + ) + (wire (pts (xy 26.67 34.29) (xy 34.29 34.29)) + (stroke (width 0) (type default)) + (uuid 4c7d3575-f4f2-4d8d-8c41-a77250588799) + ) + (wire (pts (xy 77.47 81.28) (xy 77.47 76.2)) + (stroke (width 0) (type default)) + (uuid 4d69028a-48e8-47e9-b6e7-890c9a26fe00) + ) + (polyline (pts (xy 48.26 96.52) (xy 48.26 66.04)) + (stroke (width 0) (type default)) + (uuid 4dfff8c5-a7a8-4952-b2b2-c7fad784cae6) + ) + + (wire (pts (xy 54.61 59.69) (xy 54.61 57.15)) + (stroke (width 0) (type default)) + (uuid 4fb8e6b0-0cf6-49df-9aac-90a142d4ab57) + ) + (wire (pts (xy 93.98 83.82) (xy 93.98 81.28)) + (stroke (width 0) (type default)) + (uuid 54be9838-76ee-439c-80c6-7c281f2260fb) + ) + (wire (pts (xy 31.75 184.15) (xy 31.75 185.42)) + (stroke (width 0) (type default)) + (uuid 54cc1a47-44e8-4cc1-81b4-7b696a6c7177) + ) + (wire (pts (xy 167.64 86.36) (xy 158.75 86.36)) + (stroke (width 0) (type default)) + (uuid 5943cfdf-edce-4f8d-89b1-df0354b67d54) + ) + (wire (pts (xy 93.98 81.28) (xy 102.87 81.28)) + (stroke (width 0) (type default)) + (uuid 5a1254fe-068e-4bc6-a191-750ddd1f6a8e) + ) + (wire (pts (xy 125.73 81.28) (xy 102.87 81.28)) + (stroke (width 0) (type default)) + (uuid 5d1edf09-52c0-4cbe-9fcd-011baf1b810b) + ) + (wire (pts (xy 60.96 185.42) (xy 60.96 184.15)) + (stroke (width 0) (type default)) + (uuid 5dd14a2a-5e7f-4ddf-8131-5f73ad1690e2) + ) + (wire (pts (xy 50.8 49.53) (xy 54.61 49.53)) + (stroke (width 0) (type default)) + (uuid 5e1b8b42-5b94-45fb-a446-8abfd54c0999) + ) + (wire (pts (xy 74.93 133.35) (xy 78.74 133.35)) + (stroke (width 0) (type default)) + (uuid 5ea01599-0207-4ae0-9f98-79ad6618e408) + ) + (wire (pts (xy 69.85 76.2) (xy 77.47 76.2)) + (stroke (width 0) (type default)) + (uuid 600a9dc5-6fdf-404c-a6bf-7a2948e19f65) + ) + (wire (pts (xy 130.81 176.53) (xy 130.81 186.69)) + (stroke (width 0) (type default)) + (uuid 62f22ebf-8141-413e-9aa2-8cd5ae1a27fc) + ) + (wire (pts (xy 52.07 176.53) (xy 60.96 176.53)) + (stroke (width 0) (type default)) + (uuid 632cfe72-0ae2-4d22-915b-9999a99df77a) + ) + (wire (pts (xy 44.45 31.75) (xy 44.45 24.13)) + (stroke (width 0) (type default)) + (uuid 64a646db-eee7-4685-83b8-a5a21a996289) + ) + (wire (pts (xy 165.1 81.28) (xy 167.64 81.28)) + (stroke (width 0) (type default)) + (uuid 67c34012-df12-491b-aa1b-b78eb117b3cc) + ) + (wire (pts (xy 26.67 46.99) (xy 34.29 46.99)) + (stroke (width 0) (type default)) + (uuid 69a5476f-5fbe-42ef-b1d7-61138653771a) + ) + (wire (pts (xy 87.63 52.07) (xy 92.71 52.07)) + (stroke (width 0) (type default)) + (uuid 6a92f463-a6bf-4d18-abe2-63c413b806c2) + ) + (wire (pts (xy 147.32 19.05) (xy 149.86 19.05)) + (stroke (width 0) (type default)) + (uuid 6ae006c2-6141-462b-9a3d-8320f212c90c) + ) + (wire (pts (xy 78.74 128.27) (xy 74.93 128.27)) + (stroke (width 0) (type default)) + (uuid 6b3b89d7-de19-46e2-9c86-5e881c09633d) + ) + (wire (pts (xy 148.59 92.71) (xy 148.59 88.9)) + (stroke (width 0) (type default)) + (uuid 6c337ee9-b115-4fc6-91fd-ad094a506942) + ) + (wire (pts (xy 71.12 27.94) (xy 71.12 36.83)) + (stroke (width 0) (type default)) + (uuid 6e94e2d3-0a10-4c5a-9272-4549135cd822) + ) + (wire (pts (xy 156.21 81.28) (xy 148.59 81.28)) + (stroke (width 0) (type default)) + (uuid 74cf29ae-6682-433a-953c-da56e2b514c1) + ) + (wire (pts (xy 111.76 91.44) (xy 111.76 88.9)) + (stroke (width 0) (type default)) + (uuid 7671467f-3d64-4cb4-b118-0a104d6b2f93) + ) + (wire (pts (xy 77.47 121.92) (xy 77.47 124.46)) + (stroke (width 0) (type default)) + (uuid 775d5fb7-5c21-4088-8939-32c6db6af003) + ) + (polyline (pts (xy 127 66.04) (xy 127 12.7)) + (stroke (width 0) (type default)) + (uuid 775e0407-5cbf-4618-80ac-da4e59cbfed8) + ) + + (wire (pts (xy 176.53 91.44) (xy 167.64 91.44)) + (stroke (width 0) (type default)) + (uuid 7a4b7be8-070e-4cbb-b1f8-0de4c37b4d44) + ) + (wire (pts (xy 85.09 83.82) (xy 92.71 83.82)) + (stroke (width 0) (type default)) + (uuid 808f40c4-f2a0-4bc5-ac4d-2f82b648c97e) + ) + (wire (pts (xy 71.12 36.83) (xy 77.47 36.83)) + (stroke (width 0) (type default)) + (uuid 84300e59-366a-48b8-9dff-c687bb83cd30) + ) + (wire (pts (xy 176.53 81.28) (xy 176.53 83.82)) + (stroke (width 0) (type default)) + (uuid 8c0caceb-9dd7-47cc-9660-7b7d6584e79a) + ) + (wire (pts (xy 71.12 40.64) (xy 77.47 40.64)) + (stroke (width 0) (type default)) + (uuid 8ce63c0f-7812-4c5c-ae48-efa3997e82ae) + ) + (wire (pts (xy 93.98 88.9) (xy 93.98 91.44)) + (stroke (width 0) (type default)) + (uuid 923dd758-2023-408a-a96f-cbdc7ddb22bd) + ) + (wire (pts (xy 185.42 91.44) (xy 176.53 91.44)) + (stroke (width 0) (type default)) + (uuid 92c54154-bd5c-4295-a3b6-1195e6ead925) + ) + (wire (pts (xy 71.12 46.99) (xy 71.12 40.64)) + (stroke (width 0) (type default)) + (uuid 9336b402-86e2-4172-9f55-59968b154dd3) + ) + (wire (pts (xy 78.74 133.35) (xy 78.74 130.81)) + (stroke (width 0) (type default)) + (uuid 94635628-3314-4af7-85e4-204ebf146f51) + ) + (wire (pts (xy 74.93 130.81) (xy 78.74 130.81)) + (stroke (width 0) (type default)) + (uuid 9671dbdd-3611-40c3-925a-b9ee948c2ecb) + ) + (wire (pts (xy 85.09 83.82) (xy 85.09 81.28)) + (stroke (width 0) (type default)) + (uuid 9714f953-ef1d-41e0-8683-0fe531eded83) + ) + (wire (pts (xy 62.23 86.36) (xy 62.23 91.44)) + (stroke (width 0) (type default)) + (uuid 9764cb06-8832-4818-aba9-4e5bbcf0825e) + ) + (polyline (pts (xy 176.53 166.37) (xy 144.78 166.37)) + (stroke (width 0) (type default)) + (uuid 9a47b9be-c08e-4ea6-af52-8193f79d93e3) + ) + + (wire (pts (xy 53.34 34.29) (xy 53.34 31.75)) + (stroke (width 0) (type default)) + (uuid 9aa48922-1c33-4d8c-95d8-d5ebf1b810a2) + ) + (wire (pts (xy 26.67 31.75) (xy 44.45 31.75)) + (stroke (width 0) (type default)) + (uuid 9ab71cfa-ca7a-4f41-812b-b9fcae1b8fa7) + ) + (wire (pts (xy 43.18 57.15) (xy 43.18 49.53)) + (stroke (width 0) (type default)) + (uuid 9dcfe872-3c49-4e4c-9ebf-a41e77ddccfc) + ) + (wire (pts (xy 78.74 135.89) (xy 78.74 133.35)) + (stroke (width 0) (type default)) + (uuid 9e80ad60-ae31-4c39-b979-09fe5834d076) + ) + (wire (pts (xy 45.72 49.53) (xy 43.18 49.53)) + (stroke (width 0) (type default)) + (uuid 9fb995bb-60cd-49f2-9c82-d4e854118af7) + ) + (polyline (pts (xy 12.7 96.52) (xy 48.26 96.52)) + (stroke (width 0) (type default)) + (uuid a0ceb714-b440-454b-a0fd-6c56241e78a2) + ) + + (wire (pts (xy 74.93 138.43) (xy 78.74 138.43)) + (stroke (width 0) (type default)) + (uuid a1185608-c6b0-4d31-a459-04c17551b148) + ) + (wire (pts (xy 78.74 138.43) (xy 78.74 135.89)) + (stroke (width 0) (type default)) + (uuid a1817032-55ab-4063-8dae-28f654b7b0f9) + ) + (wire (pts (xy 92.71 78.74) (xy 125.73 78.74)) + (stroke (width 0) (type default)) + (uuid a2e26e88-c3d0-49bd-b386-ae1f90ec97a7) + ) + (wire (pts (xy 152.4 91.44) (xy 152.4 83.82)) + (stroke (width 0) (type default)) + (uuid a3a70a42-d58d-46bd-a8e2-feb0370dda86) + ) + (wire (pts (xy 26.67 57.15) (xy 43.18 57.15)) + (stroke (width 0) (type default)) + (uuid a6ab9b39-2c35-49bd-aa3c-e9806ebad852) + ) + (wire (pts (xy 74.93 116.84) (xy 77.47 116.84)) + (stroke (width 0) (type default)) + (uuid a6c2b6da-fe6d-44f1-a43a-84e2acd8f575) + ) + (wire (pts (xy 62.23 81.28) (xy 62.23 76.2)) + (stroke (width 0) (type default)) + (uuid a71cf53b-c92c-42fb-8873-3f036563c394) + ) + (wire (pts (xy 92.71 52.07) (xy 92.71 45.72)) + (stroke (width 0) (type default)) + (uuid a7daf1b4-3dcb-4918-97c9-c5b216419ccd) + ) + (wire (pts (xy 77.47 124.46) (xy 74.93 124.46)) + (stroke (width 0) (type default)) + (uuid a99efc11-ebe1-431d-b50c-d243d308fa2b) + ) + (wire (pts (xy 41.91 176.53) (xy 41.91 179.07)) + (stroke (width 0) (type default)) + (uuid ad399f86-cbb4-49a1-9e31-da7187ab3332) + ) + (wire (pts (xy 36.83 83.82) (xy 36.83 86.36)) + (stroke (width 0) (type default)) + (uuid ad6f430d-6523-4518-a7eb-57ae3f20c775) + ) + (wire (pts (xy 121.92 86.36) (xy 125.73 86.36)) + (stroke (width 0) (type default)) + (uuid b17fe6fd-7faf-43a8-b9d0-aa123062a124) + ) + (wire (pts (xy 156.21 81.28) (xy 160.02 81.28)) + (stroke (width 0) (type default)) + (uuid b23a758a-a4eb-43f6-a0e5-824d05d0d72e) + ) + (wire (pts (xy 36.83 86.36) (xy 40.64 86.36)) + (stroke (width 0) (type default)) + (uuid b2587c37-bc6c-49ac-8bc9-d1aba4eb8c8c) + ) + (wire (pts (xy 85.09 86.36) (xy 85.09 83.82)) + (stroke (width 0) (type default)) + (uuid b44a45ce-09c5-47ba-a52b-59ce40fa848b) + ) + (wire (pts (xy 77.47 114.3) (xy 77.47 116.84)) + (stroke (width 0) (type default)) + (uuid b58cb44d-2c1d-4994-b6a6-fe1feeea8da9) + ) + (wire (pts (xy 67.31 36.83) (xy 71.12 36.83)) + (stroke (width 0) (type default)) + (uuid b6ab3ab3-2ba5-4f10-a857-ac7800661131) + ) + (wire (pts (xy 31.75 185.42) (xy 41.91 185.42)) + (stroke (width 0) (type default)) + (uuid b7093936-fa34-4a6d-860f-386174db0ac8) + ) + (wire (pts (xy 41.91 185.42) (xy 41.91 184.15)) + (stroke (width 0) (type default)) + (uuid b7b486a2-d648-4a0a-8738-2592923c1263) + ) + (wire (pts (xy 26.67 49.53) (xy 43.18 49.53)) + (stroke (width 0) (type default)) + (uuid bd1fce87-9093-4b5a-96d4-132042fb3f7a) + ) + (wire (pts (xy 148.59 176.53) (xy 130.81 176.53)) + (stroke (width 0) (type default)) + (uuid be77df8d-fe82-4972-9a62-b91fb51a9968) + ) + (wire (pts (xy 69.85 86.36) (xy 69.85 91.44)) + (stroke (width 0) (type default)) + (uuid bee170fe-bd4d-4608-bba6-2434703f8a8f) + ) + (wire (pts (xy 74.93 114.3) (xy 77.47 114.3)) + (stroke (width 0) (type default)) + (uuid c3a3ed1f-c863-488c-9d4a-ca96d55348c4) + ) + (wire (pts (xy 52.07 176.53) (xy 52.07 179.07)) + (stroke (width 0) (type default)) + (uuid c47cb50f-78e9-49cd-8776-d4b6ae9b7f10) + ) + (wire (pts (xy 92.71 83.82) (xy 92.71 78.74)) + (stroke (width 0) (type default)) + (uuid c7ec4472-740f-438c-b563-ad2f5079ef66) + ) + (wire (pts (xy 31.75 176.53) (xy 41.91 176.53)) + (stroke (width 0) (type default)) + (uuid c8abd3da-0cae-4e27-9d0f-20e1b3e56414) + ) + (wire (pts (xy 69.85 81.28) (xy 69.85 76.2)) + (stroke (width 0) (type default)) + (uuid c9622ec4-5e47-44ef-9106-640fae9a81f7) + ) + (wire (pts (xy 176.53 88.9) (xy 176.53 91.44)) + (stroke (width 0) (type default)) + (uuid c96996b1-d444-4291-a5bf-a56501e9d35b) + ) + (wire (pts (xy 148.59 173.99) (xy 124.46 173.99)) + (stroke (width 0) (type default)) + (uuid cc318e61-ceec-42a4-bcd2-5dfffab003b5) + ) + (wire (pts (xy 77.47 91.44) (xy 85.09 91.44)) + (stroke (width 0) (type default)) + (uuid ccaa83af-54a6-4c42-8fd9-57c8e72b4c02) + ) + (wire (pts (xy 147.32 29.21) (xy 149.86 29.21)) + (stroke (width 0) (type default)) + (uuid d1ce73f2-d4c3-4557-816f-62f20ab9a6a3) + ) + (wire (pts (xy 50.8 24.13) (xy 53.34 24.13)) + (stroke (width 0) (type default)) + (uuid da862d26-cf61-4f85-aafe-9d3c5ed89657) + ) + (wire (pts (xy 78.74 130.81) (xy 78.74 128.27)) + (stroke (width 0) (type default)) + (uuid dcaf7fee-4a8d-4c14-94e5-49390531122d) + ) + (wire (pts (xy 148.59 86.36) (xy 148.59 88.9)) + (stroke (width 0) (type default)) + (uuid e1fb42cd-2459-422c-b272-dc6b5fa729a9) + ) + (wire (pts (xy 74.93 121.92) (xy 77.47 121.92)) + (stroke (width 0) (type default)) + (uuid e34c87eb-4f0e-4920-b52c-3bed74d5173a) + ) + (wire (pts (xy 158.75 86.36) (xy 158.75 91.44)) + (stroke (width 0) (type default)) + (uuid e5ab06e5-d5d4-482c-9e20-4b44ec9cfbf6) + ) + (wire (pts (xy 41.91 176.53) (xy 52.07 176.53)) + (stroke (width 0) (type default)) + (uuid e607659b-ea14-404f-937b-22967d025e04) + ) + (wire (pts (xy 148.59 78.74) (xy 151.13 78.74)) + (stroke (width 0) (type default)) + (uuid e7f0e28d-ac04-4e51-a82f-500aedbfc01c) + ) + (wire (pts (xy 77.47 52.07) (xy 82.55 52.07)) + (stroke (width 0) (type default)) + (uuid e8649d23-236a-4a6b-9786-0069fd0d64e5) + ) + (wire (pts (xy 21.59 78.74) (xy 24.13 78.74)) + (stroke (width 0) (type default)) + (uuid e8d5099a-6b7e-4064-8647-3db413383126) + ) + (wire (pts (xy 167.64 81.28) (xy 176.53 81.28)) + (stroke (width 0) (type default)) + (uuid eb5752b5-f5c5-4cfa-ac4d-f754276d747d) + ) + (wire (pts (xy 77.47 86.36) (xy 77.47 91.44)) + (stroke (width 0) (type default)) + (uuid ed80ccfc-9866-46c8-abf6-57263de5d54d) + ) + (wire (pts (xy 74.93 135.89) (xy 78.74 135.89)) + (stroke (width 0) (type default)) + (uuid eda5df89-66d2-4b79-87ae-f0fb4575c955) + ) + (wire (pts (xy 78.74 139.7) (xy 78.74 138.43)) + (stroke (width 0) (type default)) + (uuid ef7c5583-6a4b-4f70-87e9-dc2ff0e42f1e) + ) + (polyline (pts (xy 12.7 66.04) (xy 284.48 66.04)) + (stroke (width 0) (type default)) + (uuid f5c75243-a05e-4f69-99df-f9c4bd8669cb) + ) + + (wire (pts (xy 77.47 45.72) (xy 77.47 52.07)) + (stroke (width 0) (type default)) + (uuid f5e68fcd-3245-45d3-b42f-42294eed26b6) + ) + (wire (pts (xy 31.75 175.26) (xy 31.75 176.53)) + (stroke (width 0) (type default)) + (uuid f8211fbd-8bfe-4c82-b97e-6157b371ad12) + ) + (wire (pts (xy 52.07 185.42) (xy 60.96 185.42)) + (stroke (width 0) (type default)) + (uuid fa5a73d6-282a-4de4-a103-0be82c2a2bef) + ) + (wire (pts (xy 111.76 91.44) (xy 121.92 91.44)) + (stroke (width 0) (type default)) + (uuid fa82edcb-e947-4cd4-b8bf-982635352487) + ) + (wire (pts (xy 148.59 83.82) (xy 152.4 83.82)) + (stroke (width 0) (type default)) + (uuid fdaf72a1-45c7-4c63-ae3b-01531d1b6ae8) + ) + (wire (pts (xy 85.09 91.44) (xy 93.98 91.44)) + (stroke (width 0) (type default)) + (uuid fe9090a4-7d4e-416f-a9e4-b138b1719acc) + ) + + (text "Boot Detection" (at 13.97 68.58 0) + (effects (font (size 1.524 1.524) (thickness 0.3048) bold italic) (justify left bottom)) + (uuid 0fbce4de-9a79-4bde-9f0b-60a71ac7eb74) + ) + (text "External Connections" (at 128.27 15.24 0) + (effects (font (size 1.524 1.524) (thickness 0.3048) bold italic) (justify left bottom)) + (uuid 4b8aec5f-6391-4013-91e1-3867de7fdaca) + ) + (text "Main Power Supply" (at 49.53 68.58 0) + (effects (font (size 1.524 1.524) (thickness 0.3048) bold italic) (justify left bottom)) + (uuid 517f544e-8eef-4e70-aaed-b97fd2fb72d1) + ) + (text "ROBUS Interface" (at 105.41 15.24 0) + (effects (font (size 1.524 1.524) (thickness 0.3048) bold italic) (justify left bottom)) + (uuid b2242bd7-c3c9-4c8e-9e83-4d1d57486698) + ) + (text "NC" (at 148.59 168.91 0) + (effects (font (size 1.524 1.524) (thickness 0.3048) bold italic) (justify left bottom)) + (uuid e1de700b-0272-4847-abbe-7435968ca56f) + ) + + (label "Vin" (at 124.46 168.91 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 016f0cff-b44a-4670-88ad-49566c0100a4) + ) + (label "Vin" (at 26.67 36.83 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 0a41a22a-3e48-403e-93d0-7d780b47fdb9) + ) + (label "RE" (at 105.41 36.83 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 0eeaf7a7-983e-48f9-b773-169b464df7cf) + ) + (label "TIM3.4" (at 267.97 31.75 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 16891eca-fd27-4729-992c-2e8423206688) + ) + (label "SCK/CK" (at 176.53 46.99 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 1a123051-24f2-4ade-84be-f02bc3e1886b) + ) + (label "TIM2.1/ADC0" (at 236.22 39.37 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 1a24f656-7b05-42c1-917d-fb46a98c5137) + ) + (label "D+" (at 176.53 25.4 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 1e513217-1a49-4b0e-96d5-c36e39888e76) + ) + (label "B_RS_485_P" (at 26.67 52.07 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 20df453a-fe8f-488a-804a-3b464172071f) + ) + (label "RS485_LVL_DOWN" (at 71.12 22.86 0) + (effects (font (size 1.27 1.27)) (justify left bottom)) + (uuid 288786ac-a593-4cf8-acac-73b02c393d7d) + ) + (label "TxD" (at 92.71 35.56 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 2c47fbaa-f7b0-4268-816e-ffabc9a9bac9) + ) + (label "MOSI/SD" (at 176.53 41.91 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 345eebf0-f3ea-46fb-a2aa-36064e91644a) + ) + (label "RX/SDA/TIM2.4" (at 267.97 26.67 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 38043d45-0642-4a8c-9e96-149bc91df580) + ) + (label "MISO/MCK" (at 176.53 44.45 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 3a0bdeb9-88e2-4d7e-b753-ba0e04dbdee6) + ) + (label "Vin" (at 26.67 19.05 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 3c255401-f19c-4a64-9ba5-3d8791eef3a2) + ) + (label "TIM2.1/ADC0" (at 146.05 45.72 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 3efde92f-922a-46ba-b3ef-5f725a82298d) + ) + (label "TIM3.3" (at 236.22 26.67 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 424a0c8d-dc22-4b2e-a30a-4b488d9d1475) + ) + (label "RxD" (at 105.41 41.91 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 46af8717-1b31-49cf-a744-d19b6e122b8e) + ) + (label "RE" (at 92.71 38.1 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 46c64266-9b14-4f45-b89b-8f19c6b2c44b) + ) + (label "PTPB" (at 105.41 34.29 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 49538ebc-dba9-4831-95be-c20e12d1697a) + ) + (label "DE" (at 105.41 44.45 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 4b0fef2d-0dff-4f81-b0da-8bfb347277d6) + ) + (label "B_RS_485_P" (at 26.67 26.67 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 4bd71950-d67d-41ea-9760-bd66a24466e0) + ) + (label "MOSI/SD" (at 146.05 48.26 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 4ed5f798-46b6-4312-a472-6f967b99bc8a) + ) + (label "BOOT0" (at 40.64 86.36 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 568dfc88-bc67-4f39-ba81-b1d29017c8a9) + ) + (label "Vin" (at 26.67 62.23 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 5718d272-ad54-454b-998c-f2d7f496be8e) + ) + (label "RS485_LVL_UP" (at 148.59 184.15 180) + (effects (font (size 1.27 1.27)) (justify right bottom)) + (uuid 5ea81b5b-879a-4057-8f04-24a6212cf4b1) + ) + (label "TIM2.2/ADC1" (at 236.22 41.91 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 603727bb-a689-413d-bc1c-fedffdafaa66) + ) + (label "TIM2.2/ADC1" (at 267.97 36.83 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 666b3705-8b4e-4d34-9801-bf5765b90b7a) + ) + (label "D+" (at 147.32 24.13 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 667406f6-57eb-4686-93ae-1e31b1d254e2) + ) + (label "PTPA" (at 52.07 49.53 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 67b4a76e-98dc-41fa-af39-cb14b18a3634) + ) + (label "Vin" (at 146.05 58.42 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 6dce869b-3a98-4822-9397-5d39464ef991) + ) + (label "TX/SCL/TIM2.3" (at 176.53 33.02 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 7212da49-7fe1-458d-937e-f8bf9848b696) + ) + (label "TX/SCL/TIM2.3" (at 267.97 29.21 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 7272c4c7-5963-4847-aaae-62dbbb392672) + ) + (label "SCK/CK" (at 146.05 53.34 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 73747912-2322-4059-8fde-e942cc0e8f81) + ) + (label "RS485_LVL_UP" (at 71.12 54.61 180) + (effects (font (size 1.27 1.27)) (justify right bottom)) + (uuid 7510f9a1-204d-4942-82ad-38d485c56fc5) + ) + (label "RS485_LVL_DOWN" (at 148.59 181.61 180) + (effects (font (size 1.27 1.27)) (justify right bottom)) + (uuid 794210a5-a861-40a5-bfe3-371a4884e1f6) + ) + (label "RxD" (at 92.71 40.64 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 7a68d05a-9f60-4c88-a183-5796cb2314d2) + ) + (label "TIM3.4" (at 236.22 29.21 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 7e9a9432-bf9e-44de-b7e6-ff3380eadd90) + ) + (label "Vin" (at 62.23 76.2 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 8336999a-9dc2-47cc-8540-e57dda6d195f) + ) + (label "RX/SDA/TIM2.4" (at 176.53 35.56 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 8df06a96-3c71-470d-afe5-08f13308b1ef) + ) + (label "MISO/MCK" (at 146.05 50.8 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 92214b08-c155-4ae8-aaa1-133c028cefd0) + ) + (label "PTPA_PRO" (at 26.67 57.15 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid 96a176bb-a707-4568-92d5-18f2cf8a8f46) + ) + (label "TIM3.3" (at 267.97 34.29 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 97821151-327e-465f-b176-7ea790934238) + ) + (label "B_RS_485_P" (at 67.31 36.83 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid 9d54f4d2-4a1b-4399-810c-3fdfc8d1849f) + ) + (label "BOOT0" (at 39.37 119.38 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid a7c540bd-c2bf-419f-a983-2ba3920c9c12) + ) + (label "PTPB" (at 50.8 24.13 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid b82b641a-50ec-4642-86a9-a2055d8fb989) + ) + (label "A_RS_485_N" (at 26.67 54.61 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid b8940f9d-e108-42d7-9950-eda206c6ea99) + ) + (label "TxD" (at 105.41 39.37 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid bec6eb2f-0f04-4d86-94bf-6c313e19c98a) + ) + (label "A_RS_485_N" (at 67.31 40.64 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid c6f654f5-0a3a-4bdf-b29b-9593d689af3a) + ) + (label "D-" (at 147.32 21.59 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid ca6408e2-a6cb-4a82-9ddd-d50b2f8fb931) + ) + (label "PTPB_PRO" (at 26.67 31.75 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid cccb41f3-e1a8-477d-bc3a-52c9c81d1955) + ) + (label "D-" (at 176.53 27.94 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid e25e13fb-7ade-4aa3-b5d4-a0908258a141) + ) + (label "Vin" (at 26.67 44.45 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid e4b064a5-ae11-4f88-82e4-7824d6fb5611) + ) + (label "A_RS_485_N" (at 26.67 29.21 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid e8031318-d1a1-40cd-b31d-71dc7b6dec81) + ) + (label "PTPA" (at 105.41 46.99 180) + (effects (font (size 1.524 1.524)) (justify right bottom)) + (uuid ef531b1d-f19f-461e-b7f1-9200405bdd0a) + ) + (label "DE" (at 92.71 43.18 0) + (effects (font (size 1.524 1.524)) (justify left bottom)) + (uuid f222c77f-96de-4fd7-80f5-00a84fdf8d01) + ) + + (symbol (lib_id "Common_Lib:DF11-8DP-2DS(24)") (at 20.32 27.94 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059edff88) + (property "Reference" "J1" (at 19.05 16.51 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DF11-8DP-2DS(24)" (at 15.24 27.94 90) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:DF11-8DP-2DS(24)" (at 20.32 12.7 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "https://www.hirose.com/product/en/download_file/key_name/DF11%2D8DP%2D2DS%2824%29/category/Drawing%20(2D)/doc_file_id/39437/?file_category_id=6&item_id=05430535724&is_series=" (at 35.56 43.18 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "1688360" (at 0 55.88 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 55.88 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 95a5c33e-8963-4d1a-b90f-abadbdb8c4e9)) + (pin "2" (uuid b5a0eb5c-1ea1-455b-89fc-c763599d674c)) + (pin "3" (uuid 46afdd25-b530-4cf6-a0ae-b5879d1ad0a1)) + (pin "4" (uuid abf35f53-7a01-4cb6-963a-6d1691cf2c35)) + (pin "5" (uuid 76504dcc-e494-4acc-89f3-33c0835bc58f)) + (pin "6" (uuid 2e97e042-4ab8-4284-b2b9-038202484a58)) + (pin "7" (uuid af52f011-f535-43f4-88de-c2e549ae06f4)) + (pin "8" (uuid 474acd08-a16b-4bda-ad4d-30e9e080defd)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "J1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:DF11-8DP-2DS(24)") (at 20.32 53.34 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059edffdd) + (property "Reference" "J2" (at 19.05 41.91 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DF11-8DP-2DS(24)" (at 15.24 53.34 90) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:DF11-8DP-2DS(24)" (at 20.32 38.1 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "https://www.hirose.com/product/en/download_file/key_name/DF11%2D8DP%2D2DS%2824%29/category/Drawing%20(2D)/doc_file_id/39437/?file_category_id=6&item_id=05430535724&is_series=" (at 35.56 68.58 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "1688360" (at 0 106.68 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 106.68 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 0aebe219-142b-449d-8b62-bdf880493bb1)) + (pin "2" (uuid 80cd2f26-3099-4984-a584-969039683307)) + (pin "3" (uuid 5d8b5873-c09e-4210-9714-c8515014e448)) + (pin "4" (uuid bef88330-0c0e-4970-a039-a43758394232)) + (pin "5" (uuid fdab2141-81d8-4bf9-bc94-7262b499b4e1)) + (pin "6" (uuid d34f1b1a-8c0d-45ec-9b0c-6272d89f855f)) + (pin "7" (uuid e5a31b50-8348-4d97-9df9-d12521ffd025)) + (pin "8" (uuid f30bd056-4057-45b6-9e8d-0c5458305843)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "J2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:microUSB_B") (at 142.24 24.13 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee0192) + (property "Reference" "J3" (at 140.97 16.51 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "µUSB_B" (at 142.24 31.75 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:MicroUSB_B" (at 139.7 34.29 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 142.24 31.75 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "2751674" (at 143.6624 15.4686 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 48.26 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 118fbc20-0140-4ded-a63e-43a8d87aaea1)) + (pin "2" (uuid a6a6afc2-823c-4a9a-8dfa-3eadf4ff9dc9)) + (pin "3" (uuid 8d3bd42f-0699-4c1d-9d7b-14bc2b42f478)) + (pin "4" (uuid 288eea01-8627-431b-a92f-fb0b852e1a9e)) + (pin "5" (uuid dacff49a-8589-42e7-a293-fd8597d03ad0)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "J3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:STM32F072CBU") (at 55.88 129.54 0) (unit 3) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee01e5) + (property "Reference" "U2" (at 44.45 111.76 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "STM32F072CBU" (at 50.8 140.97 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:UFQFPN48" (at 59.69 151.13 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 60.96 134.62 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "2432095" (at 56.6674 117.3226 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 12.7 274.955 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "26" (uuid bd5caddf-e62f-4614-9196-2df7510d3380)) + (pin "27" (uuid e904ff0c-61bc-44ce-96e4-a310788f5725)) + (pin "28" (uuid a21cccd2-b46f-42df-ae4e-cc0184b6f781)) + (pin "29" (uuid 3d13d504-8c02-4946-af42-31650194f67c)) + (pin "30" (uuid 5564eff6-f0f9-4d40-823a-2e8dfa28ceb4)) + (pin "31" (uuid 4c9e2fd3-74e8-424a-9de8-37b772ec60da)) + (pin "10" (uuid fb5c585e-c792-48f5-b681-4a47691d3408)) + (pin "11" (uuid e6bc46f9-4f0e-445c-b9f4-c6b6ff42063e)) + (pin "18" (uuid 8d1c855e-67c1-4c8d-b6cf-ccf4e6034893)) + (pin "19" (uuid 3de3a0fb-0fc7-4624-8f33-06b6f74d5260)) + (pin "21" (uuid eb426f30-bdcc-4585-a613-102ee87e0e1d)) + (pin "22" (uuid 3ef7f824-1e2c-4f5e-8f10-e7044cda8679)) + (pin "32" (uuid 06d7da2e-fb1e-4a0a-ad76-bc77720493e5)) + (pin "33" (uuid 30934da3-ab79-4cf6-8b68-6f67a1d3e1cb)) + (pin "39" (uuid f4bfc256-932e-4813-8efa-d51df1c9e16c)) + (pin "40" (uuid 58074148-debd-4e1b-ab91-6fc8d4a76039)) + (pin "41" (uuid e7dcab3b-81cc-4dbc-8170-815887cd4d6a)) + (pin "0" (uuid 2fe71f1f-64a8-4a2b-902d-ade682afb7d9)) + (pin "1" (uuid 77d5d06e-3f3e-45e0-afa6-d2c681354164)) + (pin "23" (uuid ed14e367-b48d-4335-8977-a68185035252)) + (pin "24" (uuid 4abb3733-729b-4690-952b-3e5063875b13)) + (pin "3" (uuid 866967c8-b2d6-4b60-920c-77b08ab86b3d)) + (pin "34" (uuid 3c9c3af4-d635-40fa-b28f-d608c2c90f64)) + (pin "35" (uuid 9b58940f-f077-47f5-89ac-823c75c99eef)) + (pin "36" (uuid 5709812e-2033-4e42-b096-1edc40f42fa4)) + (pin "37" (uuid ab316c4e-58c7-4603-b590-901eec1bb00b)) + (pin "4" (uuid 7daffd5e-fa36-4370-bcf1-2c011d230560)) + (pin "44" (uuid 2339d252-3f09-4830-976c-7453215cdf76)) + (pin "47" (uuid a59ff64a-01cf-4193-b4d4-0579d88755c9)) + (pin "48" (uuid 871c8ff6-c39a-4388-b913-2f714ac60adc)) + (pin "7" (uuid b080f7c8-510d-4eb0-ba9a-6cb0af38b65c)) + (pin "8" (uuid b5f63094-16ba-402c-9c58-84df6854bd6f)) + (pin "9" (uuid bd5fdb57-638e-4d49-bb0b-85bb3006b523)) + (pin "12" (uuid 6b243214-e13e-4eb7-9a3a-ac06acade1eb)) + (pin "13" (uuid 01f2e8c2-6850-4fdd-a0a3-f8ea61629c51)) + (pin "14" (uuid befec32f-78ec-4f09-a786-efdf4909269c)) + (pin "15" (uuid 7a48b816-7011-42e8-a7b9-d0c3d11ad6dc)) + (pin "16" (uuid 55ea9c2e-af5f-4bae-9866-f35c1fb42d21)) + (pin "17" (uuid b77dd6de-0ce5-4455-8507-075fcba066a1)) + (pin "2" (uuid 6782e54d-e1e1-4fc0-a93c-7f1d44fef24c)) + (pin "20" (uuid 4046bf2f-cf57-4438-ac25-ea3cdbb7f281)) + (pin "25" (uuid 1484bfae-bff3-43f1-9b97-59435fd06106)) + (pin "38" (uuid ce49849e-6c0d-4be5-819b-2537a59f4fd3)) + (pin "42" (uuid 11493cfd-2dd5-4073-b9c8-9386e35f387e)) + (pin "43" (uuid 6257d9a5-e1dc-49b1-a10c-753f87598bab)) + (pin "45" (uuid fdf5034c-03e9-445d-b9ef-be72355e08a6)) + (pin "46" (uuid e4e18932-e972-4ec0-ac97-bfab9797e95e)) + (pin "5" (uuid 677b99c7-c39f-4588-b2fd-4dd36d32b387)) + (pin "6" (uuid 3146c2b8-acd8-4a63-833f-292daf333b8f)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U2") (unit 3) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:STM32F072CBU") (at 160.02 186.69 0) (unit 4) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee022f) + (property "Reference" "U2" (at 152.4 171.45 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "STM32F072CBU" (at 160.02 194.31 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:UFQFPN48" (at 163.83 208.28 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 165.1 191.77 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "2432095" (at 161.925 170.4086 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 373.38 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "26" (uuid aa51e0a4-7121-4691-a44f-5f6f7102df05)) + (pin "27" (uuid 1aed47f3-3f78-4c86-9733-f2612ad20836)) + (pin "28" (uuid 79a9b37e-33d7-460d-b3f5-d53fc5560289)) + (pin "29" (uuid 2dd5a870-881e-4223-8ddd-d1b9798c6e2d)) + (pin "30" (uuid a3723e0a-187b-4ec2-a1d1-965a4b26d56c)) + (pin "31" (uuid 56a364e6-2cdc-453e-a6ff-a56615ba6e19)) + (pin "10" (uuid 9a9be102-6311-47e9-ac03-494f58ab3e2b)) + (pin "11" (uuid b1d94b32-e6f7-4856-b1c5-3fad0c69a307)) + (pin "18" (uuid 72b2c160-659a-43ce-ad23-568aa6b24615)) + (pin "19" (uuid 79cf7222-c8b6-4893-ba48-7ce5ae344afe)) + (pin "21" (uuid 3e243f9a-fb9a-40d4-9548-df5a348dc2ca)) + (pin "22" (uuid 0bbce5cb-ce4d-4dbe-b590-ba5079a558fe)) + (pin "32" (uuid 4e69ea42-a7e0-4df0-9436-039b067120ab)) + (pin "33" (uuid e1e54ca6-113e-4498-8233-18c047192a65)) + (pin "39" (uuid bc92e1c7-1682-4707-b676-05659ea03187)) + (pin "40" (uuid 6aa7b852-d906-427a-857b-3a0008b6ad8a)) + (pin "41" (uuid 75cd8533-dae8-46e3-b351-595c219fa9f8)) + (pin "0" (uuid 22f06d3e-951b-4f65-9a76-ffc71cbb40de)) + (pin "1" (uuid 906387ce-b36b-4055-99b2-c5f1d36fb619)) + (pin "23" (uuid 9f65d4ac-b37a-47a7-9ea9-130dae9a2fc0)) + (pin "24" (uuid ee64ebe5-22ac-4d62-a021-fc4411f85014)) + (pin "3" (uuid 0ae85fe4-72e3-42fd-aa25-a3d5bfe6d63b)) + (pin "34" (uuid 1486b7d6-8adc-416b-b368-fc1dce4e197a)) + (pin "35" (uuid 3a7955b5-d4f5-4e20-b14b-2a3baa00b0c4)) + (pin "36" (uuid 765e6f50-6252-4c92-8039-c6f5deefd865)) + (pin "37" (uuid 6260847f-8683-434a-9bba-1e34360dcc1d)) + (pin "4" (uuid fdf23be2-063e-4531-bf66-85182c86d5c4)) + (pin "44" (uuid d50b70ab-4c4c-43bd-85a4-d357effb44fd)) + (pin "47" (uuid 708b2d34-5f78-4c99-ae12-f2392b7dfc99)) + (pin "48" (uuid a5f72a86-1261-4d3a-b1fe-1b8fecbfa371)) + (pin "7" (uuid 629cf660-cd68-414f-807a-b0e217f681ec)) + (pin "8" (uuid 4bd2b4d7-1c7d-4f51-8e28-98d4dc93e4c1)) + (pin "9" (uuid 88b206d2-d8e6-4bf5-b1da-a61d8e621731)) + (pin "12" (uuid 0cb5292a-4f78-452a-b4e2-7b5705a10a18)) + (pin "13" (uuid 43cadb41-8213-4dcc-a8b6-abfe77f12451)) + (pin "14" (uuid 57c6c96b-e982-42ac-8e24-03611900fc5e)) + (pin "15" (uuid 8d0d2631-fb37-478d-ab5c-845e3e0d08da)) + (pin "16" (uuid 60e879c9-9787-4b1c-9a80-d9806a0dd29e)) + (pin "17" (uuid 6ed4ec1c-5476-4c86-8829-5897b540f30d)) + (pin "2" (uuid 739b21e2-e1fa-45d1-b62b-8b0495d371d5)) + (pin "20" (uuid fdcf3405-3c74-405a-9775-3749a484d7c2)) + (pin "25" (uuid 44425e81-a31b-4d88-87ad-e0dc5dec15db)) + (pin "38" (uuid d32c6133-5b97-41c9-9d9d-30d72da4c3b7)) + (pin "42" (uuid fb368d27-8a20-496f-89e1-137e4aae5ece)) + (pin "43" (uuid df96e4f3-03b9-4d1f-8c58-335dac7a1aa2)) + (pin "45" (uuid 563d0ffd-5165-471e-8092-113f8cf23e8b)) + (pin "46" (uuid 660e5c4e-a7e0-478c-8e05-b0de108255ec)) + (pin "5" (uuid dbb4208a-5c65-431d-a0c2-b880a20be0f5)) + (pin "6" (uuid 138d62ab-a07c-44de-9fc0-93b19ff8455d)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U2") (unit 4) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:STM32F072CBU") (at 115.57 41.91 0) (mirror y) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee024c) + (property "Reference" "U2" (at 109.22 30.48 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "STM32F072CBU" (at 116.84 50.8 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:UFQFPN48" (at 111.76 63.5 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 110.49 46.99 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "2432095" (at 114.3 25.8826 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 231.14 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "26" (uuid 7e4f49ff-5535-4a28-aac4-34fbfe7886ca)) + (pin "27" (uuid f6a4a3a7-fe09-4397-8e6c-2174bb76050b)) + (pin "28" (uuid b45a3d1b-0653-4b5d-b2ef-0d8ee9170abe)) + (pin "29" (uuid 998fff57-fe05-426b-8602-5c2ec40c5471)) + (pin "30" (uuid a8ab0941-f213-4f5a-94d2-1746479f4761)) + (pin "31" (uuid 289c8679-205c-4536-b34d-0e07a6c126f9)) + (pin "10" (uuid 8880eb5d-cc69-4103-a73b-28daa8540687)) + (pin "11" (uuid a4808377-206d-4d64-acf5-4c05869bf52e)) + (pin "18" (uuid 4a684e34-1580-4ecc-bc94-324e832af481)) + (pin "19" (uuid d4a5621b-cd85-4e98-b94a-0fd631d2b141)) + (pin "21" (uuid 7ed863cd-c08a-4b91-82a2-dc21cdd19298)) + (pin "22" (uuid f53c6561-4624-43d2-956b-67799547a6ac)) + (pin "32" (uuid a8bd0acf-5d3f-41d6-9734-5f512e372000)) + (pin "33" (uuid 03a24e3a-619c-4df8-a9b0-b4a556d954db)) + (pin "39" (uuid e7a4733c-a698-436a-b4eb-3eeabe68cfc9)) + (pin "40" (uuid c39edb5c-fd0c-4ad9-91b8-b5faac4b6974)) + (pin "41" (uuid 75875f2a-d4d7-4082-8946-0d527f487835)) + (pin "0" (uuid 50a310b4-b416-4b57-bb93-3cf225e27e61)) + (pin "1" (uuid a9729a14-fd50-4746-919b-910c7ae9174e)) + (pin "23" (uuid 09945cbd-5ed8-437a-9b81-45ddedcdfbb7)) + (pin "24" (uuid 0ce3ff55-deae-473d-9a1e-f0d1d19cebed)) + (pin "3" (uuid b5aa9d3a-1061-4480-badc-e19d1a89426d)) + (pin "34" (uuid b559b129-990f-4fd3-9baf-c9c3faff674c)) + (pin "35" (uuid 8a7f746a-a525-4df8-834d-6689692a3359)) + (pin "36" (uuid 61fedb6a-39fd-4768-9a66-f69b23f4ba39)) + (pin "37" (uuid 31f0ce31-2050-4e73-87c5-af63fb0dd47f)) + (pin "4" (uuid 7bde07c7-5541-47c8-a6d8-37b1986884ef)) + (pin "44" (uuid 148aba39-9ba9-4940-a1ec-8de7d8c0a345)) + (pin "47" (uuid 96b5d7e4-589c-4108-94b3-c2ace9215fbb)) + (pin "48" (uuid 854d2813-d2f4-4c5d-ae24-5b0209b40a19)) + (pin "7" (uuid 215a857a-f534-46f8-b103-9c81917c65a0)) + (pin "8" (uuid d9cc872a-59fd-4ef2-b9e4-f605f48c734a)) + (pin "9" (uuid d40630e6-e08e-44b4-b7af-17bd950d0e4f)) + (pin "12" (uuid 44ee4a72-cb7e-4154-be18-5652aa42541c)) + (pin "13" (uuid fa10f7be-cf91-4436-8996-32c564905efe)) + (pin "14" (uuid 7aa2dbaf-3c0c-4e69-85bd-ba49a3279e44)) + (pin "15" (uuid 0682bb41-72cf-4836-839f-dce137b039e0)) + (pin "16" (uuid 7145b23e-4110-46ea-b93e-ce0a5de10af0)) + (pin "17" (uuid 6ab36f4b-e26e-42f4-b944-8414e3158c4b)) + (pin "2" (uuid 105f4eb8-9452-4e95-a313-ab7585cbb12c)) + (pin "20" (uuid ec697a7a-e1e2-4883-9676-1286b92eef45)) + (pin "25" (uuid 903f66f8-8b96-450c-ac57-7c89858be2d5)) + (pin "38" (uuid 6aefaab3-3f88-43fa-91cd-4e9785b064bb)) + (pin "42" (uuid bdaf15e7-9972-4763-8066-273f090e5e38)) + (pin "43" (uuid 49b1b499-44d1-435d-ae9c-47d716eec3e7)) + (pin "45" (uuid 42d567b4-b492-44b3-91bd-93114774bd71)) + (pin "46" (uuid e52a140f-c617-4c57-af0c-be258852bf97)) + (pin "5" (uuid 27317596-46cb-43ae-9cc8-4151c5efdbde)) + (pin "6" (uuid 33838a25-3185-4daf-9ea9-e272c1e5ecc2)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:STM32F072CBU") (at 208.28 38.1 0) (unit 2) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee031a) + (property "Reference" "U2" (at 180.34 22.86 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "STM32F072CBU" (at 186.69 55.88 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:UFQFPN48" (at 212.09 59.69 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 213.36 43.18 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "2432095" (at 206.375 28.4226 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "26" (uuid 1935ece6-cfe3-4fb7-a476-921859629b0b)) + (pin "27" (uuid d622f675-9035-4025-a25a-2fe5a0434d41)) + (pin "28" (uuid e15ccce2-c453-4ca4-aba2-9e1949fc3d3b)) + (pin "29" (uuid ad4fde14-f79f-4416-ba98-c989baff42a7)) + (pin "30" (uuid c8a462df-d649-4876-b54e-50a410d9a555)) + (pin "31" (uuid a1e9df5c-7b36-4d37-b41f-2e605f137290)) + (pin "10" (uuid 952f38ce-a34b-4f3e-a843-71e2e0068ec1)) + (pin "11" (uuid 27235147-b1e3-4139-b6bc-c5a20df940a3)) + (pin "18" (uuid 46cd3f89-d7bb-48e0-bc74-c349af3ca4e3)) + (pin "19" (uuid a3d4e7d7-0f0e-4c49-aab7-71a567c1a70f)) + (pin "21" (uuid f60f3fdf-bdf1-4cb8-ac36-62b58381cc53)) + (pin "22" (uuid ca05d826-4199-4c1a-af28-97bd2b9a9803)) + (pin "32" (uuid 32dd06bc-a2a2-48db-9760-00242a99ab63)) + (pin "33" (uuid 4c3074d3-9aa5-4397-9864-3668f7cd54bf)) + (pin "39" (uuid e6428593-0a61-4d2d-8a99-ac539568e868)) + (pin "40" (uuid 86c46f01-9ff7-4fb2-866f-56cd5e6812ba)) + (pin "41" (uuid c7d0d037-0d1d-4b26-b6af-7729721a7ec2)) + (pin "0" (uuid c432bc7f-f153-44fe-b432-6b1d3e13652f)) + (pin "1" (uuid aad4eb44-14a1-48c7-9040-1b98119f9e1c)) + (pin "23" (uuid abb95d9e-6e64-4d86-a015-071291ff44ee)) + (pin "24" (uuid d3123bd4-bcda-4d4b-a66f-62c15ea67fd2)) + (pin "3" (uuid 5a2bb0ba-0a30-49b1-8eb1-22b5642d0d7d)) + (pin "34" (uuid 2cae3249-636c-4709-965a-e204c66a50d2)) + (pin "35" (uuid e5934a20-460d-4aa7-80fd-7ad707c6ac2d)) + (pin "36" (uuid 629e30fe-42b4-4433-b60a-a5d61cdb9308)) + (pin "37" (uuid c8143954-7b75-42c7-a33a-505f90628748)) + (pin "4" (uuid a5360033-4dc7-4501-8560-1ed2c3b0efa8)) + (pin "44" (uuid cf9a6005-c1ea-4fd8-9817-5b01ebbc4b53)) + (pin "47" (uuid e149a976-610d-4bfc-82dd-8951be92836f)) + (pin "48" (uuid 86ea4362-379c-4564-a43e-c97c6dfedefe)) + (pin "7" (uuid 3d374348-c2cb-4b5d-9163-2adf08197b30)) + (pin "8" (uuid 3f95b50c-5e95-4f61-8f42-7b61004a7d5d)) + (pin "9" (uuid 0a72a39e-d556-46be-8c0b-457b41a90c89)) + (pin "12" (uuid 7f6e5355-c8e7-4aa4-9b38-94ceff2f5f62)) + (pin "13" (uuid ff887f86-df53-4e47-8527-addb9668ef57)) + (pin "14" (uuid b4f730f3-6954-4b51-843a-d8d758ce2595)) + (pin "15" (uuid 1af72820-e391-4b95-82ce-3ba6ec717b4c)) + (pin "16" (uuid eac9efdb-5e0f-46e3-acef-fbac95f6e079)) + (pin "17" (uuid 9e9cf1d6-0e22-4410-9f39-013d0b725642)) + (pin "2" (uuid a150d82f-79cd-4c81-a92d-b6f32c180c4f)) + (pin "20" (uuid 0a1968c0-8442-4450-8921-f3fd34b5e582)) + (pin "25" (uuid 43d5fc2a-c220-4d17-bd76-44823b840151)) + (pin "38" (uuid 4dd14de7-cb6c-4f15-9413-efc3d9e4eba5)) + (pin "42" (uuid 3b0b4c63-392d-4d21-b71f-56d984197fd2)) + (pin "43" (uuid 37ed5e8b-b74f-4a63-aa4c-c729c78f1ace)) + (pin "45" (uuid 39a21989-8d33-4de3-9f09-bd7d1fb8dce2)) + (pin "46" (uuid 84325c84-f433-4bfc-89d4-72ff90321c52)) + (pin "5" (uuid 1d2134cd-be67-414b-a960-d7cfa53b0f60)) + (pin "6" (uuid d0b809e9-95da-4382-8a06-266db46d75f3)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U2") (unit 2) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:Header6Contacts") (at 271.78 29.21 0) (mirror y) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee159b) + (property "Reference" "J5" (at 273.05 21.59 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "Header6Contacts" (at 275.59 30.48 90) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:826926-6" (at 278.13 27.94 90) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 274.32 27.94 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "1593415" (at 543.56 58.42 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 543.56 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 8973982e-4fc4-4d65-a5a1-591f1a57c8a5)) + (pin "2" (uuid f554c4ee-cb60-48ab-a2b1-c8e18606cc6e)) + (pin "3" (uuid f197a2fb-6a0b-4711-a865-084bc101b3f1)) + (pin "4" (uuid 0f7ec67e-70ff-4f81-acf5-f2307493f5aa)) + (pin "5" (uuid eb98bd2b-f043-4138-a631-fc7182457ac3)) + (pin "6" (uuid 01635111-6a55-4afd-8929-d28a355dcf19)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "J5") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:Header6Contacts") (at 142.24 50.8 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ee15c1) + (property "Reference" "J4" (at 140.97 43.18 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "Header6Contacts" (at 138.43 52.07 90) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:826926-6" (at 135.89 49.53 90) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "" (at 139.7 49.53 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "CodeCommande" "1593415" (at 0 101.6 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 101.6 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid e8192eb2-65b1-4633-af24-80c5ae018471)) + (pin "2" (uuid 474d8af5-e724-46eb-b2a7-c5aaa36b9164)) + (pin "3" (uuid e231bbb6-5fe7-46b9-b278-fa6681c04ed9)) + (pin "4" (uuid fdd7c2ad-4899-4e79-af98-f2d5629c82fc)) + (pin "5" (uuid e19468cd-5f0c-44d5-918d-334dd2ba0643)) + (pin "6" (uuid 5fa82611-e0f5-4c2d-a884-84847eafff0c)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "J4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 34.29 59.69 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef11f2) + (property "Reference" "#PWR07" (at 34.29 66.04 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 34.417 62.9412 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 34.29 59.69 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 34.29 59.69 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 40ee185c-979f-4a7c-b8a4-e03fbb6469de)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR07") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 34.29 46.99 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef1300) + (property "Reference" "#PWR06" (at 40.64 46.99 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 37.5412 46.863 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 34.29 46.99 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 34.29 46.99 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid b6dfba89-190f-448c-9248-f325c793aca4)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR06") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 34.29 34.29 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef1353) + (property "Reference" "#PWR05" (at 34.29 40.64 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 34.417 37.5412 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 34.29 34.29 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 34.29 34.29 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c807bc5b-1bab-4985-a197-e5018d74141d)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR05") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 34.29 21.59 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef13ca) + (property "Reference" "#PWR04" (at 40.64 21.59 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 37.5412 21.463 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 34.29 21.59 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 34.29 21.59 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 5d001ba2-3478-474d-9049-5dc7f2c0bcdd)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR04") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 77.47 53.34 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef14de) + (property "Reference" "#PWR011" (at 77.47 59.69 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 77.597 57.7342 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 77.47 53.34 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 77.47 53.34 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 63b24f87-ce8e-4dc4-82bf-10e47bc2435e)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR011") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 92.71 45.72 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef183a) + (property "Reference" "#PWR012" (at 88.9 45.72 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 97.1042 46.101 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 92.71 45.72 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 92.71 45.72 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 8407041c-be46-4857-9d60-2719e915a306)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR012") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 85.09 52.07 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef1b6c) + (property "Reference" "C8" (at 86.36 50.8 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100nF" (at 86.36 53.34 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 85.09 52.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 85.09 52.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1759380" (at 33.02 -27.94 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 33.02 -27.94 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 7bc99a8a-6e65-462f-b03e-2effb35f8f29)) + (pin "2" (uuid 363f3e01-6ae5-468e-a9cf-8d66485b9f3f)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C8") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 71.12 49.53 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef4ea8) + (property "Reference" "R4" (at 72.6186 48.3616 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "10K" (at 72.6186 50.673 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 71.12 49.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 71.12 49.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447096" (at 5.08 99.06 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 5.08 99.06 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid dbc6dd81-a839-4164-92cd-ded7d2181582)) + (pin "2" (uuid b4b86f95-4677-49b6-a682-e52b1552f96e)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 71.12 25.4 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059ef52f6) + (property "Reference" "R3" (at 72.6186 24.2316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "10K" (at 72.6186 26.543 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 71.12 25.4 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 71.12 25.4 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447096" (at 5.08 50.8 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 5.08 50.8 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ebda78a6-13b6-4724-a240-e2eece9a3ac8)) + (pin "2" (uuid 0630eda2-668f-4771-bdc8-0d0a581da1e3)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 267.97 24.13 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059efca52) + (property "Reference" "#PWR023" (at 261.62 24.13 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 264.7188 24.257 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 267.97 24.13 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 267.97 24.13 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c5cf4edd-40e3-468e-9d3d-83fc95adf9e1)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR023") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 146.05 55.88 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059efd5d2) + (property "Reference" "#PWR016" (at 142.24 55.88 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 150.4442 56.261 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 146.05 55.88 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 146.05 55.88 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid b4500843-99f9-46c4-b670-9fe6bd2bb383)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR016") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 149.86 29.21 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0192d) + (property "Reference" "#PWR019" (at 156.21 29.21 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 153.1112 29.083 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 149.86 29.21 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 149.86 29.21 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 3290b397-3e54-4eb5-af26-734eeed3ca80)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR019") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 78.74 139.7 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f08d8f) + (property "Reference" "#PWR015" (at 78.74 146.05 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 78.867 142.9512 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 78.74 139.7 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 78.74 139.7 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid e30b355d-d9d6-46c1-bfe6-c5ffa285953c)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR015") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 77.47 110.49 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f092c8) + (property "Reference" "#PWR014" (at 77.47 114.3 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 77.851 106.0958 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 77.47 110.49 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 77.47 110.49 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 78f4fb4a-f2a4-4e0c-8b07-9cc509692ed0)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR014") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 31.75 175.26 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f09f54) + (property "Reference" "#PWR02" (at 31.75 179.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 32.131 170.8658 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 31.75 175.26 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 31.75 175.26 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 8e811c10-a28e-4635-8ece-4b87e31924f1)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR02") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 31.75 187.96 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f09f95) + (property "Reference" "#PWR03" (at 31.75 194.31 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 31.877 191.2112 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 31.75 187.96 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 31.75 187.96 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 739fc5f1-6ce5-4692-bd62-d70fc82b3146)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR03") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 31.75 181.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0a559) + (property "Reference" "C1" (at 31.75 179.07 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100nF" (at 33.02 184.15 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 31.75 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 31.75 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1759380" (at 31.75 181.61 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 363.22 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ed893f33-f2b2-40bf-917b-e0c06f45eec3)) + (pin "2" (uuid cf43895f-5a18-4002-86c7-b2c823f1fed3)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 60.96 181.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0aa11) + (property "Reference" "C4" (at 60.96 179.07 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1µF" (at 62.23 184.15 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 60.96 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 60.96 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 363.22 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2346885" (at 60.96 181.61 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Alternative" "2525024" (at 60.96 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 1bf396aa-329d-42a2-987b-03bd30f4c804)) + (pin "2" (uuid 290df794-bff9-4102-aef8-26225353f385)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 41.91 181.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0b866) + (property "Reference" "C2" (at 41.91 179.07 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100nF" (at 43.18 184.15 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 41.91 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 41.91 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1759380" (at 41.91 181.61 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 363.22 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 4778814e-2eaf-41f3-8510-0147dcd8cbaf)) + (pin "2" (uuid 279c11d6-365d-4a37-8351-fe7d6bc8b2a4)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 52.07 181.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0b8ba) + (property "Reference" "C3" (at 52.07 179.07 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100nF" (at 53.34 184.15 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 52.07 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 52.07 181.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1759380" (at 52.07 181.61 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 363.22 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 2c0b9656-a561-499c-b49b-210410a6ba36)) + (pin "2" (uuid 4e07d53c-e046-4e33-8e17-2b5a9cbe5c74)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+5VP") (at 149.86 19.05 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f0fc07) + (property "Reference" "#PWR018" (at 146.05 19.05 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+5VP" (at 153.1112 19.431 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 149.86 19.05 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 149.86 19.05 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 36b0b000-46da-4cb4-86b4-80eb9cdc1ddc)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR018") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+5VP") (at 21.59 78.74 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f1407f) + (property "Reference" "#PWR01" (at 25.4 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+5VP" (at 18.3388 78.359 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 21.59 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 21.59 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 920bad1f-e19b-4c33-b203-3baa1a71132a)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR01") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:D_Small") (at 59.69 76.2 180) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f162f9) + (property "Reference" "D1" (at 59.69 78.74 0) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "NSR0340HT1G" (at 59.69 73.66 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "Common_Footprint:D_SOD-323F" (at 59.69 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 59.69 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2317404" (at 59.69 76.2 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 119.38 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 93f4a3b1-8dd1-4c84-bfc9-7c567be85548)) + (pin "2" (uuid 93aa00c1-bb13-4ca9-9498-f123df91dca8)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "D1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:Q_NPN_BEC") (at 34.29 78.74 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f1661e) + (property "Reference" "Q1" (at 39.1414 77.5716 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "BC846BWT1G" (at 39.1414 79.883 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "TO_SOT_Packages_SMD:SOT-323_SC-70" (at 39.37 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 34.29 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1653606" (at 34.29 78.74 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 157.48 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 7d36ad6c-696a-472b-af7f-98059e9feac0)) + (pin "2" (uuid 8f5c43c0-ca8f-4b00-8aa4-1a997efcb851)) + (pin "3" (uuid 807ef8da-4f8e-4b82-8461-4c532fa41632)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "Q1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 36.83 88.9 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f171e2) + (property "Reference" "R2" (at 38.3286 87.7316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "510" (at 38.3286 90.043 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 36.83 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 36.83 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447194" (at -29.21 138.43 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 177.8 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 18351871-7613-4c6f-a250-3a1f36daa334)) + (pin "2" (uuid 7b69387a-f199-4ed2-880d-b27702c70a32)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 36.83 91.44 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f17863) + (property "Reference" "#PWR09" (at 36.83 97.79 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 36.957 94.6912 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 36.83 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 36.83 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 1d936c2f-dd10-4f30-8373-7370c2177734)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR09") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 36.83 73.66 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f184a8) + (property "Reference" "#PWR08" (at 36.83 77.47 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 37.211 69.2658 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 36.83 73.66 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 36.83 73.66 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid b15e3ed8-6de1-4055-9fee-0ac33167275e)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR08") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+5VP") (at 57.15 76.2 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f19387) + (property "Reference" "#PWR010" (at 60.96 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+5VP" (at 53.8988 75.819 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 57.15 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 57.15 76.2 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ad36509c-97cc-4fee-9d34-b16127e59a4d)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR010") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 26.67 78.74 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-000059f19ffc) + (property "Reference" "R1" (at 25.4 76.2 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "10K" (at 25.4 81.28 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 26.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 26.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447096" (at -22.86 12.7 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at -52.07 52.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c8423c2b-5422-460d-86ca-e84764ae4b26)) + (pin "2" (uuid 24adccb1-4841-40a2-80d6-713373a29727)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 77.47 83.82 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8caabb) + (property "Reference" "C7" (at 79.8068 82.6516 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1µF" (at 79.8068 84.963 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 77.47 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 77.47 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 77.47 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2346885" (at 77.47 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Alternative" "2525024" (at 77.47 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 4680b823-95dd-4a27-bd42-ddcd18498d1c)) + (pin "2" (uuid 7244be49-668f-4bb8-b2fc-53203bc7277c)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C7") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 85.09 78.74 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cad69) + (property "Reference" "R5" (at 86.5886 77.5716 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "105K" (at 86.5886 79.883 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 85.09 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 85.09 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 85.09 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2689251" (at 85.09 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid a5928c01-6bf2-4c3f-a892-7b96806871cf)) + (pin "2" (uuid d0c51687-9fe0-41ef-889f-2bceb6565822)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R5") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 85.09 88.9 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cb0ec) + (property "Reference" "R6" (at 86.5886 87.7316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "68.1K" (at 86.5886 90.043 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 85.09 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 85.09 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 85.09 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2073208" (at 85.09 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c504abfa-a736-4010-81f8-34a3822f159e)) + (pin "2" (uuid 099bc22a-fd67-4d4f-a88f-6b9571068d94)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R6") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 93.98 86.36 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cb6fa) + (property "Reference" "C9" (at 96.3168 85.1916 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "27pF" (at 96.3168 87.503 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 93.98 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 93.98 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 93.98 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2392128" (at 93.98 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 4190dbd8-e3e5-4014-b1ba-543df1e6ab47)) + (pin "2" (uuid 77ae7a79-6800-40b5-a0bf-4b73325e5df3)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C9") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 102.87 83.82 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cbd9b) + (property "Reference" "R7" (at 104.3686 82.6516 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "150K" (at 104.3686 84.963 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 102.87 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 102.87 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 102.87 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1174168" (at 102.87 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c35db2f8-cae7-4555-9d89-3e35baf344b8)) + (pin "2" (uuid 75c5a2cb-0a17-4b9d-a342-c66fc1c74d76)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R7") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 102.87 88.9 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cc30a) + (property "Reference" "C10" (at 105.2068 87.7316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "470pF" (at 105.2068 90.043 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0603" (at 102.87 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 102.87 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 102.87 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2392167" (at 102.87 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 21b154c5-102e-4b8d-9543-5dda0e298ae8)) + (pin "2" (uuid 3138dd96-7a5e-46d2-b3e3-60422ba1ac68)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C10") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:TPS5401") (at 137.16 81.28 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cf234) + (property "Reference" "U3" (at 129.54 73.66 0) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "TPS5401" (at 142.24 73.66 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "Common_Footprint:S-PDSO-G10" (at 137.16 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 135.89 82.55 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 132.08 71.12 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2323548" (at 134.62 68.58 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid d64a86a2-31a2-4c6f-b0ab-7c46df34b351)) + (pin "10" (uuid 6beef88d-de96-4b00-9168-ea0e46de0327)) + (pin "11" (uuid 3a5abf9b-fc18-4961-bd80-f403bd72b3d4)) + (pin "2" (uuid b9d855b2-bcd7-43a3-9c00-c787f821a36c)) + (pin "3" (uuid a9e09ad9-2151-41d6-8788-4976f5f5e175)) + (pin "4" (uuid 4e4bbe79-170c-4f98-9d34-1e471b27a4fb)) + (pin "5" (uuid a7d196d7-f42c-4f17-8a4a-9cc136543850)) + (pin "6" (uuid 7866cf1d-93db-4c53-81e5-08fde91a3c4e)) + (pin "7" (uuid dbcfed76-73ec-4dbd-884f-69523ba9b6b5)) + (pin "8" (uuid 2887c4a4-d004-4322-940f-b0cefddb4050)) + (pin "9" (uuid 88f25654-50e4-4865-a905-9997a2af31e5)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 111.76 86.36 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cf5e6) + (property "Reference" "C11" (at 114.0968 85.1916 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "6.8nF" (at 114.0968 87.503 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0603" (at 111.76 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 111.76 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 111.76 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2521904" (at 111.76 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid dc9c13c9-0a66-4b08-94e6-cba444c7423f)) + (pin "2" (uuid e2ed962f-b595-4efd-9abc-f5fa27652a89)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C11") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 121.92 88.9 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cfa95) + (property "Reference" "R8" (at 123.4186 87.7316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "174K" (at 123.4186 90.043 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 121.92 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 121.92 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 121.92 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2689279" (at 121.92 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 84f5dfac-7f91-48d9-b96a-155a7e3d6ae9)) + (pin "2" (uuid 8c68d8ff-3511-453d-bf1d-896eb353dc78)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R8") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 153.67 78.74 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8cff32) + (property "Reference" "C12" (at 153.67 72.9234 90) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "100nF" (at 153.67 75.2348 90) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 153.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 153.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 153.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2666410" (at 153.67 78.74 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ad6101dd-72c6-45bd-ad47-041e6859e222)) + (pin "2" (uuid 691c754e-6575-4f58-8271-1cc7a54ec91e)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C12") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:D_Schottky_Small") (at 156.21 83.82 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d101b) + (property "Reference" "D2" (at 157.9372 82.6516 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "SS14FL" (at 157.9372 84.963 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:SOD-123F" (at 156.21 83.82 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 156.21 83.82 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 156.21 83.82 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2822564" (at 156.21 83.82 90) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 50d6d9ec-ca94-44b4-9019-e0d0e8d869bf)) + (pin "2" (uuid 933cb699-dc41-40b2-9dbf-5ca8a11535ff)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "D2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:L_Small") (at 162.56 81.28 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d16da) + (property "Reference" "L1" (at 162.56 76.581 90) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "4,7µH" (at 162.56 78.8924 90) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "Common_Footprint:L_0806" (at 162.56 81.28 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 162.56 81.28 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 162.56 81.28 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2520674" (at 162.56 81.28 90) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid be57cf36-d38c-4319-8537-05af98ef82cc)) + (pin "2" (uuid 72372ddb-f9c8-4b0d-a660-cdf27ed0766d)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "L1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 167.64 83.82 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d1dfd) + (property "Reference" "R9" (at 169.1386 82.6516 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "31.6K" (at 169.1386 84.963 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 167.64 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 167.64 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 167.64 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2689315" (at 167.64 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 1dbf10e3-ae0d-41a8-9eb9-063bc99a4121)) + (pin "2" (uuid 5904ac45-c726-4f89-af35-db3e2a95d0d7)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R9") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 69.85 83.82 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d21b0) + (property "Reference" "C6" (at 72.1868 82.6516 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1µF" (at 72.1868 84.963 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 69.85 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 69.85 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 69.85 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2346885" (at 69.85 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Alternative" "2525024" (at 69.85 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 751192d3-3e33-4d03-ac0e-f007e7020921)) + (pin "2" (uuid 7a6209a5-d561-4f29-a2fe-20f03082cdbf)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C6") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 62.23 83.82 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d222a) + (property "Reference" "C5" (at 64.5668 82.6516 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1µF" (at 64.5668 84.963 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:C_0402_NoSilk" (at 62.23 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 62.23 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 62.23 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2346885" (at 62.23 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Alternative" "2525024" (at 62.23 83.82 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid d0782f30-0422-4e24-b839-7b291ade1819)) + (pin "2" (uuid 7c4b6981-b0a6-4de3-8c1c-05b9e595dc66)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C5") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 167.64 88.9 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d2812) + (property "Reference" "R10" (at 169.1386 87.7316 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "10K" (at 169.1386 90.043 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 167.64 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 167.64 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 167.64 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447096" (at 167.64 88.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 099a5a5f-8edb-4846-a46e-2a5b1f634e0f)) + (pin "2" (uuid 4765c3e3-b4bc-4caf-b8b4-242f4f4d5770)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R10") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 176.53 86.36 180) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d2a71) + (property "Reference" "C13" (at 178.8668 85.1916 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Value" "47µF" (at 178.8668 87.503 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "Common_Footprint:C_1206" (at 176.53 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 176.53 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 176.53 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1735534" (at 176.53 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid bcde2510-def0-4269-84de-d084bd2e02cb)) + (pin "2" (uuid d17b152e-e31f-4034-bec2-cc93c6e90b4b)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C13") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C_Small") (at 185.42 86.36 180) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8d2e23) + (property "Reference" "C14" (at 187.7568 85.1916 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Value" "47µF" (at 187.7568 87.503 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "Common_Footprint:C_1206" (at 185.42 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 185.42 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 185.42 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1735534" (at 185.42 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c3c0a286-f7d2-4837-9692-af7f6576c973)) + (pin "2" (uuid 934dee99-079d-413e-8e99-0f4ecafc49c8)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "C14") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 111.76 91.44 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8dc077) + (property "Reference" "#PWR013" (at 111.76 97.79 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 111.887 94.6912 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 111.76 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 111.76 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 1ac81300-f326-4c7d-896a-a47abe738f10)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR013") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:ST3485ECDR") (at 85.09 40.64 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8debd8) + (property "Reference" "U1" (at 85.09 29.5402 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "ST3485ECDR" (at 85.09 32.2326 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "Common_Footprint:SO8" (at 90.17 55.88 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Datasheet" "Documentations/TransceiverRS485/isl83078e.pdf" (at 81.28 34.29 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 83.82 30.48 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "1842628" (at 86.36 27.94 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 087ac5cf-0c63-4434-ab03-09fb3a6d2585)) + (pin "2" (uuid 0c224c25-2991-4442-a23c-2cbd544ae128)) + (pin "3" (uuid 8cb50571-76b6-485f-838d-6d9456481870)) + (pin "4" (uuid 09db484c-c517-43a0-b3bd-42dd9825b2d0)) + (pin "5" (uuid 1ac11a4a-242c-45d5-a78d-261caad83a2c)) + (pin "6" (uuid 6ae964f8-e39f-4c2e-8519-2e94972bae84)) + (pin "7" (uuid ba2169d8-2c7d-48fd-8808-c6f50c7c0dfa)) + (pin "8" (uuid 2183ce46-896e-453e-8bc8-0cdcbd4f6e27)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "U1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 124.46 171.45 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8e63c5) + (property "Reference" "R11" (at 125.9586 170.2816 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "68K" (at 125.9586 172.593 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 124.46 171.45 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 124.46 171.45 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 342.9 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447207" (at 58.42 220.98 0) + (effects (font (size 1.524 1.524)) hide) + ) + (pin "1" (uuid 0359674c-1340-4167-80d1-7fe6e75bc016)) + (pin "2" (uuid 13d989d7-fa7e-4e34-b461-3eaed44076f5)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R11") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 124.46 176.53 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8e662d) + (property "Reference" "R12" (at 125.9586 175.3616 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "10K" (at 125.9586 177.673 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 124.46 176.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 124.46 176.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447096" (at 58.42 226.06 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 0 353.06 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 0760598e-fe97-43f8-8010-03f8c418132d)) + (pin "2" (uuid f8e66b3f-21e7-4e4e-96c6-e1fd5b7e0f34)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R12") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 124.46 179.07 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8e6933) + (property "Reference" "#PWR024" (at 124.46 185.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 124.587 182.3212 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 124.46 179.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 124.46 179.07 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 725f0574-4db5-4fde-bd11-c1a3cd2d9377)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR024") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 156.21 86.36 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8f9b5b) + (property "Reference" "#PWR020" (at 156.21 92.71 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 157.48 90.17 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 156.21 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 156.21 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid f745ba32-1b47-4cc0-a625-1b6837e81776)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR020") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 148.59 92.71 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a8fb88f) + (property "Reference" "#PWR017" (at 148.59 99.06 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 149.86 96.52 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 148.59 92.71 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 148.59 92.71 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid e7599290-1cf3-4817-80fd-b6c4e0f830a0)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR017") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:GND") (at 176.53 91.44 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a912089) + (property "Reference" "#PWR021" (at 176.53 97.79 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (at 177.8 95.25 0) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "" (at 176.53 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 176.53 91.44 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 64ab4e05-09ed-40a1-8000-e448af99119c)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR021") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 185.42 81.28 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a912550) + (property "Reference" "#PWR022" (at 185.42 85.09 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 185.801 76.8858 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 185.42 81.28 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 185.42 81.28 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 239e6cda-1f89-4ee3-b700-eaee724e77cd)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR022") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:LED_Small") (at 99.06 179.07 90) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a9f208a) + (property "Reference" "D3" (at 100.7872 177.9016 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Value" "SMLE13BC8TT86" (at 100.7872 180.213 90) + (effects (font (size 1.27 1.27)) (justify right)) + ) + (property "Footprint" "Common_Footprint:LED_0603" (at 99.06 179.07 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 99.06 179.07 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 99.06 179.07 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2762564" (at 99.06 179.07 90) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 13eee0d7-a782-4498-a14c-5093b8c3ebea)) + (pin "2" (uuid 8897eeaa-6475-45c7-97c5-c15f9d96248a)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "D3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "power:+3.3V") (at 99.06 176.53 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a9f2ac6) + (property "Reference" "#PWR0101" (at 99.06 180.34 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "+3.3V" (at 99.441 172.1358 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at 99.06 176.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 99.06 176.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid daf02bc8-889b-4128-b700-7b7f58cf8903)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "#PWR0101") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 99.06 184.15 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005a9f2f8a) + (property "Reference" "R13" (at 100.5586 182.9816 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "82" (at 100.5586 185.293 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 99.06 184.15 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (at 99.06 184.15 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at -25.4 360.68 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447220" (at 33.02 233.68 0) + (effects (font (size 1.524 1.524)) hide) + ) + (pin "1" (uuid c8003374-7a63-4608-bbeb-4b7043164253)) + (pin "2" (uuid 4219d99d-b443-47ba-9193-c4f842f75a3a)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R13") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:D_Zener") (at 53.34 27.94 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005c64666c) + (property "Reference" "D4" (at 55.3466 26.7716 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "D_Zener" (at 55.3466 29.083 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:D_SOD-323F" (at 53.34 25.4 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "http://www.farnell.com/datasheets/1508366.pdf?_ga=2.177624099.709276861.1551429612-1109058091.1515162769&_gac=1.216712866.1551429612.EAIaIQobChMI4qC11cXg4AIVBpzVCh0oJQymEAAYASAAEgIbufD_BwE" (at 55.88 27.94 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 58.42 30.48 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2069511" (at 60.96 33.02 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 00a987f7-cc0d-4b1f-950a-02b14fb484d4)) + (pin "2" (uuid d19d1e8c-5bc7-4d0c-9210-c34bebc9203c)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "D4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Common_Lib:D_Zener") (at 54.61 53.34 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005c647283) + (property "Reference" "D5" (at 56.6166 52.1716 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "D_Zener" (at 55.88 57.15 90) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:D_SOD-323F" (at 54.61 50.8 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "http://www.farnell.com/datasheets/1508366.pdf?_ga=2.177624099.709276861.1551429612-1109058091.1515162769&_gac=1.216712866.1551429612.EAIaIQobChMI4qC11cXg4AIVBpzVCh0oJQymEAAYASAAEgIbufD_BwE" (at 57.15 53.34 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Fournisseur" "Farnell" (at 59.69 55.88 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2069511" (at 62.23 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ad827e17-ac0c-4258-a89f-b6d4faf6fd13)) + (pin "2" (uuid c26bdbda-bed8-4e00-b2a2-854006926200)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "D5") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 48.26 24.13 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005c6858f0) + (property "Reference" "R14" (at 49.4284 25.6286 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100" (at 47.117 25.6286 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 48.26 24.13 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "http://www.farnell.com/datasheets/2563624.pdf?_ga=2.51081953.913354071.1549995772-506460182.1534760965" (at 48.26 24.13 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447095" (at 22.86 -41.91 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 22.86 -41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid ab428674-ce6e-44f0-827f-d49bc4088c82)) + (pin "2" (uuid e4d42ca3-012f-4518-beca-b22f46d57917)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R14") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R_Small") (at 48.26 49.53 270) (unit 1) + (in_bom yes) (on_board yes) (dnp no) + (uuid 00000000-0000-0000-0000-00005c685df9) + (property "Reference" "R15" (at 49.4284 51.0286 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "100" (at 47.117 51.0286 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Common_Footprint:R_0402_NoSilk" (at 48.26 49.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "http://www.farnell.com/datasheets/2563624.pdf?_ga=2.51081953.913354071.1549995772-506460182.1534760965" (at 48.26 49.53 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "CodeCommande" "2447095" (at 22.86 -16.51 0) + (effects (font (size 1.524 1.524)) hide) + ) + (property "Fournisseur" "Farnell" (at 22.86 -16.51 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid db7815ef-5292-4d25-971b-11ea678153d5)) + (pin "2" (uuid 220fddd9-663b-476d-9da6-fb3330518d8b)) + (instances + (project "l0" + (path "/8f61307f-8c40-408d-a3e3-2b693c43d4fa" + (reference "R15") (unit 1) + ) + ) + ) + ) + + (sheet_instances + (path "/" (page "1")) + ) +) From f4d042143110c8e811f6a7f20400c9851d4673d7 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 15:58:55 +0200 Subject: [PATCH 173/198] update Streaming to manage bigger buffer --- engine/core/inc/streaming.h | 14 ++++----- engine/core/src/streaming.c | 59 +++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/engine/core/inc/streaming.h b/engine/core/inc/streaming.h index 4c3e6eea8..74715a45b 100644 --- a/engine/core/inc/streaming.h +++ b/engine/core/inc/streaming.h @@ -33,13 +33,13 @@ typedef struct /******************************************************************************* * Function ******************************************************************************/ -streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size); +streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint32_t ring_buffer_size, uint8_t data_size); void Streaming_ResetChannel(streaming_channel_t *stream); -uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size); -uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size); -uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream); -uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream); -uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size); -uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size); +uint32_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint32_t size); +uint32_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint32_t size); +uint32_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream); +uint32_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream); +uint32_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint32_t size); +uint32_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint32_t size); #endif /* LUOS_H */ diff --git a/engine/core/src/streaming.c b/engine/core/src/streaming.c index 427034be7..6ccb6ff53 100644 --- a/engine/core/src/streaming.c +++ b/engine/core/src/streaming.c @@ -20,7 +20,7 @@ * @param data_size : Values size. * @return Streaming channel ******************************************************************************/ -streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint16_t ring_buffer_size, uint8_t data_size) +streaming_channel_t Streaming_CreateChannel(const void *ring_buffer, uint32_t ring_buffer_size, uint8_t data_size) { streaming_channel_t stream; LUOS_ASSERT((ring_buffer != NULL) && (ring_buffer_size > 0) && (data_size > 0)); @@ -54,21 +54,21 @@ void Streaming_ResetChannel(streaming_channel_t *stream) * @param size : The number of data to copy * @return Number of samples to put in buffer ******************************************************************************/ -uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint16_t size) +uint32_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint32_t size) { LUOS_ASSERT((stream != NULL) && (data != NULL) && (size > 0)); // check if we exceed ring buffer capacity - LUOS_ASSERT((Streaming_GetAvailableSampleNB(stream) + size) <= (stream->end_ring_buffer - stream->ring_buffer)); - if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) + LUOS_ASSERT((Streaming_GetAvailableSampleNB(stream) + size) <= ((uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->ring_buffer)); + if (((size * stream->data_size) + (uintptr_t)stream->data_ptr) >= (uintptr_t)stream->end_ring_buffer) { // our data exceeds ring buffer end, cut it and copy. - uint16_t chunk1 = stream->end_ring_buffer - stream->data_ptr; - uint16_t chunk2 = (size * stream->data_size) - chunk1; + uint32_t chunk1 = (uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->data_ptr; + uint32_t chunk2 = (size * stream->data_size) - chunk1; // Everything good copy datas. memcpy(stream->data_ptr, data, chunk1); memcpy(stream->ring_buffer, (char *)data + chunk1, chunk2); // Set the new data pointer - stream->data_ptr = stream->ring_buffer + chunk2; + stream->data_ptr = (void *)((uintptr_t)stream->ring_buffer + chunk2); } else { @@ -87,10 +87,10 @@ uint16_t Streaming_PutSample(streaming_channel_t *stream, const void *data, uint * @param size : data size * @return Number of dample available in buffer ******************************************************************************/ -uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t size) +uint32_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint32_t size) { LUOS_ASSERT((stream != NULL) && (data != NULL) && (size > 0)); - uint16_t nb_available_samples = Streaming_GetAvailableSampleNB(stream); + uint32_t nb_available_samples = Streaming_GetAvailableSampleNB(stream); if (nb_available_samples >= size) { // check if we need to loop in ring buffer @@ -126,17 +126,17 @@ uint16_t Streaming_GetSample(streaming_channel_t *stream, void *data, uint16_t s * @param stream : Streaming channel pointer * @return Number of availabled samples ******************************************************************************/ -uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) +uint32_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) { LUOS_ASSERT(stream != NULL); - int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; + int32_t nb_available_sample = ((int32_t)((uintptr_t)stream->data_ptr - (uintptr_t)stream->sample_ptr)) / stream->data_size; if (nb_available_sample < 0) { // The buffer have looped - nb_available_sample = ((stream->end_ring_buffer - stream->sample_ptr) + (stream->data_ptr - stream->ring_buffer)) / stream->data_size; + nb_available_sample = (((uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->sample_ptr) + ((uintptr_t)stream->data_ptr - (uintptr_t)stream->ring_buffer)) / stream->data_size; } LUOS_ASSERT(nb_available_sample >= 0); - return (uint16_t)nb_available_sample; + return (uint32_t)nb_available_sample; } /****************************************************************************** @@ -144,17 +144,17 @@ uint16_t Streaming_GetAvailableSampleNB(streaming_channel_t *stream) * @param stream : Streaming channel pointer * @return Number of available samples ******************************************************************************/ -uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) +uint32_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *stream) { LUOS_ASSERT(stream != NULL); - int32_t nb_available_sample = (stream->data_ptr - stream->sample_ptr) / stream->data_size; + int32_t nb_available_sample = ((uintptr_t)stream->data_ptr - (uintptr_t)stream->sample_ptr) / stream->data_size; if (nb_available_sample < 0) { // The buffer have looped - nb_available_sample = (stream->end_ring_buffer - stream->sample_ptr) / stream->data_size; + nb_available_sample = ((uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->sample_ptr) / stream->data_size; } LUOS_ASSERT(nb_available_sample >= 0); - return (uint16_t)nb_available_sample; + return (uint32_t)nb_available_sample; } /****************************************************************************** @@ -163,15 +163,16 @@ uint16_t Streaming_GetAvailableSampleNBUntilEndBuffer(streaming_channel_t *strea * @param size : The number of data to copy * @return Number of samples to add to channel ******************************************************************************/ -uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t size) +uint32_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint32_t size) { LUOS_ASSERT(stream != NULL); - LUOS_ASSERT((uint32_t)(Streaming_GetAvailableSampleNB(stream) + size) < (uint32_t)(stream->end_ring_buffer - stream->ring_buffer)); + uint32_t total_sample_capacity = ((uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->ring_buffer) / stream->data_size; + LUOS_ASSERT((int32_t)(total_sample_capacity - Streaming_GetAvailableSampleNB(stream) - size) > 0); if (((size * stream->data_size) + stream->data_ptr) >= stream->end_ring_buffer) { - uint16_t chunk1 = stream->end_ring_buffer - stream->data_ptr; - uint16_t chunk2 = (size * stream->data_size) - chunk1; - stream->data_ptr = stream->ring_buffer + chunk2; + uint32_t chunk1 = (uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->data_ptr; + uint32_t chunk2 = (size * stream->data_size) - chunk1; + stream->data_ptr = (void *)((uintptr_t)stream->ring_buffer + chunk2); } else { @@ -186,7 +187,7 @@ uint16_t Streaming_AddAvailableSampleNB(streaming_channel_t *stream, uint16_t si * @param size : The number of data to remove * @return Number of availabled samples ******************************************************************************/ -uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t size) +uint32_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint32_t size) { LUOS_ASSERT(stream != NULL); LUOS_ASSERT(Streaming_GetAvailableSampleNB(stream) >= size); @@ -194,13 +195,13 @@ uint16_t Streaming_RmvAvailableSampleNB(streaming_channel_t *stream, uint16_t si if (((size * stream->data_size) + stream->sample_ptr) > stream->end_ring_buffer) { // We exceed ring buffer end. - uint16_t chunk1 = stream->end_ring_buffer - stream->sample_ptr; - uint16_t chunk2 = (size * stream->data_size) - chunk1; - stream->sample_ptr = stream->ring_buffer + chunk2; + uint32_t chunk1 = (uintptr_t)stream->end_ring_buffer - (uintptr_t)stream->sample_ptr; + uint32_t chunk2 = (size * stream->data_size) - chunk1; + stream->sample_ptr = (void *)((uintptr_t)stream->ring_buffer + chunk2); } else { - stream->sample_ptr = stream->sample_ptr + (size * stream->data_size); + stream->sample_ptr = (void *)((uintptr_t)stream->sample_ptr + (size * stream->data_size)); if (stream->sample_ptr == stream->end_ring_buffer) { // If we are exactly at the end of the ring buffer, we need to loop @@ -249,10 +250,10 @@ void Luos_SendStreamingSize(service_t *service, msg_t *msg, streaming_channel_t } // Send messages one by one - for (volatile uint16_t chunk = 0; chunk < msg_number; chunk++) + for (volatile uint32_t chunk = 0; chunk < msg_number; chunk++) { // compute chunk size - uint16_t chunk_size = 0; + uint32_t chunk_size = 0; if (data_size > max_data_msg_size) { chunk_size = max_data_msg_size; From 1527108f9072932ef2243e8c5bada0fa61aa0e0b Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:02:35 +0200 Subject: [PATCH 174/198] Secure native serial send --- .../serial_network/HAL/NATIVE/serial_network_hal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/network/serial_network/HAL/NATIVE/serial_network_hal.c b/network/serial_network/HAL/NATIVE/serial_network_hal.c index 1a9a861ab..e9d50c614 100644 --- a/network/serial_network/HAL/NATIVE/serial_network_hal.c +++ b/network/serial_network/HAL/NATIVE/serial_network_hal.c @@ -339,6 +339,19 @@ void SerialHAL_Send(uint8_t *data, uint16_t size) close(serial_port); LUOS_ASSERT(0); } + while (bytesWritten < size) + { + // Wait for the buffer to be empty + usleep(100); + ioctl(serial_port, TIOCOUTQ, &bytes_in_buffer); + bytesWritten += write(serial_port, &data[bytesWritten], size - bytesWritten); + if (bytesWritten < 0) + { + printf("Error writing to serial port\n"); + close(serial_port); + LUOS_ASSERT(0); + } + } LUOS_ASSERT(bytesWritten == size); #endif Serial_TransmissionEnd(); From 9edbf42691234de88fad899e7e07c111a161a061 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:04:58 +0200 Subject: [PATCH 175/198] [Pipe] Improve streaming buffer management avoiding to overflow it. --- tool_services/pipe/WS/native/pipe_com.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tool_services/pipe/WS/native/pipe_com.c b/tool_services/pipe/WS/native/pipe_com.c index e0e651d56..7cdab3742 100644 --- a/tool_services/pipe/WS/native/pipe_com.c +++ b/tool_services/pipe/WS/native/pipe_com.c @@ -63,6 +63,8 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) // Got websocket frame. Received data is wm->data. save it into the Pipe streaming channel struct mg_ws_message *wm = (struct mg_ws_message *)ev_data; Streaming_PutSample(Pipe_GetRxStreamChannel(), wm->data.ptr, wm->data.len); + char end = 0; + Streaming_PutSample(Pipe_GetRxStreamChannel(), &end, 1); } else if (ev == MG_EV_CLOSE) { @@ -124,6 +126,11 @@ void PipeCom_Send(void) ; } } + else + { + // No connection, we have to drop the data + Streaming_RmvAvailableSampleNB(Pipe_GetTxStreamChannel(), Streaming_GetAvailableSampleNB(Pipe_GetTxStreamChannel())); + } } /****************************************************************************** From 50efe68d5bcadf36523b6f73ec6b1b67910b074a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:05:51 +0200 Subject: [PATCH 176/198] [Gate] manage multiple JSON reception and treatment. --- tool_services/gate/data_manager.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index 670578a9e..cdf26ab8c 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -176,12 +176,20 @@ void DataManager_Format(service_t *service) // This message is a command from pipe static char data_cmd[GATE_BUFF_SIZE]; // Convert the received data into Luos commands - if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) + int size = Luos_ReceiveData(service, &data_msg, data_cmd); + if (size > 0) { // We finish to receive this data, execute the received command + char *data_ptr = data_cmd; if (data_msg.header.cmd == SET_CMD) { - Convert_DataToLuos(service, data_cmd); + while (size > 0 && *data_ptr == '{') + { + uint32_t data_consumed = strlen(data_ptr) + 1; + Convert_DataToLuos(service, data_ptr); + size -= data_consumed; + data_ptr += data_consumed; + } } } } while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED); From e4c95eebf1a67d599cfb4f4b89d3e925b00c5219 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:06:42 +0200 Subject: [PATCH 177/198] [Gate] Secure Bootloader JSON management --- tool_services/gate/TinyJSON/bootloader_ex.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tool_services/gate/TinyJSON/bootloader_ex.c b/tool_services/gate/TinyJSON/bootloader_ex.c index 761ffc925..b088208db 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.c +++ b/tool_services/gate/TinyJSON/bootloader_ex.c @@ -99,9 +99,14 @@ void Bootloader_JsonToLuos(service_t *service, char *bin_data, json_t const *boo // Get "command" json object json_t const *command_item = json_getProperty(bootloader_json, "command"); // Parse all relevant values in json object - const char *type = json_getPropertyValue(command_item, "type"); + const char *type = json_getPropertyValue(command_item, "type"); + if (json_getProperty(command_item, "topic") == NULL) + { + return; + } uint8_t topic_target = (uint8_t)json_getReal(json_getProperty(command_item, "topic")); - uint16_t node_id = (uint16_t)json_getReal(json_getProperty(command_item, "node")); + + uint16_t node_id = (uint16_t)json_getReal(json_getProperty(command_item, "node")); // Create a message to send to nodes msg_t boot_msg; From 18bc51649e52b258604fe64c2bd42d13f395636a Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 7 Nov 2023 12:08:16 +0100 Subject: [PATCH 178/198] [GATE] Fix target_trans_position to get raw value instead of converting it from mm. This allow to get the returned value in m as well as the target. --- tool_services/gate/TinyJSON/convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index a07b5768d..c2fba74af 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -296,7 +296,7 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char * { if ((property_type == JSON_REAL) || (property_type == JSON_INTEGER)) { - linear_position_t linear_position = LinearOD_PositionFrom_mm((float)json_getReal(jobj)); + linear_position_t linear_position = LinearOD_PositionFrom_m((float)json_getReal(jobj)); LinearOD_PositionToMsg(&linear_position, msg); Luos_SendMsg(service, msg); return; From 7632103563c40970470cbe855962b37efbd1e417 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:36:05 +0200 Subject: [PATCH 179/198] [ESP32] Add a simple Arduino led project --- .../projects/ESP32/led_arduino/CMakeLists.txt | 8 + .../ESP32/led_arduino/lib/led/CMakeLists.txt | 7 + .../ESP32/led_arduino/lib/led/README.md | 18 + .../ESP32/led_arduino/lib/led/led.cpp | 63 + .../projects/ESP32/led_arduino/lib/led/led.h | 25 + .../ESP32/led_arduino/lib/led/library.json | 14 + .../projects/ESP32/led_arduino/node_config.h | 125 ++ .../projects/ESP32/led_arduino/platformio.ini | 40 + .../ESP32/led_arduino/sdkconfig.defaults | 18 + .../led_arduino/sdkconfig.esp32-c3-devkitm-1 | 1374 ++++++++++++++++ .../ESP32/led_arduino/sdkconfig.esp32dev | 1459 +++++++++++++++++ .../ESP32/led_arduino/src/CMakeLists.txt | 3 + .../projects/ESP32/led_arduino/src/main.cpp | 27 + 13 files changed, 3181 insertions(+) create mode 100644 examples/projects/ESP32/led_arduino/CMakeLists.txt create mode 100644 examples/projects/ESP32/led_arduino/lib/led/CMakeLists.txt create mode 100644 examples/projects/ESP32/led_arduino/lib/led/README.md create mode 100644 examples/projects/ESP32/led_arduino/lib/led/led.cpp create mode 100644 examples/projects/ESP32/led_arduino/lib/led/led.h create mode 100644 examples/projects/ESP32/led_arduino/lib/led/library.json create mode 100644 examples/projects/ESP32/led_arduino/node_config.h create mode 100644 examples/projects/ESP32/led_arduino/platformio.ini create mode 100644 examples/projects/ESP32/led_arduino/sdkconfig.defaults create mode 100644 examples/projects/ESP32/led_arduino/sdkconfig.esp32-c3-devkitm-1 create mode 100644 examples/projects/ESP32/led_arduino/sdkconfig.esp32dev create mode 100644 examples/projects/ESP32/led_arduino/src/CMakeLists.txt create mode 100644 examples/projects/ESP32/led_arduino/src/main.cpp diff --git a/examples/projects/ESP32/led_arduino/CMakeLists.txt b/examples/projects/ESP32/led_arduino/CMakeLists.txt new file mode 100644 index 000000000..d5ac03be6 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/CMakeLists.txt @@ -0,0 +1,8 @@ +# The following lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME) +string(REPLACE " " "_" ProjectId ${ProjectId}) +project(${ProjectId}) \ No newline at end of file diff --git a/examples/projects/ESP32/led_arduino/lib/led/CMakeLists.txt b/examples/projects/ESP32/led_arduino/lib/led/CMakeLists.txt new file mode 100644 index 000000000..3e03f4185 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/lib/led/CMakeLists.txt @@ -0,0 +1,7 @@ +set(srcs "led") + +set(inc ".") + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS ${inc} + REQUIRES luos_engine) diff --git a/examples/projects/ESP32/led_arduino/lib/led/README.md b/examples/projects/ESP32/led_arduino/lib/led/README.md new file mode 100644 index 000000000..e8bf85f57 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/lib/led/README.md @@ -0,0 +1,18 @@ +Luos logo + +[![](http://certified.luos.io)](https://luos.io) +[![](https://img.shields.io/github/license/Luos-io/examples)]( +https://github.com/Luos-io/examples/blob/master/LICENSE) + +[![](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Unleash%20electronic%20devices%20as%20microservices%20thanks%20to%20Luos&https://luos.io&via=Luos_io&hashtags=embeddedsystems,electronics,microservices,api) +[![](https://img.shields.io/badge/LinkedIn-Share-0077B5?style=social&logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io) + +# Led driver +Driver for using a led in your projects with Luos. + +# Linked project +This driver is linked to the [led project](../../Projects/led). + +[![](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.luos.io&logo=Discourse)](https://community.luos.io) +[![](https://img.shields.io/badge/Luos-Documentation-34A3B4)](https://www.luos.io/docs/) +[![](https://img.shields.io/badge/LinkedIn-Follow%20us-0077B5?style=flat&logo=linkedin)](https://www.linkedin.com/company/luos) diff --git a/examples/projects/ESP32/led_arduino/lib/led/led.cpp b/examples/projects/ESP32/led_arduino/lib/led/led.cpp new file mode 100644 index 000000000..d43fd2408 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/lib/led/led.cpp @@ -0,0 +1,63 @@ +/****************************************************************************** + * @file led + * @brief driver example a simple led + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#include +#include "led.h" + +/******************************************************************************* + * Definitions + ******************************************************************************/ +#define LED_PIN 18 +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Function + ******************************************************************************/ +static void Led_MsgHandler(service_t *service, const msg_t *msg); +/****************************************************************************** + * @brief init must be call in project init + * @param None + * @return None + ******************************************************************************/ +void Led_Init(void) +{ + revision_t revision; + revision.major = 1; + revision.minor = 0; + revision.build = 0; + pinMode(LED_PIN, OUTPUT); + Luos_CreateService(Led_MsgHandler, STATE_TYPE, "led", revision); +} +/****************************************************************************** + * @brief loop must be call in project loop + * @param None + * @return None + ******************************************************************************/ +void Led_Loop(void) +{ +} +/****************************************************************************** + * @brief Msg Handler call back when a msg receive for this service + * @param Service destination + * @param Msg receive + * @return None + ******************************************************************************/ +static void Led_MsgHandler(service_t *service, const msg_t *msg) +{ + if (msg->header.cmd == IO_STATE) + { + if (msg->data[0] == 0) + { + digitalWrite(LED_PIN, false); + } + else + { + digitalWrite(LED_PIN, true); + } + } +} diff --git a/examples/projects/ESP32/led_arduino/lib/led/led.h b/examples/projects/ESP32/led_arduino/lib/led/led.h new file mode 100644 index 000000000..5bea93540 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/lib/led/led.h @@ -0,0 +1,25 @@ +/****************************************************************************** + * @file button + * @brief driver example a simple button + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef BUTTON_H +#define BUTTON_H + +#include "luos_engine.h" +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/******************************************************************************* + * Variables + ******************************************************************************/ + +/******************************************************************************* + * Function + ******************************************************************************/ +void Led_Init(void); +void Led_Loop(void); + +#endif /* BUTTON_H */ diff --git a/examples/projects/ESP32/led_arduino/lib/led/library.json b/examples/projects/ESP32/led_arduino/lib/led/library.json new file mode 100644 index 000000000..bd4e1c16b --- /dev/null +++ b/examples/projects/ESP32/led_arduino/lib/led/library.json @@ -0,0 +1,14 @@ +{ + "name": "led", + "keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST", + "description": "a simple led driver", + "version": "1.0.0", + "authors": { + "name": "Luos", + "url": "https://luos.io" + }, + "licence": "MIT", + "dependencies": { + "luos_engine": "^3.0.0" + } +} diff --git a/examples/projects/ESP32/led_arduino/node_config.h b/examples/projects/ESP32/led_arduino/node_config.h new file mode 100644 index 000000000..0f0d5d4a8 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/node_config.h @@ -0,0 +1,125 @@ +/****************************************************************************** + * @file node_config.h + * @brief This file allow you to use standard preprocessor definitions to + * configure your project, Luos and Luos HAL libraries + * + * # Introduction + * This file is for the luos user. You may here configure your project and + * define your custom Luos service and custom Luos command for your product + * + * Luos libraries offer a minimal standard configuration to optimize + * memory usage. In some case you have to modify standard value to fit + * with your need concerning among of data transiting through the network + * or network speed for example + * + * Luos libraries can be use with a lot a MCU family. Luos compagny give you + * a default configuration, for specific MCU family, in robus_hal_config.h. + * This configuration can be modify here to fit with you design by + * preprocessor definitions of MCU Hardware needs + * + * # Usage + * This file should be place a the root folder of your project and include + * where build flag preprocessor definitions are define in your IDE + * -include node_config.h + * + * @author Luos + * @version 0.0.0 + ******************************************************************************/ +#ifndef _NODE_CONFIG_H_ +#define _NODE_CONFIG_H_ + +/******************************************************************************* + * PROJECT DEFINITION + *******************************************************************************/ + +/******************************************************************************* + * LUOS LIBRARY DEFINITION + ******************************************************************************* + * Define | Default Value | Description + * :---------------------|------------------------------------------------------ + * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node + * MAX_NODE_NUMBER. | 20 | Node number in the device + * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX + * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer + * NBR_PORT | 2 | PTP Branch number Max 8 + * NBR_RETRY | 10 | Send Retry number in case of NACK or collision + ******************************************************************************/ + +#define MSG_BUFFER_SIZE 1024 +#define ROBUS_NETWORK_BAUDRATE 500000 + +/******************************************************************************* + * LUOS HAL LIBRARY DEFINITION +******************************************************************************* + * Define | Description + * :-----------------------|----------------------------------------------- + * MCUFREQ | Put your the MCU frequency (value in Hz) + * TIMERDIV | Timer divider clock (see your clock configuration) + * USE_CRC_HW | define to 0 if there is no Module CRC in your MCU + * USE_TX_IT | define to 1 to not use DMA transfers for Luos Tx + * + * PORT_CLOCK_ENABLE | Enable clock for port + * PTPx | A,B,C,D etc. PTP Branch Pin/Port/IRQ + * TX_LOCK_DETECT | Disable by default use if not busy flag in USART Pin/Port/IRQ + * RX_EN | Rx enable for driver RS485 always on Pin/Port + * TX_EN | Tx enable for driver RS485 Pin/Port + * COM_TX | Tx USART Com Pin/Port/Alternate + * COM_RX | Rx USART Com Pin/Port/Alternate + * PINOUT_IRQHANDLER | Callback function for Pin IRQ handler + + * ROBUS_COM_CLOCK_ENABLE | Enable clock for USART + * ROBUS_COM | USART number + * ROBUS_COM_IRQ | USART IRQ number + * ROBUS_COM_IRQHANDLER | Callback function for USART IRQ handler + + * ROBUS_DMA_CLOCK_ENABLE | Enable clock for DMA + * ROBUS_DMA | DMA number + * ROBUS_DMA_CHANNEL | DMA channel (depending on MCU DMA may need special config) + + * ROBUS_TIMER_CLOCK_ENABLE | Enable clock for Timer + * ROBUS_TIMER | Timer number + * ROBUS_TIMER_IRQ | Timer IRQ number + * ROBUS_TIMER_IRQHANDLER | Callback function for Timer IRQ handler +******************************************************************************/ + +/******************************************************************************* + * FLASH CONFIGURATION FOR APP WITH BOOTLOADER + ******************************************************************************** + * Define | Default Value | Description + * :---------------------|------------------------------------------------------ + * BOOT_START_ADDRESS | FLASH_BASE = 0x8000000 | Start address of Bootloader in flash + * SHARED_MEMORY_ADDRESS | 0x0800C000 | Start address of shared memory to save boot flag + * APP_START_ADDRESS | 0x0800C800 | Start address of application with bootloader + * APP_END_ADDRESS | FLASH_BANK1_END=0x0801FFFF | End address of application with bootloader + ******************************************************************************/ + +/******************************************************************************* + * GATE SERIAL COM DEFINITION + ******************************************************************************* + * Define | Default Value | Description + * :-------------------------|------------------------------------------------------ + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device + * GATE_BUFF_SIZE | 1024 | Json receive buffer size + * PIPE_TX_BUFFER_SIZE | 1024 | Receive pipe buffer size + * PIPE_RX_BUFFER_SIZE | 2048 | Transmit pipe buffer size + * INIT_TIME | 150 | Wait init time before first detection + ******************************************************************************/ + +/******************************************************************************* + * OTHER GATE PARAMETERS + ******************************************************************************* + * Define | Default Value | Description + * :--------------|------------------------------------------------------ + * INIT_TIME | 150 | Wait init time before first detection + * ******************************************************************************/ + +/******************************************************************************* + * OTHER PIPE PARAMETERS + ******************************************************************************* + * Define | Default Value | Description + * :--------------------|---------------------------------------------------- + * PIPE_CONFIG | none | To Modify pipe config + * ******************************************************************************/ + +#endif /* _NODE_CONFIG_H_ */ diff --git a/examples/projects/ESP32/led_arduino/platformio.ini b/examples/projects/ESP32/led_arduino/platformio.ini new file mode 100644 index 000000000..5e861636d --- /dev/null +++ b/examples/projects/ESP32/led_arduino/platformio.ini @@ -0,0 +1,40 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[platformio] +default_envs = esp32dev + +[env] +lib_ldf_mode =off +lib_extra_dirs = + $PROJECT_DIR/../../../../../ + $PROJECT_DIR/../../../../network/ +platform = espressif32@^5.3.0 +framework = arduino, espidf +build_unflags = -Os +build_flags = + -include node_config.h + -DLUOSHAL=ESP32 + -O1 +lib_deps = + luos_engine@^3.0.0 + robus_network + led + +[env:esp32dev] +board = esp32dev +debug_tool = esp-prog +debug_init_break = tbreak setup + +[env:esp32-c3-devkitm-1] +board = esp32-c3-devkitm-1 + + + diff --git a/examples/projects/ESP32/led_arduino/sdkconfig.defaults b/examples/projects/ESP32/led_arduino/sdkconfig.defaults new file mode 100644 index 000000000..909461e58 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/sdkconfig.defaults @@ -0,0 +1,18 @@ +# Override some defaults to enable Arduino framework +CONFIG_ENABLE_ARDUINO_DEPENDS=y +CONFIG_AUTOSTART_ARDUINO=y +CONFIG_ARDUINO_RUN_CORE1=y +CONFIG_ARDUINO_RUNNING_CORE=1 +CONFIG_ARDUINO_EVENT_RUN_CORE1=y +CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_RUN_CORE1=y +CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_DISABLE_HAL_LOCKS=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1 +CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT=y +CONFIG_ARDUHAL_PARTITION_SCHEME="default" +CONFIG_AUTOCONNECT_WIFI=y +CONFIG_ARDUINO_SELECTIVE_WiFi=y +CONFIG_MBEDTLS_PSK_MODES=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y \ No newline at end of file diff --git a/examples/projects/ESP32/led_arduino/sdkconfig.esp32-c3-devkitm-1 b/examples/projects/ESP32/led_arduino/sdkconfig.esp32-c3-devkitm-1 new file mode 100644 index 000000000..c91fdb650 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/sdkconfig.esp32-c3-devkitm-1 @@ -0,0 +1,1374 @@ +# +# Automatically generated file. DO NOT EDIT. +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET_ARCH_RISCV=y +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 + +# +# SDK tool configuration +# +CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Bootloader config + +# +# Security features +# +CONFIG_SECURE_BOOT_SUPPORTS_RSA=y +CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Boot ROM Behavior +# +CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y +# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set +# end of Boot ROM Behavior + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +CONFIG_ESPTOOLPY_FLASHFREQ="80m" +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set +# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y +# end of Partition Table + +# +# Arduino Configuration +# +CONFIG_ENABLE_ARDUINO_DEPENDS=y +CONFIG_AUTOSTART_ARDUINO=y +# CONFIG_ARDUINO_RUN_CORE0 is not set +CONFIG_ARDUINO_RUN_CORE1=y +# CONFIG_ARDUINO_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_RUNNING_CORE=1 +CONFIG_ARDUINO_LOOP_STACK_SIZE=8192 +# CONFIG_ARDUINO_EVENT_RUN_CORE0 is not set +CONFIG_ARDUINO_EVENT_RUN_CORE1=y +# CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +# CONFIG_ARDUINO_UDP_RUN_CORE0 is not set +CONFIG_ARDUINO_UDP_RUN_CORE1=y +# CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 +CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +# CONFIG_ARDUINO_ISR_IRAM is not set +CONFIG_DISABLE_HAL_LOCKS=y + +# +# Debug Log Configuration +# +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE is not set +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1 +# CONFIG_ARDUHAL_LOG_COLORS is not set +# CONFIG_ARDUHAL_ESP_LOG is not set +# end of Debug Log Configuration + +CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT=y +# CONFIG_ARDUHAL_PARTITION_SCHEME_MINIMAL is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_NO_OTA is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_HUGE_APP is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS is not set +CONFIG_ARDUHAL_PARTITION_SCHEME="default" +CONFIG_AUTOCONNECT_WIFI=y +# CONFIG_ARDUINO_SELECTIVE_COMPILATION is not set +CONFIG_ARDUINO_SELECTIVE_WiFi=y +# end of Arduino Configuration + +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +CONFIG_COMPILER_HIDE_PATHS_MACROS=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_JTAG is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# ESP-ASIO +# +# CONFIG_ASIO_SSL_SUPPORT is not set +# end of ESP-ASIO + +# +# Bluetooth +# +# CONFIG_BT_ENABLED is not set +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# +# CONFIG_ADC_FORCE_XPD_FSM is not set +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# MCPWM configuration +# +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# end of MCPWM configuration + +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# TWAI configuration +# +# CONFIG_TWAI_ISR_IN_IRAM is not set +# end of TWAI configuration + +# +# UART configuration +# +CONFIG_UART_ISR_IN_IRAM=y +# end of UART configuration + +# +# GDMA Configuration +# +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# CONFIG_EFUSE_VIRTUAL is not set +CONFIG_EFUSE_MAX_BLK_LEN=256 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y +# CONFIG_ESP_TLS_SERVER is not set +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set +# end of ESP-TLS + +# +# ESP32C3-Specific +# +# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32C3_REV_MIN_0 is not set +# CONFIG_ESP32C3_REV_MIN_1 is not set +# CONFIG_ESP32C3_REV_MIN_2 is not set +CONFIG_ESP32C3_REV_MIN_3=y +CONFIG_ESP32C3_REV_MIN=3 +CONFIG_ESP32C3_DEBUG_OCDAWARE=y +CONFIG_ESP32C3_BROWNOUT_DET=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set +CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y +# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 +# CONFIG_ESP32C3_NO_BLOBS is not set +# end of ESP32C3-Specific + +# +# ADC-Calibration +# +# end of ADC-Calibration + +# +# Common ESP-related +# +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y +CONFIG_ETH_USE_SPI_ETHERNET=y +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +# end of GDB Stub + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y +# end of ESP HTTP client + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +# CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# +# CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set +# end of ESP HTTPS server + +# +# Hardware Settings +# + +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +# +# Sleep Config +# +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config + +# +# RTC Clock Config +# +CONFIG_RTC_CLOCK_BBPLL_POWER_ON_WITH_USB=y +# end of RTC Clock Config +# end of Hardware Settings + +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# end of IPC (Inter-Processor Call) + +# +# LCD and Touch Panel +# + +# +# LCD Peripheral Configuration +# +CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32 +# end of LCD Peripheral Configuration +# end of LCD and Touch Panel + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# PHY +# +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +CONFIG_ESP_PHY_ENABLE_USB=y +# end of PHY + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y +# end of Power Management + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y +CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# CONFIG_ESP_SYSTEM_USE_EH_FRAME is not set + +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 +# end of Memory protection + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_NONE is not set +# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set +CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +CONFIG_ESP_TIMER_IMPL_SYSTIMER=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set +# CONFIG_ESP_WIFI_FTM_ENABLE is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# end of Wi-Fi + +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +# +# FAT Filesystem support +# +# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set +CONFIG_FATFS_CODEPAGE_437=y +# CONFIG_FATFS_CODEPAGE_720 is not set +# CONFIG_FATFS_CODEPAGE_737 is not set +# CONFIG_FATFS_CODEPAGE_771 is not set +# CONFIG_FATFS_CODEPAGE_775 is not set +# CONFIG_FATFS_CODEPAGE_850 is not set +# CONFIG_FATFS_CODEPAGE_852 is not set +# CONFIG_FATFS_CODEPAGE_855 is not set +# CONFIG_FATFS_CODEPAGE_857 is not set +# CONFIG_FATFS_CODEPAGE_860 is not set +# CONFIG_FATFS_CODEPAGE_861 is not set +# CONFIG_FATFS_CODEPAGE_862 is not set +# CONFIG_FATFS_CODEPAGE_863 is not set +# CONFIG_FATFS_CODEPAGE_864 is not set +# CONFIG_FATFS_CODEPAGE_865 is not set +# CONFIG_FATFS_CODEPAGE_866 is not set +# CONFIG_FATFS_CODEPAGE_869 is not set +# CONFIG_FATFS_CODEPAGE_932 is not set +# CONFIG_FATFS_CODEPAGE_936 is not set +# CONFIG_FATFS_CODEPAGE_949 is not set +# CONFIG_FATFS_CODEPAGE_950 is not set +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE=y +# CONFIG_FATFS_LFN_HEAP is not set +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +# CONFIG_FATFS_USE_FASTSEEK is not set +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_TCP_EN=y +CONFIG_FMB_TCP_PORT_DEFAULT=502 +CONFIG_FMB_TCP_PORT_MAX_CONN=5 +CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_PORT_TASK_PRIO=10 +CONFIG_FMB_PORT_TASK_AFFINITY=0x7FFFFFFF +CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_FMB_TIMER_PORT_ENABLED is not set +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 +CONFIG_FMB_MASTER_TIMER_GROUP=0 +CONFIG_FMB_MASTER_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# +CONFIG_FREERTOS_UNICORE=y +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y +CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y +# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set +CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set +# end of FreeRTOS + +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y +CONFIG_LWIP_MAX_SOCKETS=10 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF=y +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 + +# +# DHCP server +# +CONFIG_LWIP_DHCPS=y +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# Hooks +# +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set +# CONFIG_MBEDTLS_DEBUG is not set + +# +# mbedTLS v2.28.x related +# +# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set +# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set +# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y +# end of mbedTLS v2.28.x related + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +# end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_AES_USE_INTERRUPT=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +CONFIG_MBEDTLS_PSK_MODES=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers + +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI=y +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +# CONFIG_MDNS_STRICT_MODE is not set +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# CONFIG_MDNS_NETWORKING_SOCKET is not set +CONFIG_MDNS_MULTIPLE_INSTANCE=y +# end of mDNS + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_MSG_ID_INCREMENTAL is not set +# CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set +# CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set +# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set +# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set +# CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# end of NVS + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ERROR_STACK=y +# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set +CONFIG_OPENSSL_ASSERT_EXIT=y +# end of OpenSSL + +# +# OpenThread +# +# CONFIG_OPENTHREAD_ENABLED is not set +# end of OpenThread + +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +# CONFIG_SPI_FLASH_ROM_IMPL is not set +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 +# CONFIG_SPI_FLASH_AUTO_SUSPEND is not set +CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set + +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# end of SPI Flash driver + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +# CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +# CONFIG_SPIFFS_GC_STATS is not set +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +# CONFIG_SPIFFS_DBG is not set +# CONFIG_SPIFFS_API_DBG is not set +# CONFIG_SPIFFS_GC_DBG is not set +# CONFIG_SPIFFS_CACHE_DBG is not set +# CONFIG_SPIFFS_CHECK_DBG is not set +# CONFIG_SPIFFS_TEST_VISUALISATION is not set +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TCP Transport +# + +# +# Websocket +# +CONFIG_WS_TRANSPORT=y +CONFIG_WS_BUFFER_SIZE=1024 +# end of Websocket +# end of TCP Transport + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +# CONFIG_UNITY_ENABLE_64BIT is not set +# CONFIG_UNITY_ENABLE_COLOR is not set +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +# CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# +# CONFIG_WL_SECTOR_SIZE_512 is not set +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# +CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant +# end of Component config + +# +# Compatibility options +# +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options + +# Deprecated options for backward compatibility +CONFIG_TOOLPREFIX="riscv32-esp-elf-" +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART=y +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_MB_TIMER_PORT_ENABLED is not set +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=12 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# End of deprecated options diff --git a/examples/projects/ESP32/led_arduino/sdkconfig.esp32dev b/examples/projects/ESP32/led_arduino/sdkconfig.esp32dev new file mode 100644 index 000000000..466eb0ad5 --- /dev/null +++ b/examples/projects/ESP32/led_arduino/sdkconfig.esp32dev @@ -0,0 +1,1459 @@ +# +# Automatically generated file. DO NOT EDIT. +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 + +# +# SDK tool configuration +# +CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 +# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Bootloader config + +# +# Security features +# +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set +# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y +# end of Partition Table + +# +# Arduino Configuration +# +CONFIG_ARDUINO_VARIANT="esp32" +CONFIG_ENABLE_ARDUINO_DEPENDS=y +CONFIG_AUTOSTART_ARDUINO=y +# CONFIG_ARDUINO_RUN_CORE0 is not set +CONFIG_ARDUINO_RUN_CORE1=y +# CONFIG_ARDUINO_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_RUNNING_CORE=1 +CONFIG_ARDUINO_LOOP_STACK_SIZE=8192 +# CONFIG_ARDUINO_EVENT_RUN_CORE0 is not set +CONFIG_ARDUINO_EVENT_RUN_CORE1=y +# CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_EVENT_RUNNING_CORE=1 +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE0 is not set +# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE1 is not set +CONFIG_ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY=y +CONFIG_ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE=-1 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE=2048 +CONFIG_ARDUINO_SERIAL_EVENT_TASK_PRIORITY=24 +# CONFIG_ARDUINO_UDP_RUN_CORE0 is not set +CONFIG_ARDUINO_UDP_RUN_CORE1=y +# CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set +CONFIG_ARDUINO_UDP_RUNNING_CORE=1 +CONFIG_ARDUINO_UDP_TASK_PRIORITY=3 +# CONFIG_ARDUINO_ISR_IRAM is not set +CONFIG_DISABLE_HAL_LOCKS=y + +# +# Debug Log Configuration +# +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE is not set +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1 +# CONFIG_ARDUHAL_LOG_COLORS is not set +# CONFIG_ARDUHAL_ESP_LOG is not set +# end of Debug Log Configuration + +CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT=y +# CONFIG_ARDUHAL_PARTITION_SCHEME_MINIMAL is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_NO_OTA is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_HUGE_APP is not set +# CONFIG_ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS is not set +CONFIG_ARDUHAL_PARTITION_SCHEME="default" +CONFIG_AUTOCONNECT_WIFI=y +# CONFIG_ARDUINO_SELECTIVE_COMPILATION is not set +CONFIG_ARDUINO_SELECTIVE_WiFi=y +# end of Arduino Configuration + +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +CONFIG_COMPILER_HIDE_PATHS_MACROS=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_JTAG is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# ESP-ASIO +# +# CONFIG_ASIO_SSL_SUPPORT is not set +# end of ESP-ASIO + +# +# Bluetooth +# +# CONFIG_BT_ENABLED is not set +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# +# CONFIG_ADC_FORCE_XPD_FSM is not set +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# MCPWM configuration +# +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# end of MCPWM configuration + +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# TWAI configuration +# +# CONFIG_TWAI_ISR_IN_IRAM is not set +# CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set +# CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set +# CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set +# CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set +# end of TWAI configuration + +# +# UART configuration +# +CONFIG_UART_ISR_IN_IRAM=y +# end of UART configuration + +# +# RTCIO configuration +# +# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set +# end of RTCIO configuration + +# +# GPIO Configuration +# +# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set +# end of GPIO Configuration + +# +# GDMA Configuration +# +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# CONFIG_EFUSE_VIRTUAL is not set +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set +CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set +CONFIG_EFUSE_MAX_BLK_LEN=192 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set +# end of ESP-TLS + +# +# ESP32-specific +# +CONFIG_ESP32_REV_MIN_0=y +# CONFIG_ESP32_REV_MIN_1 is not set +# CONFIG_ESP32_REV_MIN_2 is not set +# CONFIG_ESP32_REV_MIN_3 is not set +CONFIG_ESP32_REV_MIN=0 +CONFIG_ESP32_DPORT_WORKAROUND=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32_SPIRAM_SUPPORT is not set +# CONFIG_ESP32_TRAX is not set +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32_ULP_COPROC_ENABLED is not set +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32_DEBUG_OCDAWARE=y +CONFIG_ESP32_BROWNOUT_DET=y +CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_ESP32_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 +CONFIG_ESP32_XTAL_FREQ_40=y +# CONFIG_ESP32_XTAL_FREQ_26 is not set +# CONFIG_ESP32_XTAL_FREQ_AUTO is not set +CONFIG_ESP32_XTAL_FREQ=40 +# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_ESP32_NO_BLOBS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set +# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set +CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 +# end of ESP32-specific + +# +# ADC-Calibration +# +CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y +CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y +CONFIG_ADC_CAL_LUT_ENABLE=y +# end of ADC-Calibration + +# +# Common ESP-related +# +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y +CONFIG_ETH_USE_ESP32_EMAC=y +CONFIG_ETH_PHY_INTERFACE_RMII=y +CONFIG_ETH_RMII_CLK_INPUT=y +# CONFIG_ETH_RMII_CLK_OUTPUT is not set +CONFIG_ETH_RMII_CLK_IN_GPIO=0 +CONFIG_ETH_DMA_BUFFER_SIZE=512 +CONFIG_ETH_DMA_RX_BUFFER_NUM=10 +CONFIG_ETH_DMA_TX_BUFFER_NUM=10 +CONFIG_ETH_USE_SPI_ETHERNET=y +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +# end of GDB Stub + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y +# end of ESP HTTP client + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +# CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# +# CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set +# end of ESP HTTPS server + +# +# Hardware Settings +# + +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +# +# Sleep Config +# +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y +# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config + +# +# RTC Clock Config +# +# end of RTC Clock Config +# end of Hardware Settings + +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_IPC_ISR_ENABLE=y +# end of IPC (Inter-Processor Call) + +# +# LCD and Touch Panel +# + +# +# LCD Peripheral Configuration +# +CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32 +# end of LCD Peripheral Configuration +# end of LCD and Touch Panel + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# PHY +# +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +CONFIG_ESP_PHY_REDUCE_TX_POWER=y +# end of PHY + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +# end of Power Management + +# +# ESP Ringbuf +# +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH is not set +# end of ESP Ringbuf + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set + +# +# Memory protection +# +# end of Memory protection + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_NONE is not set +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set +# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +# CONFIG_ESP_TIMER_IMPL_FRC2 is not set +CONFIG_ESP_TIMER_IMPL_TG0_LAC=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +# end of Wi-Fi + +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +# +# FAT Filesystem support +# +# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set +CONFIG_FATFS_CODEPAGE_437=y +# CONFIG_FATFS_CODEPAGE_720 is not set +# CONFIG_FATFS_CODEPAGE_737 is not set +# CONFIG_FATFS_CODEPAGE_771 is not set +# CONFIG_FATFS_CODEPAGE_775 is not set +# CONFIG_FATFS_CODEPAGE_850 is not set +# CONFIG_FATFS_CODEPAGE_852 is not set +# CONFIG_FATFS_CODEPAGE_855 is not set +# CONFIG_FATFS_CODEPAGE_857 is not set +# CONFIG_FATFS_CODEPAGE_860 is not set +# CONFIG_FATFS_CODEPAGE_861 is not set +# CONFIG_FATFS_CODEPAGE_862 is not set +# CONFIG_FATFS_CODEPAGE_863 is not set +# CONFIG_FATFS_CODEPAGE_864 is not set +# CONFIG_FATFS_CODEPAGE_865 is not set +# CONFIG_FATFS_CODEPAGE_866 is not set +# CONFIG_FATFS_CODEPAGE_869 is not set +# CONFIG_FATFS_CODEPAGE_932 is not set +# CONFIG_FATFS_CODEPAGE_936 is not set +# CONFIG_FATFS_CODEPAGE_949 is not set +# CONFIG_FATFS_CODEPAGE_950 is not set +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE=y +# CONFIG_FATFS_LFN_HEAP is not set +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +# CONFIG_FATFS_USE_FASTSEEK is not set +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_TCP_EN=y +CONFIG_FMB_TCP_PORT_DEFAULT=502 +CONFIG_FMB_TCP_PORT_MAX_CONN=5 +CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_PORT_TASK_PRIO=10 +# CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y +# CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set +CONFIG_FMB_PORT_TASK_AFFINITY=0x0 +CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_FMB_TIMER_PORT_ENABLED is not set +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 +CONFIG_FMB_MASTER_TIMER_GROUP=0 +CONFIG_FMB_MASTER_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# +# CONFIG_FREERTOS_UNICORE is not set +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y +CONFIG_FREERTOS_HZ=1000 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# CONFIG_FREERTOS_FPU_IN_ISR is not set +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set +# end of FreeRTOS + +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y +CONFIG_LWIP_MAX_SOCKETS=10 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF=y +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 + +# +# DHCP server +# +CONFIG_LWIP_DHCPS=y +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# Hooks +# +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set +# CONFIG_MBEDTLS_DEBUG is not set + +# +# mbedTLS v2.28.x related +# +# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set +# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set +# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y +# end of mbedTLS v2.28.x related + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200 +# end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +CONFIG_MBEDTLS_PSK_MODES=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers + +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +# CONFIG_MDNS_STRICT_MODE is not set +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# CONFIG_MDNS_NETWORKING_SOCKET is not set +CONFIG_MDNS_MULTIPLE_INSTANCE=y +# end of mDNS + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_MSG_ID_INCREMENTAL is not set +# CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set +# CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set +# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set +# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set +# CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# CONFIG_NVS_ASSERT_ERROR_CHECK is not set +# end of NVS + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ERROR_STACK=y +# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set +CONFIG_OPENSSL_ASSERT_EXIT=y +# end of OpenSSL + +# +# OpenThread +# +# CONFIG_OPENTHREAD_ENABLED is not set +# end of OpenThread + +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y +# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set +# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 +CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set + +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +# CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP is not set +# CONFIG_SPI_FLASH_SUPPORT_TH_CHIP is not set +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# end of SPI Flash driver + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +# CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +# CONFIG_SPIFFS_GC_STATS is not set +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +# CONFIG_SPIFFS_DBG is not set +# CONFIG_SPIFFS_API_DBG is not set +# CONFIG_SPIFFS_GC_DBG is not set +# CONFIG_SPIFFS_CACHE_DBG is not set +# CONFIG_SPIFFS_CHECK_DBG is not set +# CONFIG_SPIFFS_TEST_VISUALISATION is not set +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TCP Transport +# + +# +# Websocket +# +CONFIG_WS_TRANSPORT=y +CONFIG_WS_BUFFER_SIZE=1024 +# end of Websocket +# end of TCP Transport + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +# CONFIG_UNITY_ENABLE_64BIT is not set +# CONFIG_UNITY_ENABLE_COLOR is not set +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +# CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# +# CONFIG_WL_SECTOR_SIZE_512 is not set +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# +CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# CONFIG_WPA_MBO_SUPPORT is not set +# CONFIG_WPA_DPP_SUPPORT is not set +# end of Supplicant +# end of Component config + +# +# Compatibility options +# +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options + +# Deprecated options for backward compatibility +CONFIG_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_SPIRAM_SUPPORT is not set +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ULP_COPROC_ENABLED is not set +CONFIG_ULP_COPROC_RESERVE_MEM=0 +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set +# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_NO_BLOBS is not set +# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set +CONFIG_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP32_REDUCE_PHY_TX_POWER=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART=y +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_MB_TIMER_PORT_ENABLED is not set +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=12 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +# End of deprecated options diff --git a/examples/projects/ESP32/led_arduino/src/CMakeLists.txt b/examples/projects/ESP32/led_arduino/src/CMakeLists.txt new file mode 100644 index 000000000..56795111d --- /dev/null +++ b/examples/projects/ESP32/led_arduino/src/CMakeLists.txt @@ -0,0 +1,3 @@ +# Edit following two lines to set component requirements (see docs) + +idf_component_register(SRCS "main.cpp") diff --git a/examples/projects/ESP32/led_arduino/src/main.cpp b/examples/projects/ESP32/led_arduino/src/main.cpp new file mode 100644 index 000000000..195b98abe --- /dev/null +++ b/examples/projects/ESP32/led_arduino/src/main.cpp @@ -0,0 +1,27 @@ +#include +#include "luos_engine.h" +#include "robus_network.h" +#include "led.h" + +/****************************************************************************** + * @brief Setup ardiuno + * @param None + * @return None + ******************************************************************************/ +void setup() +{ + Luos_Init(); + Robus_Init(); + Led_Init(); +} +/****************************************************************************** + * @brief Loop Arduino + * @param None + * @return None + ******************************************************************************/ +void loop() +{ + Luos_Loop(); + Robus_Loop(); + Led_Loop(); +} From 2d0820ae4a47b36e5bf318ee93505b54bdef2409 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:11:23 +0200 Subject: [PATCH 180/198] Improve Bootloader node_config to be more compliant and light --- examples/projects/NUCLEO-F072RB/bootloader/node_config.h | 6 +++++- examples/projects/NUCLEO-F401RE/bootloader/node_config.h | 6 +++++- examples/projects/NUCLEO-F410RB/bootloader/node_config.h | 8 +++++--- examples/projects/NUCLEO-G431KB/bootloader/node_config.h | 6 +++++- examples/projects/NUCLEO-G474RE/bootloader/node_config.h | 6 +++++- examples/projects/NUCLEO-L073RZ/bootloader/node_config.h | 6 +++++- examples/projects/NUCLEO-L432KC/bootloader/node_config.h | 6 +++++- .../projects/STM32F4-discovery/bootloader/node_config.h | 8 +++++--- .../projects/STM32L4S5_discovery/bootloader/node_config.h | 6 +++++- examples/projects/l0/bootloader/node_config.h | 3 +++ 10 files changed, 48 insertions(+), 13 deletions(-) diff --git a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h index 6a6669822..96fd02180 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F072RB/bootloader/node_config.h @@ -47,7 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h index 4ab69e4ed..889bc23b1 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F401RE/bootloader/node_config.h @@ -47,7 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION ******************************************************************************* diff --git a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h index 2fbdfedc5..b3e653898 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-F410RB/bootloader/node_config.h @@ -47,9 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 -#define MAX_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h index 69376eb0f..6b486d307 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G431KB/bootloader/node_config.h @@ -47,7 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h index 69376eb0f..6b486d307 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/node_config.h +++ b/examples/projects/NUCLEO-G474RE/bootloader/node_config.h @@ -47,7 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h index f8cbea49b..2ab13aaaf 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L073RZ/bootloader/node_config.h @@ -48,7 +48,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ #define ROBUS_NETWORK_BAUDRATE 500000 -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h index beb3f8c6f..70122cd9a 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/node_config.h +++ b/examples/projects/NUCLEO-L432KC/bootloader/node_config.h @@ -47,7 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MSG_BUFFER_SIZE 512 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32F4-discovery/bootloader/node_config.h b/examples/projects/STM32F4-discovery/bootloader/node_config.h index 62688c38a..32670c21a 100644 --- a/examples/projects/STM32F4-discovery/bootloader/node_config.h +++ b/examples/projects/STM32F4-discovery/bootloader/node_config.h @@ -47,9 +47,11 @@ * NBR_RETRY | 10 | Send Retry number in case of NACK or collision ******************************************************************************/ -#define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 -#define MAX_BUFFER_SIZE 1024 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h index 9621e9fb8..b8825cdcf 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/node_config.h +++ b/examples/projects/STM32L4S5_discovery/bootloader/node_config.h @@ -48,7 +48,11 @@ ******************************************************************************/ #define MAX_LOCAL_SERVICE_NUMBER 1 -#define MAX_MSG_NB 10 +#define MSG_BUFFER_SIZE 2048 +#define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/bootloader/node_config.h b/examples/projects/l0/bootloader/node_config.h index 0efac10c1..c9ccf69da 100644 --- a/examples/projects/l0/bootloader/node_config.h +++ b/examples/projects/l0/bootloader/node_config.h @@ -48,6 +48,9 @@ #define MSG_BUFFER_SIZE 2048 #define MAX_MSG_NB 20 +#define NO_RTB +#define MAX_NODE_NUMBER 40 +#define MAX_SERVICE_NUMBER 50 /******************************************************************************* * LUOS HAL LIBRARY DEFINITION From ad24fb6b91b2d1266a8e1e827e6b66cb2027faad Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 26 Oct 2023 16:01:56 +0200 Subject: [PATCH 181/198] Fix node indexes computation in case of a phy with multiple branches. --- engine/core/src/routing_table.c | 52 +++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 169fcbc0e..9e94c86d6 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -414,7 +414,10 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it is phy 1. * We will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider that they are accessible trough phy 1. - * If we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + * If we encounter a node with parent connection informations that involve our node, this means that we completed the previous phy indexing, or exploring a parralel branch. + * - If the phy we were indexing is the same as the parent phy, we have to add them to the same index. + * - If the phy we were indexing is different from the parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. + * we can send it and start a new one for the phy described by the node connection informations. * When we reach the end of the routing table, we have 2 options: * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. @@ -429,16 +432,22 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 if (connection_table[node_idx].parent.node_id == node_index + 1) { // This node consider our node as its parent! - // This means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. - if (node_phy != -1) + // This means that we completed the previous phy indexing, or we are exploring a parralel branch. + // If the phy of the new branch is not the same, we can send it and start a new one for the phy described by the node connection informations. + // If the phy of the new branch is the same, we have to add them to the same index. + if (node_phy != connection_table[node_idx].parent.phy_id) { - // We have to send the indexes we completed. - RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); - } + // The parent phy_id is different than the one we were working on, we can consider that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + } - // We have to reset the indexes table and set the node_phy to the index of the concerned phy. - memset(nodes_indexes, 0, sizeof(nodes_indexes)); - node_phy = connection_table[node_idx].parent.phy_id; + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(nodes_indexes, 0, sizeof(nodes_indexes)); + node_phy = connection_table[node_idx].parent.phy_id; + } } // Add the node index to the nodes_indexes table. uint8_t bit_index = node_idx; @@ -531,7 +540,9 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it phy 1. * Then we will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider taht they are accessible trough phy 1. - * We we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. + * If we encounter a node with connection informations that involve our node, this means that we completed the previous phy indexing, or we are exploring a new branch. + * - If the phy we were indexing is the same as the parent phy, we have to add them to the same index. + * - If the phy we were indexing is different from the parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. * When we reach the end of the routing table, we have 2 options: * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. @@ -550,16 +561,21 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) if (routing_table[node_idx].connection.parent.node_id == routing_table[node_index].node_id) { // This node consider our node as its parent! - // This means that we completed the previous phy indexing, we can send it and start a new one for the phy described by the node connection informations. - if (node_phy != -1) + // This means that we completed the previous phy indexing, or we are exploring a parralel branch. + // If the phy of the new branch is not the same, we can send it and start a new one for the phy described by the node connection informations. + // If the phy of the new branch is the same, we have to add them to the same index. + if (node_phy != routing_table[node_idx].connection.parent.phy_id) { - // We have to send the indexes we completed. - RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); - } + if (node_phy != -1) + { + // We have to send the indexes we completed. + RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + } - // We have to reset the indexes table and set the node_phy to the index of the concerned phy. - memset(services_indexes, 0, sizeof(services_indexes)); - node_phy = routing_table[node_idx].connection.parent.phy_id; + // We have to reset the indexes table and set the node_phy to the index of the concerned phy. + memset(services_indexes, 0, sizeof(services_indexes)); + node_phy = routing_table[node_idx].connection.parent.phy_id; + } } break; case SERVICE: From afc63f09b02e2c8d70b28e0e76ef42e1d5eec0a3 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 30 Oct 2023 13:25:17 +0100 Subject: [PATCH 182/198] Fix an index filtering overflow during detection. --- engine/IO/src/luos_io.c | 6 +++--- engine/IO/src/luos_phy.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index aa7a603aa..f5a59dd11 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -445,12 +445,12 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) // Add this node id in the Luos phy filter allowing us to receive node messages memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); Phy_IndexSet(luos_phy->nodes, node_id); - // Also add all node before our node_id in the philter of the source phy + // Also add all node before our node_id in the philter of the source phy allowing next node to reach our parents. port_t *source_port = Phy_GetTopologysource(); luos_phy_t *source_phy_ptr = Phy_GetPhyFromId(source_port->phy_id); - for (uint16_t i = 0; i < node_id; i++) + for (uint16_t id = 1; id < node_id; id++) { - Phy_IndexSet(source_phy_ptr->nodes, i); + Phy_IndexSet(source_phy_ptr->nodes, id); } // Now we need to send back the input part of the connection data. port_t *input_port = Phy_GetTopologysource(); diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 682bc5a8b..080d7b12f 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -554,7 +554,7 @@ bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) } else { - // If the target is not the phy_ptr, we need to keep this message + // If the target is not for the receiving phy, we need to keep this message return (!Phy_IndexFilter(phy_ptr->nodes, header->target) && (Node_Get()->node_id != 0)); } break; @@ -1218,7 +1218,7 @@ inline bool Phy_IndexFilter(uint8_t *index, uint16_t id) ******************************************************************************/ inline void Phy_IndexSet(uint8_t *index, uint16_t id) { - LUOS_ASSERT((index != NULL) && (id <= 0x0FFF)); + LUOS_ASSERT((index != NULL) && (id <= 0x0FFF) && (id != 0)); uint8_t bit_index = id - 1; // Because 1 represent bit index 0. index[bit_index / 8] |= 1 << (bit_index % 8); } From 4dc5ccf5487f02a6370638cf3be0a9c3f2db6901 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 30 Oct 2023 13:25:38 +0100 Subject: [PATCH 183/198] Improve general readme --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 933a318eb..4e3c43ec3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Luos logo +Luos logo ![](https://github.com/Luos-io/luos_engine/actions/workflows/build.yml/badge.svg) [![](https://img.shields.io/github/license/Luos-io/luos_engine)](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) @@ -11,20 +11,28 @@ Version: 3.0.0 -# Luos Technology -## The most for the developer​ -Luos provides a simple way to think your hardware products as a group of independant features. You can easily manage and share your hardware products' features with your team, external developers, or with the community. Luos is an open-source lightweight library that can be used on any MCU, leading to free and fast multi-electronic-boards products development. Choosing Luos to design a product will help you to develop, debug, validate, monitor, and manage it from the cloud. +# Luos-engine: Empowering Developers +Luos-engine provides a simple and efficient way to manage your hardware products as a collection of independent software features. You can easily create and share these features with your team, external developers, or the wider community. Luos-engine is an open-source lightweight library that can be utilized on any microcontroller or computer, with any network, enabling free and fast development of multi-electronic-board connected products. Choosing Luos-engine for your product design empowers you to develop, debug, validate, monitor, and manage it from anywhere. -## The most for the community​ -Most of the embedded developments are made from scratch. By using Luos, you will be able to capitalize on the development you, your company, or the Luos community already did. The re-usability of features encapsulated in Luos services will fasten the time your products reach the market and reassure the robustness and the universality of your applications. +## Benefits for the Community +Many embedded developments start from scratch. By using Luos-engine, you can leverage the work already done by you, your company, or the Luos community. The reusability of features encapsulated in Luos-engine services accelerates the time it takes for your products to reach the market while ensuring the robustness and universality of your applications. -* → Join the [Luos Discord server](http://discord.gg/luos) -* → Join the [Luos subreddit](https://www.reddit.com/r/Luos) +* Join the [Luos Discord server](http://discord.gg/luos) to connect with the community. -## Good practices with Luos​ -Luos proposes organized and effective development practices, guaranteeing development flexibility and evolutivity of your hardware product, from the idea to the maintenance of the industrialized product fleet. +## Best Practices with Luos-engine +Luos-engine promotes organized and effective development practices, ensuring the scalability, flexibility, and adaptability of your product from the initial idea to maintaining an industrialized fleet. ## Let's do this​ * → Try on your own with the [get started](https://www.luos.io/tutorials/get-started) * → Consult the full [documentation](https://www.luos.io/docs) + + + + + + + + + + From 497f8a347477d7f347420e5ec47cf3e350cdb883 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 3 Nov 2023 18:32:33 +0100 Subject: [PATCH 184/198] Use the DEFAULTID constant instead of bare value. --- engine/IO/src/luos_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index f5a59dd11..4fb1df856 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -349,7 +349,7 @@ static int LuosIO_StartTopologyDetection(service_t *service) } // Reinit our node id - Node_Get()->node_id = 0; + Node_Get()->node_id = DEFAULTID; memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); Node_SetState(LOCAL_DETECTION); detect_state_machine = 0; @@ -429,7 +429,7 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) { // We didn't received the start detection message // Reinit our node id - Node_Get()->node_id = 0; + Node_Get()->node_id = DEFAULTID; memset(luos_phy->nodes, 0, sizeof(luos_phy->nodes)); // A phy have already been detected, so we can't reset everything // Just reset LuosIO and Phy jobs. From 031e55e6eebe7ff24d158b0710084096bd011259 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 3 Nov 2023 18:33:20 +0100 Subject: [PATCH 185/198] Fix end of branches indexing calculations --- engine/core/src/routing_table.c | 36 ++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 9e94c86d6..1fc8b8e55 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -412,6 +412,7 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 /* * To get all the nodes indexes of the provided node ID, we have to parse the routing table and use the connection informations to know how to dispatch all the nodes. * Each node is connected to all the other nodes, we "just" have to find out trough which phy we can reach them. + * If we don't have any child all the nodes are accessible from the phy of our parent. * Because node ID are contiguous the next node in the routing table (if it exist) will always have a connection information indicating trough which phy we can reach it. Let's say it is phy 1. * We will look at all the following nodes connections informations, if those informations doesn't involve our node we can consider that they are accessible trough phy 1. * If we encounter a node with parent connection informations that involve our node, this means that we completed the previous phy indexing, or exploring a parralel branch. @@ -425,6 +426,31 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 uint16_t node_idx; uint8_t nodes_indexes[MAX_NODE_NUMBER / 8 + 1] = {0}; int node_phy = -1; + if (nb_node == 1) + { + // We are the only node on the network, we don't have to send any indexes. + return; + } + // If we have no child, this means that all the nodes are accessible trough the phy of our parent. + if (connection_table[node_index + 1].parent.node_id != node_index + 1) + { + // The next node is not connected to our node, this means that we have no childs, all the nodes are accessible trough the phy of our parent. + node_phy = connection_table[node_index].child.phy_id; + for (node_idx = 0; node_idx < nb_node; node_idx++) + { + if (node_idx == node_index) + { + // This is our node, we don't care. + continue; + } + // Add the node index to the nodes_indexes table. + uint8_t bit_index = node_idx; + nodes_indexes[bit_index / 8] |= 1 << (bit_index % 8); + } + RoutingTB_SendNodeIndexes(service, node_index + 1, node_phy, nodes_indexes); + return; + } + // Start from the provided node index and parse the connection table until the end. for (node_idx = node_index + 1; node_idx < nb_node; node_idx++) { @@ -455,7 +481,7 @@ void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint1 } // We reached the end of the routing table! - // Check if the node index if the root of the routing table. If it is we just have to send the indexes and we are done. + // Check if the node index is the root of the routing table. If it is we just have to send the indexes and we are done. if (node_index == 0) { if (node_phy != -1) @@ -577,6 +603,14 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) node_phy = routing_table[node_idx].connection.parent.phy_id; } } + else + { + if (node_phy != -1) + { + // The first node we encounter is not our child, this means that we have no childs, all the nodes are accessible trough the phy of our parent. + node_phy = routing_table[node_idx].connection.child.phy_id; + } + } break; case SERVICE: // This is a service slot. From c5dd5955948b3c8003a40fe3afd49073cdaf3f88 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Thu, 12 Oct 2023 13:06:02 +0200 Subject: [PATCH 186/198] Fix some comment typo --- engine/core/src/luos_engine.c | 3 ++- engine/core/src/routing_table.c | 2 +- examples/projects/l0/gate_serialcom/node_config.h | 1 - examples/projects/native/gate_wscom/node_config.h | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engine/core/src/luos_engine.c b/engine/core/src/luos_engine.c index b38473d13..e29cbd0ed 100644 --- a/engine/core/src/luos_engine.c +++ b/engine/core/src/luos_engine.c @@ -325,10 +325,11 @@ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size // Send message uint32_t tickstart = Luos_GetSystick(); + while (Luos_SendMsg(service, msg) == FAILED) { // No more memory space available - // 500ms of timeout after start trying to load our data in memory. Perhaps the buffer is full of RX messages try to increate the buffer size. + // 500ms of timeout after start trying to load our data in memory. Perhaps the buffer is full of RX messages try to increase the buffer size. LUOS_ASSERT(((volatile uint32_t)Luos_GetSystick() - tickstart) < 500); } diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 1fc8b8e55..3bed90571 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -349,7 +349,6 @@ static bool RoutingTB_Share(service_t *service, uint16_t nb_node) for (uint16_t i = 2; i <= nb_node; i++) // don't send to ourself { intro_msg.header.target = i; - // Check if this node need to get the routing table. uint16_t node_idx; for (node_idx = i; node_idx < last_routing_table_entry; node_idx++) { @@ -359,6 +358,7 @@ static bool RoutingTB_Share(service_t *service, uint16_t nb_node) } } RoutingTB_ComputeServiceIndexes(service, node_idx); + // Check if this node need to get the routing table. if ((routing_table[node_idx].node_info & (1 << 0)) == 0) { Luos_SendData(service, &intro_msg, routing_table, (last_routing_table_entry * sizeof(routing_table_t))); diff --git a/examples/projects/l0/gate_serialcom/node_config.h b/examples/projects/l0/gate_serialcom/node_config.h index 68c0cdd4c..5646cb775 100644 --- a/examples/projects/l0/gate_serialcom/node_config.h +++ b/examples/projects/l0/gate_serialcom/node_config.h @@ -38,7 +38,6 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * MAX_NODE_NUMBER | 20 | Node number in the device diff --git a/examples/projects/native/gate_wscom/node_config.h b/examples/projects/native/gate_wscom/node_config.h index c789f57da..2954f1348 100644 --- a/examples/projects/native/gate_wscom/node_config.h +++ b/examples/projects/native/gate_wscom/node_config.h @@ -40,7 +40,8 @@ * Define | Default Value | Description * :---------------------|------------------------------------------------------ * MAX_LOCAL_SERVICE_NUMBER | 5 | Service number in the node - * MAX_NODE_NUMBER. | 20 | Node number in the device + * MAX_NODE_NUMBER | 20 | Node number in the device + * MAX_SERVICE_NUMBER | 20 | Service number in the device * MSG_BUFFER_SIZE | 3*SIZE_MSG_MAX (405 Bytes) | Size in byte of the Luos buffer TX and RX * MAX_MSG_NB | 2*MAX_LOCAL_SERVICE_NUMBER | Message number in Luos buffer * NBR_PORT | 2 | PTP Branch number Max 8 @@ -100,8 +101,6 @@ ******************************************************************************* * Define | Default Value | Description * :-------------------------|------------------------------------------------------ - * MAX_NODE_NUMBER | 20 | Node number in the device - * MAX_SERVICE_NUMBER | 20 | Service number in the device * GATE_BUFF_SIZE | 1024 | Json receive buffer size * PIPE_RX_BUFFER_SIZE | 1024 | Receive pipe buffer size * PIPE_TX_BUFFER_SIZE | 2048 | Transmit pipe buffer size From f0ba9378ad626b67860e832acdef869c7cb82b57 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 7 Nov 2023 12:10:13 +0100 Subject: [PATCH 187/198] Fix unit test to match new nodes index computation --- test/_resources/Scenarios/default_scenario.c | 5 ----- test/tests_io/test_phy/main.c | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index ac5e0be21..402b68241 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -39,11 +39,6 @@ void Init_Context(void) printf("[FATAL] Can't reset scenario context\n"); TEST_ASSERT_TRUE(IS_ASSERT()); } - Luos_Loop(); - - RESET_ASSERT(); - Luos_Init(); - Robus_Init(); // Create services revision_t revision = {.major = 1, .minor = 0, .build = 0}; diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 0435f37ca..52300eab7 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -587,6 +587,7 @@ void unittest_phy_deadTarget() luos_phy->job_nb = 3; luos_phy->oldest_job_index = 0; luos_phy->available_job_index = 3; + luos_phy->rx_phy_filter = 0; luos_phy->job[0].data_pt = (uint8_t *)msg_buffer; luos_phy->job[1].data_pt = (uint8_t *)&msg_buffer[20]; // This is a different target, it should not be removed luos_phy->job[2].data_pt = (uint8_t *)msg_buffer; @@ -1020,7 +1021,6 @@ void unittest_phy_ValidMsg() TRY { phy_test_reset(); - Init_Context(); memory_stats_t memory_stats; MsgAlloc_Init(&memory_stats); @@ -1043,6 +1043,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x00; luos_phy->rx_timestamp = 10; + robus_phy->services[0] = 0x02; // Configure this service as accessible from Robus TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); Phy_ValidMsg(luos_phy); @@ -1050,11 +1051,10 @@ void unittest_phy_ValidMsg() TEST_ASSERT_EQUAL(10, phy_ctx.io_job[0].timestamp); TEST_ASSERT_EQUAL(false, luos_phy->rx_alloc_job); TEST_ASSERT_EQUAL(msg_buffer, phy_ctx.io_job[0].alloc_msg); - TEST_ASSERT_EQUAL(0x01, phy_ctx.io_job[0].phy_filter); + TEST_ASSERT_EQUAL(0x02, phy_ctx.io_job[0].phy_filter); TEST_ASSERT_EQUAL(MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t), phy_ctx.io_job[0].size); TEST_ASSERT_EQUAL(0, luos_phy->received_data); TEST_ASSERT_EQUAL(luos_phy->rx_buffer_base, luos_phy->rx_data); - TEST_ASSERT_EQUAL(0x01, luos_phy->rx_phy_filter); // A Robus node is targeted } CATCH { From 223e9d2d6f5540e2b95f0c8ce1eeb6a32135b89d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Tue, 7 Nov 2023 15:39:19 +0100 Subject: [PATCH 188/198] Fix service indexes computation --- engine/core/src/routing_table.c | 59 +++++++++++++++++---------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 3bed90571..035fedeb8 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -37,7 +37,7 @@ static bool RoutingTB_Share(service_t *service, uint16_t nb_node); static void RoutingTB_SendEndDetection(service_t *service); static void RoutingTB_ComputeNodeIndexes(service_t *service, uint16_t node_index, uint16_t nb_node, connection_t *connection_table); static void RoutingTB_SendNodeIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *node_indexes); -static void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index); +static void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t rtb_index); static void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t phy_index, uint8_t *service_indexes); // ************************ routing_table search tools *************************** @@ -539,7 +539,7 @@ void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t // First we send the phy index allowing the target to know where to store the indexes index_msg.header.cmd = PHY_ID; Luos_SendData(service, &index_msg, &phy_index, sizeof(uint8_t)); - // Then we evaluate how many bytes we need to send the node indexes + // Then we evaluate how many bytes we need to send for the service indexes volatile uint16_t i = 0; for (i = (MAX_SERVICE_NUMBER / 8) + 1; i > 0; i--) { @@ -548,10 +548,13 @@ void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t break; } } - // Send the service indexes - index_msg.header.cmd = SERVICE_INDEXES; - memcpy(data, service_indexes, i); - Luos_SendData(service, &index_msg, data, i); + if (i != 0) + { + // Send the service indexes + index_msg.header.cmd = SERVICE_INDEXES; + memcpy(data, service_indexes, i); + Luos_SendData(service, &index_msg, data, i); + } } /****************************************************************************** @@ -559,7 +562,7 @@ void RoutingTB_SendServiceIndexes(service_t *service, uint16_t node_id, uint8_t * @param node_id : node id to compute indexes * @return None ******************************************************************************/ -void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) +void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t rtb_index) { /* * To get all the nodes indexes of the provided node ID, we have to parse the routing table and use the connection informations to know how to dispatch all the nodes. @@ -573,42 +576,42 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) * - If the phy we were indexing is the same as our parent phy, we have to add all the parents nodes in the same phy indexing then send it. * - If the phy we were indexing is different from our parent phy, we have to send the phy indexing and start a new one dedicated to the phy described by the parent node connection informations we have. */ - LUOS_ASSERT((node_index < last_routing_table_entry) && (routing_table[node_index].mode == NODE)); - uint16_t node_idx; + LUOS_ASSERT((rtb_index < last_routing_table_entry) && (routing_table[rtb_index].mode == NODE)); + uint16_t rtb_idx; uint8_t services_indexes[MAX_SERVICE_NUMBER / 8 + 1] = {0}; int node_phy = -1; // Start from the provided node index and parse the routing table until the end. - for (node_idx = node_index + 1; node_idx < last_routing_table_entry; node_idx++) + for (rtb_idx = rtb_index + 1; rtb_idx < last_routing_table_entry; rtb_idx++) { - switch (routing_table[node_idx].mode) + switch (routing_table[rtb_idx].mode) { case NODE: // This is a node slot, check if the connection informations involve our node. - if (routing_table[node_idx].connection.parent.node_id == routing_table[node_index].node_id) + if (routing_table[rtb_idx].connection.parent.node_id == routing_table[rtb_index].node_id) { // This node consider our node as its parent! - // This means that we completed the previous phy indexing, or we are exploring a parralel branch. + // This means that we completed the previous phy indexing, or we are exploring a parallel branch. // If the phy of the new branch is not the same, we can send it and start a new one for the phy described by the node connection informations. // If the phy of the new branch is the same, we have to add them to the same index. - if (node_phy != routing_table[node_idx].connection.parent.phy_id) + if (node_phy != routing_table[rtb_idx].connection.parent.phy_id) { if (node_phy != -1) { // We have to send the indexes we completed. - RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + RoutingTB_SendServiceIndexes(service, routing_table[rtb_index].node_id, node_phy, services_indexes); } // We have to reset the indexes table and set the node_phy to the index of the concerned phy. memset(services_indexes, 0, sizeof(services_indexes)); - node_phy = routing_table[node_idx].connection.parent.phy_id; + node_phy = routing_table[rtb_idx].connection.parent.phy_id; } } else { - if (node_phy != -1) + if (node_phy == -1) { // The first node we encounter is not our child, this means that we have no childs, all the nodes are accessible trough the phy of our parent. - node_phy = routing_table[node_idx].connection.child.phy_id; + node_phy = routing_table[rtb_idx].connection.child.phy_id; } } break; @@ -619,7 +622,7 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) if (node_phy != -1) { // Add the service index to the services_indexes table. - uint8_t bit_index = routing_table[node_idx].id - 1; // Because 1 represent bit index 0. + uint8_t bit_index = routing_table[rtb_idx].id - 1; // Because 1 represent bit index 0. services_indexes[bit_index / 8] |= 1 << (bit_index % 8); } break; @@ -632,35 +635,35 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) // We reached the end of the routing table! // Check if the node index is the root of the routing table. If it is we just have to send the indexes and we are done. - if (node_index == 0) + if (rtb_index == 0) { if (node_phy != -1) { // We have to send the indexes we completed. - RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + RoutingTB_SendServiceIndexes(service, routing_table[rtb_index].node_id, node_phy, services_indexes); } return; } // Compare the current node_phy to the current node index connection informations. - if (node_phy != routing_table[node_index].connection.child.phy_id) + if (node_phy != routing_table[rtb_index].connection.child.phy_id) { if (node_phy != -1) { // We were indexing another phy, we can consider it as done and send it. Then we have to start a new one for routing_table[node_index].connection.child.phy_id. - RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + RoutingTB_SendServiceIndexes(service, routing_table[rtb_index].node_id, node_phy, services_indexes); } // We have to reset the indexes table and set the node_phy to the index of the concerned phy. memset(services_indexes, 0, sizeof(services_indexes)); - node_phy = routing_table[node_index].connection.child.phy_id; + node_phy = routing_table[rtb_index].connection.child.phy_id; } // Now we can put all the parent slots in the current indexes table. - for (node_idx = 0; node_idx < node_index; node_idx++) + for (rtb_idx = 0; rtb_idx < rtb_index; rtb_idx++) { - if (routing_table[node_idx].mode == SERVICE) + if (routing_table[rtb_idx].mode == SERVICE) { // Add the service index to the services_indexes table. - uint8_t bit_index = routing_table[node_idx].id - 1; // Because 1 represent bit index 0. + uint8_t bit_index = routing_table[rtb_idx].id - 1; // Because 1 represent bit index 0. services_indexes[bit_index / 8] |= 1 << (bit_index % 8); } } @@ -668,7 +671,7 @@ void RoutingTB_ComputeServiceIndexes(service_t *service, uint16_t node_index) if (node_phy != -1) { // Send the last phy indexes. - RoutingTB_SendServiceIndexes(service, routing_table[node_index].node_id, node_phy, services_indexes); + RoutingTB_SendServiceIndexes(service, routing_table[rtb_index].node_id, node_phy, services_indexes); } } From e4536db8a88dcd3f0da134fd7e798a47d11ca887 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 8 Nov 2023 13:25:35 +0100 Subject: [PATCH 189/198] Avoid infinite loop on tests in case of detection failure. --- test/_resources/Scenarios/default_scenario.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/_resources/Scenarios/default_scenario.c b/test/_resources/Scenarios/default_scenario.c index 402b68241..2f680f9f6 100644 --- a/test/_resources/Scenarios/default_scenario.c +++ b/test/_resources/Scenarios/default_scenario.c @@ -67,9 +67,16 @@ static void Detection(service_t *service) search_result_t result; Luos_Detect(service); + uint32_t started_time = Luos_GetSystick(); do { Luos_Loop(); + if (Luos_GetSystick() - started_time > 10000) + { + printf("[FATAL] Detection failed\n"); + TEST_ASSERT_TRUE(0); + return; + } } while (!Luos_IsDetected()); RTFilter_Reset(&result); From 993bfb2098fb244f29b29d80ee97afd9d8f2a874 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 13 Nov 2023 10:50:27 +0100 Subject: [PATCH 190/198] Switch license from Apache 2 to MIT --- .github/pull_request_template.md | 2 +- CLA.md | 7 +- CONTRIBUTING.md | 2 +- LICENSE | 222 +++---------------------------- examples/LICENSE | 21 --- library.json | 2 +- 6 files changed, 27 insertions(+), 229 deletions(-) delete mode 100644 examples/LICENSE diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 07f98f851..404e62af3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -By submiting this PR, you agree with the associated license ([Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) or [MIT](http://choosealicense.com/licenses/mit/)) and with our [Contributor License Agreement](https://github.com/Luos-io/luos_engine/) (CLA). +By submiting this PR, you agree with the associated license [MIT](http://choosealicense.com/licenses/mit/)) and with our [Contributor License Agreement](https://github.com/Luos-io/luos_engine/) (CLA). ## Before to begin diff --git a/CLA.md b/CLA.md index 75a071544..435a4fabe 100644 --- a/CLA.md +++ b/CLA.md @@ -3,13 +3,13 @@ By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I - have the right to submit it under the Apache 2.0 license; or + have the right to submit it under the MIT license; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part - by me, under the Apache 2.0 license; or + by me, under the MIT license; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified @@ -23,5 +23,4 @@ By making a contribution to this project, I certify that: --- -The text of this license is available under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/). It is based on the Linux [Developer Certificate Of Origin](http://elinux.org/Developer_Certificate_Of_Origin), but is modified to explicitly use the Apache 2.0 license -and not mention sign-off. \ No newline at end of file +The text of this license is available under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-sa/3.0/). It is based on the Linux [Developer Certificate Of Origin](http://elinux.org/Developer_Certificate_Of_Origin), but is modified to explicitly use the MIT license and not mention sign-off. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83a29dcb3..06e3beb79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,7 +121,7 @@ There are many resources to guide you into making clean contribution on the Inte
ℹ️ Info
-Luos is open source. Keep in mind that any contribution you make will be under the MIT Software License for examples, and the Apache 2.0 Licence for Luos engine. In short, when you submit code to the project, you agree with our [Contributor License Agreement](https://github.com/Luos-io/luos_engine/) (CLA) and your submission is placed under the same license that the one covering the project. +Luos is open source. Keep in mind that any contribution you make will be under the MIT Software License, when you submit code to the project, you agree with our [Contributor License Agreement](https://github.com/Luos-io/luos_engine/) (CLA) and your submission is placed under the same license that the one covering the project.
People love thorough bug reports or feature requests. They tend to have: diff --git a/LICENSE b/LICENSE index 261eeb9e9..54d9724a0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2023 Nicolas Rabault + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/examples/LICENSE b/examples/LICENSE deleted file mode 100644 index 7c6a34d6b..000000000 --- a/examples/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Luos - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/library.json b/library.json index 2cb839ea0..ab20e9e67 100644 --- a/library.json +++ b/library.json @@ -8,7 +8,7 @@ "url": "https://luos.io" }, "homepage": "https://www.luos.io", - "license": "Apache-2.0", + "license": "MIT", "headers": "engine/core/inc/luos_engine.h", "build": { "srcDir": "engine/core/src", From 33b8ba16c28a0e13075884cc366afbabd7f51d96 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 20 Nov 2023 13:00:13 +0100 Subject: [PATCH 191/198] Allow to delete excluded services and nodes from filters --- engine/IO/inc/_luos_phy.h | 2 ++ engine/IO/src/luos_io.c | 17 +++++++++-- engine/IO/src/luos_phy.c | 52 ++++++++++++++++++++++++++++++--- engine/core/src/routing_table.c | 4 +-- 4 files changed, 67 insertions(+), 8 deletions(-) diff --git a/engine/IO/inc/_luos_phy.h b/engine/IO/inc/_luos_phy.h index 71566a0dd..11e5cf6d5 100644 --- a/engine/IO/inc/_luos_phy.h +++ b/engine/IO/inc/_luos_phy.h @@ -27,6 +27,8 @@ void Phy_FiltersInit(void); void Phy_AddLocalServices(uint16_t service_id, uint16_t service_number); bool Phy_FilterType(uint16_t type_id); void Phy_IndexSet(uint8_t *index, uint16_t id); +void Phy_NodeIndexRm(uint16_t id); +void Phy_ServiceIndexRm(uint16_t id); void Phy_ResetAllNeeded(void); #endif /* _PRIVATE_LUOS_PHY_H_ */ diff --git a/engine/IO/src/luos_io.c b/engine/IO/src/luos_io.c index 4fb1df856..766eed8c4 100644 --- a/engine/IO/src/luos_io.c +++ b/engine/IO/src/luos_io.c @@ -476,12 +476,12 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) switch (input->header.size) { case 2: - // generate local ID + // Generate local ID RoutingTB_Erase(); memcpy(&base_id, &input->data[0], sizeof(uint16_t)); Service_GenerateId(base_id); case 0: - // send back a local routing table + // Send back a local routing table output_msg.header.cmd = RTB; output_msg.header.target_mode = NODEIDACK; output_msg.header.target = input->header.source; @@ -582,10 +582,23 @@ error_return_t LuosIO_ConsumeMsg(const msg_t *input) case DEADTARGET: if (dead_target->node_id != 0) { + // Get all services of this node and remove them from the indexes + search_result_t result; + RTFilter_Node(RTFilter_Reset(&result), dead_target->node_id); + for (size_t i = 0; i < result.result_nbr; i++) + { + Phy_ServiceIndexRm(result.result_table[i]->id); + } + // remove the node from the indexes + Phy_NodeIndexRm(dead_target->node_id); + // remove the node services from the routing table RoutingTB_RemoveNode(dead_target->node_id); } if (dead_target->service_id != 0) { + // Remove the service from the indexes + Phy_ServiceIndexRm(dead_target->service_id); + // Remove the service from the routing table RoutingTB_RemoveService(dead_target->service_id); } // This assert information could be usefull for services, do not remove it. diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 080d7b12f..11383c1d0 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -100,6 +100,7 @@ static int Phy_GetPhyId(luos_phy_t *phy_ptr); static bool Phy_IndexFilter(uint8_t *index, uint16_t id); static bool Phy_Need(luos_phy_t *phy_ptr, header_t *header); static phy_target_t Phy_ComputeTargets(luos_phy_t *phy_ptr, header_t *header); +static void Phy_IndexRm(uint8_t *index, uint16_t id); /******************************************************************************* * Variables @@ -1199,8 +1200,8 @@ void Phy_AddLocalServices(uint16_t service_id, uint16_t service_number) /****************************************************************************** * @brief check if the given id value concern this phy index - * @param index Pointer to the index of the node - * @param id id of the service concerned by this message + * @param index Pointer to the index of the node or service + * @param id id of the node or service concerned by this message * @return phy concerned by this message ******************************************************************************/ inline bool Phy_IndexFilter(uint8_t *index, uint16_t id) @@ -1212,8 +1213,8 @@ inline bool Phy_IndexFilter(uint8_t *index, uint16_t id) /****************************************************************************** * @brief Set a given id value in the index - * @param index Pointer to the index of the node - * @param id id of the service concerned by this message + * @param index Pointer to the index of the node or service + * @param id id of the node or service concerned by this message * @return phy concerned by this message ******************************************************************************/ inline void Phy_IndexSet(uint8_t *index, uint16_t id) @@ -1223,6 +1224,49 @@ inline void Phy_IndexSet(uint8_t *index, uint16_t id) index[bit_index / 8] |= 1 << (bit_index % 8); } +/****************************************************************************** + * @brief Remove a given id value in the index + * @param index Pointer to the index of the node or service + * @param id id of the service concerned by this message + * @return phy concerned by this message + ******************************************************************************/ +inline void Phy_IndexRm(uint8_t *index, uint16_t id) +{ + LUOS_ASSERT((index != NULL) && (id <= 0x0FFF) && (id != 0)); + uint8_t bit_index = id - 1; // Because 1 represent bit index 0. + index[bit_index / 8] &= ~(1 << (bit_index % 8)); +} + +/****************************************************************************** + * @brief Remove a given service id value in the index of all phys + * @param id id of the service concerned by this message + * @return phy concerned by this message + ******************************************************************************/ +inline void Phy_ServiceIndexRm(uint16_t id) +{ + LUOS_ASSERT((id <= 0x0FFF) && (id != 0)); + // for all phy + for (int i = 0; i < phy_ctx.phy_nb; i++) + { + Phy_IndexRm(phy_ctx.phy[i].services, id); + } +} + +/****************************************************************************** + * @brief Remove a given node id value in the index of all phys + * @param id id of the node concerned by this message + * @return phy concerned by this message + ******************************************************************************/ +inline void Phy_NodeIndexRm(uint16_t id) +{ + LUOS_ASSERT((id <= 0x0FFF) && (id != 0)); + // for all phy + for (int i = 0; i < phy_ctx.phy_nb; i++) + { + Phy_IndexRm(phy_ctx.phy[i].nodes, id); + } +} + /****************************************************************************** * @brief Parse all services type to find if target exists * @param type_id of message diff --git a/engine/core/src/routing_table.c b/engine/core/src/routing_table.c index 035fedeb8..1eb006cb9 100644 --- a/engine/core/src/routing_table.c +++ b/engine/core/src/routing_table.c @@ -1030,12 +1030,12 @@ search_result_t *RTFilter_Node(search_result_t *result, uint16_t node_id) uint8_t entry_nbr = 0; // Check result pointer LUOS_ASSERT(result != 0); - // if we the result is not initialized return 0 + // If the result is not initialized return 0 if (RTFilter_InitCheck(result) == FAILED) { result->result_nbr = 0; } - // search all the entries of the research table + // Search all the entries of the research table while (entry_nbr < result->result_nbr) { // find a service with the wanted node_id From 7364ff64cd3b9215b393a133e661e24272feb481 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 22 Nov 2023 10:52:25 +0100 Subject: [PATCH 192/198] Add a source filtering allowing to check message known provenance, fix #451 --- engine/IO/src/luos_phy.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 11383c1d0..21c3d33e1 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -528,7 +528,7 @@ bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) // To avoid to spend precious computing time, instead of checking all the phy we will only check if this concern only the receiving phy. // We need to keep this message only if the message target is not only for the phy_ptr, except if it is Luos because Luos can do localhost. - // If this phy is Luos phy, we need to keep all the messages + // If this phy is Luos phy, we need to keep all the messages no matter what. if (Phy_GetPhyId(phy_ptr) == 0) { return true; @@ -544,19 +544,27 @@ bool Phy_Need(luos_phy_t *phy_ptr, header_t *header) break; case SERVICEIDACK: case SERVICEID: - // If the target is not the phy_ptr, we need to keep this message - return !Phy_IndexFilter(phy_ptr->services, header->target); + // If the target is not the phy_ptr, and the source service is known, we need to keep this message + return (!Phy_IndexFilter(phy_ptr->services, header->target)) && (Phy_IndexFilter(phy_ptr->services, header->source)); break; case NODEIDACK: case NODEID: if (header->target == 0) { - return Node_DoWeWaitId() || (phy_ctx.PhyExeptSourceDone == false); // or we are waiting for child branches ((phy_ctx.topology_running == true) && (header->source == 1)) + return Node_DoWeWaitId() || (phy_ctx.PhyExeptSourceDone == false); } else { - // If the target is not for the receiving phy, we need to keep this message - return (!Phy_IndexFilter(phy_ptr->nodes, header->target) && (Node_Get()->node_id != 0)); + if (Luos_IsDetected()) + { + // If the target is not for the receiving phy, and the source service is known, we need to keep this message + return (!Phy_IndexFilter(phy_ptr->nodes, header->target) && (Node_Get()->node_id != 0) && (Phy_IndexFilter(phy_ptr->services, header->source))); + } + else + { + // If the target is not for the receiving phy, we need to keep this message + return (!Phy_IndexFilter(phy_ptr->nodes, header->target) && (Node_Get()->node_id != 0)); + } } break; default: From 86288ff3731f98b470bbc43784a738b273c15806 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 22 Nov 2023 10:58:01 +0100 Subject: [PATCH 193/198] Adapt tests --- test/tests_io/test_phy/main.c | 266 +++++++++++++++++++++++++++++++++- 1 file changed, 264 insertions(+), 2 deletions(-) diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index 52300eab7..dcc10e075 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -2,6 +2,7 @@ #include "../src/luos_phy.c" #include "../src/msg_alloc.c" #include "../src/luos_io.c" +#include "../../core/src/node.c" #include luos_phy_t *robus_phy; @@ -696,7 +697,7 @@ void unittest_phy_ComputeHeader() END_TRY; } - NEW_TEST_CASE("Check ComputeHeader for a non timestamped message needed by Luos"); + NEW_TEST_CASE("Check ComputeHeader for a non timestamped message from Luos"); { TRY { @@ -723,7 +724,7 @@ void unittest_phy_ComputeHeader() luos_phy->rx_alloc_job = false; luos_phy->rx_size = 0; luos_phy->rx_phy_filter = 0x00; - Phy_ComputeHeader(luos_phy); + Phy_ComputeHeader(luos_phy); // Here, because we use luos_phy, the message is accepted no matter what. TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), luos_phy->rx_size); TEST_ASSERT_EQUAL(true, luos_phy->rx_keep); TEST_ASSERT_EQUAL(true, luos_phy->rx_ack); @@ -736,6 +737,264 @@ void unittest_phy_ComputeHeader() END_TRY; } + NEW_TEST_CASE("Check ComputeHeader for a non timestamped message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 2; + msg.data[0] = 0xAE; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); // Here, because we use luos_phy, the message is accepted no matter what. + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(true, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(true, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(true, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader failure for a non referenced service source message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = SERVICEIDACK; + msg.header.target = 1; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 3; + msg.data[0] = 0xAE; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader failure for a non referenced service source node message needed by Luos during the detection"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 2; + msg.data[0] = 0xAE; + Node_Get()->node_id = 0; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); // Here, because we don't have node_id yet, the message is rejected no matter what. + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader failure for a non referenced service source node message needed by Luos before detection"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 3; + msg.data[0] = 0xAE; + Node_Get()->node_id = 2; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); // Here, the source is not a referenced service, we have a node ID, but detection is not done, so the message is accepted. + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(true, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(true, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(true, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader failure for a non referenced service source node message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 3; + msg.data[0] = 0xAE; + Node_Get()->node_id = 2; + node_ctx.state = DETECTION_OK; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); // Here, the source is not a referenced service, we have a node ID, and detection is done, so the message is rejected. + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(false, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(false, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(false, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + + NEW_TEST_CASE("Check ComputeHeader failure for a referenced service source node message needed by Luos"); + { + TRY + { + phy_test_reset(); + // Create a fake service with id 1 + Phy_AddLocalServices(1, 1); + + msg_t msg; + msg.header.config = BASE_PROTOCOL; + msg.header.target_mode = NODEIDACK; + msg.header.target = 2; + msg.header.cmd = IO_STATE; + msg.header.size = 1; + msg.header.source = 2; + msg.data[0] = 0xAE; + Node_Get()->node_id = 2; + node_ctx.state = DETECTION_OK; + + // Configure the source in indexes + Phy_IndexSet(robus_phy->services, 2); + // Save message information in the Luos phy struct + robus_phy->rx_buffer_base = (uint8_t *)&msg; + robus_phy->rx_data = luos_phy->rx_buffer_base; + // For now let just consider that we received the header allowing us to compute the message things based on it. + robus_phy->received_data = sizeof(header_t); + robus_phy->rx_keep = true; // Tell phy that we want to keep this message + robus_phy->rx_ack = false; + robus_phy->rx_alloc_job = false; + robus_phy->rx_size = 0; + robus_phy->rx_phy_filter = 0x00; + Phy_ComputeHeader(robus_phy); // Here, the source service is referenced, we have a node Id, and detection is done. The message is accepted. + TEST_ASSERT_EQUAL(msg.header.size + sizeof(header_t), robus_phy->rx_size); + TEST_ASSERT_EQUAL(true, robus_phy->rx_keep); + TEST_ASSERT_EQUAL(true, robus_phy->rx_ack); + TEST_ASSERT_EQUAL(true, robus_phy->rx_alloc_job); + } + CATCH + { + TEST_ASSERT_TRUE(false); + } + END_TRY; + } + NEW_TEST_CASE("Check ComputeHeader for a timestamped message needed by Luos"); { TRY @@ -750,6 +1009,7 @@ void unittest_phy_ComputeHeader() msg.header.target = 1; msg.header.cmd = IO_STATE; msg.header.size = 1; + msg.header.source = 2; msg.data[0] = 0xAE; // Save message information in the Luos phy struct @@ -1028,6 +1288,7 @@ void unittest_phy_ValidMsg() msg.header.config = TIMESTAMP_PROTOCOL; msg.header.target_mode = SERVICEIDACK; msg.header.target = 2; + msg.header.source = 1; msg.header.cmd = IO_STATE; msg.header.size = 600; msg.data[0] = 0xAE; @@ -1043,6 +1304,7 @@ void unittest_phy_ValidMsg() luos_phy->rx_size = MAX_DATA_MSG_SIZE + sizeof(header_t) + sizeof(time_luos_t); luos_phy->rx_phy_filter = 0x00; luos_phy->rx_timestamp = 10; + luos_phy->services[0] = 0x01; // Configure service 1 as accessible from Luos robus_phy->services[0] = 0x02; // Configure this service as accessible from Robus TEST_ASSERT_EQUAL(0, phy_ctx.io_job_nb); From 66957d73d34273bd92d58f0a9823af3ed7d79aab Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 22 Nov 2023 16:10:09 +0100 Subject: [PATCH 194/198] [Gate] Add exclusion management back. --- tool_services/gate/TinyJSON/convert.c | 18 ++++++++++++++++++ tool_services/gate/convert.h | 2 ++ tool_services/gate/data_manager.c | 13 +++++++++++++ 3 files changed, 33 insertions(+) diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index c2fba74af..85c687f6b 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -927,6 +927,24 @@ void Convert_AssertToData(service_t *service, uint16_t source, luos_assert_t ass PipeLink_Send(service, assert_json, strlen(assert_json)); } +// This function generate a Json about service exclusion and send it. +void Convert_DeadServiceToData(service_t *service, uint16_t service_id) +{ + char dead_json[512]; + sprintf(dead_json, "{\"dead_service\":%d}\n", service_id); + // Send the message to pipe + PipeLink_Send(service, dead_json, strlen(dead_json)); +} + +// This function generate a Json about node exclusion and send it. +void Convert_DeadNodeToData(service_t *service, uint16_t node_id) +{ + char dead_json[512]; + sprintf(dead_json, "{\"dead_node\":%d}\n", node_id); + // Send the message to pipe + PipeLink_Send(service, dead_json, strlen(dead_json)); +} + /******************************************************************************* * Luos routing table information to Json convertion ******************************************************************************/ diff --git a/tool_services/gate/convert.h b/tool_services/gate/convert.h index b97360077..46ad2cfeb 100644 --- a/tool_services/gate/convert.h +++ b/tool_services/gate/convert.h @@ -38,6 +38,8 @@ void Convert_VoidData(service_t *service); // Luos default information to Data convertion void Convert_AssertToData(service_t *service, uint16_t source, luos_assert_t assertion); +void Convert_DeadServiceToData(service_t *service, uint16_t service_id); +void Convert_DeadNodeToData(service_t *service, uint16_t node_id); // Luos routing table information to Json convertion void Convert_RoutingTableData(service_t *service); diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index cdf26ab8c..f1bf16f95 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -149,6 +149,19 @@ void DataManager_Format(service_t *service) i++; continue; } + if (data_msg.header.cmd == DEADTARGET) + { + dead_target_t *dead_target = (dead_target_t *)data_msg.data; + if (dead_target->node_id != 0) + { + Convert_DeadNodeToData(service, dead_target->node_id); + } + if (dead_target->service_id != 0) + { + Convert_DeadServiceToData(service, dead_target->service_id); + } + continue; + } // check if a node send a bootloader message if (data_msg.header.cmd >= BOOTLOADER_START && data_msg.header.cmd <= BOOTLOADER_ERROR_SIZE) { From b54b942a3dbbd3bcfb795428903ff16203239a05 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 8 Dec 2023 13:07:23 +0100 Subject: [PATCH 195/198] Remove the need of BOOTLADER define when BOOTLOADER_UPDATE is set --- engine/HAL/ARDUINO/luos_hal.c | 2 +- engine/HAL/ATSAMD21_ARDUINO/luos_hal.c | 2 +- engine/HAL/ATSAMD21_MBED/luos_hal.c | 2 +- engine/HAL/ESP32/luos_hal.c | 2 +- engine/HAL/STM32F0/luos_hal.c | 2 +- engine/HAL/STM32F0/luos_hal.h | 2 +- engine/HAL/STM32F4/luos_hal.c | 2 +- engine/HAL/STM32F4/luos_hal.h | 2 +- engine/HAL/STM32G4/luos_hal.c | 2 +- engine/HAL/STM32G4/luos_hal.h | 2 +- engine/HAL/STM32L0/luos_hal.c | 2 +- engine/HAL/STM32L0/luos_hal.h | 2 +- engine/HAL/STM32L4/luos_hal.c | 2 +- engine/HAL/STM32L4/luos_hal.h | 2 +- engine/HAL/template/luos_hal.h | 2 +- engine/bootloader/luos_bootloader.c | 2 +- .../NUCLEO-F072RB/bootloader/platformio.ini | 16 ---------------- .../NUCLEO-F401RE/bootloader/platformio.ini | 1 - .../NUCLEO-F410RB/bootloader/platformio.ini | 1 - .../NUCLEO-G431KB/bootloader/platformio.ini | 1 - .../NUCLEO-G474RE/bootloader/platformio.ini | 1 - .../NUCLEO-L073RZ/bootloader/platformio.ini | 1 - .../NUCLEO-L432KC/bootloader/platformio.ini | 1 - .../STM32F4-discovery/bootloader/platformio.ini | 1 - .../bootloader/platformio.ini | 1 - examples/projects/l0/bootloader/platformio.ini | 1 - 26 files changed, 16 insertions(+), 41 deletions(-) diff --git a/engine/HAL/ARDUINO/luos_hal.c b/engine/HAL/ARDUINO/luos_hal.c index 359527279..b3ca5eb16 100644 --- a/engine/HAL/ARDUINO/luos_hal.c +++ b/engine/HAL/ARDUINO/luos_hal.c @@ -138,7 +138,7 @@ void LuosHAL_Reboot(void) { } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief Get node id saved in flash memory * @param Address diff --git a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c index 025d4dcd5..ad6b697a8 100644 --- a/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c +++ b/engine/HAL/ATSAMD21_ARDUINO/luos_hal.c @@ -159,7 +159,7 @@ void LuosHAL_Reboot(void) { } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief Get node id saved in flash memory * @param Address diff --git a/engine/HAL/ATSAMD21_MBED/luos_hal.c b/engine/HAL/ATSAMD21_MBED/luos_hal.c index a4848cd05..096c2c06f 100644 --- a/engine/HAL/ATSAMD21_MBED/luos_hal.c +++ b/engine/HAL/ATSAMD21_MBED/luos_hal.c @@ -224,7 +224,7 @@ void LuosHAL_Reboot(void) { } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief Get node id saved in flash memory * @param Address diff --git a/engine/HAL/ESP32/luos_hal.c b/engine/HAL/ESP32/luos_hal.c index 6cbf903b5..d78557a79 100644 --- a/engine/HAL/ESP32/luos_hal.c +++ b/engine/HAL/ESP32/luos_hal.c @@ -174,5 +174,5 @@ void LuosHAL_Reboot(void) { } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) #endif diff --git a/engine/HAL/STM32F0/luos_hal.c b/engine/HAL/STM32F0/luos_hal.c index e17e14c16..b1e006ecc 100644 --- a/engine/HAL/STM32F0/luos_hal.c +++ b/engine/HAL/STM32F0/luos_hal.c @@ -262,7 +262,7 @@ uint8_t LuosHAL_GetMode(void) return (uint8_t)data; } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief DeInit Bootloader peripherals * @param None diff --git a/engine/HAL/STM32F0/luos_hal.h b/engine/HAL/STM32F0/luos_hal.h index 585376cfe..92867ac20 100644 --- a/engine/HAL/STM32F0/luos_hal.h +++ b/engine/HAL/STM32F0/luos_hal.h @@ -49,7 +49,7 @@ void LuosHAL_SaveNodeID(uint16_t); void LuosHAL_JumpToAddress(uint32_t); uint8_t LuosHAL_GetMode(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) void LuosHAL_DeInit(void); uint16_t LuosHAL_GetNodeID(void); void LuosHAL_EraseMemory(uint32_t, uint16_t); diff --git a/engine/HAL/STM32F4/luos_hal.c b/engine/HAL/STM32F4/luos_hal.c index 05decfa0a..b65e49b1e 100644 --- a/engine/HAL/STM32F4/luos_hal.c +++ b/engine/HAL/STM32F4/luos_hal.c @@ -248,7 +248,7 @@ uint8_t LuosHAL_GetMode(void) return (uint8_t)data; } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief DeInit Bootloader peripherals * @param None diff --git a/engine/HAL/STM32F4/luos_hal.h b/engine/HAL/STM32F4/luos_hal.h index 834e312b6..1659f4a03 100644 --- a/engine/HAL/STM32F4/luos_hal.h +++ b/engine/HAL/STM32F4/luos_hal.h @@ -48,7 +48,7 @@ void LuosHAL_SaveNodeID(uint16_t); void LuosHAL_JumpToAddress(uint32_t); uint8_t LuosHAL_GetMode(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) void LuosHAL_DeInit(void); uint16_t LuosHAL_GetNodeID(void); void LuosHAL_EraseMemory(uint32_t, uint16_t); diff --git a/engine/HAL/STM32G4/luos_hal.c b/engine/HAL/STM32G4/luos_hal.c index aee4a330b..f157de109 100644 --- a/engine/HAL/STM32G4/luos_hal.c +++ b/engine/HAL/STM32G4/luos_hal.c @@ -249,7 +249,7 @@ uint8_t LuosHAL_GetMode(void) return (uint8_t)data; } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief DeInit Bootloader peripherals * @param None diff --git a/engine/HAL/STM32G4/luos_hal.h b/engine/HAL/STM32G4/luos_hal.h index a15ffcd97..41582213d 100644 --- a/engine/HAL/STM32G4/luos_hal.h +++ b/engine/HAL/STM32G4/luos_hal.h @@ -52,7 +52,7 @@ void LuosHAL_SaveNodeID(uint16_t); void LuosHAL_JumpToAddress(uint32_t); uint8_t LuosHAL_GetMode(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) void LuosHAL_DeInit(void); uint16_t LuosHAL_GetNodeID(void); void LuosHAL_EraseMemory(uint32_t, uint16_t); diff --git a/engine/HAL/STM32L0/luos_hal.c b/engine/HAL/STM32L0/luos_hal.c index bf3de181d..6d81c692b 100644 --- a/engine/HAL/STM32L0/luos_hal.c +++ b/engine/HAL/STM32L0/luos_hal.c @@ -262,7 +262,7 @@ uint8_t LuosHAL_GetMode(void) return (uint8_t)data; } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief DeInit Bootloader peripherals * @param None diff --git a/engine/HAL/STM32L0/luos_hal.h b/engine/HAL/STM32L0/luos_hal.h index 585376cfe..92867ac20 100644 --- a/engine/HAL/STM32L0/luos_hal.h +++ b/engine/HAL/STM32L0/luos_hal.h @@ -49,7 +49,7 @@ void LuosHAL_SaveNodeID(uint16_t); void LuosHAL_JumpToAddress(uint32_t); uint8_t LuosHAL_GetMode(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) void LuosHAL_DeInit(void); uint16_t LuosHAL_GetNodeID(void); void LuosHAL_EraseMemory(uint32_t, uint16_t); diff --git a/engine/HAL/STM32L4/luos_hal.c b/engine/HAL/STM32L4/luos_hal.c index 64bf46e69..e5afd4c4b 100644 --- a/engine/HAL/STM32L4/luos_hal.c +++ b/engine/HAL/STM32L4/luos_hal.c @@ -246,7 +246,7 @@ uint8_t LuosHAL_GetMode(void) return (uint8_t)data; } -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) /****************************************************************************** * @brief DeInit Bootloader peripherals * @param None diff --git a/engine/HAL/STM32L4/luos_hal.h b/engine/HAL/STM32L4/luos_hal.h index c5d384281..cf1c81909 100644 --- a/engine/HAL/STM32L4/luos_hal.h +++ b/engine/HAL/STM32L4/luos_hal.h @@ -52,7 +52,7 @@ void LuosHAL_SaveNodeID(uint16_t); void LuosHAL_JumpToAddress(uint32_t); uint8_t LuosHAL_GetMode(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) void LuosHAL_DeInit(void); uint16_t LuosHAL_GetNodeID(void); void LuosHAL_EraseMemory(uint32_t, uint16_t); diff --git a/engine/HAL/template/luos_hal.h b/engine/HAL/template/luos_hal.h index fdf3fa0c3..1712d4734 100644 --- a/engine/HAL/template/luos_hal.h +++ b/engine/HAL/template/luos_hal.h @@ -46,7 +46,7 @@ uint64_t LuosHAL_GetTimestamp(void); void LuosHAL_StartTimestamp(void); void LuosHAL_StopTimestamp(void); -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) // bootloader functions void LuosHAL_SetMode(uint8_t mode); void LuosHAL_Reboot(void); diff --git a/engine/bootloader/luos_bootloader.c b/engine/bootloader/luos_bootloader.c index 73dc4c69a..a4e669398 100644 --- a/engine/bootloader/luos_bootloader.c +++ b/engine/bootloader/luos_bootloader.c @@ -16,7 +16,7 @@ /******************************************************************************* * Definitions ******************************************************************************/ -#ifdef BOOTLOADER +#if defined(BOOTLOADER) || defined(BOOTLOADER_UPDATER) #define MAX_FRAME_SIZE (MAX_DATA_MSG_SIZE - 1) #define BUFFER_SIZE 0x800 // 2kB buffer to store received data diff --git a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini index a4aaf4315..25ce0a007 100644 --- a/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F072RB/bootloader/platformio.ini @@ -39,7 +39,6 @@ board_build.ldscript = linker/custom_bootloader_updater_script.ld build_unflags = -Os build_flags = -include node_config.h - -DBOOTLOADER -DBOOTLOADER_UPDATER -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER @@ -49,18 +48,3 @@ upload_protocol = custom upload_flags = -t2 upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE - -[env:nucleo_f072rb_new_boot] -board_build.ldscript = linker/custom_new_bootloader_script.ld -build_unflags = -Os -build_flags = - -include node_config.h - -DBOOTLOADER - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32F0 - -O1 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE diff --git a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini index 20b46fb7c..10eb597c5 100644 --- a/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F401RE/bootloader/platformio.ini @@ -40,7 +40,6 @@ build_unflags = -Os build_flags = -O1 -include node_config.h - -DBOOTLOADER -DBOOTLOADER_UPDATER -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER diff --git a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini index ca1bb4c50..590f72b24 100644 --- a/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-F410RB/bootloader/platformio.ini @@ -40,7 +40,6 @@ build_unflags = -Os build_flags = -O1 -include node_config.h - -DBOOTLOADER -DBOOTLOADER_UPDATER -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER diff --git a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini index 9b500d707..c697fca60 100644 --- a/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G431KB/bootloader/platformio.ini @@ -39,7 +39,6 @@ board_build.ldscript = linker/custom_bootloader_updater_script.ld build_unflags = -Os build_flags = -O1 - -DBOOTLOADER -DBOOTLOADER_UPDATER -include node_config.h -DUSE_HAL_DRIVER diff --git a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini index dc1c83a12..ef662b9f9 100644 --- a/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-G474RE/bootloader/platformio.ini @@ -40,7 +40,6 @@ build_unflags = -Os build_flags = -O1 -include node_config.h - -D BOOTLOADER -D BOOTLOADER_UPDATER -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini index 9cf6fec6f..bf1deb4e4 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini @@ -43,7 +43,6 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32L0 - -DBOOTLOADER -DBOOTLOADER_UPDATER upload_protocol = custom upload_flags = diff --git a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini index 1e90565a6..8ce1fcb0c 100644 --- a/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L432KC/bootloader/platformio.ini @@ -44,7 +44,6 @@ build_flags = -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DLUOSHAL=STM32L4 - -DBOOTLOADER -DBOOTLOADER_UPDATER lib_deps = luos_engine@^3.0.0 diff --git a/examples/projects/STM32F4-discovery/bootloader/platformio.ini b/examples/projects/STM32F4-discovery/bootloader/platformio.ini index 3d0645b0b..c8f5addd4 100644 --- a/examples/projects/STM32F4-discovery/bootloader/platformio.ini +++ b/examples/projects/STM32F4-discovery/bootloader/platformio.ini @@ -38,7 +38,6 @@ debug_tool = stlink board_build.ldscript = linker/custom_bootloader_updater_script.ld build_unflags = -Os build_flags = - -DBOOTLOADER -DBOOTLOADER_UPDATER -include node_config.h -O1 diff --git a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini index 6197201e9..e42b0486e 100644 --- a/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini +++ b/examples/projects/STM32L4S5_discovery/bootloader/platformio.ini @@ -40,7 +40,6 @@ build_unflags = -Os build_flags = -O1 -include node_config.h - -DBOOTLOADER -DBOOTLOADER_UPDATER -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER diff --git a/examples/projects/l0/bootloader/platformio.ini b/examples/projects/l0/bootloader/platformio.ini index a17f313f8..3a9427ec1 100644 --- a/examples/projects/l0/bootloader/platformio.ini +++ b/examples/projects/l0/bootloader/platformio.ini @@ -36,7 +36,6 @@ board_build.ldscript = linker/custom_bootloader_updater_script.ld build_unflags = -Os build_flags = -include node_config.h - -D BOOTLOADER -O1 -D BOOTLOADER_UPDATER upload_protocol = custom From a33c39941c10dafaf4e6566172767b8343518255 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Fri, 8 Dec 2023 13:09:14 +0100 Subject: [PATCH 196/198] Remove the newboot linker script config --- .../linker/custom_new_bootloader_script.ld | 189 ----------------- .../linker/custom_new_bootloader_script.ld | 200 ------------------ .../NUCLEO-L073RZ/bootloader/platformio.ini | 16 -- .../projects/l0/bootloader/platformio.ini | 12 -- 4 files changed, 417 deletions(-) delete mode 100644 examples/projects/NUCLEO-F072RB/bootloader/linker/custom_new_bootloader_script.ld delete mode 100644 examples/projects/NUCLEO-L073RZ/bootloader/linker/custom_new_bootloader_script.ld diff --git a/examples/projects/NUCLEO-F072RB/bootloader/linker/custom_new_bootloader_script.ld b/examples/projects/NUCLEO-F072RB/bootloader/linker/custom_new_bootloader_script.ld deleted file mode 100644 index 4baac8d22..000000000 --- a/examples/projects/NUCLEO-F072RB/bootloader/linker/custom_new_bootloader_script.ld +++ /dev/null @@ -1,189 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F072RBTx Device from STM32F0 series - * 128Kbytes FLASH - * 16Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM_RSVD (xrw) : ORIGIN = 0x20000000, LENGTH = 1K - RAM (xrw) : ORIGIN = 0x20000400, LENGTH = 15K - FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 48K - SHRD_MEM (rx) : ORIGIN = 0x800C000, LENGTH = 2K -} - -/* Sections */ -SECTIONS -{ - /* placing my boot flags section at given address: */ - .boot_flags : - { - KEEP(*(.boot_flags)) /* keep my variable even if not referenced */ - } > SHRD_MEM - - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - .boot_data : - { - *(.rsvd.data) - *(.rsvd.data*) - } > RAM_RSVD - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/linker/custom_new_bootloader_script.ld b/examples/projects/NUCLEO-L073RZ/bootloader/linker/custom_new_bootloader_script.ld deleted file mode 100644 index 95ca5cec1..000000000 --- a/examples/projects/NUCLEO-L073RZ/bootloader/linker/custom_new_bootloader_script.ld +++ /dev/null @@ -1,200 +0,0 @@ -/* -****************************************************************************** -** -** @file : LinkerScript.ld -** -** @author : Auto-generated by STM32CubeIDE -** -** @brief : Linker script for STM32L073RZTx Device from STM32L0 series -** 192Kbytes FLASH -** 20Kbytes RAM -** -** Set heap size, stack size and stack location according -** to application requirements. -** -** Set memory bank area and size if external memory is used -** -** Target : STMicroelectronics STM32 -** -** Distribution: The file is distributed as is, without any warranty -** of any kind. -** -****************************************************************************** -** @attention -** -**

© Copyright (c) 2021 STMicroelectronics. -** All rights reserved.

-** -** This software component is licensed by ST under BSD 3-Clause license, -** the "License"; You may not use this file except in compliance with the -** License. You may obtain a copy of the License at: -** opensource.org/licenses/BSD-3-Clause -** -****************************************************************************** -*/ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - RAM_RSVD (xrw) : ORIGIN = 0x20000000, LENGTH = 1K - RAM (xrw) : ORIGIN = 0x20000400, LENGTH = 19K - FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 48K - SHRD_MEM (rw) : ORIGIN = 0x0800C000, LENGTH = 2K -} - -/* Sections */ -SECTIONS -{ - /* placing my boot flags section at given address: */ - .boot_flags : - { - KEEP(*(.boot_flags)) /* keep my variable even if not referenced */ - } > SHRD_MEM - - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - *(.RamFunc) /* .RamFunc sections */ - *(.RamFunc*) /* .RamFunc* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - .boot_data : - { - *(.rsvd.data) - *(.rsvd.data*) - } > RAM_RSVD - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini index bf1deb4e4..2ccd2c86e 100644 --- a/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini +++ b/examples/projects/NUCLEO-L073RZ/bootloader/platformio.ini @@ -48,19 +48,3 @@ upload_protocol = custom upload_flags = -t2 upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE - -[env:nucleo_l073rz_new_boot] -board_build.ldscript = linker/custom_new_bootloader_script.ld -build_unflags = -Os -build_flags = - -O1 - -include node_config.h - -DUSE_HAL_DRIVER - -DUSE_FULL_LL_DRIVER - -DLUOSHAL=STM32L0 - -DBOOTLOADER -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE - diff --git a/examples/projects/l0/bootloader/platformio.ini b/examples/projects/l0/bootloader/platformio.ini index 3a9427ec1..c3252a96e 100644 --- a/examples/projects/l0/bootloader/platformio.ini +++ b/examples/projects/l0/bootloader/platformio.ini @@ -42,15 +42,3 @@ upload_protocol = custom upload_flags = -t2 upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE - -[env:l0_new_boot] -board_build.ldscript = linker/custom_new_bootloader_script.ld -build_unflags = -Os -build_flags = - -include node_config.h - -D BOOTLOADER - -O1 -upload_protocol = custom -upload_flags = - -t2 -upload_command = pyluos-bootloader flash $UPLOAD_PORT $UPLOAD_FLAGS -b $SOURCE From e8db62ca86d52390f184232404ba17cc87a720a0 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 13 Dec 2023 10:26:45 +0100 Subject: [PATCH 197/198] Fix the number of allocated phy assertion --- engine/IO/src/luos_phy.c | 22 +++++++++---------- engine/engine_config.h | 2 -- examples/projects/l0/button/node_config.h | 2 ++ .../l0/controller_motor/node_config.h | 1 + test/tests_io/test_phy/main.c | 4 ++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/engine/IO/src/luos_phy.c b/engine/IO/src/luos_phy.c index 21c3d33e1..01fc8e770 100644 --- a/engine/IO/src/luos_phy.c +++ b/engine/IO/src/luos_phy.c @@ -69,9 +69,9 @@ typedef struct __attribute__((__packed__)) typedef struct { // ******************** Phy management ******************** - luos_phy_t phy[PHY_NB]; // phy[0] is the local phy, phy[1] is the remote phy. - uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. - IRQ_STATE phy_irq_states[PHY_NB]; // Store the irq state functions of phys aving one. + luos_phy_t phy[LOCAL_PHY_NB + 1]; // phy[0] is the local phy, phy[1] is the remote phy. + uint8_t phy_nb; // Number of phy instantiated in the phy_ctx.phy array. + IRQ_STATE phy_irq_states[LOCAL_PHY_NB + 1]; // Store the irq state functions of phys aving one. // ******************** Topology management ******************** port_t topology_source; // The source port. Where we receive the topological detection signal from. @@ -137,7 +137,7 @@ void Phy_Reset(void) memset((void *)phy_ctx.failed_job, 0, sizeof(phy_ctx.failed_job)); phy_ctx.failed_job_nb = 0; phy_ctx.resetAllNeed = false; - for (uint8_t i = 0; i < PHY_NB; i++) + for (uint8_t i = 0; i <= LOCAL_PHY_NB; i++) { Luos_SetIrqState(false); memset((void *)&phy_ctx.phy[i].job, 0, sizeof(phy_ctx.phy[0].job)); @@ -241,7 +241,7 @@ void Phy_Loop(void) ******************************************************************************/ luos_phy_t *Phy_Create(JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) { - LUOS_ASSERT(phy_ctx.phy_nb < PHY_NB); + LUOS_ASSERT(phy_ctx.phy_nb <= LOCAL_PHY_NB); return Phy_Get(phy_ctx.phy_nb++, job_cb, run_topo, reset_phy); } @@ -256,7 +256,7 @@ void Phy_SetIrqStateFunciton(IRQ_STATE irq_state) while (phy_ctx.phy_irq_states[i] != NULL) { i++; - if (i >= PHY_NB) + if (i > LOCAL_PHY_NB) { // We exceed the number of phy LUOS_ASSERT(0); @@ -280,7 +280,7 @@ void Phy_SetIrqState(bool state) { phy_ctx.phy_irq_states[i](state); i++; - if (i >= PHY_NB) + if (i > LOCAL_PHY_NB) { // We exceed the number of phy LUOS_ASSERT(0); @@ -440,7 +440,7 @@ port_t *Phy_GetTopologysource(void) ******************************************************************************/ luos_phy_t *Phy_Get(uint8_t id, JOB_CB job_cb, RUN_TOPO run_topo, RESET_PHY reset_phy) { - LUOS_ASSERT((id <= PHY_NB) + LUOS_ASSERT((id <= LOCAL_PHY_NB) && (job_cb != NULL) && (run_topo != NULL)); // Set the callbacks @@ -471,7 +471,7 @@ void Phy_DisableSynchro(luos_phy_t *phy_ptr) ******************************************************************************/ luos_phy_t *Phy_GetPhyFromId(uint8_t phy_id) { - LUOS_ASSERT(phy_id <= PHY_NB); + LUOS_ASSERT(phy_id <= LOCAL_PHY_NB); return &phy_ctx.phy[phy_id]; } @@ -1093,7 +1093,7 @@ inline int Phy_GetJobId(luos_phy_t *phy_ptr, phy_job_t *job) inline int Phy_GetPhyId(luos_phy_t *phy_ptr) { LUOS_ASSERT((phy_ptr >= phy_ctx.phy) - && (phy_ptr < &phy_ctx.phy[PHY_NB])); + && (phy_ptr <= &phy_ctx.phy[LOCAL_PHY_NB])); return ((uintptr_t)phy_ptr - (uintptr_t)phy_ctx.phy) / sizeof(luos_phy_t); } @@ -1176,7 +1176,7 @@ error_return_t Phy_TxAllComplete(void) ******************************************************************************/ void Phy_FiltersInit(void) { - for (int i = 0; i < PHY_NB; i++) + for (int i = 0; i <= LOCAL_PHY_NB; i++) { // Service ID init memset(phy_ctx.phy[i].services, 0, sizeof(phy_ctx.phy[i].services)); diff --git a/engine/engine_config.h b/engine/engine_config.h index 483b45ddc..11ed5aba3 100644 --- a/engine/engine_config.h +++ b/engine/engine_config.h @@ -34,8 +34,6 @@ #define LOCAL_PHY_NB 1 // The number of phy layer in the node, by default we have only Luos engine + 1 phy layer #endif -#define PHY_NB (LOCAL_PHY_NB + 1) // The total number of phy layer in the node including Luos engine - #ifdef MAX_RTB_ENTRY #error 'MAX_RTB_ENTRY' configuration is deprecated and have been replaced by MAX_NODE_NUMBER and MAX_SERVICE_NUMBER. MAX_RTB_ENTRY is now automatically calculated by the engine based on these values. #endif diff --git a/examples/projects/l0/button/node_config.h b/examples/projects/l0/button/node_config.h index 099378211..a5cfa8408 100644 --- a/examples/projects/l0/button/node_config.h +++ b/examples/projects/l0/button/node_config.h @@ -49,6 +49,8 @@ #define MAX_LOCAL_SERVICE_NUMBER 1 #define MAX_LOCAL_PROFILE_NUMBER 1 #define MAX_MSG_NB 10 +#define LOCAL_PHY_NB 2 +#define NO_RTB /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/examples/projects/l0/controller_motor/node_config.h b/examples/projects/l0/controller_motor/node_config.h index 7ca9b39d9..4974cde3c 100644 --- a/examples/projects/l0/controller_motor/node_config.h +++ b/examples/projects/l0/controller_motor/node_config.h @@ -50,6 +50,7 @@ #define MAX_LOCAL_PROFILE_NUMBER 2 #define MAX_MSG_NB 30 #define MSG_BUFFER_SIZE 1024 +#define NO_RTB /******************************************************************************* * LUOS HAL LIBRARY DEFINITION diff --git a/test/tests_io/test_phy/main.c b/test/tests_io/test_phy/main.c index dcc10e075..6b48a0719 100644 --- a/test/tests_io/test_phy/main.c +++ b/test/tests_io/test_phy/main.c @@ -1710,7 +1710,7 @@ void unittest_phy_GetPhyId() TRY { - int value = Phy_GetPhyId(&phy_ctx.phy[PHY_NB]); + int value = Phy_GetPhyId(&phy_ctx.phy[LOCAL_PHY_NB + 1]); } TEST_ASSERT_TRUE(IS_ASSERT()); END_TRY; @@ -1720,7 +1720,7 @@ void unittest_phy_GetPhyId() { TRY { - for (int i = 0; i < PHY_NB; i++) + for (int i = 0; i <= LOCAL_PHY_NB; i++) { int value = Phy_GetPhyId(&phy_ctx.phy[i]); TEST_ASSERT_EQUAL(i, value); From 445648d8f1bb1b4d266faca41cd8a145c017bdf3 Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Wed, 13 Dec 2023 16:10:56 +0100 Subject: [PATCH 198/198] Update tool_services revision to fit the library.json --- tool_services/gate/gate.c | 2 +- tool_services/pipe/pipe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool_services/gate/gate.c b/tool_services/gate/gate.c index 0aac929a3..9a4696155 100644 --- a/tool_services/gate/gate.c +++ b/tool_services/gate/gate.c @@ -36,7 +36,7 @@ time_luos_t update_time = {GATE_REFRESH_TIME_S}; ******************************************************************************/ void Gate_Init(void) { - revision_t revision = {.major = 1, .minor = 0, .build = 1}; + revision_t revision = {.major = 2, .minor = 0, .build = 0}; gate = Luos_CreateService(0, GATE_TYPE, "gate", revision); #ifndef NODETECTION uint32_t init_timer = Luos_GetSystick(); diff --git a/tool_services/pipe/pipe.c b/tool_services/pipe/pipe.c index 5b7b2efc0..01eb8a00f 100644 --- a/tool_services/pipe/pipe.c +++ b/tool_services/pipe/pipe.c @@ -36,7 +36,7 @@ void Pipe_Init(void) rx_StreamChannel = Streaming_CreateChannel(rx_Buffer, PIPE_RX_BUFFER_SIZE, 1); tx_StreamChannel = Streaming_CreateChannel(tx_Buffer, PIPE_TX_BUFFER_SIZE, 1); PipeCom_Init(); - revision_t revision = {.major = 1, .minor = 0, .build = 0}; + revision_t revision = {.major = 2, .minor = 0, .build = 0}; Luos_CreateService(Pipe_MsgHandler, PIPE_TYPE, "Pipe", revision); } /******************************************************************************