commit
c2c450bd72
@ -1,7 +1,5 @@ |
||||
idf_component_register( |
||||
SRCS |
||||
"gay-ipod-fw.cpp" "dac.cpp" "gpio-expander.cpp" "battery.cpp" |
||||
"storage.cpp" "i2c.cpp" "playback.cpp" |
||||
SRCS "gay-ipod-fw.cpp" "dac.cpp" "gpio-expander.cpp" "battery.cpp" "storage.cpp" |
||||
"i2c.cpp" "playback.cpp" "display.cpp" "display-init.cpp" |
||||
INCLUDE_DIRS "." |
||||
REQUIRES |
||||
"esp_adc_cal" "fatfs" "audio_pipeline" "audio_stream" "result" "lvgl") |
||||
REQUIRES "esp_adc_cal" "fatfs" "audio_pipeline" "audio_stream" "result" "lvgl") |
||||
|
@ -0,0 +1,103 @@ |
||||
#include "display-init.hpp" |
||||
|
||||
namespace gay_ipod { |
||||
namespace displays { |
||||
|
||||
/* Bit to use to signify we should delay after part of an init sequence */ |
||||
const uint8_t kDelayBit = 0x80; |
||||
|
||||
// ST7735 commands and general format from the Adafruit library for these
|
||||
// displays. AFAICT it's the most complete implementation out there, and I
|
||||
// really don't want to have to derive this from the datasheet myself.
|
||||
// See https://github.com/adafruit/Adafruit-ST7735-Library/
|
||||
|
||||
// clang-format off
|
||||
static const uint8_t kST7735RCommonHeader[]{ |
||||
15, // 15 commands in list:
|
||||
ST77XX_SWRESET, kDelayBit, // 1: Software reset, 0 args, w/delay
|
||||
150, // 150 ms delay
|
||||
ST77XX_SLPOUT, kDelayBit, // 2: Out of sleep mode, 0 args, w/delay
|
||||
255, // 500 ms delay
|
||||
ST7735_FRMCTR1, 3, // 3: Framerate ctrl - normal mode, 3 arg:
|
||||
0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D)
|
||||
ST7735_FRMCTR2, 3, // 4: Framerate ctrl - idle mode, 3 args:
|
||||
0x01, 0x2C, 0x2D, // Rate = fosc/(1x2+40) * (LINE+2C+2D)
|
||||
ST7735_FRMCTR3, 6, // 5: Framerate - partial mode, 6 args:
|
||||
0x01, 0x2C, 0x2D, // Dot inversion mode
|
||||
0x01, 0x2C, 0x2D, // Line inversion mode
|
||||
ST7735_INVCTR, 1, // 6: Display inversion ctrl, 1 arg:
|
||||
0x07, // No inversion
|
||||
ST7735_PWCTR1, 3, // 7: Power control, 3 args, no delay:
|
||||
0xA2, |
||||
0x02, // -4.6V
|
||||
0x84, // AUTO mode
|
||||
ST7735_PWCTR2, 1, // 8: Power control, 1 arg, no delay:
|
||||
0xC5, // VGH25=2.4C VGSEL=-10 VGH=3 * AVDD
|
||||
ST7735_PWCTR3, 2, // 9: Power control, 2 args, no delay:
|
||||
0x0A, // Opamp current small
|
||||
0x00, // Boost frequency
|
||||
ST7735_PWCTR4, 2, // 10: Power control, 2 args, no delay:
|
||||
0x8A, // BCLK/2,
|
||||
0x2A, // opamp current small & medium low
|
||||
ST7735_PWCTR5, 2, // 11: Power control, 2 args, no delay:
|
||||
0x8A, 0xEE, |
||||
ST7735_VMCTR1, 1, // 12: Power control, 1 arg, no delay:
|
||||
0x0E, |
||||
ST77XX_INVOFF, 0, // 13: Don't invert display, no args
|
||||
ST77XX_MADCTL, 1, // 14: Mem access ctl (directions), 1 arg:
|
||||
0xC8, // row/col addr, bottom-top refresh
|
||||
ST77XX_COLMOD, 1, // 15: set color mode, 1 arg, no delay:
|
||||
0x05 |
||||
}; |
||||
|
||||
// Commands to include for the variant of the panel that has a green pull tab on
|
||||
// the screen protector.
|
||||
static const uint8_t kST7735RCommonGreen[]{ |
||||
2, // 2 commands in list:
|
||||
ST77XX_CASET, 4, // 1: Column addr set, 4 args, no delay:
|
||||
0x00, 0x02, // XSTART = 0
|
||||
0x00, 0x7F+0x02, // XEND = 127
|
||||
ST77XX_RASET, 4, // 2: Row addr set, 4 args, no delay:
|
||||
0x00, 0x01, // XSTART = 0
|
||||
0x00, 0x9F+0x01}; |
||||
|
||||
// Commands to include for the variant of the panel that has a red pull tab on
|
||||
// the screen protector.
|
||||
static const uint8_t kST7735RCommonRed[]{ |
||||
3, // 2 commands in list:
|
||||
ST77XX_CASET, 4, // 1: Column addr set, 4 args, no delay:
|
||||
0x00, 0x00, // XSTART = 0
|
||||
0x00, 0x7F, // XEND = 127
|
||||
ST77XX_RASET, 4, // 2: Row addr set, 4 args, no delay:
|
||||
0x00, 0x00, // XSTART = 0
|
||||
0x00, 0x9F, |
||||
ST77XX_MADCTL, 1, |
||||
0xC0, |
||||
}; |
||||
|
||||
static const uint8_t kST7735RCommonFooter[]{ |
||||
4, // 4 commands in list:
|
||||
ST7735_GMCTRP1, 16 , // 1: Gamma Adjustments (pos. polarity), 16 args + delay:
|
||||
0x02, 0x1c, 0x07, 0x12, // (Not entirely necessary, but provides
|
||||
0x37, 0x32, 0x29, 0x2d, // accurate colors)
|
||||
0x29, 0x25, 0x2B, 0x39, |
||||
0x00, 0x01, 0x03, 0x10, |
||||
ST7735_GMCTRN1, 16 , // 2: Gamma Adjustments (neg. polarity), 16 args + delay:
|
||||
0x03, 0x1d, 0x07, 0x06, // (Not entirely necessary, but provides
|
||||
0x2E, 0x2C, 0x29, 0x2D, // accurate colors)
|
||||
0x2E, 0x2E, 0x37, 0x3F, |
||||
0x00, 0x00, 0x02, 0x10, |
||||
ST77XX_NORON, kDelayBit, // 3: Normal display on, no args, w/delay
|
||||
10, // 10 ms delay
|
||||
ST77XX_DISPON, kDelayBit, // 4: Main screen turn on, no args w/delay
|
||||
100 |
||||
}; |
||||
// clang-format on
|
||||
|
||||
const InitialisationData kST7735R = { |
||||
.num_sequences = 3, |
||||
.sequences = {kST7735RCommonHeader, kST7735RCommonRed, |
||||
kST7735RCommonFooter}}; |
||||
|
||||
} // namespace displays
|
||||
} // namespace gay_ipod
|
@ -0,0 +1,81 @@ |
||||
#pragma once |
||||
|
||||
#include <cstdint> |
||||
|
||||
namespace gay_ipod { |
||||
namespace displays { |
||||
|
||||
extern const uint8_t kDelayBit; |
||||
|
||||
struct InitialisationData { |
||||
uint8_t num_sequences; |
||||
const uint8_t* sequences[4]; |
||||
}; |
||||
|
||||
extern const InitialisationData kST7735R; |
||||
|
||||
/*
|
||||
* Valid command bytes that can be sent to ST77XX displays, as well as commands |
||||
* for more specific variants. |
||||
*/ |
||||
enum StCommands { |
||||
ST77XX_NOP = 0x00, |
||||
ST77XX_SWRESET = 0x01, |
||||
ST77XX_RDDID = 0x04, |
||||
ST77XX_RDDST = 0x09, |
||||
|
||||
ST77XX_SLPIN = 0x10, |
||||
ST77XX_SLPOUT = 0x11, |
||||
ST77XX_PTLON = 0x12, |
||||
ST77XX_NORON = 0x13, |
||||
|
||||
ST77XX_INVOFF = 0x20, |
||||
ST77XX_INVON = 0x21, |
||||
ST77XX_DISPOFF = 0x28, |
||||
ST77XX_DISPON = 0x29, |
||||
ST77XX_CASET = 0x2A, |
||||
ST77XX_RASET = 0x2B, |
||||
ST77XX_RAMWR = 0x2C, |
||||
ST77XX_RAMRD = 0x2E, |
||||
|
||||
ST77XX_PTLAR = 0x30, |
||||
ST77XX_TEOFF = 0x34, |
||||
ST77XX_TEON = 0x35, |
||||
ST77XX_MADCTL = 0x36, |
||||
ST77XX_COLMOD = 0x3A, |
||||
|
||||
ST77XX_MADCTL_MY = 0x80, |
||||
ST77XX_MADCTL_MX = 0x40, |
||||
ST77XX_MADCTL_MV = 0x20, |
||||
ST77XX_MADCTL_ML = 0x10, |
||||
ST77XX_MADCTL_RGB = 0x00, |
||||
|
||||
ST77XX_RDID1 = 0xDA, |
||||
ST77XX_RDID2 = 0xDB, |
||||
ST77XX_RDID3 = 0xDC, |
||||
ST77XX_RDID4 = 0xDD, |
||||
|
||||
ST7735_MADCTL_BGR = 0x08, |
||||
ST7735_MADCTL_MH = 0x04, |
||||
|
||||
ST7735_FRMCTR1 = 0xB1, |
||||
ST7735_FRMCTR2 = 0xB2, |
||||
ST7735_FRMCTR3 = 0xB3, |
||||
ST7735_INVCTR = 0xB4, |
||||
ST7735_DISSET5 = 0xB6, |
||||
|
||||
ST7735_PWCTR1 = 0xC0, |
||||
ST7735_PWCTR2 = 0xC1, |
||||
ST7735_PWCTR3 = 0xC2, |
||||
ST7735_PWCTR4 = 0xC3, |
||||
ST7735_PWCTR5 = 0xC4, |
||||
ST7735_VMCTR1 = 0xC5, |
||||
|
||||
ST7735_PWCTR6 = 0xFC, |
||||
|
||||
ST7735_GMCTRP1 = 0xE0, |
||||
ST7735_GMCTRN1 = 0xE1, |
||||
}; |
||||
|
||||
} // namespace displays
|
||||
} // namespace gay_ipod
|
@ -0,0 +1,285 @@ |
||||
#include "display.hpp" |
||||
#include <atomic> |
||||
#include <cstdint> |
||||
#include <cstring> |
||||
#include <memory> |
||||
#include <mutex> |
||||
#include "assert.h" |
||||
#include "display-init.hpp" |
||||
#include "driver/gpio.h" |
||||
#include "driver/spi_master.h" |
||||
#include "esp_attr.h" |
||||
#include "esp_heap_caps.h" |
||||
#include "freertos/portable.h" |
||||
#include "freertos/portmacro.h" |
||||
#include "freertos/projdefs.h" |
||||
#include "hal/gpio_types.h" |
||||
#include "hal/spi_types.h" |
||||
#include "lvgl/lvgl.h" |
||||
|
||||
static const char* kTag = "DISPLAY"; |
||||
static const gpio_num_t kCommandOrDataPin = GPIO_NUM_21; |
||||
static const gpio_num_t kLedPin = GPIO_NUM_22; |
||||
|
||||
static const uint8_t kDisplayWidth = 128; |
||||
static const uint8_t kDisplayHeight = 160; |
||||
static const uint8_t kTransactionQueueSize = 10; |
||||
|
||||
/*
|
||||
* The size of each of our two display buffers. This is fundamentally a balance |
||||
* between performance and memory usage. LVGL docs recommend a buffer 1/10th the |
||||
* size of the screen is the best tradeoff. |
||||
* We use two buffers so that one can be flushed to the screen at the same time |
||||
* as the other is being drawn. |
||||
*/ |
||||
static const int kDisplayBufferSize = (kDisplayWidth * kDisplayHeight) / 10; |
||||
|
||||
// Allocate both buffers in static memory to ensure that they're in DRAM, with
|
||||
// minimal fragmentation. We most cases we always need these buffers anyway, so
|
||||
// it's not a memory hit we can avoid anyway.
|
||||
// Note: 128 * 160 / 10 * 2 bpp * 2 buffers = 8 KiB
|
||||
DMA_ATTR static lv_color_t sBuffer1[kDisplayBufferSize]; |
||||
DMA_ATTR static lv_color_t sBuffer2[kDisplayBufferSize]; |
||||
|
||||
namespace gay_ipod { |
||||
|
||||
// Static functions for interrop with the LVGL display driver API, which
|
||||
// requires a function pointer.
|
||||
namespace callback { |
||||
static std::atomic<Display*> instance = nullptr; |
||||
|
||||
static void flush_cb(lv_disp_drv_t* disp_drv, |
||||
const lv_area_t* area, |
||||
lv_color_t* color_map) { |
||||
auto instance_unwrapped = instance.load(); |
||||
if (instance_unwrapped == nullptr) { |
||||
ESP_LOGW(kTag, "uncaught flush callback"); |
||||
return; |
||||
} |
||||
// TODO: what if a transaction comes in right now?
|
||||
instance_unwrapped->Flush(disp_drv, area, color_map); |
||||
} |
||||
|
||||
static void IRAM_ATTR post_cb(spi_transaction_t* transaction) { |
||||
auto instance_unwrapped = instance.load(); |
||||
if (instance_unwrapped == nullptr) { |
||||
// Can't log in ISR.
|
||||
return; |
||||
} |
||||
instance_unwrapped->PostTransaction(*transaction); |
||||
} |
||||
} // namespace callback
|
||||
|
||||
auto Display::create(GpioExpander* expander, |
||||
const displays::InitialisationData& init_data) |
||||
-> cpp::result<std::unique_ptr<Display>, Error> { |
||||
// First, set up our GPIOs
|
||||
gpio_config_t gpio_cfg = { |
||||
.pin_bit_mask = GPIO_SEL_22 | GPIO_SEL_21, |
||||
.mode = GPIO_MODE_OUTPUT, |
||||
.pull_up_en = GPIO_PULLUP_DISABLE, |
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE, |
||||
.intr_type = GPIO_INTR_DISABLE, |
||||
}; |
||||
gpio_config(&gpio_cfg); |
||||
|
||||
gpio_set_level(kLedPin, 1); |
||||
gpio_set_level(kCommandOrDataPin, 0); |
||||
|
||||
// Next, init the SPI device
|
||||
spi_device_interface_config_t spi_cfg = { |
||||
.command_bits = 0, // No command phase
|
||||
.address_bits = 0, // No address phase
|
||||
.dummy_bits = 0, |
||||
// For ST7789, mode should be 2
|
||||
.mode = 0, |
||||
.duty_cycle_pos = 0, // Unused
|
||||
.cs_ena_pretrans = 0, |
||||
.cs_ena_posttrans = 0, |
||||
.clock_speed_hz = SPI_MASTER_FREQ_40M, |
||||
.input_delay_ns = 0, |
||||
.spics_io_num = -1, // TODO: change for R2
|
||||
.flags = 0, |
||||
.queue_size = kTransactionQueueSize, |
||||
.pre_cb = NULL, |
||||
.post_cb = &callback::post_cb, |
||||
}; |
||||
spi_device_handle_t handle; |
||||
spi_bus_add_device(VSPI_HOST, &spi_cfg, &handle); |
||||
|
||||
// TODO: ideally create this later? a bit awkward rn.
|
||||
auto display = std::make_unique<Display>(expander, handle); |
||||
|
||||
// Now we reset the display into a known state, then configure it
|
||||
// TODO: set rotatoin
|
||||
ESP_LOGI(kTag, "Sending init sequences"); |
||||
for (int i = 0; i < init_data.num_sequences; i++) { |
||||
display->SendInitialisationSequence(init_data.sequences[i]); |
||||
} |
||||
|
||||
// The hardware is now configured correctly. Next, initialise the LVGL display
|
||||
// driver.
|
||||
ESP_LOGI(kTag, "Init buffers"); |
||||
lv_disp_draw_buf_init(&display->buffers_, sBuffer1, sBuffer2, |
||||
kDisplayBufferSize); |
||||
lv_disp_drv_init(&display->driver_); |
||||
display->driver_.draw_buf = &display->buffers_; |
||||
display->driver_.hor_res = kDisplayWidth; |
||||
display->driver_.ver_res = kDisplayHeight; |
||||
display->driver_.flush_cb = &callback::flush_cb; |
||||
|
||||
ESP_LOGI(kTag, "Registering driver"); |
||||
display->display_ = lv_disp_drv_register(&display->driver_); |
||||
|
||||
return std::move(display); |
||||
} |
||||
|
||||
Display::Display(GpioExpander* gpio, spi_device_handle_t handle) |
||||
: gpio_(gpio), handle_(handle) { |
||||
callback::instance = this; |
||||
} |
||||
|
||||
Display::~Display() { |
||||
callback::instance = nullptr; |
||||
// TODO.
|
||||
} |
||||
|
||||
void Display::SendInitialisationSequence(const uint8_t* data) { |
||||
uint8_t command, num_args; |
||||
uint16_t sleep_duration_ms; |
||||
|
||||
// First byte of the data is the number of commands.
|
||||
for (int i = *(data++); i > 0; i--) { |
||||
command = *(data++); |
||||
num_args = *(data++); |
||||
bool has_delay = (num_args & displays::kDelayBit) > 0; |
||||
num_args &= ~displays::kDelayBit; |
||||
|
||||
SendCommandWithData(command, data, num_args); |
||||
|
||||
data += num_args; |
||||
if (has_delay) { |
||||
sleep_duration_ms = *(data++); |
||||
if (sleep_duration_ms == 0xFF) { |
||||
sleep_duration_ms = 500; |
||||
} |
||||
vTaskDelay(pdMS_TO_TICKS(sleep_duration_ms)); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void Display::SendCommandWithData(uint8_t command, |
||||
const uint8_t* data, |
||||
size_t length, |
||||
uintptr_t flags) { |
||||
SendCmd(&command, 1, flags); |
||||
SendData(data, length, flags); |
||||
} |
||||
|
||||
void Display::SendCmd(const uint8_t* data, size_t length, uintptr_t flags) { |
||||
SendTransaction(COMMAND, data, length, flags); |
||||
} |
||||
|
||||
void Display::SendData(const uint8_t* data, size_t length, uintptr_t flags) { |
||||
SendTransaction(DATA, data, length, flags); |
||||
} |
||||
|
||||
void Display::SendTransaction(TransactionType type, |
||||
const uint8_t* data, |
||||
size_t length, |
||||
uint32_t flags) { |
||||
if (length == 0) { |
||||
return; |
||||
} |
||||
|
||||
// TODO: Use a memory pool for these.
|
||||
spi_transaction_t* transaction = (spi_transaction_t*)heap_caps_calloc( |
||||
1, sizeof(spi_transaction_t), MALLOC_CAP_DMA); |
||||
|
||||
transaction->rx_buffer = NULL; |
||||
// Length is in bits, so multiply by 8.
|
||||
transaction->length = length * 8; |
||||
transaction->rxlength = 0; // Match `length` value.
|
||||
|
||||
// If the data to transmit is very short, then we can fit it directly
|
||||
// inside the transaction struct.
|
||||
if (length * 8 <= 32) { |
||||
transaction->flags = SPI_TRANS_USE_TXDATA; |
||||
std::memcpy(&transaction->tx_data, data, length); |
||||
} else { |
||||
// TODO: copy data to a DMA-capable transaction buffer
|
||||
transaction->tx_buffer = const_cast<uint8_t*>(data); |
||||
} |
||||
|
||||
transaction->user = reinterpret_cast<void*>(flags); |
||||
|
||||
// TODO: acquire the bus first? Or in an outer scope?
|
||||
// TODO: fail gracefully
|
||||
// ESP_ERROR_CHECK(spi_device_queue_trans(handle_, transaction,
|
||||
// portMAX_DELAY));
|
||||
//
|
||||
|
||||
ServiceTransactions(); |
||||
gpio_set_level(kCommandOrDataPin, type); |
||||
|
||||
gpio_->with([&](auto& gpio_) { |
||||
gpio_.set_pin(GpioExpander::DISPLAY_CHIP_SELECT, 0); |
||||
}); |
||||
{ |
||||
// auto lock = gpio_->AcquireSpiBus(GpioExpander::DISPLAY);
|
||||
ESP_ERROR_CHECK(spi_device_polling_transmit(handle_, transaction)); |
||||
} |
||||
|
||||
free(transaction); |
||||
} |
||||
|
||||
void Display::Flush(lv_disp_drv_t* disp_drv, |
||||
const lv_area_t* area, |
||||
lv_color_t* color_map) { |
||||
uint16_t data[2] = {0, 0}; |
||||
|
||||
data[0] = SPI_SWAP_DATA_TX(area->x1, 16); |
||||
data[1] = SPI_SWAP_DATA_TX(area->x2, 16); |
||||
SendCommandWithData(displays::ST77XX_CASET, (uint8_t*)data, 4); |
||||
|
||||
data[0] = SPI_SWAP_DATA_TX(area->y1, 16); |
||||
data[1] = SPI_SWAP_DATA_TX(area->y2, 16); |
||||
SendCommandWithData(displays::ST77XX_RASET, (uint8_t*)data, 4); |
||||
|
||||
uint32_t size = lv_area_get_width(area) * lv_area_get_height(area); |
||||
SendCommandWithData(displays::ST77XX_RAMWR, (uint8_t*)color_map, size * 2, |
||||
LVGL_FLUSH); |
||||
|
||||
// ESP_LOGI(kTag, "finished flush.");
|
||||
// lv_disp_flush_ready(&driver_);
|
||||
} |
||||
|
||||
void IRAM_ATTR Display::PostTransaction(const spi_transaction_t& transaction) { |
||||
if (reinterpret_cast<uintptr_t>(transaction.user) & LVGL_FLUSH) { |
||||
lv_disp_flush_ready(&driver_); |
||||
} |
||||
} |
||||
|
||||
void Display::ServiceTransactions() { |
||||
// todo
|
||||
if (1) |
||||
return; |
||||
spi_transaction_t* transaction = nullptr; |
||||
// TODO: just wait '1' here, provide mechanism to wait for sure (poll?)
|
||||
while (spi_device_get_trans_result(handle_, &transaction, pdMS_TO_TICKS(1)) != |
||||
ESP_ERR_TIMEOUT) { |
||||
ESP_LOGI(kTag, "cleaning up finished transaction"); |
||||
|
||||
// TODO: a bit dodge lmao
|
||||
// TODO: also this should happen in the post callback instead i guess?
|
||||
if (transaction->length > 1000) { |
||||
ESP_LOGI(kTag, "finished flush."); |
||||
lv_disp_flush_ready(&driver_); |
||||
} |
||||
|
||||
// TODO: place back into pool.
|
||||
free(transaction); |
||||
} |
||||
} |
||||
|
||||
} // namespace gay_ipod
|
@ -0,0 +1,67 @@ |
||||
#pragma once |
||||
|
||||
#include <cstdint> |
||||
#include "display-init.hpp" |
||||
#include "driver/spi_master.h" |
||||
#include "gpio-expander.hpp" |
||||
#include "lvgl/lvgl.h" |
||||
#include "result.hpp" |
||||
|
||||
namespace gay_ipod { |
||||
|
||||
/*
|
||||
* Display driver for LVGL. |
||||
*/ |
||||
class Display { |
||||
public: |
||||
enum Error {}; |
||||
static auto create(GpioExpander* expander, |
||||
const displays::InitialisationData& init_data) |
||||
-> cpp::result<std::unique_ptr<Display>, Error>; |
||||
|
||||
Display(GpioExpander* gpio, spi_device_handle_t handle); |
||||
~Display(); |
||||
|
||||
void WriteData(); |
||||
|
||||
void Flush(lv_disp_drv_t* disp_drv, |
||||
const lv_area_t* area, |
||||
lv_color_t* color_map); |
||||
|
||||
void IRAM_ATTR PostTransaction(const spi_transaction_t& transaction); |
||||
|
||||
void ServiceTransactions(); |
||||
|
||||
private: |
||||
GpioExpander* gpio_; |
||||
spi_device_handle_t handle_; |
||||
|
||||
lv_disp_draw_buf_t buffers_; |
||||
lv_disp_drv_t driver_; |
||||
lv_disp_t* display_ = nullptr; |
||||
|
||||
enum TransactionType { |
||||
COMMAND = 0, |
||||
DATA = 1, |
||||
}; |
||||
|
||||
enum TransactionFlags { |
||||
LVGL_FLUSH = 1, |
||||
}; |
||||
|
||||
void SendInitialisationSequence(const uint8_t* data); |
||||
|
||||
void SendCommandWithData(uint8_t command, |
||||
const uint8_t* data, |
||||
size_t length, |
||||
uintptr_t flags = 0); |
||||
|
||||
void SendCmd(const uint8_t* data, size_t length, uintptr_t flags = 0); |
||||
void SendData(const uint8_t* data, size_t length, uintptr_t flags = 0); |
||||
void SendTransaction(TransactionType type, |
||||
const uint8_t* data, |
||||
size_t length, |
||||
uintptr_t flags = 0); |
||||
}; |
||||
|
||||
} // namespace gay_ipod
|
Loading…
Reference in new issue