|
25 | 25 |
|
26 | 26 | using namespace arduino;
|
27 | 27 |
|
28 | | -/************************************************************************************** |
29 | | - * EXTERN GLOBAL CONSTANTS |
30 | | - **************************************************************************************/ |
31 | | - |
32 | | -extern const PinMuxCfg_t g_pin_cfg[]; |
33 | | -extern const size_t g_pin_cfg_size; |
34 | | - |
35 | 28 | /**************************************************************************************
|
36 | 29 | * GLOBAL MEMBER VARIABLES
|
37 | 30 | **************************************************************************************/
|
@@ -73,7 +66,7 @@ void ArduinoSPI::begin()
|
73 | 66 | /* Configure the pins and auto-determine channel and
|
74 | 67 | * whether or not we are using a SCI.
|
75 | 68 | */
|
76 | | - int const max_index = g_pin_cfg_size / sizeof(g_pin_cfg[0]); |
| 69 | + int const max_index = PINS_COUNT; |
77 | 70 | auto [cfg_pins_ok, cfg_channel, cfg_is_sci] = cfg_pins(max_index, _miso_pin, _mosi_pin, _sck_pin, _periph_mode);
|
78 | 71 | init_ok &= cfg_pins_ok;
|
79 | 72 | _channel = cfg_channel;
|
|
0 commit comments