Skip to content

Commit 35d4e23

Browse files
committed
Addd rust app readme
1 parent d7f4727 commit 35d4e23

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -378,39 +378,39 @@ Sample logs for Windows and Ubuntu Linux may be found in the [logs folder](logs)
378378
379379
This repository contains...
380380
381-
1. [`src`](src): Rust Application
381+
[`src`](src): Rust Application
382382
383-
1. [`Cargo.toml`](Cargo.toml): Rust Build Settings
383+
[`Cargo.toml`](Cargo.toml): Rust Build Settings
384384
385-
1. [`.cargo`](.cargo): Rust Target Settings
385+
[`.cargo`](.cargo): Rust Target Settings
386386
387-
1. [`my_sensor_app`](apps/my_sensor_app): Mynewt Application Stub
387+
[`my_sensor_app`](apps/my_sensor_app): Mynewt Application Stub
388388
389-
1. [`boot_stub`](apps/boot_stub): Mynewt Bootloader Stub
389+
[`boot_stub`](apps/boot_stub): Mynewt Bootloader Stub
390390
391-
1. [`adc_stm32f1`](libs/adc_stm32f1): Mynewt Driver for ADC on STM32F1
391+
[`adc_stm32f1`](libs/adc_stm32f1): Mynewt Driver for ADC on STM32F1
392392
393-
1. [`custom_sensor`](libs/custom_sensor): Custom Sensor Definitions
393+
[`custom_sensor`](libs/custom_sensor): Custom Sensor Definitions
394394
395-
1. [`esp8266`](libs/esp8266): Mynewt Driver for ESP8266
395+
[`esp8266`](libs/esp8266): Mynewt Driver for ESP8266
396396
397-
1. [`hmac_prng`](libs/hmac_prng): HMAC pseudorandom number generator with entropy based on internal temperature sensor
397+
[`hmac_prng`](libs/hmac_prng): HMAC pseudorandom number generator with entropy based on internal temperature sensor
398398
399-
1. [`nrf24l01`](libs/nrf24l01): Mynewt Driver for nRF24L01
399+
[`nrf24l01`](libs/nrf24l01): Mynewt Driver for nRF24L01
400400
401-
1. [`remote_sensor`](libs/remote_sensor): Mynewt Driver for Remote Sensor
401+
[`remote_sensor`](libs/remote_sensor): Mynewt Driver for Remote Sensor
402402
403-
1. [`semihosting_console`](libs/semihosting_console): Mynewt Console for Arm Semihosting
403+
[`semihosting_console`](libs/semihosting_console): Mynewt Console for Arm Semihosting
404404
405-
1. [`sensor_coap`](libs/sensor_coap): Sensor CoAP Library
405+
[`sensor_coap`](libs/sensor_coap): Sensor CoAP Library
406406
407-
1. [`sensor_network`](libs/sensor_network): Sensor Network Library
407+
[`sensor_network`](libs/sensor_network): Sensor Network Library
408408
409-
1. [`temp_stm32`](libs/temp_stm32): Mynewt Driver for Internal Temperature Sensor on STM32
409+
[`temp_stm32`](libs/temp_stm32): Mynewt Driver for Internal Temperature Sensor on STM32
410410
411-
1. [`scripts`](scripts): Install, build and deploy scripts
411+
[`scripts`](scripts): Install, build and deploy scripts
412412
413-
1. [`.vscode`](.vscode): Visual Studio Code macros for install, build and deploy
413+
[`.vscode`](.vscode): Visual Studio Code macros for install, build and deploy
414414
415415
416416
# How This Application Was Created

src/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,19 @@
33
This Rust application polls the internal temperature sensor every 10 seconds and displays the results.
44

55
The application is compiled as a Rust library `libmylib.rlib`, which is injected into the Mynewt build.
6+
7+
[`lib.rs`](lib.rs): Main library module. Contains `main()`, called by Mynewt at startup, and the panic handler. Imports the modules below via the `mod` directive.
8+
9+
[`base.rs`](base.rs): Common declarations
10+
11+
[`sensor.rs`](sensor.rs): Imports the [Mynewt Sensor Framework API](https://mynewt.apache.org/latest/os/modules/sensor_framework/sensor_framework.html). Contains custom sensor declarations.
12+
13+
[`listen_sensor.rs`](listen_sensor.rs): Calls the [Mynewt Sensor Framework API](https://mynewt.apache.org/latest/os/modules/sensor_framework/sensor_framework.html) to poll the [Blue Pill internal temperature sensor](/libs/temp_stm32) every 10 seconds, and register a Listener Function that will be called after each poll.
14+
15+
[`send_coap.rs`](send_coap.rs): Called by the Listener Function after each poll of the internal temperature sensor.
16+
17+
## Related Files
18+
19+
[`/Cargo.toml`](/Cargo.toml): Rust Build Settings
20+
21+
[`/.cargo`](/.cargo): Rust Target Settings

0 commit comments

Comments
 (0)