Cleanup arduino useless bullshit

This commit is contained in:
2022-05-23 23:54:26 +02:00
parent c7da12b153
commit a2c33507ba
16 changed files with 75 additions and 58 deletions

View File

@ -20,29 +20,21 @@
#ifndef HAL_ESP32_HAL_H_
#define HAL_ESP32_HAL_H_
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <inttypes.h>
#include <string.h>
#include <math.h>
#include "sdkconfig.h"
#include "esp_system.h"
#include "esp_sleep.h"
//#include <stdint.h>
//#include <stdbool.h>
//#include <stdio.h>
//#include <stdlib.h>
//#include <stdarg.h>
//#include <inttypes.h>
//#include <string.h>
//#include <math.h>
//#include "sdkconfig.h"
//#include "esp_system.h"
//#include "esp_sleep.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef F_CPU
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#define F_CPU (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000U)
#elif CONFIG_IDF_TARGET_ESP32S2
#define F_CPU (CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000U)
#endif
#endif
//#ifdef __cplusplus
//extern "C" {
//#endif
#if CONFIG_ARDUINO_ISR_IRAM
#define ARDUINO_ISR_ATTR IRAM_ATTR
@ -52,36 +44,32 @@ extern "C" {
#define ARDUINO_ISR_FLAG (0)
#endif
//forward declaration from freertos/portmacro.h
void vPortYield(void);
void yield(void);
#define optimistic_yield(u)
////forward declaration from freertos/portmacro.h
//void vPortYield(void);
//#define optimistic_yield(u)
#define ESP_REG(addr) *((volatile uint32_t *)(addr))
#define NOP() asm volatile ("nop")
//#include "esp32-hal-log.h"
//#include "esp32-hal-matrix.h"
//#include "esp32-hal-gpio.h"
//#include "esp32-hal-touch.h"
//#include "esp32-hal-dac.h"
//#include "esp32-hal-adc.h"
//#include "esp32-hal-spi.h"
//#include "esp32-hal-i2c.h"
//#include "esp32-hal-ledc.h"
//#include "esp32-hal-rmt.h"
//#include "esp32-hal-sigmadelta.h"
//#include "esp32-hal-psram.h"
//#include "esp32-hal-cpu.h"
////#include "esp32-hal-log.h"
////#include "esp32-hal-matrix.h"
////#include "esp32-hal-gpio.h"
////#include "esp32-hal-touch.h"
////#include "esp32-hal-dac.h"
////#include "esp32-hal-adc.h"
////#include "esp32-hal-spi.h"
////#include "esp32-hal-i2c.h"
////#include "esp32-hal-ledc.h"
////#include "esp32-hal-rmt.h"
////#include "esp32-hal-sigmadelta.h"
////#include "esp32-hal-psram.h"
////#include "esp32-hal-cpu.h"
//returns chip temperature in Celsius
float temperatureRead();
////returns chip temperature in Celsius
//float temperatureRead();
unsigned long micros();
void delayMicroseconds(uint32_t us);
#ifdef __cplusplus
}
#endif
//#ifdef __cplusplus
//}
//#endif
#endif /* HAL_ESP32_HAL_H_ */