This library contains CRC, pseudo-RNG and utility memory functions.
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
Go to the source code of this file.
Defines | |
| #define | ROM400_UTIL_VERSION 5 |
| #define | REDIRECT_KERNELMALLOC 1 |
| #define | REDIRECT_KERNELFREE 2 |
| #define | REDIRECT_MALLOC 3 |
| #define | REDIRECT_FREE 4 |
| #define | REDIRECT_MALLOCDIRTY 5 |
| #define | REDIRECT_TINIEXPORT_MM_DEREF 6 |
| #define | REDIRECT_GETFREERAM 7 |
| #define | REDIRECT_GETTIMEMILLIS 8 |
| #define | REDIRECT_GETTHREADID 9 |
| #define | REDIRECT_THREADRESUME 10 |
| #define | REDIRECT_THREADIOSLEEP 11 |
| #define | REDIRECT_THREADIOSLEEPNC 12 |
| #define | REDIRECT_THREADSAVE 13 |
| #define | REDIRECT_THREADRESTORE 14 |
| #define | REDIRECT_SLEEP 15 |
| #define | REDIRECT_GETTASKID 16 |
| #define | REDIRECT_INFOSENDCHAR 17 |
| #define | REDIRECT_IP_COMPUTECHECKSUM_SOFTWARE 18 |
| #define | REDIRECT_0 19 |
| #define | REDIRECT_DHCPNOTIFY 20 |
| #define | REDIRECT_ROM_TASK_CREATE 21 |
| #define | REDIRECT_ROM_TASK_DUPLICATE 22 |
| #define | REDIRECT_ROM_TASK_DESTROY 23 |
| #define | REDIRECT_ROM_TASK_SWITCH_IN 24 |
| #define | REDIRECT_ROM_TASK_SWITCH_OUT 25 |
| #define | REDIRECT_OWIP_READCONFIG 26 |
| #define | REDIRECT_SETMACID 27 |
| #define | REDIRECT_MM_UNDEREF 28 |
| #define | REDIRECT_USER_IOPOLL 29 |
| #define | REDIRECT_ERROR_NOTIFICATION 30 |
Functions | |
| unsigned int | util_crc16 (unsigned char value, unsigned int seed) |
| Generates a 16-bit CRC given a seed. | |
| unsigned char | util_getpseudorandom (void) |
| Gets a pseudo-random byte. | |
| void | util_setrandomseed (unsigned int seed) |
| Sets the seed of the random number generator. | |
| void | util_memclear (void *target, unsigned int length) |
| Clears a block of memory. | |
| void | util_memcopy (void *source, void *dest, unsigned int length) |
| Copies a block of memory. | |
| unsigned char | util_memcompare (void *block0, void *block1, unsigned int length) |
| Compares the values in 2 blocks of memory. | |
| void | util_infosendchar (unsigned char ch) |
| Sends a character to serial port 0. | |
| void | util_installhook (void *fncptr, unsigned int fncindex) |
| Installs a new function pointer into the ROM redirect table. | |
| unsigned int | util_version (void) |
| Returns the version number of this utility library. | |
|
|
Reserved for future use with the util_installhook method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the DHCPNotify method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the ErrorNotification method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the mem_free method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the mem_getfreeram method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_gettaskid method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_getthreadid method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_gettimemillis method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the util_infosendchar method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the IP_ComputeChecksum method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the KernelFree method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the KernelMalloc method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the mem_malloc method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the mem_mallocdirty method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the M_UnDeref method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the OWIP_ReadConfig method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the TaskCreate method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_kill method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the TaskDuplicate method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the TaskSwitchIn method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the TaskSwitchOut method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the SetMACID method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_sleep method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_threadiosleep method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_threadiosleepnc method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_threadrestore method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_threadresume method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the task_threadsave method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the MM_Deref method.
|
|
|
Value to be used in conjunction with the util_installhook method to override the User_IOPoll method.
|
|
|
Version number associated with this header file. Should be the same as the version number returned by the util_version function.
|
|
||||||||||||
|
Generates a 16-bit CRC given a seed. Implements the Cyclic-Redundancy Check CRC16. This CRC is based on the polynomial X^16 + X^15 + X^2 + 1. It is used extensively in operations with Dallas Semiconductor 1-Wire devices. This function is safe to be called from multiple processes at the same time.
|
|
|
Gets a pseudo-random byte. Returns a pseudo-random byte generated with the help of the CRC function. This is not a true random byte, as there is no real source of entropy. This function is safe to be called from multiple processes at the same time.
|
|
|
Sends a character to serial port 0. This is a redirected function. The DS80C400 silicon software version of this function accesses the serial loader pin (P1.7) and does nothing if this pin is in the logic low state. The DS80C400 silicon software does not use interrupt driver I/O to the serial port. This function is safe to be called from multiple processes at the same time.
|
|
||||||||||||
|
Installs a new function pointer into the ROM redirect table. This function alters the redirect table, which allows functions in the ROM to be overridden by intredpid users. The function that is redirected will now call the code at address fncptr. It is not advised that fncptr point to a C function unless no arguments are expected (there is no way without writing an assembler wrapper to get the arguments to the C function in the Keil compiler). See the DS80C400 User's Guide Supplement for more on the meaning of redirected functions. This function is safe to be called from multiple processes at the same time.
|
|
||||||||||||
|
Clears a block of memory. Sets length bytes to zero starting at address target. This function is safe to be called from multiple processes at the same time.
|
|
||||||||||||||||
|
Compares the values in 2 blocks of memory. Compares length bytes from block0 to length bytes from block1 for equality. If the two memory blocks are identical, the function returns 0.
|
|
||||||||||||||||
|
Copies a block of memory. Copies length bytes of data from the source pointer to the dest pointer. The copy operation starts from the beginning of the source pointer, placing bytes from the beginning of the dest buffer. Therefore, f the buffers referenced by source and dest overlap, some bytes from source bytes will be overwritten prior to being copied to the target.
|
|
|
Sets the seed of the random number generator. Changes the current value of the random seed to the random number generator, allowing for additional randomness to be inserted into the generation. Note that additional randomness is also generated by the timer bytes and the millisecond counter, so this seed is not the only source. This function is safe to be called from multiple processes at the same time.
|
|
|
Returns the version number of this utility library. This function is safe to be called from multiple processes at the same time.
|
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |