From 15d8d88950a7827e02857c6a87e849a3d4e86208 Mon Sep 17 00:00:00 2001 From: Hierophect Date: Mon, 4 Nov 2019 14:15:26 -0500 Subject: [PATCH] Add default defines --- .../boards/feather_stm32f405_express/board.c | 3 ++- .../feather_stm32f405_express/mpconfigboard.h | 13 +++++++++++-- ports/stm32f4/boards/pyboard_v11/mpconfigboard.h | 6 +++++- .../boards/stm32f412zg_discovery/mpconfigboard.h | 2 ++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ports/stm32f4/boards/feather_stm32f405_express/board.c b/ports/stm32f4/boards/feather_stm32f405_express/board.c index 4421970eef..82b0c506ed 100644 --- a/ports/stm32f4/boards/feather_stm32f405_express/board.c +++ b/ports/stm32f4/boards/feather_stm32f405_express/board.c @@ -25,12 +25,13 @@ */ #include "boards/board.h" +#include "mpconfigboard.h" void board_init(void) { } bool board_requests_safe_mode(void) { - return false; + return false; } void reset_board(void) { diff --git a/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h b/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h index d795342dd8..67ddc885ae 100644 --- a/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h +++ b/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h @@ -3,8 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2016 Glenn Ruben Bakke - * Copyright (c) 2018 Dan Halbert for Adafruit Industries + * Copyright (c) 2019 Lucian Copeland for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -41,3 +40,13 @@ #define SPI_FLASH_MISO_PIN &pin_PB04 #define SPI_FLASH_SCK_PIN &pin_PB03 #define SPI_FLASH_CS_PIN &pin_PA15 + +#define DEFAULT_I2C_BUS_SCL (&pin_PB06) +#define DEFAULT_I2C_BUS_SDA (&pin_PB07) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB13) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB15) +#define DEFAULT_SPI_BUS_MISO (&pin_PB14) + +#define DEFAULT_UART_BUS_RX (&pin_PB11) +#define DEFAULT_UART_BUS_TX (&pin_PB10) diff --git a/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h b/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h index e8441d665c..57ad4ca54e 100644 --- a/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h +++ b/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h @@ -34,4 +34,8 @@ #define FLASH_PAGE_SIZE (0x4000) #define AUTORESET_DELAY_MS 500 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) \ No newline at end of file +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) + + +#define DEFAULT_I2C_BUS_SCL (&pin_PB06) +#define DEFAULT_I2C_BUS_SDA (&pin_PB07) \ No newline at end of file diff --git a/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h b/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h index ebee98f89f..339c5313f4 100644 --- a/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h +++ b/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h @@ -36,3 +36,5 @@ #define AUTORESET_DELAY_MS 500 #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) +#define DEFAULT_I2C_BUS_SCL (&pin_PB10) +#define DEFAULT_I2C_BUS_SDA (&pin_PB09)