diff options
| author | krolyxon <me@krolyxon.com> | 2026-06-08 23:12:15 +0530 |
|---|---|---|
| committer | krolyxon <me@krolyxon.com> | 2026-06-08 23:12:15 +0530 |
| commit | 8a4d103196312b8a18afc0a2ba0fc13ff1a0b180 (patch) | |
| tree | a92424ac65fbdb93702ea8c44a5c52c9fd66e28c /.pio/libdeps/esp32-s3-n16r8/RF24/utility | |
| parent | 1d557527be495c59bbc07f194d903b1cec1780d3 (diff) | |
remove .pio
Diffstat (limited to '.pio/libdeps/esp32-s3-n16r8/RF24/utility')
17 files changed, 0 insertions, 791 deletions
diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/ATTiny/RF24_arch_config.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/ATTiny/RF24_arch_config.h deleted file mode 100644 index 40e5399..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/ATTiny/RF24_arch_config.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - TMRh20 2015 - ATTiny Configuration File -*/ - -#ifndef RF24_UTILITY_ATTINY_RF24_ARCH_CONFIG_H_ -#define RF24_UTILITY_ATTINY_RF24_ARCH_CONFIG_H_ - -/*** USER DEFINES: ***/ -//#define FAILURE_HANDLING -//#define MINIMAL -/**********************/ - -#define rf24_max(a, b) (a > b ? a : b) -#define rf24_min(a, b) (a < b ? a : b) - -#if ARDUINO < 100 - #include <WProgram.h> -#else - #include <Arduino.h> -#endif - -#include <stddef.h> - -#include <SPI.h> - -#define _SPI SPI -typedef uint8_t rf24_gpio_pin_t; -#define RF24_PIN_INVALID 0xFF - -#if !defined(RF24_CSN_SETTLE_LOW_DELAY) - #define RF24_CSN_SETTLE_LOW_DELAY 11 -#endif - -#if !defined(RF24_CSN_SETTLE_HIGH_DELAY) - #define RF24_CSN_SETTLE_HIGH_DELAY 100 -#endif - -#ifdef RF24_DEBUG - #define IF_RF24_DEBUG(x) ({ x; }) -#else - #define IF_RF24_DEBUG(x) - - #if defined(RF24_TINY) - #define printf_P(...) - #endif -#endif // !defined(RF24_DEBUG) - -#include <avr/pgmspace.h> - -#define PRIPSTR "%S" - -#endif // RF24_UTILITY_ATTINY_RF24_ARCH_CONFIG_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Teensy/RF24_arch_config.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Teensy/RF24_arch_config.h deleted file mode 100644 index 6e4a836..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Teensy/RF24_arch_config.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef RF24_UTILITY_TEENSY_RF24_ARCH_CONFIG_H_ -#define RF24_UTILITY_TEENSY_RF24_ARCH_CONFIG_H_ -#if ARDUINO < 100 - - #include <WProgram.h> - -#else - #include <Arduino.h> -#endif - -#include <stddef.h> - -#include <stdint.h> -#include <stdio.h> -#include <string.h> - -#include <SPI.h> - -#define _SPI SPIClass -#define RF24_SPI_PTR -typedef uint8_t rf24_gpio_pin_t; -#define RF24_PIN_INVALID 0xFF - -#define printf Serial.printf - -#ifdef RF24_DEBUG - #define IF_RF24_DEBUG(x) ({ x; }) -#else - #define IF_RF24_DEBUG(x) -#endif - -#define PRIPSTR "%s" - -#endif // RF24_UTILITY_TEENSY_RF24_ARCH_CONFIG_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/RF24_arch_config.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/RF24_arch_config.h deleted file mode 100644 index 2cfd75a..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/RF24_arch_config.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - */ - -/** - * @file RF24_arch_config.h - * General defines and includes for RF24/Linux - */ - -/** - * Example of RF24_arch_config.h for RF24 portability - * - * @defgroup Porting_General Porting: General - * @{ - */ - -#ifndef RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_ -#define RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_ - -#define RF24_LINUX - -#include <stddef.h> -#include "spi.h" -#include "gpio.h" -#include "compatibility.h" -#include <stdint.h> -#include <stdio.h> -#include <time.h> -#include <string.h> -#include <sys/time.h> - -#define _BV(x) (1 << (x)) -#define _SPI spi - -#ifdef RF24_DEBUG - #define IF_RF24_DEBUG(x) ({ x; }) -#else - #define IF_RF24_DEBUG(x) -#endif - -// Avoid spurious warnings -#if !defined(NATIVE) && defined(ARDUINO) - #undef PROGMEM - #define PROGMEM __attribute__((section(".progmem.data"))) - #undef PSTR - #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0]; })) -#endif - -typedef uint16_t prog_uint16_t; -typedef uint16_t rf24_gpio_pin_t; -#define PSTR(x) (x) -#define printf_P printf -#define strlen_P strlen -#define PROGMEM -#define pgm_read_word(p) (*(const unsigned short*)(p)) -#define PRIPSTR "%s" -#define pgm_read_byte(p) (*(const unsigned char*)(p)) - -// Function, constant map as a result of migrating from Arduino -#define LOW GPIO::OUTPUT_LOW -#define HIGH GPIO::OUTPUT_HIGH -#define INPUT GPIO::DIRECTION_IN -#define OUTPUT GPIO::DIRECTION_OUT -#define digitalWrite(pin, value) GPIO::write(pin, value) -#define pinMode(pin, direction) GPIO::open(pin, direction) -#define delay(millisec) __msleep(millisec) -#define delayMicroseconds(usec) __usleep(usec) -#define millis() __millis() - -/**@}*/ - -#endif // RF24_UTILITY_TEMPLATE_RF24_ARCH_CONFIG_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/compatibility.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/compatibility.h deleted file mode 100644 index 49c33e1..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/compatibility.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file compatibility.h - * Class declaration for SPI helper files - */ - -/** - * Example of compatibility.h class declaration for timing functions portability - * - * @defgroup Porting_Timing Porting: Timing - * @{ - */ - -#ifndef RF24_UTILITY_TEMPLATE_COMPATIBLITY_H_ -#define RF24_UTILITY_TEMPLATE_COMPATIBLITY_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> - -void __msleep(int millisec); - -void __usleep(int microsec); - -void __start_timer(); - -uint32_t __millis(); - -#ifdef __cplusplus -} -#endif - -/**@}*/ - -#endif // RF24_UTILITY_TEMPLATE_COMPATIBLITY_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/gpio.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/gpio.h deleted file mode 100644 index 9164646..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/gpio.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file gpio.h - * Class declaration for SPI helper files - */ - -/** - * Example of gpio.h class declaration for GPIO portability - * - * @defgroup Porting_GPIO Porting: GPIO - * @{ - */ -#ifndef RF24_UTILITY_TEMPLATE_GPIO_H_ -#define RF24_UTILITY_TEMPLATE_GPIO_H_ - -#include <cstdio> - -#ifndef DOXYGEN_FORCED -// exclude this line from the docs to prevent displaying in the list of classes -class GPIO -#endif -{ - -public: - /* Constants */ - static const int DIRECTION_OUT = 1; - static const int DIRECTION_IN = 0; - - static const int OUTPUT_HIGH = 1; - static const int OUTPUT_LOW = 0; - - GPIO(); - - /** - * Similar to Arduino pinMode(pin,mode); - * @param port - * @param DDR - */ - static void open(int port, int DDR); - - /** - * - * @param port - */ - static void close(int port); - - /** - * Similar to Arduino digitalRead(pin); - * @param port - */ - static int read(int port); - - /** - * Similar to Arduino digitalWrite(pin,state); - * @param port - * @param value - */ - static void write(int port, int value); - -#ifndef DOXYGEN_FORCED - // exclude this line from the docs to prevent warnings docs generators - virtual ~GPIO(); -#endif -}; - -/**@}*/ - -#endif // RF24_UTILITY_TEMPLATE_GPIO_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/includes.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/includes.h deleted file mode 100644 index 2dd2412..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/includes.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @file includes.h - * Configuration defines for RF24/Linux - */ - -/** - * Example of includes.h for RF24 Linux portability - * - * @defgroup Porting_Includes Porting: Includes - * @{ - */ - -#ifndef RF24_UTILITY_INCLUDES_H_ -#define RF24_UTILITY_INCLUDES_H_ - -/** - * Define a specific platform for this configuration - */ -#define RF24_TEMPLATE - -/** - * Load the correct configuration for this platform - */ -#include "Template/RF24_arch_config.h" - -/**@}*/ - -#endif // RF24_UTILITY_INCLUDES_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/spi.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/spi.h deleted file mode 100644 index c4432a3..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/Template/spi.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file spi.h - * Class declaration for SPI helper files - */ - -/** - * Example of spi.h class declaration for SPI portability - * - * @defgroup Porting_SPI Porting: SPI - * @{ - */ -#ifndef RF24_UTILITY_TEMPLATE_SPI_H_ -#define RF24_UTILITY_TEMPLATE_SPI_H_ - -#include <stdint.h> - -#ifndef DOXYGEN_FORCED -// exclude this line from the docs to prevent displaying in the list of classes -class SPI -#endif -{ - -public: - /** - * SPI constructor - */ - SPI(); - - /** - * Start SPI - */ - void begin(int busNo); - - /** - * Transfer a single byte - * @param tx_ Byte to send - * @return Data returned via spi - */ - uint8_t transfer(uint8_t tx_); - - /** - * Transfer a buffer of data - * @param txBuf Transmit buffer - * @param rxBuf Receive buffer - * @param len Length of the data - */ - void transfernb(char* txBuf, char* rxBuf, uint32_t len); - - /** - * Transfer a buffer of data without an rx buffer - * @param buf Pointer to a buffer of data - * @param len Length of the data - */ - void transfern(char* buf, uint32_t len); - -#ifndef DOXYGEN_FORCED - // exclude this line from the docs to prevent warnings docs generators - virtual ~SPI(); -#endif - -private: - /** SPI bus */ - int bus; - /** SPI Mode set */ - uint8_t mode; - /** SPI word size */ - uint8_t bits; - /** SPI speed */ - uint32_t speed; -}; - -/**@}*/ - -#endif // RF24_UTILITY_TEMPLATE_SPI_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/RF24_arch_config.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/RF24_arch_config.h deleted file mode 100644 index 3d05c09..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/RF24_arch_config.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - */ -#ifndef RF24_UTILITY_PIGPIO_RF24_ARCH_CONFIG_H_ -#define RF24_UTILITY_PIGPIO_RF24_ARCH_CONFIG_H_ - -#define RF24_LINUX - -#include <stdint.h> // uint16_t -#include <stdio.h> // printf -#include <string.h> // strlen -#include "spi.h" -#include "gpio.h" -#include "compatibility.h" - -//#define RF24_SPI_SPEED RF24_SPIDEV_SPEED - -#define _BV(x) (1 << (x)) -#define _SPI spi - -#ifdef RF24_DEBUG - #define IF_RF24_DEBUG(x) ({ x; }) -#else - #define IF_RF24_DEBUG(x) -#endif - -// Avoid spurious warnings -#if 1 - #if !defined(NATIVE) && defined(ARDUINO) - #undef PROGMEM - #define PROGMEM __attribute__((section(".progmem.data"))) - #undef PSTR - #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0]; })) - #endif -#endif - -#if RF24_SPI_SPEED > 1000000 - #undef RF24_SPI_SPEED - #define RF24_SPI_SPEED 1000000 -#endif - -typedef uint16_t prog_uint16_t; -typedef uint8_t rf24_gpio_pin_t; -#define RF24_PIN_INVALID 0xFF - -#define PSTR(x) (x) -#define printf_P printf -#define strlen_P strlen -#define PROGMEM -#define pgm_read_word(p) (*(const unsigned short*)(p)) -#define PRIPSTR "%s" -#define pgm_read_byte(p) (*(const unsigned char*)(p)) -#define pgm_read_ptr(p) (*(void* const*)(p)) - -// Function, constant map as a result of migrating from Arduino -#define LOW GPIO::OUTPUT_LOW -#define HIGH GPIO::OUTPUT_HIGH -#define INPUT GPIO::DIRECTION_IN -#define OUTPUT GPIO::DIRECTION_OUT -#define digitalWrite(pin, value) GPIO::write(pin, value) -#define pinMode(pin, direction) GPIO::open(pin, direction) -#define delay(millisec) __msleep(millisec) -#define delayMicroseconds(usec) __usleep(usec) -#define millis() __millis() - -#endif // RF24_UTILITY_PIGPIO_RF24_ARCH_CONFIG_H_ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.cpp b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.cpp deleted file mode 100644 index f28cf3d..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include <time.h> -#include <chrono> -#include "compatibility.h" - -long long mtime, seconds, useconds; -//static struct timeval start, end; -//struct timespec start, end; - -void __msleep(int millisec) -{ - struct timespec req; // = {0}; - req.tv_sec = (time_t)millisec / 1000; - req.tv_nsec = (millisec % 1000) * 1000000L; - //nanosleep(&req, (struct timespec *)NULL); - clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL); -} - -void __usleep(int microsec) -{ - struct timespec req; // = {0}; - req.tv_sec = (time_t)microsec / 1000000; - req.tv_nsec = (microsec % 1000000) * 1000; - //nanosleep(&req, (struct timespec *)NULL); - clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL); -} - -/** - * This function is added in order to simulate arduino millis() function - */ - -bool timerStarted = false; - -void __start_timer() -{ -} - -auto start = std::chrono::steady_clock::now(); - -uint32_t __millis() -{ - - auto end = std::chrono::steady_clock::now(); - - return std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count(); -} diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.h deleted file mode 100644 index b94c571..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/compatibility.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Time keeping functions - */ -#ifndef RF24_UTILITY_PIGPIO_COMPATIBLITY_H_ -#define RF24_UTILITY_PIGPIO_COMPATIBLITY_H_ - -#include <stdint.h> // for uintXX_t types - -#ifdef __cplusplus -extern "C" { -#endif - -void __msleep(int millisec); - -void __usleep(int microsec); - -void __start_timer(); - -uint32_t __millis(); - -#ifdef __cplusplus -} -#endif - -#endif /* RF24_UTILITY_PIGPIO_COMPATIBLITY_H_ */ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.cpp b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.cpp deleted file mode 100644 index 3c9a63e..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * GPIO Functions - */ -#include <pigpio.h> -#include "gpio.h" - -bool initialized = 0; - -GPIO::GPIO() -{ -} - -GPIO::~GPIO() -{ - gpioTerminate(); -} - -void GPIO::open(int port, int DDR) -{ - if (!initialized) { - gpioInitialise(); - } - initialized = true; - gpioSetMode(port, PI_OUTPUT); -} - -void GPIO::close(int port) -{ -} - -int GPIO::read(int port) -{ - return gpioRead(port); -} - -void GPIO::write(int port, int value) -{ - gpioWrite(port, value); -} diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.h deleted file mode 100644 index 8fe245c..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/gpio.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - */ - -#ifndef RF24_UTILITY_PIGPIO_GPIO_H_ -#define RF24_UTILITY_PIGPIO_GPIO_H_ - -#include <stdexcept> - -/** Specific exception for GPIO errors */ -class GPIOException : public std::runtime_error -{ -public: - explicit GPIOException(const std::string& msg) - : std::runtime_error(msg) - { - } -}; - -class GPIO -{ -public: - /* Constants */ - static const int DIRECTION_OUT = 1; - static const int DIRECTION_IN = 0; - - static const int OUTPUT_HIGH = 1; - static const int OUTPUT_LOW = 0; - - GPIO(); - - /** - * Similar to Arduino pinMode(pin,mode); - * @param port - * @param DDR - */ - static void open(int port, int DDR); - - /** - * - * @param port - */ - static void close(int port); - - /** - * Similar to Arduino digitalRead(pin); - * @param port - */ - static int read(int port); - - /** - * Similar to Arduino digitalWrite(pin,state); - * @param port - * @param value - */ - static void write(int port, int value); - - virtual ~GPIO(); - -private: -}; - -#endif /* RF24_UTILITY_PIGPIO_GPIO_H_ */ diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/includes.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/includes.h deleted file mode 100644 index 9f4c2e8..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/includes.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef RF24_UTILITY_INCLUDES_H_ -#define RF24_UTILITY_INCLUDES_H_ - -#define RF24_PIGPIO - -#include <cstring> // memcpy() used in RF24.cpp -#include "pigpio/RF24_arch_config.h" -#include "pigpio/interrupt.h" - -#endif diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.cpp b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.cpp deleted file mode 100644 index ad89af4..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Interrupt implementation wrapped from pigpio library - */ -#include <pigpio.h> -#include "interrupt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int attachInterrupt(int pin, int mode, void (*function)(void)) -{ - gpioInitialise(); - return gpioSetISRFunc(pin, mode, 0, (gpioISRFunc_t)function); -} - -int detachInterrupt(int pin) -{ - return gpioSetISRFunc(pin, 0, 0, NULL); -} - -void rfNoInterrupts() -{ -} - -void rfInterrupts() -{ -} - -#ifdef __cplusplus -} -#endif diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.h deleted file mode 100644 index 80272cd..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/interrupt.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Interrupt functions wrapped from pigpio library - */ -#ifndef RF24_UTILITY_PIGPIO_INTERRUPT_H_ -#define RF24_UTILITY_PIGPIO_INTERRUPT_H_ - -#include <pigpio.h> - -#define INT_EDGE_FALLING FALLING_EDGE -#define INT_EDGE_RISING RISING_EDGE -#define INT_EDGE_BOTH EITHER_EDGE - -#ifdef __cplusplus -extern "C" { -#endif - -int attachInterrupt(int pin, int mode, void (*function)(void)); - -int detachInterrupt(int pin); - -/* Deprecated, no longer functional */ -void rfNoInterrupts(); - -/* Deprecated, no longer functional */ -void rfInterrupts(); - -#ifdef __cplusplus -} -#endif -#endif // RF24_UTILITY_PIGPIO_INTERRUPT_H_
\ No newline at end of file diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.cpp b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.cpp deleted file mode 100644 index 8698a14..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - */ - -#include <pigpio.h> -#include "spi.h" - -SPI::SPI() -{ -} - -void SPI::begin(int busNo, uint32_t spi_speed) -{ - if (this->spiIsInitialized) { - return; - } - spiIsInitialized = true; - gpioInitialise(); - spiHandle = spiOpen((unsigned int)(busNo & 2), spi_speed, (unsigned int)((busNo / 10) << 7)); -} - -void SPI::init(uint32_t speed) -{ -} - -uint8_t SPI::transfer(char tx) -{ - char rbuf = 0; - spiXfer(spiHandle, &tx, &rbuf, 1); - return rbuf; -} - -void SPI::transfernb(char* txBuf, char* rxBuf, uint32_t len) -{ - spiXfer(spiHandle, txBuf, rxBuf, len); -} - -SPI::~SPI() -{ -} diff --git a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.h b/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.h deleted file mode 100644 index 9c5fa2a..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/RF24/utility/pigpio/spi.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * - */ - -#ifndef RF24_UTILITY_PIGPIO_SPI_H_ -#define RF24_UTILITY_PIGPIO_SPI_H_ - -#include <cstdint> -#include <stdexcept> - -/** Specific exception for SPI errors */ -class SPIException : public std::runtime_error -{ -public: - explicit SPIException(const std::string& msg) - : std::runtime_error(msg) - { - } -}; - -class SPI -{ - -public: - /** - * SPI constructor - */ - SPI(); - - /** - * Start SPI - */ - void begin(int busNo, uint32_t spi_speed); - - /** - * Transfer a single byte - * @param tx Byte to send - * @return Data returned via spi - */ - uint8_t transfer(char tx); - - /** - * Transfer a buffer of data - * @param txBuf Transmit buffer - * @param rxBuf Receive buffer - * @param len Length of the data - */ - void transfernb(char* txBuf, char* rxBuf, uint32_t len); - - /** - * Transfer a buffer of data without an rx buffer - * @param buf Pointer to a buffer of data - * @param len Length of the data - */ - void transfern(char* buf, uint32_t len) - { - transfernb(buf, buf, len); - } - - ~SPI(); - -private: - unsigned spiHandle; - bool spiIsInitialized = false; - void init(uint32_t spi_speed); -}; - -#endif /* RF24_UTILITY_PIGPIO_SPI_H_ */ |
