diff options
| author | hierophect <hierophect@gmail.com> | 2020-08-10 15:59:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-10 15:59:36 -0400 |
| commit | 78f90db72f35ecab052c70411cb7d1d1a1980970 (patch) | |
| tree | 5aef9a2a6ee1c306f639427cb6816d3eb129527e /tools | |
| parent | ce911c5f5057cf72509ed9e704b46a66423b95d6 (diff) | |
| parent | 1cf37623920a7da93f454c8b23f761ad2c4c54db (diff) | |
Merge pull request #3191 from jepler/stm32-sdioio
stm32: Implement sdioio, enable for feather stm32f405 express
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/mksdiodata.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tools/mksdiodata.py b/tools/mksdiodata.py deleted file mode 100755 index 0cce3819f..000000000 --- a/tools/mksdiodata.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/python3 - -def defines(name, function): - print(f'pin_function_t {name} [] = {{') - for instance in (0, 1): - for port in 'ABCD': - for idx in range(32): - pin = f'P{port}{idx:02d}' - pinmux = f'PINMUX_{pin}I_SDHC{instance}_{function}' - print(f'''\ -#if defined({pinmux}) && ! defined(IGNORE_PIN_{pin}) - {{&pin_{pin}, {instance}, PIN_{pin}, {pinmux} & 0xffff}}, -#endif''') - print(f'{{NULL, 0, 0}}') - print(f'}};') - print() - -print('''\ -#include <stdint.h> -#include "py/obj.h" -#include "sam.h" -#include "samd/pins.h" -#include "mpconfigport.h" -#include "atmel_start_pins.h" -#include "hal/include/hal_gpio.h" - -typedef struct { - const mcu_pin_obj_t *obj; - uint8_t instance; - uint8_t pin; - uint16_t function; -} pin_function_t; -''') - -defines('sdio_ck', 'SDCK') -defines('sdio_cmd', 'SDCMD') -defines('sdio_dat0', 'SDDAT0') -defines('sdio_dat1', 'SDDAT1') -defines('sdio_dat2', 'SDDAT2') -defines('sdio_dat3', 'SDDAT3') |
