1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

added some documentation

This commit is contained in:
Marenz 2011-04-17 14:47:25 +02:00
parent f07efe501d
commit 2294dabea2

View file

@ -36,13 +36,22 @@ typedef struct
} PSYC_State; } PSYC_State;
#ifndef PSYC_COMPILE_LIBRARY #ifndef PSYC_COMPILE_LIBRARY
/* @brief shortcut for creating an array
*
* @param memory pointer to the buffer
* @param length length of that buffer
*
* @returns an instance of the PSYC_Array struct */
inline PSYC_Array PSYC_CreateArray (uint8_t* const memory, unsigned int length) inline PSYC_Array PSYC_CreateArray (uint8_t* const memory, unsigned int length)
{ {
PSYC_Array arr = {length, memory}; PSYC_Array arr = {length, memory};
return arr; return arr;
} }
/* @brief initiates the state struct with flags
*
* @param state pointer to the state struct that should be initiated
* @param flags the flags that one ones to set, se PSYC_Flags */
inline void PSYC_initState2 (PSYC_State* state, uint8_t flags ) inline void PSYC_initState2 (PSYC_State* state, uint8_t flags )
{ {
memset(state, 0, sizeof(PSYC_State)); memset(state, 0, sizeof(PSYC_State));