16using namespace display;
28 bool empty()
const {
return this->count_ == 0; }
29 size_t size()
const {
return this->count_; }
30 static constexpr size_t capacity() {
return N; }
33 if (this->count_ >= N)
35 this->data_[(this->head_ + this->count_) % N] = value;
41 if (this->count_ >= N)
43 this->head_ = (this->head_ + N - 1) % N;
44 this->data_[this->head_] = value;
50 if (this->count_ == 0)
52 this->head_ = (this->head_ + 1) % N;
56 const T &
front()
const {
return this->data_[this->head_]; }
57 T &
front() {
return this->data_[this->head_]; }
71static constexpr size_t OP_QUEUE_SIZE = 32;
140 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
141 spi::DATA_RATE_2MHZ> {
149 void setup()
override;
150 void loop()
override;
229 :
static_cast<uint16_t
>(((
static_cast<uint32_t>(this->
width_) + 15) / 16) * 2);
BedjetMode mode
BedJet operating mode.
Helper class to request loop() to be called as fast as possible.
int int int const uint8_t ColorOrder ColorBitness bitness
int int int const uint8_t ColorOrder ColorBitness bool int int y_offset
int int int const uint8_t ColorOrder ColorBitness bool int int int x_pad
int int int const uint8_t * ptr
virtual void set_rotation(DisplayRotation rotation)
Internal method to set the display rotation with.
int int int const uint8_t ColorOrder ColorBitness bool big_endian
int int int const uint8_t ColorOrder ColorBitness bool int x_offset
int get_height() override
uint8_t full_update_every_
void on_powerdown() override
void update_mode(UpdateMode mode)
bool use_legacy_dpy_area_
float get_setup_priority() const override
void start_update_(UpdateMode mode)
void spi_write_args_(const uint16_t *args, uint16_t count)
void enqueue_init_temp_()
void enqueue_update_refresh_()
bool pixel_axes_swapped() const override
HighFrequencyLoopRequester high_freq_
void reset_dirty_region_()
void set_invert_colors(bool invert_colors)
uint32_t partial_update_count_
int16_t force_temperature_
void set_transform(uint8_t t)
void set_phase_(Phase next)
void spi_cmd_(uint16_t cmd)
UpdateMode default_update_mode_
bool rotate_coordinates_(int &x, int &y)
void dump_config() override
void enqueue_(OpType type, uint16_t a=0, uint16_t b=0)
void set_reset_pin(GPIOPin *pin)
IT8951Display(const char *name, uint16_t width, uint16_t height)
uint16_t compute_row_width_() const
void spi_write_reg_(uint16_t addr, uint16_t value)
bool force_temperature_set_
void set_force_temperature(int16_t celsius)
void prepend_(OpType type, uint16_t a=0, uint16_t b=0)
void set_update_mode(uint16_t m)
std::vector< GPIOPin * > enable_pins_
int get_height_internal() override
void enqueue_init_dev_info_()
StaticOpQueue< Op, OP_QUEUE_SIZE > queue_
uint32_t phase_started_at_
void draw_pixels_internal(int x_start, int y_start, int w, int h, const uint8_t *ptr, ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
void set_mono_pixel_(uint16_t x, uint16_t y, bool value) const
void update_effective_transform_()
void enqueue_update_transfer_()
void spi_read_dev_info_()
void set_busy_pin(GPIOPin *pin)
uint8_t dev_info_attempts_
void enqueue_init_vcom_()
void set_enable_pins(std::vector< GPIOPin * > pins)
void set_reset_duration(uint32_t ms)
void set_grayscale(bool g)
uint32_t configured_data_rate_
void enqueue_update_sleep_()
void write_pixel_native_(uint16_t x, uint16_t y, const Color &color) const
uint32_t update_started_at_
void set_rotation(DisplayRotation rotation) override
UpdateMode pending_update_mode_
void apply_transform_(int &x, int &y) const
uint8_t effective_transform_
void enqueue_init_reset_()
void process_op_(const Op &op)
void fill(Color color) override
uint16_t spi_read_word_()
void spi_write_word_(uint16_t value)
void on_safe_shutdown() override
static constexpr uint32_t BUSY_TIMEOUT_MS
void set_vcom(uint16_t vcom_mv)
void set_full_update_every(uint8_t n)
void set_sleep_when_done(bool s)
void set_use_legacy_dpy_area(bool use)
bool prepare_update_region_(UpdateMode &mode)
DisplayType get_display_type() override
void set_dithering(bool d)
void set_gray_pixel_(uint16_t x, uint16_t y, uint8_t nibble) const
void set_vcom_register(uint16_t selector)
uint8_t recovery_attempts_
void op_xfer_area_args_()
void op_check_lut_idle_()
int get_width_internal() override
void draw_pixel_at(int x, int y, Color color) override
bool push_front(const T &value)
bool push_back(const T &value)
static constexpr size_t capacity()
The SPIDevice is what components using the SPI will create.
constexpr float PROCESSOR
For components that use data from sensors like displays.