dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_servo.h File Reference

RC Servo functions header. More...

#include <pios_dio.h>

Go to the source code of this file.

Data Structures

struct  pios_servo_callbacks
 

Macros

#define PIOS_SERVO_MAX_BANKS   8
 

Enumerations

enum  pios_servo_shot_type { SHOT_ONESHOT = 0, SHOT_DSHOT300 = 65532, SHOT_DSHOT600 = 65533, SHOT_DSHOT1200 = 65534 }
 

Functions

int PIOS_Servo_GetPins (dio_tag_t *dios, int max_dio)
 
void PIOS_Servo_SetCallbacks (const struct pios_servo_callbacks *cb)
 
int PIOS_Servo_SetMode (const uint16_t *out_rate, const int banks, const uint16_t *channel_max, const uint16_t *channel_min)
 PIOS_Servo_SetMode Sets the PWM output frequency and resolution. An output rate of 0 indicates Synchronous updates (e.g. SyncPWM/OneShot), otherwise normal PWM at the specified output rate. SyncPWM uses hardware one-pulse mode. Timer prescaler and related parameters are calculated based on the channel with highest max pulse length on each timer. A deadtime is provided to ensure SyncPWM pulses cannot merge. The information required to convert from us to compare value is cached for each channel (not timer) to facilitate PIOS_Servo_Set. More...
 
void PIOS_Servo_SetFraction (uint8_t servo, uint16_t fraction, uint16_t max_val, uint16_t min_val)
 
void PIOS_Servo_DisableChannel (int channel)
 
void PIOS_Servo_PrepareForReset ()
 Determines the APB clock used by a given timer. More...
 
void PIOS_Servo_Set (uint8_t servo, float position)
 
void PIOS_Servo_Update (void)
 
bool PIOS_Servo_IsDshot (uint8_t servo)
 

Detailed Description

RC Servo functions header.

Author
The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
Tau Labs, http://taulabs.org, Copyright (C) 2015
See Also
The GNU Public License (GPL) Version 3

Definition in file pios_servo.h.