Skip to content

Commit

Permalink
Misc Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
boxingcow committed Nov 14, 2011
1 parent cf182dc commit 1287fc3
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 10 deletions.
2 changes: 1 addition & 1 deletion openiboot/includes/ftl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/**
* @file Header file for OiB's Flash Transition Layer
* @file Header file for OiB's Flash Translation Layer
*
*/

Expand Down
63 changes: 62 additions & 1 deletion openiboot/includes/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/**
* @file This file defines the GPIO Interface
*
* The GPIO (General Purpose Input Output) interface is designed to represent
* the setup, direction, enabling/disabling, reading and writing of GPIO pins.
*
* @defgroup GPIO
*/
#ifndef GPIO_H
#define GPIO_H

Expand All @@ -45,11 +53,64 @@ typedef struct GPIORegisters {
volatile uint32_t PUDSLP2;
} GPIORegisters;

/**
* Setup the GPIO interface and register
*
* Returns 0 on success, OiB won't work if this fails.
*
* @ingroup GPIO
*/
int gpio_setup();

/**
* Returns the state value of a GPIO Pin.
*
* @param port The GPIO pin of which to return the value for
*
* @ingroup GPIO
*/
int gpio_pin_state(int port);
void gpio_custom_io(int port, int bits);

/**
* Modify a GPIO Port
*
* 0 = Use as input\n
* 1 = Use as output\n
* 2 = Clear putput\n
* 3 = Set output\n
* 4 = Reset\n
* 5-7 = ?
*
* @param port The pin to modify
*
* @param mode The mode of which to change the GPIO port to
*
* @ingroup GPIO
*/
void gpio_custom_io(int port, int mode);
/**
* void gpio_custom_io(int port, int bits);
* Propose using mode as opposed to bits for clarifcation
*/

/**
* Use a GPIO Pin as an input
*
* @param port The GPIO pin to use as input
*
* @ingroup GPIO
*/
void gpio_pin_use_as_input(int port);

void gpio_pin_output(int port, int bit);

/**
* Reset a GPIO pin
*
* @param port The GPIO pin to reset
*
* @ingroup GPIO
*/
void gpio_pin_reset(int port);

void gpio_register_interrupt(uint32_t interrupt, int type, int level, int autoflip, InterruptServiceRoutine handler, uint32_t token);
Expand Down
13 changes: 13 additions & 0 deletions openiboot/includes/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/**
* @file
*
* This file defines LCD initialisation, shutdown and various control
* inplementations including backlight control.
*
* This is a way of displaying things on the LCD screen, if you don't know
* what that is, please consider suicide it will save the world of your
* idiocy.
*
* @defgroup LCD
*/

#ifndef LCD_H
#define LCD_H

Expand Down
14 changes: 9 additions & 5 deletions openiboot/includes/nvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
*/

/**
* @file This file defines NVRAM interface.
* @file
*
* The NVRAM interfae is designed to represent the reading, writing
* and setup of the NVRAM.
* This file defines NVRAM interface.
*
* This provides a way of getting the environment variables stored
* in the NVRAM on the device.
* The NVRAM (Non-volatile Random Access Memory) interface is designed to
* represent the reading, writing and setup of the NVRAM.
*
* This provides a way of retrieving the values of environment variables
* stored in the NVRAM on the device.
*
* @defgroup NVRAM
*/
Expand All @@ -37,12 +39,14 @@
#define NVRAM_H

#include "openiboot.h"

/**
* Start value of NVRAM
*
* @ingroup NVRAM
*/
#define NVRAM_START 0xFC000

/**
* Size of NVRAM
*
Expand Down
7 changes: 4 additions & 3 deletions openiboot/includes/vfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
*
* This is used by vfl_get_info to determine
* which info to obtain.
*
* @ingroup VFL
*/
typedef enum _vfl_info
{
Expand All @@ -60,6 +62,8 @@ typedef enum _vfl_info
*
* This is used to determine how the signature will
* be read by vfl_detect.
*
* @ingroup VFL
*/
typedef enum _vfl_signature_style
{
Expand Down Expand Up @@ -87,9 +91,6 @@ typedef uint16_t *(*vfl_get_ftl_ctrl_block_t)(struct _vfl_device *);

typedef error_t (*vfl_get_info_t)(struct _vfl_device *, vfl_info_t _item, void * _result, size_t _sz);


// VFL Device Struct

/**
* The VFL device structure.
*
Expand Down

0 comments on commit 1287fc3

Please sign in to comment.