used pins.c instead of README.rst

This commit is contained in:
Matt Land 2018-05-16 15:54:01 -04:00
parent fbb57f902d
commit 2c067edf54
17 changed files with 35 additions and 15 deletions

View File

@ -13,5 +13,5 @@
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SCL (&pin_PA22)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02) #define DEFAULT_I2C_BUS_SDA (&pin_PA23)

View File

@ -14,5 +14,5 @@
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02) #define DEFAULT_I2C_BUS_SDA (&pin_PA22)

View File

@ -49,5 +49,5 @@
#define BOARD_HAS_CRYSTAL 1 #define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02) #define DEFAULT_I2C_BUS_SDA (&pin_PA22)

View File

@ -48,5 +48,5 @@
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02) #define DEFAULT_I2C_BUS_SDA (&pin_PA22)

View File

@ -31,3 +31,6 @@
#define EXTERNAL_FLASH_QSPI_DUAL #define EXTERNAL_FLASH_QSPI_DUAL
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)

View File

@ -1,4 +1,5 @@
#include "samd21_pins.h" #include "samd21_pins.h"
#include "board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = { STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
@ -26,5 +27,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -46,3 +46,6 @@
GD25Q16C GD25Q16C
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)

View File

@ -1,4 +1,5 @@
#include "samd21_pins.h" #include "samd21_pins.h"
#include "board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = { STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
@ -38,5 +39,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -31,3 +31,6 @@
#define EXTERNAL_FLASH_DEVICES GD25Q16C #define EXTERNAL_FLASH_DEVICES GD25Q16C
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)

View File

@ -1,4 +1,5 @@
#include "samd51_pins.h" #include "samd51_pins.h"
#include "board_busses.h"
// This mapping only includes functional names because pins broken // This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from // out on connectors are labeled with their MCU name available from
@ -35,5 +36,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -32,3 +32,6 @@
#define EXTERNAL_FLASH_DEVICES S25FL116K, S25FL216K, GD25Q16C #define EXTERNAL_FLASH_DEVICES S25FL116K, S25FL216K, GD25Q16C
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)

View File

@ -1,4 +1,5 @@
#include "samd51_pins.h" #include "samd51_pins.h"
#include "board_busses.h"
// This mapping only includes functional names because pins broken // This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from // out on connectors are labeled with their MCU name available from
@ -41,5 +42,6 @@ STATIC const mp_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PB06 }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PB06 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PA27 }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PA27 },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -60,3 +60,6 @@
GD25Q16C GD25Q16C
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)

View File

@ -1,4 +1,5 @@
#include "samd51_pins.h" #include "samd51_pins.h"
#include "board_busses.h"
// This mapping only includes functional names because pins broken // This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from // out on connectors are labeled with their MCU name available from
@ -40,5 +41,6 @@ STATIC const mp_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PB06 }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), (mp_obj_t)&pin_PB06 },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PA27 }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), (mp_obj_t)&pin_PA27 },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -55,5 +55,5 @@
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SCL (&pin_PA09)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22) #define DEFAULT_I2C_BUS_SDA (&pin_PA08)

View File

@ -47,6 +47,3 @@
#define EXTERNAL_FLASH_DEVICES S25FL216K #define EXTERNAL_FLASH_DEVICES S25FL216K
#include "external_flash/external_flash.h" #include "external_flash/external_flash.h"
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)

View File

@ -1,5 +1,4 @@
#include "samd21_pins.h" #include "samd21_pins.h"
#include "board_busses.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = { STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) },
@ -24,6 +23,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_B), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_B), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_C), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_C), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_D), MP_ROM_PTR(&pin_PA28) }, { MP_ROM_QSTR(MP_QSTR_D), MP_ROM_PTR(&pin_PA28) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);