]> cvs.zerfleddert.de Git - rsbs2/blame - bmc/chassis.c
fix lost wakeup and activate sleep mode
[rsbs2] / bmc / chassis.c
CommitLineData
da7751cb
MG
1#include <avr/io.h>
2#include <stdio.h>
3
4#include "chassis.h"
5
da7751cb
MG
6void chassis_init()
7{
8 DDRB = 0xff;
9 PORTB = 0xff;
10}
11
12void chassis_control(unsigned char action)
13{
14#ifdef DEBUG
15 printf("Chassis control 0x%02x\n", action);
16#endif
17
18 switch(action) {
19 case CHASSIS_ACTION_POWER_DOWN:
20 PORTB=0xff;
21 break;
22
23 case CHASSIS_ACTION_POWER_UP:
24 PORTB=0x00;
25 break;
26
27 case CHASSIS_ACTION_HARD_RESET:
28 PORTB=0x55;
29 break;
30
31 default:
f9d5c6e0 32#ifdef DEBUG
da7751cb 33 printf("Unimplemented chassis action 0x%02x\n", action);
f9d5c6e0 34#endif
da7751cb
MG
35 break;
36 }
37}
Impressum, Datenschutz