mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Some Doxygen work and comments.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@16 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
5efc81f6c9
commit
845a4ff817
@ -65,13 +65,13 @@ int main()
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : PiosMainTask
|
||||
* Description : PIOS
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void PiosMainTask( void *pvParameters )
|
||||
{
|
||||
|
||||
@ -80,13 +80,13 @@ void PiosMainTask( void *pvParameters )
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : SensorTask
|
||||
* Description : PIOS
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void SensorTask( void *pvParameters )
|
||||
{
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define PIOS_H
|
||||
|
||||
|
||||
/* C Header Files */
|
||||
/* C Lib Includes */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -38,14 +38,14 @@
|
||||
#include <stm32f10x.h>
|
||||
#include <stm32f10x_conf.h>
|
||||
|
||||
/* FatFS Functions */
|
||||
/* FatFS Includes */
|
||||
#include <ff.h>
|
||||
#include <diskio.h>
|
||||
|
||||
/* minIni Functions */
|
||||
/* minIni Includes */
|
||||
#include <minIni.h>
|
||||
|
||||
/* Include PIOS Hardware Header Files */
|
||||
/* PIOS Hardware Includes */
|
||||
#include <pios_board.h>
|
||||
#include <pios_sys.h>
|
||||
#include <pios_settings.h>
|
||||
|
@ -45,6 +45,7 @@
|
||||
/* Channel 6 - */
|
||||
/* Channel 7 - */
|
||||
/* Channel 8 - */
|
||||
|
||||
/* Channel 9 - */
|
||||
/* Channel 10 - */
|
||||
/* Channel 11 - */
|
||||
|
@ -30,11 +30,6 @@
|
||||
#include "pios.h"
|
||||
|
||||
|
||||
/* Public Function Prototypes */
|
||||
int IRQDisable(void);
|
||||
int IRQEnable(void);
|
||||
|
||||
|
||||
/* Private Function Prototypes */
|
||||
|
||||
|
||||
@ -46,13 +41,13 @@ static unsigned int nested_ctr;
|
||||
static unsigned int prev_primask;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : IRQDisable
|
||||
* Description : Disables all interrupts (nested)
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : Zero on no error
|
||||
*******************************************************************************/
|
||||
*/
|
||||
int IRQDisable(void)
|
||||
{
|
||||
/* Get current priority if nested level == 0 */
|
||||
@ -77,13 +72,13 @@ int IRQDisable(void)
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : IRQEnable
|
||||
* Description : Enables all interrupts (nested)
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : Zero on no error, -1 on nesting error
|
||||
*******************************************************************************/
|
||||
*/
|
||||
int IRQEnable(void)
|
||||
{
|
||||
/* Check for nesting error */
|
||||
|
@ -30,13 +30,6 @@
|
||||
#include "pios.h"
|
||||
|
||||
|
||||
/* Public Function Prototypes */
|
||||
void LED_INIT(void);
|
||||
void LED_ON(LedTypeDef LEDNum);
|
||||
void LED_OFF(LedTypeDef LEDNum);
|
||||
void LED_TOGGLE(LedTypeDef LEDNum);
|
||||
|
||||
|
||||
/* Private Function Prototypes */
|
||||
|
||||
|
||||
@ -46,13 +39,13 @@ const uint16_t LED_GPIO_PIN[NUM_LED] = {LED1_GPIO_PIN, LED2_GPIO_PIN};
|
||||
const uint32_t LED_GPIO_CLK[NUM_LED] = {LED1_GPIO_CLK, LED2_GPIO_CLK};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : LED_INIT
|
||||
* Description : Initialises all the LED's
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void LED_INIT(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
@ -67,39 +60,39 @@ void LED_INIT(void)
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : LED_ON
|
||||
* Description : Turn on LED
|
||||
* Input : LED Number
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void LED_ON(LedTypeDef LEDNum)
|
||||
{
|
||||
LED_GPIO_PORT[LEDNum]->BSRR = LED_GPIO_PIN[LEDNum];
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : LED_OFF
|
||||
* Description : Turn off LED
|
||||
* Input : LED Number
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void LED_OFF(LedTypeDef LEDNum)
|
||||
{
|
||||
LED_GPIO_PORT[LEDNum]->BRR = LED_GPIO_PIN[LEDNum];
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : LED_TOGGLE
|
||||
* Description : Turn on/off LED
|
||||
* Input : LED Number
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void LED_TOGGLE(LedTypeDef LEDNum)
|
||||
{
|
||||
LED_GPIO_PORT[LEDNum]->ODR ^= LED_GPIO_PIN[LEDNum];
|
||||
|
@ -30,10 +30,6 @@
|
||||
#include "pios.h"
|
||||
|
||||
|
||||
/* Public Function Prototypes */
|
||||
void LoadSettings(void);
|
||||
|
||||
|
||||
/* Private Function Prototypes */
|
||||
|
||||
|
||||
@ -41,7 +37,7 @@ void LoadSettings(void);
|
||||
SettingsTypeDef Settings;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : LoadSettings
|
||||
* Description : Populate System global Vars into Structs using MinIni,
|
||||
* : defaults are also set here. Only function in the file
|
||||
@ -50,7 +46,7 @@ SettingsTypeDef Settings;
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
/* Value Reading: ini_getl("Section", "Key", (DefaultValue), IniFile); */
|
||||
/* String Reading: ini_gets("Section", "Key", "DefaultValue", StrBuffer, sizearray(StrBuffer), IniFile); */
|
||||
|
||||
|
@ -30,10 +30,6 @@
|
||||
#include "pios.h"
|
||||
|
||||
|
||||
/* Public Function Prototypes */
|
||||
void SysInit(void);
|
||||
|
||||
|
||||
/* Private Function Prototypes */
|
||||
void NVIC_Configuration(void);
|
||||
|
||||
@ -42,13 +38,13 @@ void NVIC_Configuration(void);
|
||||
FATFS Fatfs[_DRIVES]; // File system object for each logical drive */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : SysInit
|
||||
* Description : Brings up the System and Initializes peripherals
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
//TODO: Get these in the right order, settings need to be loaded ASAP
|
||||
void SysInit(void)
|
||||
{
|
||||
@ -76,26 +72,26 @@ void SysInit(void)
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : GPIO_Configuration
|
||||
* Description : Configures base level GPIO ports.
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void GPIO_Configuration(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : NVIC_Configuration
|
||||
* Description : Configures Vector Table base location and SysTick
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void NVIC_Configuration(void)
|
||||
{
|
||||
/* Set the Vector Table base address as specified in .ld file */
|
||||
|
@ -30,13 +30,6 @@
|
||||
#include "pios.h"
|
||||
|
||||
|
||||
/* Public Function Prototypes */
|
||||
void UARTInit(void);
|
||||
void EnableAuxUART(void);
|
||||
void DisableAuxUART(void);
|
||||
void UARTChangeBaud(USART_TypeDef* USARTx, uint32_t Baud);
|
||||
|
||||
|
||||
/* Private Function Prototypes */
|
||||
|
||||
|
||||
@ -52,13 +45,13 @@ static volatile u8 tx_buffer_head[UART_NUM];
|
||||
static volatile u8 tx_buffer_size[UART_NUM];
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : UARTInit
|
||||
* Description : Initialise the GPS and TELEM onboard UARTs
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void UARTInit(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
@ -149,40 +142,40 @@ void UARTInit(void)
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : EnableAuxUART
|
||||
* Description : Enables AUX UART at the expense of servo inputs
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void EnableAuxUART(void)
|
||||
{
|
||||
//Implement after servo inputs are implemented
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : DisableAuxUART
|
||||
* Description : Disables AUX UART reclaims two servo inputs
|
||||
* Input : None
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void DisableAuxUART(void)
|
||||
{
|
||||
//Implement after servo inputs are implemented
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/**
|
||||
* Function Name : UARTInit
|
||||
* Description : Changes the baud rate of the USART peripherial without
|
||||
* : re-initialising.
|
||||
* Input : USART to change, new baud rate
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
*/
|
||||
void UARTChangeBaud(USART_TypeDef* USARTx, uint32_t Baud)
|
||||
{
|
||||
/* USART BRR Configuration */
|
||||
|
Loading…
Reference in New Issue
Block a user