43 uint8_t i = 0,
id = 0;
45 buffer_mgr.active_buffer = 0;
73 uint8_t cmd[4] = { 0xC7, 0x94, 0x80, 0x9A };
85 (uint8_t) (addr << 5), 0x00 };
97 (uint8_t) (addr << 2), 0x00 };
109 uint8_t cmd[4] = { buffer_mgr.buffer_addr[buffer_mgr.active_buffer], 0x00,
110 (uint8_t) (addr >> 8), (uint8_t) (addr) };
114 for (i = 0; i < bytes; i++) {
125 uint8_t cmd[4] = { buffer_mgr.buf_to_page_addr[buffer_mgr.active_buffer],
126 (uint8_t) (addr >> 6), (uint8_t) (addr << 2), 0x00 };
131 buffer_mgr.active_buffer ^= 1;
138 uint8_t cmd[4] = { buffer_mgr.page_program[buffer_mgr.active_buffer],
139 (uint8_t) (p_addr >> 6), ((uint8_t) (p_addr << 2) & 0xFC) | ((uint8_t) (b_addr >> 8) & 0x3), (uint8_t) (b_addr) };
143 for (i = 0; i < bytes; i++) {
151 buffer_mgr.active_buffer ^= 1;
155 uint8_t *buffer, uint16_t bytes) {
163 uint8_t *buffer, uint16_t bytes) {
170 (((uint8_t) (p_addr << 2)) & 0xFC) | ((uint8_t) (b_addr >> 8)),
171 (uint8_t) (b_addr) };
173 for (i = 0; i < 4; i++) {
177 for (i = 0; i < bytes; i++) {
187 (uint8_t) (addr << 2), 0x00 };
200 (uint8_t) (b_addr) };
205 for (i = 0; i < bytes; i++) {
214 for (i = 0; i < 4; i++) {