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);
107107
108108int digitalPinToInterrupt (pin_size_t pin);
109109
110+ #define digitalPinToPort (x ) (x)
111+ #define digitalPinToBitMask (x ) (x)
112+ #define portOutputRegister (x ) (x)
113+ #define portInputRegister (x ) (x)
114+
110115#include < variant.h>
111116#ifdef __cplusplus
112117#include < SerialUSB.h>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66
77#include " new.h"
88
9+ extern " C" void __cxa_pure_virtual () {}
10+
911// The C++ spec dictates that allocation failure should cause the
1012// (non-nothrow version of the) operator new to throw an exception.
1113// 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[] =
170170const pin_size_t arduino_analog_pins[] =
171171 { DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user), adc_pin_gpios, ADC_PINS) };
172172
173- struct adc_channel_cfg channel_cfg[ARRAY_SIZE(arduino_analog_pins) ] =
173+ struct adc_channel_cfg channel_cfg[] =
174174 { DT_FOREACH_PROP_ELEM (DT_PATH (zephyr_user), io_channels, ADC_CH_CFG) };
175175
176176size_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) {
7979void arduino::ZephyrSPI::notUsingInterrupt (int interruptNumber) {
8080}
8181
82+ #ifndef SPI_MIN_CLOCK_FEQUENCY
83+ #define SPI_MIN_CLOCK_FEQUENCY 1000000
84+ #endif
85+
8286void arduino::ZephyrSPI::beginTransaction (SPISettings settings) {
8387 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 ;
8589 auto mode = SPI_MODE_CPOL | SPI_MODE_CPHA;
8690 switch (settings.getDataMode ()) {
8791 case SPI_MODE0:
Original file line number Diff line number Diff line change 66#include <stdio.h>
77#include <stdlib.h>
88#include <math.h>
9+ #include <zephyr/kernel.h>
910
1011#define FORCE_EXPORT_SYM (name ) \
1112 extern void name(void); \
@@ -35,6 +36,13 @@ EXPORT_SYMBOL(isspace);
3536EXPORT_SYMBOL (isalnum );
3637EXPORT_SYMBOL (tolower );
3738EXPORT_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 );
3846
3947#if defined(CONFIG_USB_DEVICE_STACK )
4048EXPORT_SYMBOL (usb_enable );
@@ -96,8 +104,8 @@ FORCE_EXPORT_SYM(inet_pton);
96104FORCE_EXPORT_SYM (cdc_acm_dte_rate_callback_set );
97105#endif
98106
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 );
101109//FORCE_EXPORT_SYM(k_timer_user_data_set);
102110//FORCE_EXPORT_SYM(k_timer_start);
103111
You can’t perform that action at this time.
0 commit comments