initial commit

This commit is contained in:
7u83 2024-05-19 21:00:30 +02:00
parent 5457e799f5
commit ff95ee6537

14
int_to_bcd.c Normal file
View File

@ -0,0 +1,14 @@
#include "mc8051fun.h"
uint16_t int_to_bcd(uint16_t i)
{
uint16_t b;
b = i%10;
i/=10;
b |= (i%10)<<4;
i/=10;
b |= (i%10)<<8;
i/=10;
b |= (i%10)<<12;
return b;
}