40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
/* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
/* This is the main part of the LED light controller program.
|
|
* It handles all peripherals (power, fan, channels, IR, serial)
|
|
*/
|
|
|
|
/* ports */
|
|
#define LED PD6 /* status LED */
|
|
#define IR PB0 /* IR receiver */
|
|
#define FAN PC5 /* FAN output */
|
|
#define PWR_OK PB1 /* ATX power OK */
|
|
#define nPS_ON PB2 /* ATX power supply ON switch */
|
|
/* LEDs */
|
|
#define CH1_1 PC0
|
|
#define CH1_2 PC1
|
|
#define CH1_3 PC2
|
|
#define CH1_4 PC3
|
|
#define CH1_5 PC4
|
|
#define CH2_1 PD2
|
|
#define CH2_2 PD3
|
|
#define CH2_3 PD4
|
|
#define CH2_4 PD5
|
|
#define CH2_5 PD7
|
|
|
|
void ioinit(void);
|
|
void uart_action(char c);
|
|
void ir_action(uint8_t address, uint8_t command);
|