Merge branch 'better_color_handling'
* better_color_handling: Remove cmd_debug from flasher, we've COMMS_DEBUG_RAW if needed Use PrintAndLogEx in flasher Simplify color & banner logic Smart color handling:
This commit is contained in:
@@ -53,4 +53,11 @@ void lsl(uint8_t *data, size_t len);
|
||||
int32_t le24toh(uint8_t data[3]);
|
||||
void htole24(uint32_t val, uint8_t data[3]);
|
||||
|
||||
# define _BLUE_(s) "\x1b[34m" s "\x1b[0m "
|
||||
# define _RED_(s) "\x1b[31m" s "\x1b[0m "
|
||||
# define _GREEN_(s) "\x1b[32m" s "\x1b[0m "
|
||||
# define _YELLOW_(s) "\x1b[33m" s "\x1b[0m "
|
||||
# define _MAGENTA_(s) "\x1b[35m" s "\x1b[0m "
|
||||
# define _CYAN_(s) "\x1b[36m" s "\x1b[0m "
|
||||
|
||||
#endif
|
||||
|
||||
@@ -593,7 +593,7 @@ bool I2C_WriteFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t d
|
||||
}
|
||||
|
||||
void I2C_print_status(void) {
|
||||
DbpStringEx(FLAG_LOG | FLAG_ANSI, _BLUE_("Smart card module (ISO 7816)"));
|
||||
DbpString(_BLUE_("Smart card module (ISO 7816)"));
|
||||
uint8_t resp[] = {0, 0, 0, 0};
|
||||
I2C_Reset_EnterMainProgram();
|
||||
uint8_t len = I2C_BufferRead(resp, sizeof(resp), I2C_DEVICE_CMD_GETVERSION, I2C_DEVICE_ADDRESS_MAIN);
|
||||
|
||||
Reference in New Issue
Block a user