Merge branch 'feature-i2c-gemma' into feature-default-spi-circuit-playground
This commit is contained in:
commit
de885e81b1
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA19)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA19)
|
||||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA18)
|
#define DEFAULT_SPI_BUS_MISO (&pin_PA18)
|
|
@ -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,6 +27,7 @@ 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_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
|
||||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
|
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
|
|
@ -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,7 +39,7 @@ 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_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA01)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA01)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA00)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA00)
|
||||||
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
|
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
|
|
@ -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,7 +36,7 @@ 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_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA13)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA13)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
|
||||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA14)
|
#define DEFAULT_SPI_BUS_MISO (&pin_PA14)
|
|
@ -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,7 +42,7 @@ 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_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -61,6 +61,9 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA13)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA13)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
|
||||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA15)
|
#define DEFAULT_SPI_BUS_MISO (&pin_PA15)
|
||||||
|
|
|
@ -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,7 +41,7 @@ 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_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||||
};
|
};
|
||||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
|
|
||||||
#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)
|
||||||
|
|
||||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA07)
|
#define DEFAULT_SPI_BUS_SCK (&pin_PA07)
|
||||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA06)
|
#define DEFAULT_SPI_BUS_MOSI (&pin_PA06)
|
||||||
|
|
|
@ -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)
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue