-
Notifications
You must be signed in to change notification settings - Fork 0
/
led328.h~
55 lines (44 loc) · 1.57 KB
/
led328.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
51
52
53
54
55
#ifndef _LED328_
#define _LED328_
#pragma used+
#define CH1_ON (PORTB |= (1<<0))
#define CH2_ON (PORTB |= (1<<1))
#define CH3_ON (PORTB |= (1<<2))
#define CH4_ON (PORTB |= (1<<3))
#define CH5_ON (PORTB |= (1<<4))
#define CH6_ON (PORTB |= (1<<5))
#define CH7_ON (PORTB |= (1<<6))
#define CH8_ON (PORTB |= (1<<7))
#define CH9_ON (PORTC |= (1<<0))
#define CH10_ON (PORTC |= (1<<1))
#define CH11_ON (PORTC |= (1<<2))
#define CH12_ON (PORTC |= (1<<3))
#define CH13_ON (PORTC |= (1<<4))
#define CH14_ON (PORTC |= (1<<5))
#define CH15_ON (PORTD |= (1<<4))
#define CH16_ON (PORTD |= (1<<5))
#define CH1_OFF (PORTB &= ~(1<<0))
#define CH2_OFF (PORTB &= ~(1<<1))
#define CH3_OFF (PORTB &= ~(1<<2))
#define CH4_OFF (PORTB &= ~(1<<3))
#define CH5_OFF (PORTB &= ~(1<<4))
#define CH6_OFF (PORTB &= ~(1<<5))
#define CH7_OFF (PORTB &= ~(1<<6))
#define CH8_OFF (PORTB &= ~(1<<7))
#define CH9_OFF (PORTC &= ~(1<<0))
#define CH10_OFF (PORTC &= ~(1<<1))
#define CH11_OFF (PORTC &= ~(1<<2))
#define CH12_OFF (PORTC &= ~(1<<3))
#define CH13_OFF (PORTC &= ~(1<<4))
#define CH14_OFF (PORTC &= ~(1<<5))
#define CH15_OFF (PORTD &= ~(1<<4))
#define CH16_OFF (PORTD &= ~(1<<5))
#define PORTB_ON PORTB |= ((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7))
#define PORTC_ON PORTC |= ((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5))
#define PORTD_ON PORTD |= ((1<<4)|(1<<5))
#define PORTB_OFF PORTB &= ~((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7))
#define PORTC_OFF PORTC &= ~((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5))
#define PORTD_OFF PORTD &= ~((1<<4)|(1<<5))
#define TIME_OFFSET 10;
#pragma used-
#endif