Merge branch 'master' into master

This commit is contained in:
Limor "Ladyada" Fried 2025-02-09 11:17:11 -05:00 committed by GitHub
commit 22dfda2c1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 18 additions and 11 deletions

@ -1 +1 @@
Subproject commit ece6e68f29c6f406a4434659bcbcfe558baaa3a9
Subproject commit 82928635c893189343cf8eb78569f0c4136fded0

View file

@ -110,7 +110,7 @@ extern bool __isFreeRTOS;
#endif
#ifndef PGM_VOID_P
#define PGM_VOID_P void *
#define PGM_VOID_P const void *
#endif
#ifdef __cplusplus
@ -159,3 +159,7 @@ constexpr uint64_t __bitset(const int (&a)[N], size_t i = 0U) {
#define __GPIOCNT 30
#define __FIRSTANALOGGPIO 26
#endif
#ifdef __cplusplus
using namespace arduino;
#endif

View file

@ -29,7 +29,7 @@
extern "C" typedef struct uart_inst uart_inst_t;
class SerialPIO : public HardwareSerial {
class SerialPIO : public arduino::HardwareSerial {
public:
static const pin_size_t NOPIN = 0xff; // Use in constructor to disable RX or TX unit
SerialPIO(pin_size_t tx, pin_size_t rx, size_t fifoSize = 32);

View file

@ -24,7 +24,7 @@
#include "Arduino.h"
#include "api/HardwareSerial.h"
class SerialSemiClass : public HardwareSerial {
class SerialSemiClass : public arduino::HardwareSerial {
public:
SerialSemiClass() {
/* noop */

View file

@ -29,7 +29,7 @@
extern "C" typedef struct uart_inst uart_inst_t;
#define UART_PIN_NOT_DEFINED (255u)
class SerialUART : public HardwareSerial {
class SerialUART : public arduino::HardwareSerial {
public:
SerialUART(uart_inst_t *uart, pin_size_t tx, pin_size_t rx, pin_size_t rts = UART_PIN_NOT_DEFINED, pin_size_t cts = UART_PIN_NOT_DEFINED);

View file

@ -24,7 +24,7 @@
#include "api/HardwareSerial.h"
#include <stdarg.h>
class SerialUSB : public HardwareSerial {
class SerialUSB : public arduino::HardwareSerial {
public:
SerialUSB() { }
void begin(unsigned long baud = 115200) override;

View file

@ -23,6 +23,7 @@
#include <errno.h>
#include <_syslist.h>
#include <sys/times.h>
#include <sys/unistd.h>
#include <pico/stdlib.h>
#include <pico/multicore.h>

View file

@ -56,9 +56,9 @@ extern "C" void shiftOut(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOr
}
for (i = 0; i < 8; i++) {
if (bitOrder == LSBFIRST) {
digitalWrite(dataPin, !!(val & (1 << i)));
digitalWrite(dataPin, !!(val & (1 << i)) ? HIGH : LOW);
} else {
digitalWrite(dataPin, !!(val & (1 << (7 - i))));
digitalWrite(dataPin, !!(val & (1 << (7 - i))) ? HIGH : LOW);
}
digitalWrite(clockPin, HIGH);

View file

@ -216,9 +216,9 @@ void handleFileList() {
// as an HTTP chunk
Serial.println(output);
server.sendContent(output);
output = ',';
output = ",";
} else {
output = '[';
output = "[";
}
output += "{\"type\":\"";

View file

@ -21,6 +21,7 @@
#pragma once
#include <Arduino.h>
#include <Udp.h>
#include <include/slist.h>

View file

@ -507,7 +507,7 @@ bool TwoWire::writeReadAsync(uint8_t address, const void *wbuffer, size_t wbytes
abortAsync();
// Create or enlarge dma command buffer, we need one entry for every i2c byte we want to write/read
const size_t bufLen = (wbytes + rbytes) * 2;
const size_t bufLen = (wbytes + rbytes) * sizeof(uint16_t);
if (_dmaSendBufferLen < bufLen) {
if (_dmaSendBuffer) {
free(_dmaSendBuffer);
@ -518,6 +518,7 @@ bool TwoWire::writeReadAsync(uint8_t address, const void *wbuffer, size_t wbytes
if (!_dmaSendBuffer) {
return false;
}
_dmaSendBufferLen = bufLen;
}
// Fill the dma command buffer