Changeset 383

Show
Ignore:
Timestamp:
02/11/07 13:25:04 (2 years ago)
Author:
goodea
Message:

dox

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Doxyfile

    r382 r383  
    5656CASE_SENSE_NAMES       = YES 
    5757HIDE_SCOPE_NAMES       = NO 
    58 SHOW_INCLUDE_FILES     = YES 
     58SHOW_INCLUDE_FILES     = NO 
    5959INLINE_INFO            = YES 
    6060SORT_MEMBER_DOCS       = YES 
     
    171171TOC_EXPAND             = NO 
    172172DISABLE_INDEX          = NO 
    173 ENUM_VALUES_PER_LINE   = 4 
     173ENUM_VALUES_PER_LINE   = 1 
    174174GENERATE_TREEVIEW      = NO 
    175175TREEVIEW_WIDTH         = 250 
     
    250250HIDE_UNDOC_RELATIONS   = YES 
    251251HAVE_DOT               = YES 
    252 CLASS_GRAPH            = YES 
    253 COLLABORATION_GRAPH    = YES 
    254 GROUP_GRAPHS           = YES 
     252CLASS_GRAPH            = NO 
     253COLLABORATION_GRAPH    = NO 
     254GROUP_GRAPHS           = NO 
    255255UML_LOOK               = NO 
    256256TEMPLATE_RELATIONS     = NO 
    257 INCLUDE_GRAPH          = YES 
    258 INCLUDED_BY_GRAPH      = YES 
     257INCLUDE_GRAPH          = NO 
     258INCLUDED_BY_GRAPH      = NO 
    259259CALL_GRAPH             = NO 
    260260CALLER_GRAPH           = NO 
  • trunk/include/cc3.h

    r371 r383  
    11/* 
    2  * Copyright 2006  Anthony Rowe and Adam Goode 
     2 * Copyright 2006-2007  Anthony Rowe and Adam Goode 
    33 * 
    44 * Licensed under the Apache License, Version 2.0 (the "License"); 
     
    1616 */ 
    1717 
     18/** \file 
     19 * The core of the cc3 system. 
     20 */ 
     21 
    1822 
    1923#ifndef CC3_H 
     
    2428#include <stdio.h> 
    2529 
    26 /******************************************************************************* 
    27 *  Initial CMUcam3 (cc3) data types and functions. 
    28 
    29 *******************************************************************************/ 
    30  
     30/** 
     31 * Mark a boolean expression as "likely". 
     32 * This is sometimes useful for assisting the compiler in predicting branches. 
     33 */ 
    3134#define likely(x)   __builtin_expect(x,1) 
     35 
     36/** 
     37 * Mark a boolean expression as "unlikely". 
     38 * This is sometimes useful for assisting the compiler in predicting branches. 
     39 */ 
    3240#define unlikely(x) __builtin_expect(x,0) 
    3341 
    34 typedef enum { 
    35   CC3_LOW_RES = 0, 
    36   CC3_HIGH_RES = 1 
     42/** 
     43 * Allowed resolutions for the camera device. 
     44 */ 
     45typedef enum { 
     46  CC3_LOW_RES = 0,  /**< QCIF */ 
     47  CC3_HIGH_RES = 1  /**< CIF */ 
    3748} cc3_camera_resolution_t; 
    3849 
    39 typedef enum { 
    40   CC3_SINGLE = 0, 
    41   CC3_RED = 0, 
    42   CC3_GREEN = 1, 
    43   CC3_BLUE = 2, 
    44   CC3_Y = 0, 
    45   CC3_CR = 1, 
    46   CC3_CB = 2, 
    47   CC3_ALL 
     50/** 
     51 * Allowable channel values for channel of interest selection and 
     52 * other functions. 
     53 */ 
     54typedef enum { 
     55  CC3_SINGLE = 0,  /**< Only channel in single-channel images */ 
     56  CC3_RED = 0,     /**< Red channel in RGB images */ 
     57  CC3_GREEN = 1,   /**< Green channel in RGB images */ 
     58  CC3_BLUE = 2,    /**< Blue channel in RGB images */ 
     59  CC3_Y = 0,       /**< Y channel in YCrCb images */ 
     60  CC3_CR = 1,      /**< Cr channel in YCrCb images */ 
     61  CC3_CB = 2,      /**< Cb channel in YCrCb images */ 
     62  CC3_ALL          /**< All channels in an image */ 
    4863} cc3_channel_t; 
    4964 
    50 typedef enum { 
    51   CC3_YCRCB = 0, 
    52   CC3_RGB = 1 
     65/** 
     66 * Colorspace selector. 
     67 */ 
     68typedef enum { 
     69  CC3_YCRCB = 0,   /**< YCrCb colorspace */ 
     70  CC3_RGB = 1      /**< RGB colorspace */ 
    5371} cc3_colorspace_t; 
    5472 
    55 typedef enum { 
    56   CC3_NEAREST, 
    57   CC3_MEAN, 
    58   CC3_RANDOM 
     73/** 
     74 * Subsampling modes. 
     75 */ 
     76typedef enum { 
     77  CC3_NEAREST,     /**< Nearest neighbor subsampling */ 
     78  CC3_MEAN,        /**< Mean of neighbors subsampling */ 
     79  CC3_RANDOM       /**< Random neighbor subsampling */ 
    5980} cc3_subsample_mode_t; 
    6081 
     82/** 
     83 * UART speeds. 115200 is the most common. 
     84 * \sa cc3_uart_init(). 
     85 */ 
    6186typedef enum { 
    6287  CC3_UART_RATE_300 = 300, 
     
    7499} cc3_uart_rate_t; 
    75100 
    76 typedef enum { 
    77   CC3_UART_MODE_8N1, 
    78   CC3_UART_MODE_7N1, 
    79   CC3_UART_MODE_8N2, 
    80   CC3_UART_MODE_7N2, 
    81   CC3_UART_MODE_8E1, 
    82   CC3_UART_MODE_7E1, 
    83   CC3_UART_MODE_8E2, 
    84   CC3_UART_MODE_7E2, 
    85   CC3_UART_MODE_8O1, 
    86   CC3_UART_MODE_7O1, 
    87   CC3_UART_MODE_8O2, 
    88   CC3_UART_MODE_7O2 
     101 
     102/** 
     103 * UART modes. 
     104 * 8N1 is the most common. 
     105 * \sa cc3_uart_init(). 
     106 */ 
     107typedef enum { 
     108  CC3_UART_MODE_8N1,   /**< 8 data bits, no parity, 1 stop bit */ 
     109  CC3_UART_MODE_7N1,   /**< 7 data bits, no parity, 1 stop bit */ 
     110  CC3_UART_MODE_8N2,   /**< 8 data bits, no parity, 2 stop bits */ 
     111  CC3_UART_MODE_7N2,   /**< 7 data bits, no parity, 2 stop bits */ 
     112  CC3_UART_MODE_8E1,   /**< 8 data bits, even parity, 1 stop bit */ 
     113  CC3_UART_MODE_7E1,   /**< 7 data bits, even parity, 1 stop bit */ 
     114  CC3_UART_MODE_8E2,   /**< 8 data bits, even parity, 2 stop bits */ 
     115  CC3_UART_MODE_7E2,   /**< 7 data bits, even parity, 2 stop bits */ 
     116  CC3_UART_MODE_8O1,   /**< 8 data bits, odd parity, 1 stop bit */ 
     117  CC3_UART_MODE_7O1,   /**< 7 data bits, odd parity, 1 stop bit */ 
     118  CC3_UART_MODE_8O2,   /**< 8 data bits, odd parity, 2 stop bits */ 
     119  CC3_UART_MODE_7O2    /**< 7 data bits, odd parity, 2 stop bits */ 
    89120} cc3_uart_mode_t; 
    90121 
     122/** 
     123 * UART binary/text mode selection values. \sa cc3_uart_init() for 
     124 * how to use this. 
     125 */ 
    91126typedef enum { 
    92127  CC3_UART_BINMODE_BINARY, 
     
    94129} cc3_uart_binmode_t; 
    95130 
    96  
     131/** 
     132 * Framebuffer definition. 
     133 * \sa cc3_g_current_frame for the main use of this definition. 
     134 */ 
    97135typedef struct { 
    98   uint16_t raw_width, raw_height;       // raw image width and height 
    99   uint16_t x0, y0, x1, y1;      // bounding box in frame 
    100   uint16_t y_loc;               // current position in frame 
    101   uint8_t x_step, y_step;       // subsampling step 
    102   cc3_channel_t coi; 
    103   cc3_subsample_mode_t subsample_mode; 
    104   uint16_t width, height; 
    105   uint8_t channels; 
     136  uint16_t raw_width;          /**< Native width */ 
     137  uint16_t raw_height;         /**< Native height */ 
     138  uint16_t x0;                 /**< Left horizontal clipping boundary */ 
     139  uint16_t y0;                 /**< Top vertical clipping boundary */ 
     140  uint16_t x1;                 /**< Right horizontal clipping boundary */ 
     141  uint16_t y1;                 /**< Bottom horizontal clipping boundary */ 
     142  uint16_t y_loc;              /**< Currently selected row */ 
     143  uint8_t x_step;              /**< Horizontal subsampling value */ 
     144  uint8_t y_step;              /**< Vertical subsampling value */ 
     145  cc3_channel_t coi;           /**< Channel of interest */ 
     146  cc3_subsample_mode_t subsample_mode;  /**< Subsampling mode */ 
     147  uint16_t width;              /**< Width of clipping region */ 
     148  uint16_t height;             /**< Height of clipping region */ 
     149  uint8_t channels;            /**< Number of channels */ 
    106150} cc3_frame_t; 
    107151 
     
    146190 
    147191/** 
    148  * Sets the channel of interest 1 or all 
     192 * Sets the channel of interest 1 or all. Blah. 
    149193 */ 
    150194int cc3_pixbuf_set_coi (cc3_channel_t chan); 
     
    176220 
    177221uint8_t cc3_get_uart_count (void); 
     222 
     223/** 
     224 * Awesome. 
     225 */ 
    178226bool cc3_uart_init (uint8_t uart, 
    179227                    cc3_uart_rate_t rate,