Rotork Research Team / Mbed 2 deprecated HHH_MOTOR_TRAP_Polled_TFM

Dependencies:   mbed

Fork of HHH_MOTOR_TRAP_Polled_TFM by Simon Truelove

Revision:
5:f3eba32e78a7
Parent:
4:2f93d15d1d3f
--- a/PWM.cpp	Wed Dec 19 10:58:32 2018 +0000
+++ b/PWM.cpp	Mon Mar 18 11:11:15 2019 +0000
@@ -4,10 +4,10 @@
 #include "PWM.h"
 #include <string> 
 
-#define PWMPRESCALE (48-1)
+//#define PWMPRESCALE (12-1)
 #define PWM 200
 
-void InitPWM(void)
+void InitPWM(int PWMPRESCALE)
 {
     LPC_PINCON->PINSEL4  = (1<<0)|(1<<0)|(1<<2)|(1<<4)|(1<<6)|(1<<8)|(1<<10);          //set up the pins to be PWM outputs  '01 01 01 0101 01' is pwm mode put onto Mbed pins 26,25,24,23.          
     LPC_PINCON->PINMODE2 |= (2<<0)|(2<<2)||(2<<4)|(2<<6)|(2<<8)|(2<<10)|(2<<12)|(2<<14)|(2<<16)|(2<<18)|(2<<20)|(2<<22)|(2<<24)|(2<<26)|(2<<28);      // no pull ups                                 //no pull ups/pull downs on PIN1