This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "esp_err.h" | |
#include "driver/ledc.h" | |
#include "driver/periph_ctrl.h" | |
void app_main() | |
{ | |
periph_module_enable(PERIPH_LEDC_MODULE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/components/esp32/ld/esp32.common.ld b/components/esp32/ld/esp32.common.ld | |
index 32fc089..884717c 100644 | |
--- a/components/esp32/ld/esp32.common.ld | |
+++ b/components/esp32/ld/esp32.common.ld | |
@@ -11,12 +11,15 @@ SECTIONS | |
. = ALIGN(4); | |
*(.rtc.literal .rtc.text) | |
*rtc_wake_stub*.o(.literal .text .literal.* .text.*) | |
+ _rtc_text_end = ABSOLUTE(.); | |
} >rtc_iram_seg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I (437) example: Opening file | |
I (457) example: File written | |
I (467) example: Renaming file | |
I (467) example: Reading file | |
I (467) example: Read from file: 'Hello SU04G!' | |
This line will be written into the log file, not to UART |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include "soc/rtc_cntl_reg.h" | |
#include "esp32/ulp.h" | |
#include "driver/rtc_cntl.h" | |
#include "esp_log.h" | |
#include "ulp_main.h" | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/semphr.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This sample illustrates how to go back to deep sleep from the | |
* deep sleep wake stub. | |
* | |
* Consider the use case of counting pulses from an external sensor, | |
* where the pulses arrive at a relatively slow rate. | |
* | |
* ESP32 is configured to go into deep sleep mode, and wake up from | |
* a GPIO pin connected to the external pulse source. | |
* Once the pulse arrives, ESP32 wakes up from deep sleep and runs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRC := dcmi_source.v | |
CONSTRAINTS := dcmi_source.pcf | |
NAME := dcmi_source | |
TOP := DCMISource | |
all: $(NAME).bin | |
$(NAME).blif: $(SRC) | |
yosys -p 'synth_ice40 -top $(TOP) -blif $@' $< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Runs astyle with the full set of formatting options | |
astyle \ | |
--style=otbs \ | |
--indent=spaces=4 \ | |
--convert-tabs \ | |
--align-pointer=name \ | |
--align-reference=name \ | |
--keep-one-line-statements \ | |
--pad-header \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/espressif/newlib-esp32.git && | |
cd newlib-esp32 && \ | |
./configure \ | |
--with-newlib \ | |
--enable-multilib \ | |
--disable-newlib-io-c99-formats \ | |
--disable-newlib-supplied-syscalls \ | |
--enable-newlib-nano-formatted-io \ | |
--enable-newlib-reent-small \ | |
--enable-target-optspace \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download SMTPClient library from https://github.com/gregington/SMTPClient | |
#include <ESP8266WiFi.h> | |
#include <Client.h> | |
#include <Mail.h> | |
#include <SMTPClient.h> | |
WiFiClient wifiClient; | |
SmtpClient client(&wifiClient, "smtp.163.com"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <FS.h> | |
#include <ESP8266WebServer.h> | |
void startSoftAP() { | |
Serial.println("startSoftAP"); | |
WiFi.mode(WIFI_AP); | |
WiFi.softAP("ESPAP"); | |
ESP8266WebServer server; |