unit_main.c File Reference

Run a series of PIC-specific unit tests. More...

#include "pm.h"
#include "pic24_all.h"
#include "CuTestSmall.h"
#include "pyFuncsInC.h"
#include <pps.h>

Go to the source code of this file.

Functions

void test_gpioExists (CuTest *tc)
void test_gpioOdExists (CuTest *tc)
void test_gpioSetPinIsInput (CuTest *tc)
void test_gpioGetPinIsInput (CuTest *tc)
void test_gpioSetPinIsDigital (CuTest *tc)
void test_gpioSetPinIsOpenDrain (CuTest *tc)
void test_gpioSetPinPullDirection (CuTest *tc)
void test_gpioUnmapPin (CuTest *tc)
void test_gpioSetDigitalPin (CuTest *tc)
void test_gpioReadDigitalPin (CuTest *tc)
void test_gpioReadDigitalLatch (CuTest *tc)
void test_configDigitalPin (CuTest *tc)
void test_configAnalogPin (CuTest *tc)
void test_configPwm (CuTest *tc)
void test_setPwm (CuTest *tc)
CuSuite * getSuite_testGpio ()
int main (void)

Variables

pPmNativeFxn_t const usr_nat_fxn_table []


Detailed Description

Run a series of PIC-specific unit tests.

Note that these test routines rely on local versions of CuTest.c and CuTest.h. This is because some of the defines in CuTest.h have been modified to accomodate a limited RAM space (e.g. original max string size was 8K, etc.).

Definition in file unit_main.c.


Function Documentation

CuSuite* getSuite_testGpio (  ) 

Run a series of tests on general-purpose I/O functions.

Returns:
A suite of tests.

Definition at line 491 of file unit_main.c.

void test_configAnalogPin ( CuTest *  tc  ) 

A series of tests of configAnalogPin.

Parameters:
tc Test object.

Definition at line 418 of file unit_main.c.

void test_configDigitalPin ( CuTest *  tc  ) 

A series of tests of configDigitalPin.

Parameters:
tc Test object.

Definition at line 397 of file unit_main.c.

void test_configPwm ( CuTest *  tc  ) 

A series of tests of configPwm.

Parameters:
tc Test object.

Definition at line 436 of file unit_main.c.

void test_gpioExists ( CuTest *  tc  ) 

A series of tests on the existance of digital IO pins.

Parameters:
tc Test object.

Definition at line 42 of file unit_main.c.

void test_gpioGetPinIsInput ( CuTest *  tc  ) 

A series of tests of getPinIsInput.

Parameters:
tc Test object.

Definition at line 210 of file unit_main.c.

void test_gpioOdExists ( CuTest *  tc  ) 

A series of tests on the existance of digital IO pins. Note: Microchip header files define _ODCA0-4, but the data sheet claims these don't exist. So, the test below fail. For now, ignore this. The same is true of pins on ports B and C.

It looks like the header files defined the ODC bits if the corresponding LATx/Rx bits exist, which is incorrect.

Therefore, these tell will always fail. Aargh.

Parameters:
tc Test object.

Definition at line 123 of file unit_main.c.

void test_gpioReadDigitalLatch ( CuTest *  tc  ) 

A series of tests of readDigitalPin.

Parameters:
tc Test object.

Definition at line 378 of file unit_main.c.

void test_gpioReadDigitalPin ( CuTest *  tc  ) 

A series of tests of readDigitalPin.

Parameters:
tc Test object.

Definition at line 357 of file unit_main.c.

void test_gpioSetDigitalPin ( CuTest *  tc  ) 

A series of tests of setDigitalPin.

Parameters:
tc Test object.

Definition at line 340 of file unit_main.c.

void test_gpioSetPinIsDigital ( CuTest *  tc  ) 

A series of tests of setPinIsDigital.

Parameters:
tc Test object.

Definition at line 232 of file unit_main.c.

void test_gpioSetPinIsInput ( CuTest *  tc  ) 

A series of tests of setPinIsInput.

Parameters:
tc Test object.

Definition at line 192 of file unit_main.c.

void test_gpioSetPinIsOpenDrain ( CuTest *  tc  ) 

A series of tests of setPinIsOpenDrain.

Parameters:
tc Test object.

Definition at line 257 of file unit_main.c.

void test_gpioSetPinPullDirection ( CuTest *  tc  ) 

A series of tests of setPinPullDirection.

Parameters:
tc Test object.

Definition at line 282 of file unit_main.c.

void test_gpioUnmapPin ( CuTest *  tc  ) 

A series of tests of unmapPin.

Parameters:
tc Test object.

Definition at line 313 of file unit_main.c.

void test_setPwm ( CuTest *  tc  ) 

A series of tests of setPwm.

Parameters:
tc Test object.

Definition at line 480 of file unit_main.c.


Generated on Mon Oct 18 07:40:49 2010 for Python-on-a-chip by  doxygen 1.5.9