File tree Expand file tree Collapse file tree 8 files changed +30
-10
lines changed
feather_stm32f405_express Expand file tree Collapse file tree 8 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 25
25
*/
26
26
27
27
#include "boards/board.h"
28
+ #include "mpconfigboard.h"
28
29
29
30
void board_init (void ) {
30
31
}
31
32
32
33
bool board_requests_safe_mode (void ) {
33
- return false;
34
+ return false;
34
35
}
35
36
36
37
void reset_board (void ) {
Original file line number Diff line number Diff line change 3
3
*
4
4
* The MIT License (MIT)
5
5
*
6
- * Copyright (c) 2016 Glenn Ruben Bakke
7
- * Copyright (c) 2018 Dan Halbert for Adafruit Industries
6
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
8
7
*
9
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
* of this software and associated documentation files (the "Software"), to deal
41
40
#define SPI_FLASH_MISO_PIN &pin_PB04
42
41
#define SPI_FLASH_SCK_PIN &pin_PB03
43
42
#define SPI_FLASH_CS_PIN &pin_PA15
43
+
44
+ #define DEFAULT_I2C_BUS_SCL (&pin_PB06)
45
+ #define DEFAULT_I2C_BUS_SDA (&pin_PB07)
46
+
47
+ #define DEFAULT_SPI_BUS_SCK (&pin_PB13)
48
+ #define DEFAULT_SPI_BUS_MOSI (&pin_PB15)
49
+ #define DEFAULT_SPI_BUS_MISO (&pin_PB14)
50
+
51
+ #define DEFAULT_UART_BUS_RX (&pin_PB11)
52
+ #define DEFAULT_UART_BUS_TX (&pin_PB10)
Original file line number Diff line number Diff line change @@ -25,5 +25,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
25
25
26
26
{ MP_ROM_QSTR (MP_QSTR_TX ), MP_ROM_PTR (& pin_PB10 ) },
27
27
{ MP_ROM_QSTR (MP_QSTR_RX ), MP_ROM_PTR (& pin_PB11 ) },
28
+
29
+ { MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& board_i2c_obj ) },
30
+ { MP_ROM_QSTR (MP_QSTR_SPI ), MP_ROM_PTR (& board_spi_obj ) },
31
+ { MP_ROM_QSTR (MP_QSTR_UART ), MP_ROM_PTR (& board_uart_obj ) },
28
32
};
29
33
MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
Original file line number Diff line number Diff line change 3
3
*
4
4
* The MIT License (MIT)
5
5
*
6
- * Copyright (c) 2016 Glenn Ruben Bakke
7
- * Copyright (c) 2018 Dan Halbert for Adafruit Industries
6
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
8
7
*
9
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
* of this software and associated documentation files (the "Software"), to deal
34
33
#define FLASH_PAGE_SIZE (0x4000)
35
34
36
35
#define AUTORESET_DELAY_MS 500
37
- #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
36
+ #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
37
+
38
+ #define DEFAULT_I2C_BUS_SCL (&pin_PB06)
39
+ #define DEFAULT_I2C_BUS_SDA (&pin_PB07)
Original file line number Diff line number Diff line change @@ -46,5 +46,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
46
46
47
47
{ MP_ROM_QSTR (MP_QSTR_SCL ), MP_ROM_PTR (& pin_PB06 ) },
48
48
{ MP_ROM_QSTR (MP_QSTR_SDA ), MP_ROM_PTR (& pin_PB07 ) },
49
+
50
+ { MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& board_i2c_obj ) },
49
51
};
50
52
MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
Original file line number Diff line number Diff line change 3
3
*
4
4
* The MIT License (MIT)
5
5
*
6
- * Copyright (c) 2016 Glenn Ruben Bakke
7
- * Copyright (c) 2018 Dan Halbert for Adafruit Industries
6
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
8
7
*
9
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
* of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change 3
3
*
4
4
* The MIT License (MIT)
5
5
*
6
- * Copyright (c) 2016 Glenn Ruben Bakke
7
- * Copyright (c) 2018 Dan Halbert for Adafruit Industries
6
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
8
7
*
9
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
* of this software and associated documentation files (the "Software"), to deal
36
35
#define AUTORESET_DELAY_MS 500
37
36
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
38
37
38
+ #define DEFAULT_I2C_BUS_SCL (&pin_PB10)
39
+ #define DEFAULT_I2C_BUS_SDA (&pin_PB09)
Original file line number Diff line number Diff line change @@ -88,5 +88,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
88
88
{ MP_ROM_QSTR (MP_QSTR_LED2 ), MP_ROM_PTR (& pin_PE01 ) },
89
89
{ MP_ROM_QSTR (MP_QSTR_LED3 ), MP_ROM_PTR (& pin_PE02 ) },
90
90
{ MP_ROM_QSTR (MP_QSTR_LED4 ), MP_ROM_PTR (& pin_PE03 ) },
91
+
92
+ { MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& board_i2c_obj ) },
91
93
};
92
94
MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
You can’t perform that action at this time.
0 commit comments