init
This commit is contained in:
32
main/domain/internal/printer_protocol_internal.h
Normal file
32
main/domain/internal/printer_protocol_internal.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#define CMD_GAP_MOVE 0x05
|
||||
#define CMD_GET_OFFSET 0x06
|
||||
#define CMD_SET_OFFSET 0x07
|
||||
#define CMD_BOOT_JUMP_BOOT 0xA0
|
||||
#define CMD_BOOT_ERASE_PAGE 0xA1
|
||||
#define CMD_BOOT_WRITE_DATA 0xA2
|
||||
#define CMD_BOOT_JUMP_APP 0xA3
|
||||
#define CMD_BOOT_GET_VERSION 0xA4
|
||||
|
||||
#define OTA_MAX_DATA_PER_FRAME 236u
|
||||
|
||||
bool printer_protocol_acquire_control_lane(uint32_t timeout_ms, char *err, size_t err_len);
|
||||
void printer_protocol_release_control_lane(void);
|
||||
esp_err_t printer_protocol_send_cmd_wait_response(uint8_t cmd,
|
||||
const uint8_t *payload,
|
||||
uint16_t payload_len,
|
||||
bool with_checksum,
|
||||
uint32_t timeout_ms,
|
||||
bool expect_ack,
|
||||
uint8_t *out_payload,
|
||||
size_t out_payload_cap,
|
||||
uint16_t *out_payload_len,
|
||||
char *err,
|
||||
size_t err_len);
|
||||
Reference in New Issue
Block a user