/* Send a sequence of ASCII bytes to the LCDCA via the digit decoder.  */
void lcdca_write_packet(uint8_t lcd_tdg, uint8_t first_seg, const uint8_t *data, size_t width, uint8_t dir)
/* Send a sequence of ASCII bytes to the LCDCA via the digit decoder.  */
void lcdca_write_packet(uint8_t lcd_tdg, uint8_t first_seg, const uint8_t *data, size_t width, uint8_t dir)
{
	LCDCA->LCDCA_CMCFG = LCDCA_CMCFG_TDG(lcd_tdg)
			| LCDCA_CMCFG_STSEG(first_seg)
			| (dir ? LCDCA_CMCFG_DREV_LEFT : LCDCA_CMCFG_DREV_RIGHT);
	while (width--) {
		if (*data == '\0') {
			break;
		}
		LCDCA->LCDCA_CMDR = (*data++);
	}
}