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