mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +01:00
It works in a similar way as a monochrome print, but with few differences: 1. User needs to send 3 rows of color bitstrings for each image row. 2. Printer will stay in place while printing all 3 non-white 'colors', it will feed the paper each third line. 3. User must multiply height by 3. 4. Command is different: cmd[0] == ASCII_GS && cmd[1] == 118 && cmd[2] == 49 E.g. For image 200x200, user needs to send header with width 200, height 600. Image data is arranged the following way (fourth color is blank): 25 bytes (200bits) of 1st color for first row 25 bytes (200bits) of 2nd color for first row 25 bytes (200bits) of 3rd color for first row 25 bytes (200bits) of 1st color for second row 25 bytes (200bits) of 2nd color for second row ...etc...
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
#ifndef PRINTER_H
|
|
#define PRINTER_H
|
|
|
|
#include "config.h"
|
|
|
|
//#define PRINT_SPLIT 6 // max points printed at the same time,
|
|
//384/PRINT_SPLIT==96 #define MAX_PRINT_PTS 2
|
|
|
|
void printer_send_data8(uint8_t);
|
|
|
|
void clear_printer_buffer();
|
|
uint8_t IsPaper();
|
|
|
|
uint8_t header_init();
|
|
uint8_t header_init1();
|
|
|
|
void motor_stepper_pos1(uint8_t Position);
|
|
|
|
void motor_stepper_pos2(uint8_t Position);
|
|
|
|
uint8_t feed_pitch1(uint64_t lines, uint8_t forward_backward);
|
|
|
|
uint8_t bits_number(uint8_t n);
|
|
|
|
void print_dots_8bit_split(CONFIG *cfg, uint8_t *Array, uint8_t characters);
|
|
|
|
void print_dots_8bit(CONFIG *cfg, uint8_t *Array, uint8_t characters,
|
|
uint8_t feed_num);
|
|
|
|
uint16_t read_adc(char *);
|
|
uint16_t temperature();
|
|
int glob_file(char *);
|
|
uint16_t get_serial_cache_font_width(CONFIG *);
|
|
uint8_t print_lines_ft(CONFIG *,int ,int);
|
|
uint8_t print_lines8(CONFIG *,int,int);
|
|
|
|
uint8_t invert_bit(uint8_t a);
|
|
|
|
uint8_t print_image8(CONFIG *);
|
|
uint8_t print_gray_image8(CONFIG *);
|
|
void print_cut_line(CONFIG *);
|
|
|
|
void printer_set_font_mode(CONFIG *cfg, int);
|
|
void printer_set_font(CONFIG *cfg, uint8_t fnbits);
|
|
void parse_serial_stream(CONFIG *cfg, uint8_t input_ch);
|
|
|
|
void reset_cmd();
|
|
|
|
#endif
|