1 //*****************************************************************************
 2 // controller_actuators.c
 3 // this file contains code for controller actuators
 4 // author: chris madormo
 5 //*****************************************************************************
 6 
 7 // includes
 8 #include <hidef.h>         /* common defines and macros */
 9 #include <mc9s12e128.h>    /* derivative information */
10 #include <S12e128bits.h>   /* bit definitions  */
11 #include <Bin_Const.h>     /* macros to allow specifying binary constants */
12 #include <termio.h>        /* to get prototype for kbhit() */
13 #include "S12eVec.h"
14 #include <stdio.h>
15 #include "TestMain.h"
16 
17 // module variables
18 static char m_ledsOn = 0;
19 static char m_audioOn = 0;
20 
21 
22 // turn off leds
23 void turn_off_leds(void)
24 {
25     if (m_ledsOn == 1)
26         {
27             PTU |= BIT0HI;
28             m_ledsOn = 0;
29         }
30 
31     // main board led
32     PTU &= ~BIT5HI;
33 }
34 
35 // turn on leds
36 void turn_on_leds(void)
37 {
38     if (m_ledsOn == 0)
39         {
40             printf("leds on\r\n");
41             PTU &= ~BIT0HI;
42             m_ledsOn = 1;
43 
44             // main board led
45             PTU |= BIT5HI;
46         }
47 }
48 
49 // turn off audio
50 void turn_off_audio(void)
51 {
52     //if (m_audioOn == 1) {
53     //PTU &= ~BIT1HI;
54     //init_sound_timer();
55     //m_audioOn = 0;
56     //}
57 }
58 
59 // turn on audio
60 void turn_on_audio(void)
61 {
62     //if (m_audioOn == 0) {
63     //PTU &= ~BIT1HI;
64     //init_sound_timer();
65     //m_audioOn = 1;
66     //}
67 }
68 
69 
70 
71 
72 
73 
74