include/pwmdrive.h File Reference

Drive functions. More...

#include "../lib/pwmdrive_common.h"

Go to the source code of this file.

Functions

uint8_t pwmdrive_go_cm (uint8_t dir, uint8_t cm, uint8_t *cm_driven)
uint8_t pwmdrive_go_until (uint8_t dir, uint8_t(*test_function)(void *), void *params, uint8_t *cm_driven)
uint8_t pwmdrive_turn_deg10 (uint8_t dir, uint8_t deg10)
uint8_t pwmdrive_turn_until (uint8_t dir, uint8_t(*test_function)(void *), void *params)
uint8_t has_data_pwm (void *unused)

Detailed Description

Drive functions.

Definition in file pwmdrive.h.


Function Documentation

uint8_t pwmdrive_go_cm ( uint8_t  dir,
uint8_t  cm,
uint8_t *  cm_driven 
)

Move forward/backward for some centimeters

Parameters:
[in]dirDirection (FORWARD or BACKWARD)
[in]cmDistance in centimeters
[out]cm_drivendistance actually driven in centimeters
Returns:
uint8_t pwmdrive_go_until ( uint8_t  dir,
uint8_t(*)(void *)  test_function,
void *  params,
uint8_t *  cm_driven 
)

Move forward/backward until test_function returns PWM_TESTFUNCTION_RETURN_STOP .

Parameters:
[in]dirDirection (FORWARD or BACKWARD)
[in]test_functionFunction pointer to the Testfunction
[in]paramsParameter of the Testfunction
[out]cm_drivendistance actually driven in centimeters
Returns:
uint8_t pwmdrive_turn_deg10 ( uint8_t  dir,
uint8_t  deg10 
)

Turn left/right for some degrees

Parameters:
[in]dirDirection (LEFT or RIGHT)
[in]deg10(deg10 * 10) is angle of rotation.
Returns:
uint8_t pwmdrive_turn_until ( uint8_t  dir,
uint8_t(*)(void *)  test_function,
void *  params 
)

Turn left/right until test_function returns PWM_TESTFUNCTION_RETURN_STOP . *

Parameters:
[in]dirDirection (FORWARD or BACKWARD)
[in]test_functionFunction pointer to the Testfunction
[in]paramsParameter of the Testfunction
Returns: