Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into rewrite-graphics…
Browse files Browse the repository at this point in the history
…-API
  • Loading branch information
TomSaw committed Sep 20, 2021
2 parents ecf3c5c + 6057873 commit 532e1f4
Show file tree
Hide file tree
Showing 70 changed files with 2,526 additions and 143 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ jobs:
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py generic)
- name: Examples SAM Devices
- name: Examples SAMD Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samd)
- name: Examples SAMG Devices
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py samg55_xplained_pro)
- name: Execute Python Scripts
if: always()
run: |
Expand Down Expand Up @@ -127,7 +131,7 @@ jobs:
- name: Examples STM32H7 Series
if: always()
run: |
(cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg)
(cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg stm32h750vbt6_devebox)
stm32f4-examples-1:
runs-on: ubuntu-20.04
Expand Down
55 changes: 39 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git

## Microcontrollers

modm can create a HAL for <!--allcount-->3172<!--/allcount--> devices of these vendors:
modm can create a HAL for <!--allcount-->3175<!--/allcount--> devices of these vendors:

- STMicroelectronics STM32: <!--stmcount-->2621<!--/stmcount--> devices.
- Microchip SAM: <!--samcount-->163<!--/samcount--> devices.
- Microchip SAM: <!--samcount-->166<!--/samcount--> devices.
- Microchip AVR: <!--avrcount-->388<!--/avrcount--> devices.

