ACS Firmware Documentation
Attitude Control System Capstone 2018 for OreSat
|
#include "magnetorquer.h"
Go to the source code of this file.
Functions | |
void | mtqrInit (MTQR *mtqr) |
Magnetorquer initialization function. More... | |
void | mtqrStart (MTQR *mtqr) |
Magnetorquer start function. More... | |
void | mtqrStop (MTQR *mtqr) |
Magnetorquer stop function. More... | |
void | mtqrSetDC (uint16_t dc) |
Magnetorquer set duty cycle function. More... | |
void | mtqrSetDir (uint8_t dc) |
Magnetorquer set direction function. More... | |
void | mtqrExit (MTQR *mtqr) |
Magnetorquer exit function. More... | |
void mtqrExit | ( | MTQR * | mtqr | ) |
Magnetorquer exit function.
Function to initialize shutdown of driver.
void mtqrInit | ( | MTQR * | mtqr | ) |
Magnetorquer initialization function.
This function will initialize the driver state to off.
void mtqrSetDC | ( | uint16_t | dc | ) |
Magnetorquer set duty cycle function.
This function takes a 16 bit value as parameter and sets the duty cycle of the magnetorquer driver using the paramater.
void mtqrSetDir | ( | uint8_t | dc | ) |
Magnetorquer set direction function.
This function sets the phase pin for the STSPIN250 motor driver. The phase is set based on the value of the paramater given to the function.
void mtqrStart | ( | MTQR * | mtqr | ) |
Magnetorquer start function.
This function will start the PWM driver and enable the STSPIN250 motor driver while providing a starting duty cycle. At this point, the state of the magnetorquer will be set to true to indicate on state.
void mtqrStop | ( | MTQR * | mtqr | ) |
Magnetorquer stop function.
This function will disable the active PWM driver and disable the STSPIN250 motor driver.