Browse files

Misc Docs

  • Loading branch information...
1 parent cf182dc commit 1287fc3c796d60f6ef2db9d721c93c49712d71a5 boxingcow committed Nov 14, 2011
Showing with 89 additions and 10 deletions.
  1. +1 −1 openiboot/includes/ftl.h
  2. +62 −1 openiboot/includes/gpio.h
  3. +13 −0 openiboot/includes/lcd.h
  4. +9 −5 openiboot/includes/nvram.h
  5. +4 −3 openiboot/includes/vfl.h
View
2 openiboot/includes/ftl.h
@@ -22,7 +22,7 @@
*/
/**
- * @file Header file for OiB's Flash Transition Layer
+ * @file Header file for OiB's Flash Translation Layer
*
*/
View
63 openiboot/includes/gpio.h
@@ -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
@@ -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);
View
13 openiboot/includes/lcd.h
@@ -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
View
14 openiboot/includes/nvram.h
@@ -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
*/
@@ -37,12 +39,14 @@
#define NVRAM_H
#include "openiboot.h"
+
/**
* Start value of NVRAM
*
* @ingroup NVRAM
*/
#define NVRAM_START 0xFC000
+
/**
* Size of NVRAM
*
View
7 openiboot/includes/vfl.h
@@ -43,6 +43,8 @@
*
* This is used by vfl_get_info to determine
* which info to obtain.
+ *
+ * @ingroup VFL
*/
typedef enum _vfl_info
{
@@ -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
{
@@ -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.
*

0 comments on commit 1287fc3

Please sign in to comment.