Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/hm01b0.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ int hm01b0_init(const struct hm01b0_config* config)
hm01b0_write_reg8(0x3010, qvga_win_en_val);
hm01b0_write_reg16(0x0340, frame_length_lines_val);
hm01b0_write_reg16(0x0342, line_length_pclk_val);


uint8_t val = 0;
if (config->flipx)
val |= 0b01;
if (config->flipy)
val |= 0b10;
hm01b0_write_reg8(0x0101, val); // flip H and flip V

hm01b0_write_reg8(0x3060, 0x08 | 0); // OSC_CLK_DIV

Expand Down
2 changes: 2 additions & 0 deletions src/include/pico/hm01b0.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ struct hm01b0_config {

uint width;
uint height;
uint flipx;
uint flipy;
};

int hm01b0_init(const struct hm01b0_config* config);
Expand Down