Skip to content

Commit

Permalink
Merge pull request #48 from mcer12/master
Browse files Browse the repository at this point in the history
deinit function
  • Loading branch information
vroland committed Dec 7, 2020
2 parents 86dc98a + 48ab585 commit 331383c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions components/epd_driver/ed097oc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ void epd_poweron() { cfg_poweron(&config_reg); }

void epd_poweroff() { cfg_poweroff(&config_reg); }

void epd_base_deinit(){
epd_poweroff();
i2s_deinit();
}

void epd_start_frame() {
while (i2s_is_busy() || rmt_busy()) {
};
Expand Down
1 change: 1 addition & 0 deletions components/epd_driver/ed097oc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define D0 GPIO_NUM_33

void epd_base_init(uint32_t epd_row_width);
void epd_base_deinit();
void epd_poweron();
void epd_poweroff();

Expand Down
4 changes: 4 additions & 0 deletions components/epd_driver/epd_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,3 +939,7 @@ void epd_init() {
assert(conversion_lut != NULL);
output_queue = xQueueCreate(32, EPD_WIDTH / 2);
}

void epd_deinit(){
epd_base_deinit();
}
3 changes: 2 additions & 1 deletion components/epd_driver/i2s_data_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ void i2s_deinit() {
free(i2s_state.buf_b);
free((void *)i2s_state.dma_desc_a);
free((void *)i2s_state.dma_desc_b);


rtc_clk_apll_enable(0, 0, 0, 8, 0);
periph_module_disable(PERIPH_I2S1_MODULE);
}
3 changes: 3 additions & 0 deletions components/epd_driver/include/epd_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ typedef struct {
/** Initialize the ePaper display */
void epd_init();

/** Deinit the ePaper display */
void epd_deinit();

/** Enable display power supply. */
void epd_poweron();

Expand Down

0 comments on commit 331383c

Please sign in to comment.