summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-10 14:51:16 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-10 14:51:16 +0000
commitc0a3cda12be8937abf31c8233d3dff7256101cff (patch)
tree9cfe36e76bc6859b41b40213c0183e908a64d73b
parent3b42a77d3fd438bbea8dfdbe1b7f9dcf4ae11481 (diff)
make PWM 'main' build with current environment
git-svn-id: https://svn.openpcd.org:2342/trunk@173 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r--openpcd/firmware/src/pcd/main_pwm.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/openpcd/firmware/src/pcd/main_pwm.c b/openpcd/firmware/src/pcd/main_pwm.c
index 691c27d..2f92d28 100644
--- a/openpcd/firmware/src/pcd/main_pwm.c
+++ b/openpcd/firmware/src/pcd/main_pwm.c
@@ -8,15 +8,18 @@
#include <string.h>
#include <lib_AT91SAM7.h>
#include "../openpcd.h"
-#include "rc632.h"
+#include <pcd/rc632.h>
#include <os/dbgu.h>
#include <os/led.h>
-#include "pwm.h"
-#include "tc.h"
-#include "ssc.h"
+#include <os/pwm.h>
+#include <os/tc_cdiv.h>
#include <os/pcd_enumerate.h>
#include <os/usb_handler.h>
+#ifdef SSC
+#include <pcd/ssc.h>
+#endif
+
static u_int8_t force_100ask = 1;
static u_int8_t mod_conductance = 0x3f;
static u_int8_t cw_conductance = 0x3f;
@@ -95,8 +98,10 @@ void _init_func(void)
pwm_duty_set_percent(0, 22); /* 22% of 9.43uS = 2.07uS */
rc632_modulate_mfin();
+#ifdef SSC
DEBUGPCRF("Initializing SSC RX");
ssc_rx_init();
+#endif
}
int _main_dbgu(char key)
@@ -213,12 +218,14 @@ int _main_dbgu(char key)
cdiv_idx++;
tc_cdiv_set_divider(cdivs[cdiv_idx]);
break;
+#ifdef SSC
case 's':
ssc_rx_start();
break;
case 'S':
ssc_rx_stop();
break;
+#endif
default:
return -EINVAL;
}
@@ -242,7 +249,9 @@ void _main_func(void)
/* try unthrottling sources since we now are [more] likely to
* have empty request contexts */
rc632_unthrottle();
+#ifdef SSC
ssc_rx_unthrottle();
+#endif
led_toggle(2);
}
personal git repositories of Harald Welte. Your mileage may vary