Revision 65
changes
utils.c | ||
---|---|---|
2 | 2 |
|
3 | 3 |
#include <stdint.h> |
4 | 4 |
|
5 |
int(util_get_LSB)(uint16_t val, uint8_t *lsb) { |
|
6 |
if (lsb == NULL) return 1; |
|
7 |
*lsb = val; |
|
8 |
return 0; |
|
9 |
} |
|
10 |
|
|
11 |
int(util_get_MSB)(uint16_t val, uint8_t *msb) { |
|
12 |
if (msb == NULL) return 1; |
|
13 |
*msb = (val >> 8); |
|
14 |
return 0; |
|
15 |
} |
|
16 |
|
|
5 | 17 |
#ifdef LAB3 |
6 | 18 |
uint32_t sys_inb_counter = 0; |
7 | 19 |
#endif |
Also available in: Unified diff