forked from ps2/subg_rfspy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardware.h
50 lines (45 loc) · 1.29 KB
/
hardware.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef HARDWARE_H
#define HARDWARE_H
#ifndef NON_NATIVE_TEST
#include <cc1110.h> // /usr/share/sdcc/include/mcs51/cc1110.h
#include "ioCCxx10_bitdef.h"
#endif
#define BIT0 0x1
#define BIT1 0x2
#define BIT2 0x4
#define BIT3 0x8
#define BIT4 0x10
#define BIT5 0x20
#define BIT6 0x40
#define BIT7 0x80
#ifdef RILEYLINK
#define HARDWARE_FLOW_CONTROL_CONFIG 0xc0; /* 8N1, hw flow control, high stop bit */
#define HARDWARE_LED_INIT P0DIR |= BIT0|BIT1;
#define GREEN_LED P0_0
#define BLUE_LED P0_1
#define SYSTEM_CLOCK_MHZ 24
#elif TI_DONGLE
#define HARDWARE_LED_INIT P1DIR |= 2;
#define GREEN_LED P1_1
#define BLUE_LED P1_1
#define SYSTEM_CLOCK_MHZ 24
#elif SRF_ERF
#define HARDWARE_FLOW_CONTROL_CONFIG 0x02; /* 8N1, NO flow control, high stop bit */
#define HARDWARE_LED_INIT P1DIR |= BIT7;
#define GREEN_LED P1_7
#define BLUE_LED P1_7
#define SYSTEM_CLOCK_MHZ 24
#elif SRF_STICK
#define HARDWARE_FLOW_CONTROL_CONFIG 0x02; /* 8N1, NO flow control, high stop bit */
#define HARDWARE_LED_INIT P1DIR |= BIT7;
#define GREEN_LED P1_7
#define BLUE_LED P1_6
#define SYSTEM_CLOCK_MHZ 24
#elif TI_MINIDEV
#define HARDWARE_FLOW_CONTROL_CONFIG 0xc0; /* 8N1, hw flow control, high stop bit */
#define HARDWARE_LED_INIT P1DIR |= BIT0|BIT1;
#define GREEN_LED P1_0
#define BLUE_LED P1_1
#define SYSTEM_CLOCK_MHZ 26
#endif
#endif