File tree Expand file tree Collapse file tree 6 files changed +23
-28
lines changed Expand file tree Collapse file tree 6 files changed +23
-28
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ void noInterrupts(void);
107
107
108
108
int digitalPinToInterrupt (pin_size_t pin);
109
109
110
+ #define digitalPinToPort (x ) (x)
111
+ #define digitalPinToBitMask (x ) (x)
112
+ #define portOutputRegister (x ) (x)
113
+ #define portInputRegister (x ) (x)
114
+
110
115
#include < variant.h>
111
116
#ifdef __cplusplus
112
117
#include < SerialUSB.h>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
7
7
#include " new.h"
8
8
9
+ extern " C" void __cxa_pure_virtual () {}
10
+
9
11
// The C++ spec dictates that allocation failure should cause the
10
12
// (non-nothrow version of the) operator new to throw an exception.
11
13
// Since we expect to have exceptions disabled, it would be more
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ const struct adc_dt_spec arduino_adc[] =
170
170
const pin_size_t arduino_analog_pins[] =
171
171
{ DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user), adc_pin_gpios, ADC_PINS) };
172
172
173
- struct adc_channel_cfg channel_cfg[ARRAY_SIZE(arduino_analog_pins) ] =
173
+ struct adc_channel_cfg channel_cfg[] =
174
174
{ DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user), io_channels, ADC_CH_CFG) };
175
175
176
176
size_t analog_pin_index (pin_size_t pinNumber) {
Original file line number Diff line number Diff line change @@ -79,9 +79,13 @@ void arduino::ZephyrSPI::usingInterrupt(int interruptNumber) {
79
79
void arduino::ZephyrSPI::notUsingInterrupt (int interruptNumber) {
80
80
}
81
81
82
+ #ifndef SPI_MIN_CLOCK_FEQUENCY
83
+ #define SPI_MIN_CLOCK_FEQUENCY 1000000
84
+ #endif
85
+
82
86
void arduino::ZephyrSPI::beginTransaction (SPISettings settings) {
83
87
memset (&config, 0 , sizeof (config));
84
- config.frequency = settings.getClockFreq ();
88
+ config.frequency = settings.getClockFreq () > SPI_MIN_CLOCK_FEQUENCY ? settings. getClockFreq () : SPI_MIN_CLOCK_FEQUENCY ;
85
89
auto mode = SPI_MODE_CPOL | SPI_MODE_CPHA;
86
90
switch (settings.getDataMode ()) {
87
91
case SPI_MODE0:
Original file line number Diff line number Diff line change 6
6
#include <stdio.h>
7
7
#include <stdlib.h>
8
8
#include <math.h>
9
+ #include <zephyr/kernel.h>
9
10
10
11
#define FORCE_EXPORT_SYM (name ) \
11
12
extern void name(void); \
@@ -35,6 +36,13 @@ EXPORT_SYMBOL(isspace);
35
36
EXPORT_SYMBOL (isalnum );
36
37
EXPORT_SYMBOL (tolower );
37
38
EXPORT_SYMBOL (toupper );
39
+ EXPORT_SYMBOL (isalpha );
40
+ EXPORT_SYMBOL (iscntrl );
41
+ EXPORT_SYMBOL (isdigit );
42
+ EXPORT_SYMBOL (isgraph );
43
+ EXPORT_SYMBOL (isprint );
44
+ EXPORT_SYMBOL (isupper );
45
+ EXPORT_SYMBOL (isxdigit );
38
46
39
47
#if defined(CONFIG_USB_DEVICE_STACK )
40
48
EXPORT_SYMBOL (usb_enable );
@@ -96,8 +104,8 @@ FORCE_EXPORT_SYM(inet_pton);
96
104
FORCE_EXPORT_SYM (cdc_acm_dte_rate_callback_set );
97
105
#endif
98
106
99
- FORCE_EXPORT_SYM (k_timer_init );
100
- FORCE_EXPORT_SYM (k_fatal_halt );
107
+ EXPORT_SYMBOL (k_timer_init );
108
+ EXPORT_SYMBOL (k_fatal_halt );
101
109
//FORCE_EXPORT_SYM(k_timer_user_data_set);
102
110
//FORCE_EXPORT_SYM(k_timer_start);
103
111
You can’t perform that action at this time.
0 commit comments