summaryrefslogtreecommitdiff
path: root/firmware/pwm.c
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2011-10-13 20:33:30 +0200
committerYves Fischer <yvesf-git@xapek.org>2011-10-13 20:33:30 +0200
commit5d9d373a959271b498710817d08c2ea8e153aa6e (patch)
tree6867e887454a850b4e15616000ef342a1c661c7e /firmware/pwm.c
parent35a36b0a6c69ce136fd6ea2a203d34e48e1291e8 (diff)
downloadmini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.tar.gz
mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.zip
correct firmware??
Diffstat (limited to 'firmware/pwm.c')
-rw-r--r--firmware/pwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/pwm.c b/firmware/pwm.c
index b8b6231..9e3666d 100644
--- a/firmware/pwm.c
+++ b/firmware/pwm.c
@@ -84,7 +84,7 @@ int pwm_init(int pin)
{
case 9:
/* set pin as output */
- DDRB |=(1<<PB5);
+ OX_DDR9 |=(1<<OX_P9);
OCR1A=1; // TOP
#ifdef OCTOPUS_CAN
/* configure timer, (WGM = FAST PWM) (clear on OCnA, set on TOP COM1A1)*/
@@ -97,7 +97,7 @@ int pwm_init(int pin)
#endif
break;
case 8:
- DDRB |=(1<<PB4);
+ OX_DDR8 |=(1<<OX_P8);
#ifdef OCTOPUS_CAN
OCR2A=1; // TOP
/* configure timer, (WGM = FAST PWM) (clear on OCnA, set on TOP COM1A1)*/
@@ -138,7 +138,7 @@ void pwm_deinit_usb(int pin)
int pwm_deinit(int pin)
{
- octopus.ports[pin]=PIN_NONE;
+ octopus.ports[pin]=PIN_OUT; // this is wrong!
#ifdef OCTOPUS_CAN
switch(pin)
{