void comm_send_n_bytes(uint8_t N, uint8_t Byte) { for (uint8_t i = 0; i < N; ++i) comm_send_byte(Byte); return; }
void comm_send_time(uint32_t Time) { const uint16_t ms = Time % 1000; Time /= 1000; const uint8_t s = Time % 60; Time /= 60; const uint8_t min = Time % 60; Time /= 60; const uint8_t h = Time; comm_send_dec_number8(2, h); comm_send_byte(':'); comm_send_dec_number8(2, min); comm_send_byte(':'); comm_send_dec_number8(2, s); comm_send_byte(':'); comm_send_dec_number16(3, ms); return; }
static void read_prg_send(unsigned int address, unsigned int len) { LED_GREEN_ON; MODE_READ; comm_start(COMMAND_PRG_READ_RESULT, len); while (len > 0) { comm_send_byte(read_prg_byte(address)); len--; address++; } LED_GREEN_OFF; }