2021-03-29 17:05:06 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "pico/stdlib.h"
|
2021-05-13 12:06:01 +01:00
|
|
|
#include "drivers/esp32spi/esp32spi.hpp"
|
2021-03-29 17:05:06 +01:00
|
|
|
|
|
|
|
namespace pimoroni {
|
|
|
|
|
2021-03-29 21:08:29 +01:00
|
|
|
class PicoWireless : public Esp32Spi {
|
|
|
|
typedef Esp32Spi parent;
|
2021-03-29 17:05:06 +01: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 16:44:11 +01:00
|
|
|
static const uint8_t ESP_SD_DETECT = 15;
|
|
|
|
|
2021-03-29 17:05:06 +01: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 16:44:11 +01:00
|
|
|
bool is_sdcard_detected();
|
2021-03-29 17:05:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|