Here is a table with all device families and the peripheral drivers they support:
Expand All @@ -96,7 +96,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<tr>
<th align="center"></th>
<th align="center" colspan="12">STM32</th>
<th align="center" colspan="1">SAM</th>
<th align="center" colspan="2">SAM</th>
<th align="center" colspan="3">AT</th>
</tr><tr>
<th align="left">Peripheral</th>
Expand All @@ -113,6 +113,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<th align="center">L1</th>
<th align="center">L4</th>
<th align="center">D21</th>
<th align="center">G</th>
<th align="center">90</th>
<th align="center">Mega</th>
<th align="center">Tiny</th>
Expand All @@ -132,6 +133,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
Expand All @@ -149,6 +151,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✗</td>
Expand All @@ -167,6 +170,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
Expand All @@ -186,6 +190,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">○</td>
<td align="center">✗</td>
</tr><tr>
Expand All @@ -206,6 +211,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">Ethernet</td>
<td align="center">✗</td>
Expand All @@ -224,6 +230,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">External Interrupt</td>
<td align="center">✅</td>
Expand All @@ -242,6 +249,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">External Memory</td>
<td align="center">✗</td>
Expand All @@ -260,6 +268,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">GPIO</td>
<td align="center">✅</td>
Expand All @@ -278,6 +287,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">I<sup>2</sup>C</td>
<td align="center">✅</td>
Expand All @@ -293,6 +303,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
Expand All @@ -314,6 +325,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">Random Generator</td>
<td align="center">✗</td>
Expand All @@ -332,6 +344,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">SPI</td>
<td align="center">✅</td>
Expand All @@ -350,6 +363,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
</tr><tr>
<td align="left">System Clock</td>
<td align="center">✅</td>
Expand All @@ -368,6 +382,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">Timer</td>
<td align="center">✅</td>
Expand All @@ -386,6 +401,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
<td align="center">○</td>
</tr><tr>
<td align="left">UART</td>
<td align="center">✅</td>
Expand All @@ -401,6 +417,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">○</td>
Expand All @@ -422,6 +439,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
</tr><tr>
<td align="left">USB</td>
<td align="center">✅</td>
Expand All @@ -437,6 +455,7 @@ Please [discover modm's peripheral drivers for your specific device][discover].
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center">✗</td>
<td align="center">✗</td>
<td align="center">✗</td>
Expand Down Expand Up @@ -468,63 +487,66 @@ We have out-of-box support for many development boards including documentation.
<td align="center"><a href="https://modm.io/reference/module/modm-board-blue-pill-f103">Blue Pill F103</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-devebox-stm32f4xx">DEVEBOX-STM32F4XX</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-devebox-stm32h750vb">DEVEBOX-STM32H750VB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f051r8">DISCO-F051R8</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f072rb">DISCO-F072RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f100rb">DISCO-F100RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f303vc">DISCO-F303VC</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f303vc">DISCO-F303VC</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f407vg">DISCO-F407VG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f429zi">DISCO-F429ZI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f469ni">DISCO-F469NI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f746ng">DISCO-F746NG</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f746ng">DISCO-F746NG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-f769ni">DISCO-F769NI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-l152rc">DISCO-L152RC</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-disco-l476vg">DISCO-L476VG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-feather-m0">FEATHER-M0</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-feather-m0">FEATHER-M0</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-mega-2560-pro">MEGA-2560-PRO</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f031k6">NUCLEO-F031K6</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f042k6">NUCLEO-F042K6</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f072rb">NUCLEO-F072RB</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f072rb">NUCLEO-F072RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f091rc">NUCLEO-F091RC</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f103rb">NUCLEO-F103RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f303k8">NUCLEO-F303K8</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f303re">NUCLEO-F303RE</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f303re">NUCLEO-F303RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f334r8">NUCLEO-F334R8</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f401re">NUCLEO-F401RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f411re">NUCLEO-F411RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f429zi">NUCLEO-F429ZI</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f429zi">NUCLEO-F429ZI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f439zi">NUCLEO-F439ZI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f446re">NUCLEO-F446RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f446ze">NUCLEO-F446ZE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f746zg">NUCLEO-F746ZG</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f746zg">NUCLEO-F746ZG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-f767zi">NUCLEO-F767ZI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g071rb">NUCLEO-G071RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g431kb">NUCLEO-G431KB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g431rb">NUCLEO-G431RB</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g431rb">NUCLEO-G431RB</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-g474re">NUCLEO-G474RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-h723zg">NUCLEO-H723ZG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-h743zi">NUCLEO-H743ZI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l031k6">NUCLEO-L031K6</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l031k6">NUCLEO-L031K6</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l152re">NUCLEO-L152RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l432kc">NUCLEO-L432KC</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l452re">NUCLEO-L452RE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l476rg">NUCLEO-L476RG</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l476rg">NUCLEO-L476RG</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-nucleo-l496zg-p">NUCLEO-L496ZG-P</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-olimexino-stm32">OLIMEXINO-STM32</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-raspberrypi">Raspberry Pi</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-samd21-mini">SAMD21-MINI</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-samd21-mini">SAMD21-MINI</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-samg55-xplained-pro">SAMG55-XPLAINED-PRO</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-stm32_f4ve">STM32-F4VE</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-board-stm32f030_demo">STM32F030-DEMO</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-board-srxe">Smart Response XE</a></td>
</tr>
</table>
Expand Down Expand Up @@ -613,20 +635,21 @@ you specific needs.
<td align="center"><a href="https://modm.io/reference/module/modm-driver-sk9822">SK9822</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-ssd1306">SSD1306</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-st7586s">ST7586S</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-stts22h">STTS22H</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-stusb4500">STUSB4500</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-sx1276">SX1276</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tcs3414">TCS3414</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tcs3472">TCS3472</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tlc594x">TLC594X</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tlc594x">TLC594X</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tmp102">TMP102</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-tmp175">TMP175</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-touch2046">TOUCH2046</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-vl53l0">VL53L0</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-vl6180">VL6180</a></td>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-ws2812">WS2812</a></td>
</tr><tr>
<td align="center"><a href="https://modm.io/reference/module/modm-driver-ws2812">WS2812</a></td>
</tr>
</table>
<!--/drivertable-->
Expand Down
13 changes: 13 additions & 0 deletions examples/samg55_xplained_pro/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "modm/board.hpp"

using namespace modm::platform;

int main() {
Board::initialize();

while(true) {
Board::Led::toggle();
modm::delay_ms(500);
}

}
9 changes: 9 additions & 0 deletions examples/samg55_xplained_pro/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<library>
<extends>modm:samg55-xplained-pro</extends>
<options>
<option name="modm:build:build.path">../../../build/samg55_xplained_pro/blink</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>
36 changes: 36 additions & 0 deletions examples/samg55_xplained_pro/spi-loopback/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include <modm/board.hpp>

using namespace modm::platform;

int main() {
// Test SPI send and receive in loopback mode. If we receive the expected
// characters back, flash slowly. Otherwise, flash fast.
Board::initialize();

SpiMaster0::connect<GpioB0::Sck, GpioA9::Miso, GpioA10::Mosi>();
SpiMaster0::initialize<Board::SystemClock, 1_MHz>();

SpiMaster0::setLocalLoopback(true);

while (true)
{
uint32_t flash_time_ms;
uint8_t tx[] = {0xa5, 0x21};
uint8_t rx[2];

SpiMaster0::transferBlocking(tx, rx, 2);

if(rx[0] == 0xa5 && rx[1] == 0x21) {
flash_time_ms = 500;
} else {
flash_time_ms = 100;
}

for(uint32_t i=0; i<5; i++) {
Board::Led::set();
modm::delay_ms(flash_time_ms);
Board::Led::reset();
modm::delay_ms(flash_time_ms);
}
}
}
11 changes: 11 additions & 0 deletions examples/samg55_xplained_pro/spi-loopback/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<library>
<extends>modm:samg55-xplained-pro</extends>
<options>
<option name="modm:build:project.name">samg-spi-demo</option>
<option name="modm:build:build.path">../../../build/samg55_xplained_pro/spi-loopback</option>
</options>
<modules>
<module>modm:build:scons</module>
<module>modm:platform:spi:0</module>
</modules>
</library>
Loading

0 comments on commit 532e1f4

Please sign in to comment.