Palmmicro Name Logo
 
   
PA3288 Developer's Guide - Function Overview
  
Include Files
All external include files are located in include directory.
Except for version.h and type.h, all other .h files corresponding to functions of .c files in a directory. For example, csl.h includes all functions of .c files in csl directory.
 
Chip Support Libary
All chip support libary functions look like ABCD_Eabc. For example, function GPIO_Write indicates that it is most probably declared in csl.h and the function implementation is located in csl\gpio.c.
All .c files in chip support libary are independent of version.h, which means they are only related of PA3288 chip and independent of hardware type. Usually they only need to include type.h, csl.h and internal csl\reg.h.
If you need to use "complicated" functions like strcmp, consider to put this part of code outside of chip support libary. Most part of codes here are related with chip register operation.
The calling orders of ABCD_Init at the beginning of main function is important, do NOT change it unless you are 100% sure about the changes.
 
Board Support Libary
All board support libary functions look like AbcdEfgh, where Abcd is usually the name of a programmable component connected with PA3288 chip on the hardware board. For example, OV7670Init function in include\bsl.h indicates that the function implementation is located in bsl\ov7670.c. And reading from the name, the function is about the initialization of VGA image sensor from OmniVision.
With almost every abcd.c file in bsl directory there is a BSL_ABCD compiler define in version.h. For example, only hardware board with OV7670 defines BSL_OV7670, so we can control when and where to call OV7670 related functions.
As different hardware board may use different way to connect an external component, for example use different GPIO, .c files in board support libary usually need to include version.h.
Most part of codes here are related with programmable component register operation, using functions in csl.h. Same as in chip support libary, keep in mind to move "complicated" code outside of board support libary.
 
System Level
System level functions also look like AbcdEfgh, but Abcd is no longer a component name. Same as above, all system level functions are declared in include\sys.h and implemented in sys directory.
One or more SYS_ABCD_XXXX compiler defines related with abcd.c may be found in version.h. For example, when SYS_DEBUG is not defined, the final code size is at least 7k bytes less than debug function enabled in the system. And our demo High Level UI Protocols is supported when SYS_SERIAL_UI is defined.
Unlike chip support libary, system level .c files usually need version.h as they need the directions of SYS_ABCD_XXXX defines.
 
Simple File System
A simple FAT16 compatible implementaion is in fat directory and declared in include\fat.h.
No sub directory supported, Only allow 1 file read and/or 1 file write at the same time, no file seek operation supported.
 
MD5 Algorithm
A GNU GPL2 implementation of MD5 algorithm from GRUB(GRand Unified Bootloader) is in md5 directory and declared in include\md5.h.
 
Test Blocks
All block test functions which will not be actually used in final product are declared in include\test.h and implemented in test directory.
For example, function Test_Md5 is implemented in test\test_md5.c with all RFC 1321 recommended string tests. TEST_MD5 is defined in version.h when the test need to be done.