Skip to content

Commit

Permalink
Merge branch 'main' into feature/fix-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaegers authored Oct 6, 2022
2 parents 3ee4dec + a1fc827 commit f62bbf3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/linting-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
fetch-depth: 0
- name: Run Linter
uses: oxsecurity/megalinter@bd931465299fd65a0fb91d8ab8ef04419e3b198e
uses: oxsecurity/megalinter@88a858eca0d241a5611b234a1b331771bd5335f3
env:
APPLY_FIXES: all
VALIDATE_ALL_CODEBASE: true
Expand All @@ -35,6 +35,7 @@ jobs:
name: linter
path: |
megalinter-reports
# - uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e
# with:
# tool_name: MegaLinter
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
actions: read
contents: read
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
persist-credentials: false
- name: Analysis
Expand All @@ -30,6 +30,6 @@ jobs:
results_format: sarif
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
publish_results: true
- uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4
- uses: github/codeql-action/upload-sarif@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44
with:
sarif_file: scorecards.sarif
2 changes: 2 additions & 0 deletions .github/workflows/social-interaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
permissions:
issues: write
pull-requests: write
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/first-interaction@bd33205aa5c96838e10fd65df0d01efd613677c1
continue-on-error: true
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Thank you for adding your first issue. We will be looking into it as soon as possible."
Expand Down
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ DISABLE_ERRORS_LINTERS:
PRINT_ALPACA: false
FLAVOR_SUGGESTIONS: false
SHOW_SKIPPED_LINTERS: false
FILTER_REGEX_EXCLUDE: (hal_st/middlewares/STM32_WPAN/)
38 changes: 19 additions & 19 deletions hal_st/middlewares/STM32_WPAN/ble_lld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ BLE LLD is a radio communication layer. It relies on BLE radio hardware, but it
BLE LLD provides a light and simple layer to develop proprietary protocols and applications.

Two layers are available:
- LLD with full features
- HAL with simple API
- LLD with full features
- HAL with simple API

# Architecture
```
Expand Down Expand Up @@ -40,26 +40,26 @@ core ┌───▼───┐
```

On appli core:
- Application is the user program using a custom radio protocol
- HAL is a wrapper based on LLD for simple communications
- LLD is the layer for full features communications
- LLD proxy packs/unpacks data and commands to/from radio core
- Application is the user program using a custom radio protocol
- HAL is a wrapper based on LLD for simple communications
- LLD is the layer for full features communications
- LLD proxy packs/unpacks data and commands to/from radio core

On radio core:
- LLD proxy packs/unpacks data and commands to/from appli core
- LLD provides the radio abstraction
- BLE radio is the RF hardware
- LLD proxy packs/unpacks data and commands to/from appli core
- LLD provides the radio abstraction
- BLE radio is the RF hardware

## Dual core
BLE LLD is designed to run on a dual core hardware:
- Application core runs user code
- Radio core runs private code dedicated to radio management
- Application core runs user code
- Radio core runs private code dedicated to radio management

The software communication layer between both core is called IPCC. This transport layer is decoupled from BLE LLD.

This architecture brings some important constraints:
- no application code runs on radio core
- it takes a long time to run application code after a radio event
- no application code runs on radio core
- it takes a long time to run application code after a radio event

To help implement fast radio operations sequences despite those constraints, "action packets" can be chained by the radio core. This chaining is configured by the application.

Expand Down Expand Up @@ -111,8 +111,8 @@ Before packets exchange with HAL, it must be initialized with `HAL_BLE_LLD_Init(

### Communication
Two set of functions are available:
- without ACK: the radio transmits/receives just one packet
- with ACK: the radio transmits/receives one packet, then another packet goes in the opposite direction
- without ACK: the radio transmits/receives just one packet
- with ACK: the radio transmits/receives one packet, then another packet goes in the opposite direction

"With ACK" functions can be used to detect packet loss, thus they can be used to implement a reliable communication channel with retransmissions of lost packets.

Expand All @@ -121,10 +121,10 @@ LLD is the layer that exposes all the features supported by the radio core. Its

### Configuration
Before packets exchange with LLD, it must be initialized with `BLE_LLD_Init()` then configured with:
- `BLE_LLD_SetChannel()`
- `BLE_LLD_SetTxAttributes()`
- `BLE_LLD_SetTxPower()`
- `BLE_LLD_SetTx_Rx_Phy()`
- `BLE_LLD_SetChannel()`
- `BLE_LLD_SetTxAttributes()`
- `BLE_LLD_SetTxPower()`
- `BLE_LLD_SetTx_Rx_Phy()`

### Communication
With LLD API, user is responsible for the configuration of each action packet.
Expand Down

0 comments on commit f62bbf3

Please sign in to comment.