User Tools

Site Tools


robots:hako:firmware:welcome

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
robots:hako:firmware:welcome [2012/09/26 18:25]
karina [Mainboard - Software - Notation - Types and prefixes]
robots:hako:firmware:welcome [2012/09/26 19:01]
karina [Mainboard - Software - Notation - Types and prefixes]
Line 73: Line 73:
 ==== Mainboard - Software - Notation - Types and prefixes ==== ==== Mainboard - Software - Notation - Types and prefixes ====
    
 +  * [[robots:hako:firmware:welcome#Examples|Unordered List ItemTypes/prefixes]] 
 +  * [[robots:hako:firmware:welcome#Examples|Typedef prefixes]]
 +  * [[robots:hako:firmware:welcome#Examples|Definition prefixes]] 
 +  * [[robots:hako:firmware:welcome#Modifier prefixes|Modifier refixes]] 
 +  * [[robots:hako:firmware:welcome#Area of validity prefixes|Validity prefixes]] 
 +  * [[robots:hako:firmware:welcome#Examples|Examples]]
 +
 +
 Header file: "xll_stwtypes.h" Header file: "xll_stwtypes.h"
  
Line 137: Line 145:
  
  
-**Modifier prefixes**+== Modifier prefixes ==
 ^Prefix^Example^Description^ ^Prefix^Example^Description^
 |p<type prefix>|uint8 *pu8_Example; |pointer of type| |p<type prefix>|uint8 *pu8_Example; |pointer of type|
 |a<type prefix>|uint8 au8_Example[4];| array of type| |a<type prefix>|uint8 au8_Example[4];| array of type|
  
-**Area of validity prefixes**+== Area of validity prefixes == 
 +^Prefix^Example^Description^ 
 +|g<type prefix>| uint8 gu8_Global; |global| 
 +|m<type prefix>| static uint8 mu8_ModuleGlobal; |module global (static inside file)| 
 +|h<type prefix>| static uint8 hu8_Example; |local static (static inside function - hold)| 
 +|o<type prefix>| void Callback( const uint8 ou8_Parameter ); |function parameter (operand)| 
 + 
 +== Examples == 
 + 
 +<sxh c> 
 +//Prefix examples 
 +/* local variable sint16 */  
 +sint16 s16_VariableName; 
 + 
 +/* function internal array of pointers to uint8 with MAX_MESSAGES elements */  
 +uint8 *apu8_Messages[MAX_MESSAGES]; 
 + 
 +/* Module global variable of type uint32 */  
 +static uint32 mu32_Index; 
 + 
 +/* typedef for structure */  
 +typedef struct  
 + 
 +
 +uint8 u8_Element1; 
 +uint32 *pu32_Element2;  
 +} T_StructType; 
 + 
 +/* modul globale pointer to structure defined by typdedef */  
 +static T_StructType *mpt_PointerToMyStructType; 
 + 
 +/* function internal used structure */  
 +T_StructType t_MyStructObject; 
 + 
 +/* module global structure variable */  
 +static T_StructType mt_MyStruct; 
 + 
 +/* typedef for function pointer for a module 'DigIN' */  
 +typedef void (*PR_DIN_CallBack)(const uint8 ou8_Parameter); 
 + 
 +/global function pointer in module 'DigIN' */  
 +PR_DIN_CallBack gpr_DIN_CallBack; 
 +</sxh> 
 + 
  
robots/hako/firmware/welcome.txt · Last modified: 2021/08/14 04:21 (external edit)