Arduino ESP32
https://github.com/espressif/arduino-esp32/
Serial
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.h
code:HardwareSerial.h
void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1, bool invert=false, unsigned long timeout_ms = 20000UL);
pinMode
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.h
code:esp32-hal-gpio.h
void pinMode(uint8_t pin, uint8_t mode);
preference
ESP32のNVS
MACアドレスの取得
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html#mac-address
code:mac_adderss
#define ETH_ALEN 6
uint8_t baseMacETH_ALEN;
esp_read_mac(baseMac, ESP_MAC_WIFI_STA); // esp_mac_type_t
WiFi.macAddress()でも取れるが,WiFi.begin()を呼んでおかないと落ちる
C++11
autoが使える
nullptr
ヌルポインタを表す
std::nullptr_t型
#m5stack