Energy Micro IEC60355 Library Example Project 1.0 (internal use only!) GCC-Version
Example project demonstrating POST and BIST library functions

iec60335_class_b.h

Go to the documentation of this file.
00001 /***************************************************************************/
00030 #ifndef __IEC60335_CLASS_B_H__
00031 #define __IEC60335_CLASS_B_H__
00032 
00134 #include "efm32g890f128.h"
00135 #ifdef TESSY
00136 #include "iec60335_class_b_tessy.h"
00137 #endif
00138 #include "iec60335_class_b_def.h"
00139 #include "iec60335_class_b_typedef.h"
00140 #include "iec60335_class_b_programcounter_test.h"
00141 #include "iec60335_class_b_cpureg_test.h"
00142 #include "iec60335_class_b_interrupt_test.h"
00143 #include "iec60335_class_b_ram_test.h"
00144 #include "iec60335_class_b_flash_test.h"
00145 #include "iec60335_class_b_timer_rtc_test.h"
00146 #include "iec60335_class_b_critical_data.h"
00147 #include "iec60335_class_b_wdt_test.h"
00148 #include "iec60335_class_b_post.h"
00149 
00150 /* applicational */
00151 #include "dvk_spi.h"
00152 
00153 #ifdef __cplusplus
00154 extern "C"
00155 {
00156 #endif /* __cplusplus */
00157 
00160 /*  User configuration  */
00161 #define CPU_CLK               (32000000)        
00162 /* definition from EFM32 library */
00163 #ifndef FLASH_SIZE
00164 #define FLASH_SIZE            (0x00020000UL)    
00165 #endif
00166 
00167 #define IEC60335_RAM_START    (0x20000000UL)    
00168 #ifndef SRAM_SIZE
00169 #define SRAM_SIZE             (0x00004000UL)    
00170 #endif
00171 #define IEC60335_RAM_SIZE     SRAM_SIZE         
00173 /* POST test configuration */
00174 #define TEST_POST_WDOG        0                 
00175 #define TEST_POST_FLASH       1                 
00176 #define TEST_POST_RAM         1                 
00177 #define TEST_POST_CPUREG      1                 
00178 #define TEST_POST_PC          1                 
00180 /* configuration of the timer tests */
00181 #define USE_SYSTICK           0                 
00182 #define USE_TIMER0            1                 
00183 #define USE_TIMER1            0                 
00185 /* End of user configuration */
00186 
00202 static __INLINE void util_memcpy(void * t, void * s, uint32_t byte_count)
00203 {
00204   uint8_t * ptr_t = (uint8_t *) t;
00205   uint8_t * ptr_s = (uint8_t *) s;
00206   while (byte_count)
00207   {
00208     byte_count--;
00209     *ptr_t = *ptr_s;
00210     ptr_s++;
00211     ptr_t++;
00212   }
00213 }
00217 #ifdef __cplusplus
00218 }
00219 #endif /* __cplusplus */
00220 
00225 #endif  /* __IEC60335_CLASS_B_H__ */
00226 
00227 /************************************** EOF *********************************/