2021-03-29 16:05:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "pico/stdlib.h"
|
2021-05-13 11:06:01 +00:00
|
|
|
#include "drivers/esp32spi/esp32spi.hpp"
|
2021-03-29 16:05:06 +00:00
|
|
|
|
|
|
|
namespace pimoroni {
|
|
|
|
|
2021-03-29 20:08:29 +00:00
|
|
|
class PicoWireless : public Esp32Spi {
|
|
|
|
typedef Esp32Spi parent;
|
2021-03-29 16:05:06 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------
|
|
|
|
// Constants
|
|
|
|
//--------------------------------------------------
|
|
|
|
public:
|
|
|
|
static const uint8_t A = 12;
|
|
|
|
|
|
|
|
static const uint8_t ESP_LED_R = 25;
|
|
|
|
static const uint8_t ESP_LED_G = 26;
|
|
|
|
static const uint8_t ESP_LED_B = 27;
|
|
|
|
|
2021-04-19 15:44:11 +00:00
|
|
|
static const uint8_t ESP_SD_DETECT = 15;
|
|
|
|
|
2021-03-29 16:05:06 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------
|
|
|
|
// Variables
|
|
|
|
//--------------------------------------------------
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
//PicoWireless();
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------
|
|
|
|
// Methods
|
|
|
|
//--------------------------------------------------
|
|
|
|
public:
|
|
|
|
virtual bool init();
|
|
|
|
|
|
|
|
void set_led(uint8_t r, uint8_t g, uint8_t b);
|
|
|
|
bool is_pressed(uint8_t button);
|
2021-04-19 15:44:11 +00:00
|
|
|
bool is_sdcard_detected();
|
2021-03-29 16:05:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|