Skip to content

Commit 574a2ba

Browse files
committed
add type conversion macro byte()
1 parent b418483 commit 574a2ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • sduino/hardware/sduino/stm8/cores/sduino

sduino/hardware/sduino/stm8/cores/sduino/Arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ void yield(void);
128128
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
129129
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
130130

131+
#define byte(w) ((uint8_t)(w))
131132
#define lowByte(w) ((uint8_t) ((w) & 0xff))
132133
#define highByte(w) ((uint8_t) ((w) >> 8))
133134

0 commit comments

Comments
 (0)