From c0a3cda12be8937abf31c8233d3dff7256101cff Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Sun, 10 Sep 2006 14:51:16 +0000 Subject: make PWM 'main' build with current environment git-svn-id: https://svn.openpcd.org:2342/trunk@173 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/firmware/src/pcd/main_pwm.c | 17 +++++++++++++---- 1 file 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 #include #include "../openpcd.h" -#include "rc632.h" +#include #include #include -#include "pwm.h" -#include "tc.h" -#include "ssc.h" +#include +#include #include #include +#ifdef SSC +#include +#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); } -- cgit v1.2.3