Improve print state machine, add print API
This commit is contained in:
parent
17962b29ce
commit
064cdc5ba0
4 changed files with 85 additions and 57 deletions
|
|
@ -1,14 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "stm32f1xx.h"
|
||||
|
||||
typedef int (*LTP1245_DataProvider_t)(uint8_t *buffer);
|
||||
typedef enum
|
||||
{
|
||||
LTP1245_OK,
|
||||
LTP1245_NO_PAPER,
|
||||
LTP1245_HEAD_UP
|
||||
} LTP1245_Result_t;
|
||||
|
||||
#define LTP1245_MAX_DRIVE_FREQ 473 // In Hz
|
||||
#define LTP1245_BUFFER_LINES 64
|
||||
#define LTP1245_LINEWIDTH 384 // In pixels
|
||||
|
||||
#define LTP1245_TH_REXT 10 // In kΩ
|
||||
|
||||
void LTP1245_Init(void);
|
||||
LTP1245_Result_t LTP1245_FeedPaper(int lines);
|
||||
LTP1245_Result_t LTP1245_Print(uint8_t *data, int lines);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue