Format hex values as uppercase

This commit is contained in:
Scott Lahteine 2017-04-21 21:42:27 -05:00
parent 77aa16005d
commit ff0018e287
13 changed files with 201 additions and 201 deletions

View file

@ -230,7 +230,7 @@
#define LCD_STR_DEGREE "\x09" #define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09' #define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin. // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
// Symbol characters // Symbol characters

View file

@ -141,8 +141,8 @@ void M100_dump_routine(const char * const title, const char *start, const char *
// //
// Round the start and end locations to produce full lines of output // Round the start and end locations to produce full lines of output
// //
start = (char*)((uint16_t) start & 0xfff0); start = (char*)((uint16_t) start & 0xFFF0);
end = (char*)((uint16_t) end | 0x000f); end = (char*)((uint16_t) end | 0x000F);
dump_free_memory(start, end); dump_free_memory(start, end);
} }

View file

@ -10578,7 +10578,7 @@ void ok_to_send() {
x2 = number * 0.5f; x2 = number * 0.5f;
y = number; y = number;
i = * ( long * ) &y; // evil floating point bit level hacking i = * ( long * ) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the f***? i = 0x5F3759DF - ( i >> 1 ); // what the f***?
y = * ( float * ) &i; y = * ( float * ) &i;
y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
@ -10804,7 +10804,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
* Prepare a mesh-leveled linear move in a Cartesian setup, * Prepare a mesh-leveled linear move in a Cartesian setup,
* splitting the move where it crosses mesh borders. * splitting the move where it crosses mesh borders.
*/ */
void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) { void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xFF, uint8_t y_splits = 0xFF) {
int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X)), int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X)),
cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y)), cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y)),
cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])), cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),

View file

@ -664,8 +664,8 @@ fail:
bool Sd2Card::writeData(uint8_t token, const uint8_t* src) { bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
spiSendBlock(token, src); spiSendBlock(token, src);
spiSend(0xff); // dummy crc spiSend(0xFF); // dummy crc
spiSend(0xff); // dummy crc spiSend(0xFF); // dummy crc
status_ = spiRec(); status_ = spiRec();
if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) { if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {

View file

@ -30,7 +30,7 @@
// Settings for the I2C based DIGIPOT (MCP4018) based on WT150 // Settings for the I2C based DIGIPOT (MCP4018) based on WT150
#define DIGIPOT_I2C_ADDRESS 0x2f #define DIGIPOT_I2C_ADDRESS 0x2F
#define DIGIPOT_A4988_Rsx 0.250 #define DIGIPOT_A4988_Rsx 0.250
#define DIGIPOT_A4988_Vrefmax 5.0 #define DIGIPOT_A4988_Vrefmax 5.0

View file

@ -60,8 +60,8 @@ void digipot_i2c_set_current(int channel, float current) {
} }
// Initial setup // Initial setup
i2c_send(addr, 0x40, 0xff); i2c_send(addr, 0x40, 0xFF);
i2c_send(addr, 0xA0, 0xff); i2c_send(addr, 0xA0, 0xFF);
// Set actual wiper value // Set actual wiper value
byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 }; byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };

View file

@ -37,67 +37,67 @@
const unsigned char custom_start_bmp[512] PROGMEM = { const unsigned char custom_start_bmp[512] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFC, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF0, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00,
0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x00, 0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xc0, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00,
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00,
0x00, 0x01, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xF0, 0x00, 0x00,
0x00, 0x00, 0x07, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}; };

View file

@ -36,35 +36,35 @@
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64 #define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
const unsigned char custom_start_bmp[512] PROGMEM = { const unsigned char custom_start_bmp[512] PROGMEM = {
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x03, 0xc0, 0x0f, 0xf0, 0x07, 0x80, 0x00, 0x00, 0x03, 0xC0, 0x0F, 0xF0, 0x07, 0x80, 0x00,
0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xc0, 0x00, 0x00, 0x07, 0xE0, 0x07, 0xE0, 0x0F, 0xC0, 0x00,
0x00, 0x0f, 0xf0, 0x03, 0xc0, 0x1f, 0xe0, 0x00, 0x00, 0x0F, 0xF0, 0x03, 0xC0, 0x1F, 0xE0, 0x00,
0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x0f, 0xf0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x1F, 0xE0, 0x00,
0x00, 0x07, 0xe0, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x00, 0x0F, 0xC0, 0x00,
0x00, 0x03, 0xc0, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x07, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -73,28 +73,28 @@ const unsigned char custom_start_bmp[512] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1e, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0x3f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0x7f, 0x80, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x00, 0x00, 0xf7, 0xc0, 0x1f, 0x80, 0xFF, 0xC0, 0x00, 0x00, 0xF7, 0xC0, 0x1F, 0x80,
0xff, 0xc0, 0x00, 0x00, 0xff, 0xf0, 0x7f, 0xc0, 0xFF, 0xC0, 0x00, 0x00, 0xFF, 0xF0, 0x7F, 0xC0,
0x7f, 0x80, 0x00, 0x00, 0xff, 0xf8, 0xff, 0xe0, 0x7F, 0x80, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xE0,
0x3f, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0xf0, 0xf8, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xF8, 0xF0, 0xF8,
0x1e, 0x00, 0x00, 0x00, 0xf8, 0x7d, 0xe0, 0x78, 0x1E, 0x00, 0x00, 0x00, 0xF8, 0x7D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
0x00, 0x00, 0x00, 0x00, 0xf8, 0x79, 0xf0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x79, 0xF0, 0xF8,
0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x7F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x3F, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x0e, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x0E, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,

View file

@ -402,7 +402,7 @@ class Planner {
// Doesn't matter because block_buffer_runtime_us is already too small an estimation. // Doesn't matter because block_buffer_runtime_us is already too small an estimation.
bbru >>= 10; bbru >>= 10;
// limit to about a minute. // limit to about a minute.
NOMORE(bbru, 0xfffful); NOMORE(bbru, 0xFFFFul);
return bbru; return bbru;
} }

View file

@ -302,14 +302,14 @@ class Stepper {
step_rate -= F_CPU / 500000; // Correct for minimal speed step_rate -= F_CPU / 500000; // Correct for minimal speed
if (step_rate >= (8 * 256)) { // higher step rate if (step_rate >= (8 * 256)) { // higher step rate
unsigned short table_address = (unsigned short)&speed_lookuptable_fast[(unsigned char)(step_rate >> 8)][0]; unsigned short table_address = (unsigned short)&speed_lookuptable_fast[(unsigned char)(step_rate >> 8)][0];
unsigned char tmp_step_rate = (step_rate & 0x00ff); unsigned char tmp_step_rate = (step_rate & 0x00FF);
unsigned short gain = (unsigned short)pgm_read_word_near(table_address + 2); unsigned short gain = (unsigned short)pgm_read_word_near(table_address + 2);
MultiU16X8toH16(timer, tmp_step_rate, gain); MultiU16X8toH16(timer, tmp_step_rate, gain);
timer = (unsigned short)pgm_read_word_near(table_address) - timer; timer = (unsigned short)pgm_read_word_near(table_address) - timer;
} }
else { // lower step rates else { // lower step rates
unsigned short table_address = (unsigned short)&speed_lookuptable_slow[0][0]; unsigned short table_address = (unsigned short)&speed_lookuptable_slow[0][0];
table_address += ((step_rate) >> 1) & 0xfffc; table_address += ((step_rate) >> 1) & 0xFFFC;
timer = (unsigned short)pgm_read_word_near(table_address); timer = (unsigned short)pgm_read_word_near(table_address);
timer -= (((unsigned short)pgm_read_word_near(table_address + 2) * (unsigned char)(step_rate & 0x0007)) >> 3); timer -= (((unsigned short)pgm_read_word_near(table_address + 2) * (unsigned char)(step_rate & 0x0007)) >> 3);
} }

View file

@ -1396,7 +1396,7 @@ void Temperature::disable_all_heaters() {
max6675_temp >>= MAX6675_DISCARD_BITS; max6675_temp >>= MAX6675_DISCARD_BITS;
#if ENABLED(MAX6675_IS_MAX31855) #if ENABLED(MAX6675_IS_MAX31855)
// Support negative temperature // Support negative temperature
if (max6675_temp & 0x00002000) max6675_temp |= 0xffffc000; if (max6675_temp & 0x00002000) max6675_temp |= 0xFFFFC000;
#endif #endif
return (int)max6675_temp; return (int)max6675_temp;

View file

@ -107,10 +107,10 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val) {
#define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); } #define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); }
#define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); } #define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); }
#define ST7920_SET_CMD() { ST7920_SWSPI_SND_8BIT(0xf8); U8G_DELAY(); } #define ST7920_SET_CMD() { ST7920_SWSPI_SND_8BIT(0xF8); U8G_DELAY(); }
#define ST7920_SET_DAT() { ST7920_SWSPI_SND_8BIT(0xfa); U8G_DELAY(); } #define ST7920_SET_DAT() { ST7920_SWSPI_SND_8BIT(0xFA); U8G_DELAY(); }
#define ST7920_WRITE_BYTE(a) { ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u)); ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u)); U8G_DELAY(); } #define ST7920_WRITE_BYTE(a) { ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xF0u)); ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u)); U8G_DELAY(); }
#define ST7920_WRITE_BYTES(p,l) { for (uint8_t i = l + 1; --i;) { ST7920_SWSPI_SND_8BIT(*p&0xf0); ST7920_SWSPI_SND_8BIT(*p<<4); p++; } U8G_DELAY(); } #define ST7920_WRITE_BYTES(p,l) { for (uint8_t i = l + 1; --i;) { ST7920_SWSPI_SND_8BIT(*p&0xF0); ST7920_SWSPI_SND_8BIT(*p<<4); p++; } U8G_DELAY(); }
uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) { uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
uint8_t i, y; uint8_t i, y;

View file

@ -44,33 +44,33 @@
#if ENABLED(MAPPER_C2C3) #if ENABLED(MAPPER_C2C3)
const PROGMEM uint8_t utf_recode[] = const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is fair for symbols { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is fair for symbols
0x20,0x3f,0xec,0xed,0x3f,0x5c,0x7c,0x3f,0x22,0x63,0x61,0x7f,0x3f,0x3f,0x52,0xb0, // c2a 0x20,0x3F,0xEC,0xED,0x3F,0x5C,0x7C,0x3F,0x22,0x63,0x61,0x7F,0x3F,0x3F,0x52,0xB0, // c2a
//' ' ¢ £ ­ l " c a « R //' ' ¢ £ ­ l " c a « R
0xdf,0x3f,0x32,0x33,0x27,0xe4,0xf1,0xa5,0x2c,0x31,0xdf,0x7e,0x3f,0x3f,0x3f,0x3f, // c2b but relatively bad for letters. 0xDF,0x3F,0x32,0x33,0x27,0xE4,0xF1,0xA5,0x2C,0x31,0xDF,0x7E,0x3F,0x3F,0x3F,0x3F, // c2b but relatively bad for letters.
// ° 2 3 ` N p . , 1 ° » // ° 2 3 ` N p . , 1 ° »
0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c38 0x3F,0x3F,0x3F,0x3F,0xE1,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, // c38
// ä // ä
0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0xef,0x78,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0xe2, // c39 missing characters display as '?' 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0xEF,0x78,0x3F,0x3F,0x3F,0x3F,0xF5,0x3F,0x3F,0xE2, // c39 missing characters display as '?'
// ö x ü ß // ö x ü ß
0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c3a 0x3F,0x3F,0x3F,0x3F,0xE1,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, // c3a
// ä // ä
0x3f,0xee,0x3f,0x3f,0x3f,0x3f,0xef,0xfd,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0x3f // c3b 0x3F,0xEE,0x3F,0x3F,0x3F,0x3F,0xEF,0xFD,0x3F,0x3F,0x3F,0x3F,0xF5,0x3F,0x3F,0x3F // c3b
// n ö ÷ ü // n ö ÷ ü
}; };
#elif ENABLED(MAPPER_E382E383) #elif ENABLED(MAPPER_E382E383)
const PROGMEM uint8_t utf_recode[] = const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f { // 0 1 2 3 4 5 6 7 8 9 a b c d e f
0x3d,0xb1,0xb1,0xa8,0xb2,0xa9,0xb3,0xaa,0xb4,0xab,0xb5,0xb6,0xb6,0xb7,0xb7,0xb8, // e382a Please test and correct 0x3D,0xB1,0xB1,0xA8,0xB2,0xA9,0xB3,0xAA,0xB4,0xAB,0xB5,0xB6,0xB6,0xB7,0xB7,0xB8, // e382a Please test and correct
// = ア ア ィ イ ゥ ウ ェ エ ォ オ ガ ガ キ キ ク // = ア ア ィ イ ゥ ウ ェ エ ォ オ ガ ガ キ キ ク
0xb8,0xb9,0xb9,0xba,0xba,0xbb,0xbb,0xbc,0xbc,0xbd,0xbd,0xbe,0xbe,0xbf,0xbf,0xc0, // e382b 0xB8,0xB9,0xB9,0xBA,0xBA,0xBB,0xBB,0xBC,0xBC,0xBD,0xBD,0xBE,0xBE,0xBF,0xBF,0xC0, // e382b
// ク ケ ケ コ コ サ サ シ シ ス ス セ セ ソ ソ タ // ク ケ ケ コ コ サ サ シ シ ス ス セ セ ソ ソ タ
0xc0,0xc1,0xc1,0xc2,0xc2,0xc2,0xc3,0xc3,0xc4,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca, // e3838 0xC0,0xC1,0xC1,0xC2,0xC2,0xC2,0xC3,0xC3,0xC4,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, // e3838
// タ チ チ ッ ッ ッ テ テ ト ト ナ ニ ヌ ネ // タ チ チ ッ ッ ッ テ テ ト ト ナ ニ ヌ ネ
0xca,0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,0xce,0xce,0xcf,0xd0, // e3839 0xCA,0xCA,0xCB,0xCB,0xCB,0xCC,0xCC,0xCC,0xCD,0xCD,0xCD,0xCE,0xCE,0xCE,0xCF,0xD0, // e3839
// ハ ハ ヒ ヒ ヒ フ フ フ ヘ ヘ ヘ ホ ホ ホ マ ミ // ハ ハ ヒ ヒ ヒ フ フ フ ヘ ヘ ヘ ホ ホ ホ マ ミ
0xd1,0xd2,0xd3,0xd4,0xd4,0xd5,0xd5,0xae,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc, // e383a 0xD1,0xD2,0xD3,0xD4,0xD4,0xD5,0xD5,0xAE,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDC, // e383a
// ム メ モ ャ ャ ユ ユ ョ ヨ ラ リ ル レ ロ ワ ワ // ム メ モ ャ ャ ユ ユ ョ ヨ ラ リ ル レ ロ ワ ワ
0xec,0xa7,0xa6,0xdd,0xcc,0x3f,0x3f,0x3f,0x3f,0x3f,0xa6,0xa5,0xb0,0xa4,0xa4,0x3f // e383b 0xEC,0xA7,0xA6,0xDD,0xCC,0x3F,0x3F,0x3F,0x3F,0x3F,0xA6,0xA5,0xB0,0xA4,0xA4,0x3F // e383b
// ヰ ヱ ヲ ン フ ? ? ? ? ? ヲ ・ ー ヽ ヽ ? // ヰ ヱ ヲ ン フ ? ? ? ? ? ヲ ・ ー ヽ ヽ ?
}; };
#elif ENABLED(MAPPER_D0D1) #elif ENABLED(MAPPER_D0D1)
@ -81,30 +81,30 @@
#if ENABLED(MAPPER_C2C3) #if ENABLED(MAPPER_C2C3)
const PROGMEM uint8_t utf_recode[] = const PROGMEM uint8_t utf_recode[] =
{ // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is relative complete. { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is relative complete.
0x20,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0x22,0xa9,0xaa,0xab,0x3f,0x3f,0xae,0x3f, // c2a ¡¢£¤¥¦§¨©ª«¬­®¯ 0x20,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0x22,0xA9,0xAA,0xAB,0x3F,0x3F,0xAE,0x3F, // c2a ¡¢£¤¥¦§¨©ª«¬­®¯
//' ' ¡ ¢ £ ¤ ¥ ¦ § " © ª « ? ? ® ? //' ' ¡ ¢ £ ¤ ¥ ¦ § " © ª « ? ? ® ?
0xb0,0xb1,0xb2,0xb3,0x27,0xb5,0xb6,0xb7,0x2c,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf, // c2b °±²³´µ¶·¸¹º»¼½¾¿ 0xB0,0xB1,0xB2,0xB3,0x27,0xB5,0xB6,0xB7,0x2C,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, // c2b °±²³´µ¶·¸¹º»¼½¾¿
// ° ± ³ ² ? µ ¶ · , ¹ º » ¼ ½ ¾ ¿ // ° ± ³ ² ? µ ¶ · , ¹ º » ¼ ½ ¾ ¿
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf, // c38 ÀÁÃÄÅÆÇÈÉÊËÌÍÎÏ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, // c38 ÀÁÃÄÅÆÇÈÉÊËÌÍÎÏ
// À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï // À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf, // c39 ÐÑÓÔÕÖ×ØÙÚÛÜÝÞß 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, // c39 ÐÑÓÔÕÖ×ØÙÚÛÜÝÞß
// Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß // Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef, // c3a àáãäåæçèéêëìíîï 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, // c3a àáãäåæçèéêëìíîï
// à á â ã ä å æ ç è é ê ë ì í î ï // à á â ã ä å æ ç è é ê ë ì í î ï
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff // c3b ðñóôõö÷øùúûüýþÿ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF // c3b ðñóôõö÷øùúûüýþÿ
// ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ // ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
}; };
#elif ENABLED(MAPPER_D0D1) #elif ENABLED(MAPPER_D0D1)
#define MAPPER_D0D1_MOD #define MAPPER_D0D1_MOD
const PROGMEM uint8_t utf_recode[] = const PROGMEM uint8_t utf_recode[] =
{//0 1 2 3 4 5 6 7 8 9 a b c d e f {//0 1 2 3 4 5 6 7 8 9 a b c d e f
0x41,0x80,0x42,0x92,0x81,0x45,0x82,0x83,0x84,0x85,0x4b,0x86,0x4d,0x48,0x4f,0x87, // d0a 0x41,0x80,0x42,0x92,0x81,0x45,0x82,0x83,0x84,0x85,0x4B,0x86,0x4D,0x48,0x4F,0x87, // d0a
// A Б B Г Д E Ж З И Й K Л M H O П // A Б B Г Д E Ж З И Й K Л M H O П
0x50,0x43,0x54,0x88,0xd8,0x58,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad, // d0b 0x50,0x43,0x54,0x88,0xD8,0x58,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x62,0x8F,0xAC,0xAD, // d0b
// P C T У Ф X Ч ч Ш Щ Ъ Ы b Э Ю Я // P C T У Ф X Ч ч Ш Щ Ъ Ы b Э Ю Я
0x61,0x36,0x42,0x92,0x81,0x65,0x82,0xb3,0x84,0x85,0x6b,0x86,0x4d,0x48,0x6f,0x87, // d18 0x61,0x36,0x42,0x92,0x81,0x65,0x82,0xB3,0x84,0x85,0x6B,0x86,0x4D,0x48,0x6F,0x87, // d18
// a 6 B Г Д e Ж ³ И Й k Л M H o П // a 6 B Г Д e Ж ³ И Й k Л M H o П
0x70,0x63,0x54,0x79,0xd8,0x78,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad // d19 0x70,0x63,0x54,0x79,0xD8,0x78,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x62,0x8F,0xAC,0xAD // d19
// p c T y Ф x Ч ч Ш Щ Ъ Ы b Э Ю Я // p c T y Ф x Ч ч Ш Щ Ъ Ы b Э Ю Я
}; };
#elif ENABLED(MAPPER_E382E383) #elif ENABLED(MAPPER_E382E383)
@ -115,23 +115,23 @@
#if ENABLED(MAPPER_D0D1) #if ENABLED(MAPPER_D0D1)
#define MAPPER_D0D1_MOD #define MAPPER_D0D1_MOD
// it is a Russian alphabet translation // it is a Russian alphabet translation
// except 0401 --> 0xa2 = Ё, 0451 --> 0xb5 = ё // except 0401 --> 0xA2 = Ё, 0451 --> 0xB5 = ё
const PROGMEM uint8_t utf_recode[] = const PROGMEM uint8_t utf_recode[] =
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4, // unicode U+0400 to U+047f { 0x41,0xA0,0x42,0xA1,0xE0,0x45,0xA3,0xA4, // unicode U+0400 to U+047f
// A Б->Ё B Г Д E Ж З // 0 Ѐ Ё Ђ Ѓ Є Ѕ І Ї // A Б->Ё B Г Д E Ж З // 0 Ѐ Ё Ђ Ѓ Є Ѕ І Ї
0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8, // Ј Љ Њ Ћ Ќ Ѝ Ў Џ 0xA5,0xA6,0x4B,0xA7,0x4D,0x48,0x4F,0xA8, // Ј Љ Њ Ћ Ќ Ѝ Ў Џ
// И Й K Л M H O П // 1 А Б В Г Д Е Ж З // И Й K Л M H O П // 1 А Б В Г Д Е Ж З
0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab, // И Й К Л М Н О П 0x50,0x43,0x54,0xA9,0xAA,0x58,0xE1,0xAB, // И Й К Л М Н О П
// P C T У Ф X Ч ч // 2 Р С Т У Ф Х Г Ч // P C T У Ф X Ч ч // 2 Р С Т У Ф Х Г Ч
0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1, // Ш Щ Ъ Ы Ь Э Ю Я 0xAC,0xE2,0xAD,0xAE,0x62,0xAF,0xB0,0xB1, // Ш Щ Ъ Ы Ь Э Ю Я
// Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з // Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7, // и й к л м н о п 0x61,0xB2,0xB3,0xB4,0xE3,0x65,0xB6,0xB7, // и й к л м н о п
// a б->ё в г д e ж з // 4 р с т у ф х ц ч // a б->ё в г д e ж з // 4 р с т у ф х ц ч
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe, // ш щ ъ ы ь э ю я 0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0x6F,0xBE, // ш щ ъ ы ь э ю я
// и й к л м н o п // 5 ѐ ё ђ ѓ є ѕ і ї // и й к л м н o п // 5 ѐ ё ђ ѓ є ѕ і ї
0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0, // ј љ њ ћ ќ ѝ ў џ 0x70,0x63,0xBF,0x79,0xE4,0x78,0xE5,0xC0, // ј љ њ ћ ќ ѝ ў џ
// p c т y ф x ц ч // 6 Ѡ ѡ Ѣ ѣ Ѥ ѥ Ѧ ѧ // p c т y ф x ц ч // 6 Ѡ ѡ Ѣ ѣ Ѥ ѥ Ѧ ѧ
0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7 // Ѫ ѩ Ѫ ѫ Ѭ ѭ Ѯ ѯ 0xC1,0xE6,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7 // Ѫ ѩ Ѫ ѫ Ѭ ѭ Ѯ ѯ
// ш щ ъ ы ь э ю я // 7 Ѱ ѱ Ѳ ѳ Ѵ ѵ Ѷ ѷ // ш щ ъ ы ь э ю я // 7 Ѱ ѱ Ѳ ѳ Ѵ ѵ Ѷ ѷ
}; // ѻ ѹ Ѻ ѻ Ѽ ѽ Ѿ ѿ }; // ѻ ѹ Ѻ ѻ Ѽ ѽ Ѿ ѿ
#elif ENABLED(MAPPER_C2C3) #elif ENABLED(MAPPER_C2C3)
@ -151,13 +151,13 @@
static bool seen_c2 = false; static bool seen_c2 = false;
uint8_t d = c; uint8_t d = c;
if ( d >= 0x80u ) { // UTF-8 handling if ( d >= 0x80u ) { // UTF-8 handling
if ( (d >= 0xc0u) && (!seen_c2) ) { if ( (d >= 0xC0u) && (!seen_c2) ) {
utf_hi_char = d - 0xc2u; utf_hi_char = d - 0xC2u;
seen_c2 = true; seen_c2 = true;
return 0; return 0;
} }
else if (seen_c2) { else if (seen_c2) {
d &= 0x3fu; d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else
@ -181,38 +181,38 @@
char charset_mapper(const char c) { char charset_mapper(const char c) {
static uint8_t utf_hi_char; // UTF-8 high part static uint8_t utf_hi_char; // UTF-8 high part
static bool seen_c2 = false; static bool seen_c2 = false,
static bool seen_c4 = false; seen_c4 = false,
static bool seen_c5 = false; seen_c5 = false;
uint8_t d = c; uint8_t d = c;
if ( d >= 0x80u ) { // UTF-8 handling if ( d >= 0x80u ) { // UTF-8 handling
if ( d == 0xc4u ) {seen_c4 = true; return 0;} if ( d == 0xC4u ) {seen_c4 = true; return 0;}
else if ( d == 0xc5u ) {seen_c5 = true; return 0;} else if ( d == 0xC5u ) {seen_c5 = true; return 0;}
else if ( (d >= 0xc0u) && (!seen_c2) ) { else if ( (d >= 0xC0u) && (!seen_c2) ) {
utf_hi_char = d - 0xc2u; utf_hi_char = d - 0xC2u;
seen_c2 = true; seen_c2 = true;
return 0; return 0;
} }
else if (seen_c4) { else if (seen_c4) {
switch(d) { switch(d) {
case 0x9eu: d = 0xd0u; break; case 0x9Eu: d = 0xD0u; break;
case 0x9fu: d = 0xf0u; break; case 0x9Fu: d = 0xF0u; break;
case 0xb0u: d = 0xddu; break; case 0xB0u: d = 0xDDu; break;
case 0xb1u: d = 0xfdu; break; case 0xB1u: d = 0xFDu; break;
default: d = '?'; default: d = '?';
} }
HARDWARE_CHAR_OUT((char)d) ; HARDWARE_CHAR_OUT((char)d) ;
} }
else if (seen_c5) { else if (seen_c5) {
switch(d) { switch(d) {
case 0x9eu: d = 0xdeu; break; case 0x9Eu: d = 0xDEu; break;
case 0x9fu: d = 0xfeu; break; case 0x9Fu: d = 0xFEu; break;
default: d = '?'; default: d = '?';
} }
HARDWARE_CHAR_OUT((char)d) ; HARDWARE_CHAR_OUT((char)d) ;
} }
else if (seen_c2) { else if (seen_c2) {
d &= 0x3fu; d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else
@ -237,13 +237,13 @@
static bool seen_ce = false; static bool seen_ce = false;
uint8_t d = c; uint8_t d = c;
if ( d >= 0x80 ) { // UTF-8 handling if ( d >= 0x80 ) { // UTF-8 handling
if ( (d >= 0xc0) && (!seen_ce) ) { if ( (d >= 0xC0) && (!seen_ce) ) {
utf_hi_char = d - 0xce; utf_hi_char = d - 0xCE;
seen_ce = true; seen_ce = true;
return 0; return 0;
} }
else if (seen_ce) { else if (seen_ce) {
d &= 0x3f; d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else
@ -255,7 +255,7 @@
} }
} }
else { else {
HARDWARE_CHAR_OUT((char) c ); HARDWARE_CHAR_OUT((char)c);
} }
seen_ce = false; seen_ce = false;
return 1; return 1;
@ -267,14 +267,14 @@
static uint8_t utf_hi_char; // UTF-8 high part static uint8_t utf_hi_char; // UTF-8 high part
static bool seen_ce = false; static bool seen_ce = false;
uint8_t d = c; uint8_t d = c;
if ( d >= 0x80 ) { // UTF-8 handling if (d >= 0x80) { // UTF-8 handling
if ( (d >= 0xc0) && (!seen_ce) ) { if (d >= 0xC0 && !seen_ce) {
utf_hi_char = d - 0xce; utf_hi_char = d - 0xCE;
seen_ce = true; seen_ce = true;
return 0; return 0;
} }
else if (seen_ce) { else if (seen_ce) {
d &= 0x3f; d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else
@ -296,23 +296,23 @@
char charset_mapper(const char c) { char charset_mapper(const char c) {
// it is a Russian alphabet translation // it is a Russian alphabet translation
// except 0401 --> 0xa2 = Ё, 0451 --> 0xb5 = ё // except 0401 --> 0xA2 = Ё, 0451 --> 0xB5 = ё
static uint8_t utf_hi_char; // UTF-8 high part static uint8_t utf_hi_char; // UTF-8 high part
static bool seen_d5 = false; static bool seen_d5 = false;
uint8_t d = c; uint8_t d = c;
if (d >= 0x80) { // UTF-8 handling if (d >= 0x80) { // UTF-8 handling
if (d >= 0xd0 && !seen_d5) { if (d >= 0xD0 && !seen_d5) {
utf_hi_char = d - 0xd0; utf_hi_char = d - 0xD0;
seen_d5 = true; seen_d5 = true;
return 0; return 0;
} }
else if (seen_d5) { else if (seen_d5) {
d &= 0x3f; d &= 0x3F;
if (!utf_hi_char && d == 1) { if (!utf_hi_char && d == 1) {
HARDWARE_CHAR_OUT((char) 0xa2); // Ё HARDWARE_CHAR_OUT((char) 0xA2); // Ё
} }
else if (utf_hi_char == 1 && d == 0x11) { else if (utf_hi_char == 1 && d == 0x11) {
HARDWARE_CHAR_OUT((char)0xb5); // ё HARDWARE_CHAR_OUT((char)0xB5); // ё
} }
else { else {
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x10)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x10));
@ -336,17 +336,17 @@
static bool seen_d5 = false; static bool seen_d5 = false;
uint8_t d = c; uint8_t d = c;
if (d >= 0x80u) { // UTF-8 handling if (d >= 0x80u) { // UTF-8 handling
if (d >= 0xd0u && !seen_d5) { if (d >= 0xD0u && !seen_d5) {
utf_hi_char = d - 0xd0u; utf_hi_char = d - 0xD0u;
seen_d5 = true; seen_d5 = true;
return 0; return 0;
} }
else if (seen_d5) { else if (seen_d5) {
d &= 0x3fu; d &= 0x3Fu;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else
HARDWARE_CHAR_OUT((char)(0xa0u + (utf_hi_char << 6) + d)) ; HARDWARE_CHAR_OUT((char)(0xA0u + (utf_hi_char << 6) + d)) ;
#endif #endif
} }
else { else {
@ -364,13 +364,13 @@
char charset_mapper(const char c) { char charset_mapper(const char c) {
static uint8_t utf_hi_char; // UTF-8 high part static uint8_t utf_hi_char; // UTF-8 high part
static bool seen_e3 = false; static bool seen_e3 = false,
static bool seen_82_83 = false; seen_82_83 = false;
uint8_t d = c; uint8_t d = c;
if (d >= 0x80) { // UTF-8 handling if (d >= 0x80) { // UTF-8 handling
if (d == 0xe3 && !seen_e3) { if (d == 0xE3 && !seen_e3) {
seen_e3 = true; seen_e3 = true;
return 0; // eat 0xe3 return 0; // eat 0xE3
} }
else if (d >= 0x82 && seen_e3 && !seen_82_83) { else if (d >= 0x82 && seen_e3 && !seen_82_83) {
utf_hi_char = d - 0x82; utf_hi_char = d - 0x82;
@ -378,7 +378,7 @@
return 0; return 0;
} }
else if (seen_e3 && seen_82_83) { else if (seen_e3 && seen_82_83) {
d &= 0x3f; d &= 0x3F;
#ifndef MAPPER_ONE_TO_ONE #ifndef MAPPER_ONE_TO_ONE
HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20));
#else #else