You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CubeSatSim/libs/libmf/source/lcdwrhexu32.c

19 lines
312 B

#include "libmflcd.h"
void lcd_writehexu32(uint32_t val, uint8_t nrdig, uint8_t pos)
{
while (nrdig) {
uint8_t __autodata v1 = val;
val >>= 4;
v1 &= 0x0F;
if (v1 >= 10)
v1 += 'A' - '9' - 1;
lcd_setpos(pos);
lcd_waitshort();
lcd_writedata('0' + v1);
lcd_waitshort();
--pos;
--nrdig;
}
}

Powered by TurnKey Linux.