added named constants

and removed hoardcoded pulse cycle limits
This commit is contained in:
ichbtm authored and GitHub committed 2018-03-30 17:02:01 +02:00
1 parent e99bd4dbaa
commit a6b744fe3c
1 file changed
+7 -4
+7 -4
View File
@@ -28,11 +28,14 @@
* NRF52 Only definitions
* ---------------------
*/
#define MIN_PULSE 55
#define MAX_PULSE 284
//PWM_PRESCALER_PRESCALER_DIV_128 -> NRF_PWM_CLK_125kHz -> resolution 8µs
//MaxValue = 2500 -> PWM period = 20ms
//20ms - 50Hz
#define DUTY_CYCLE_RESOLUTION 8
#define MAXVALUE 2500
#define CLOCKDIV PWM_PRESCALER_PRESCALER_DIV_128
// define one timer in order to have MAX_SERVOS = 12
typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t;
#endif // __SERVO_TIMERS_H__
#endif // __SERVO_TIMERS_H__