Issue 2 move folders and use deep path include file names to prevent collisions (#4)
* moving folders and files and adjust server demo build * Fix Makefile for apps/server on Linux * fix unit test source file folders * fix datetime convert UTC functions. Add Code::Blocks project for datetime testing * added some ignore extensions * disable parallel make option * fix build for abort, dcc, and epics apps * fix build for dcc, epics, error, and getevent apps. * Fixed building of all apps * fix the ipv4 to ipv6 router app build * Change indent style from Google to Webkit * make pretty to re-format style * removed common Makefile since we already had one and two was too many * remove scripts from root folder that are no longer maintained or used * remove mercurial EOL and ignore files for git repo * remove .vscodeconfig files from repo * tweak clang-format style * clang-format src and apps with tweaked style * added clang-tidy to fix readability if braces in src * result of make tidy for src and apps * fix clang-tidy mangling * Added code::blocks project for BACnet server simulation * added code::blocks linux project for WhoIs app * update text files for EOL * fix EOL in some files * fixed make win32 apps for older gcc * Removed Borland C++ Makefile in apps. Unable to maintain support for Borland C++ compiler. * created codeblocks project for apps/epics for Windows * fixing ports/xplained to work with new data structure. * fix ports/xplained example for Atmel Studio compile * fix ports/stm32f10x example for gcc Makefile compile * fix ports/stm32f10x example for IAR EWARM compile * fix ports/xplained timer callback * fix ports/bdk_atxx_mspt build with subdirs * fix ports/bdk_atxx_mspt build with subdirs * updated git ignore for IAR build artifacts * updated gitignore for non-tracked files and folders * fixed bdk-atxx4-mstp port for Rowley Crossworks project file * fixed bdk-atxx4-mstp port for GCC AVR Makefile * fixed atmega168 port for IAR AVR and GCC AVR Makefile * fixed at91sam7s port for IAR ARM and GCC ARM Makefile * removed unmaintainable DOS, RTOS32, and atmega8 ports. Updated rx62n (untested). * changed arm7 to uip port
This commit is contained in:
@@ -1,310 +0,0 @@
|
||||
[HIMDBVersion]
|
||||
2.0
|
||||
[DATABASE_VERSION]
|
||||
"2.8"
|
||||
[PROJECT_DETAILS]
|
||||
"BACnet_Ethernet_RX62N" "C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N" "C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N.hwp" "RX" "Renesas RX Standard" "Application" "" ""
|
||||
[INFORMATION]
|
||||
"No project information available"
|
||||
[TOOL_CHAIN]
|
||||
"Renesas RX Standard Toolchain" "1.0.1.0"
|
||||
[CONFIGURATIONS]
|
||||
"Debug" "C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\Debug"
|
||||
[BUILD_PHASES]
|
||||
"Renesas OptLinker" 1
|
||||
"Renesas RX Assembler" 1
|
||||
"Renesas RX C/C++ Compiler" 1
|
||||
"Renesas RX C/C++ Library Generator" 1
|
||||
"Renesas RX Configurator" 1
|
||||
[TOOL_ENVIRONMENT]
|
||||
[EXTENSIONS]
|
||||
"Absolute file" "ABS"
|
||||
"Assembly include file" "INC"
|
||||
"Assembly list file" "LST"
|
||||
"Assembly source file" "S"
|
||||
"Assembly source file" "SRC"
|
||||
"Binary file" "BIN"
|
||||
"C header file" "H"
|
||||
"C source file" "C"
|
||||
"C++ header file" "HPP"
|
||||
"C++ source file" "CC"
|
||||
"C++ source file" "CP"
|
||||
"C++ source file" "CPP"
|
||||
"CPU information file" "CPU"
|
||||
"Calling information file" "CAL"
|
||||
"Configuration file" "CFG"
|
||||
"Debug information file" "DBG"
|
||||
"Hex file" "HEX"
|
||||
"Library file" "LIB"
|
||||
"Library information file" "LBP"
|
||||
"Linkage map file" "MAP"
|
||||
"Linkage symbol file" "FSY"
|
||||
"Object file" "OBJ"
|
||||
"Optimize map file" "bls"
|
||||
"Preprocessed C source file" "P"
|
||||
"Preprocessed C++ source file" "PP"
|
||||
"Relocatable file" "REL"
|
||||
"Rts information file" "RTS"
|
||||
"S-Record file" "MOT"
|
||||
"Stack information file" "SNI"
|
||||
"TD include object file" "RTI"
|
||||
[FILE_GROUPS]
|
||||
"Absolute file" "BIN" "NONE" ""
|
||||
"Assembly include file" "TEXT" "EDITOR" ""
|
||||
"Assembly list file" "TEXT" "EDITOR" ""
|
||||
"Assembly source file" "TEXT" "EDITOR" ""
|
||||
"Binary file" "BIN" "NONE" ""
|
||||
"C header file" "TEXT" "EDITOR" ""
|
||||
"C source file" "TEXT" "EDITOR" ""
|
||||
"C++ header file" "TEXT" "EDITOR" ""
|
||||
"C++ source file" "TEXT" "EDITOR" ""
|
||||
"CPU information file" "BIN" "NONE" ""
|
||||
"Calling information file" "BIN" "NONE" ""
|
||||
"Configuration file" "TEXT" "EDITOR" ""
|
||||
"Debug information file" "BIN" "NONE" ""
|
||||
"Hex file" "TEXT" "EDITOR" ""
|
||||
"Library file" "BIN" "NONE" ""
|
||||
"Library information file" "TEXT" "EDITOR" ""
|
||||
"Linkage map file" "TEXT" "EDITOR" ""
|
||||
"Linkage symbol file" "TEXT" "EDITOR" ""
|
||||
"Object file" "BIN" "NONE" ""
|
||||
"Optimize map file" "BIN" "NONE" ""
|
||||
"Preprocessed C source file" "TEXT" "EDITOR" ""
|
||||
"Preprocessed C++ source file" "TEXT" "EDITOR" ""
|
||||
"Relocatable file" "BIN" "NONE" ""
|
||||
"Rts information file" "BIN" "NONE" ""
|
||||
"S-Record file" "TEXT" "EDITOR" ""
|
||||
"Stack information file" "BIN" "NONE" ""
|
||||
"TD include object file" "BIN" "NONE" ""
|
||||
[ASSOCIATED_APPLICATIONS]
|
||||
[TOOLCHAIN_PHASE]
|
||||
"Renesas OptLinker"
|
||||
"Renesas RX Assembler"
|
||||
"Renesas RX C/C++ Compiler"
|
||||
"Renesas RX C/C++ Library Generator"
|
||||
"Renesas RX Configurator"
|
||||
[UTILITY_PHASE]
|
||||
[CUSTOM_PHASES]
|
||||
[CUSTOM_PHASE_INPUT_GROUP]
|
||||
[CUSTOM_PHASE_OUTPUT_SYNTAX]
|
||||
[BUILD_ORDER]
|
||||
"Renesas RX C/C++ Library Generator" 1
|
||||
"Renesas RX C/C++ Compiler" 1
|
||||
"Renesas RX Assembler" 1
|
||||
"Renesas OptLinker" 1
|
||||
"Renesas RX Configurator" 0
|
||||
[BUILD_PHASE_DETAILS]
|
||||
"Renesas OptLinker" "Object file|Library file|Relocatable file" 0
|
||||
"Renesas RX Assembler" "Assembly source file|Linkage symbol file" 1
|
||||
"Renesas RX C/C++ Compiler" "C source file|C++ source file" 1
|
||||
"Renesas RX C/C++ Library Generator" "" 0
|
||||
"Renesas RX Configurator" "Configuration file" 0
|
||||
[BUILD_FILE_ORDER_Assembly source file]
|
||||
"Renesas RX Assembler" 1
|
||||
[BUILD_FILE_ORDER_C source file]
|
||||
"Renesas RX C/C++ Compiler" 1
|
||||
[BUILD_FILE_ORDER_C++ source file]
|
||||
"Renesas RX C/C++ Compiler" 1
|
||||
[BUILD_FILE_ORDER_Linkage symbol file]
|
||||
"Renesas RX Assembler" 1
|
||||
[SCRAP]
|
||||
"Project Generator Setup File" ""
|
||||
[MAPPINGS]
|
||||
"Assembly source file" "Renesas RX Assembler" "Renesas RX C/C++ Compiler"
|
||||
"Library file" "Renesas OptLinker" "Renesas RX C/C++ Library Generator"
|
||||
"Object file" "Renesas OptLinker" "Renesas RX Assembler"
|
||||
"Object file" "Renesas OptLinker" "Renesas RX C/C++ Compiler"
|
||||
[PROJECT_FILES]
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_dcc.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_npdu.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rd.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rp.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rpm.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_whohas.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_whois.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_wp.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\noserv.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\s_iam.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\s_ihave.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\txbuf.c" "User" "C source file|BACnet|Handler" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_ADC_10.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_ADC_12.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_BSC.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_CMT.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_DMAC.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_IIC.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_INTC.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_MTU.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_POE.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_SCI.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_SPI.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_TMR.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_WDT.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_not_RPDL.c" "User" "C source file|RPDL" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\bacnet.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\bacnet.h" "User" "C header file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\bo.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\device.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\ethernet.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\hardware.h" "User" "C header file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\led.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\led.h" "User" "C header file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\main.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\timer-hdw.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\timer.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\timer.h" "User" "C header file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\GlyphLib_v2.lib" "User" "Library file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\YRDKRX62N_RSPI_API.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\dbsct.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\hwsetup.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\lcd.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\resetprg.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\sbrk.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\switch.c" "User" "C source file|bsp" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\driver\phy.c" "User" "C source file|driver" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\driver\r_ether.c" "User" "C source file|driver" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\abort.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\apdu.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacapp.c" "User" "C source file" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacdcode.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacerror.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacint.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacprop.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacreal.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacstr.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\datetime.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\dcc.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\iam.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\ihave.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\memcopy.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\npdu.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rd.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\reject.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rp.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rpm.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\version.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\whohas.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\whois.c" "User" "C source file|BACnet|Core" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\wp.c" "User" "C source file|BACnet|Core" 2
|
||||
[FOLDER]
|
||||
"C header file" "C header file"
|
||||
"C source file" "C source file"
|
||||
"C source file|BACnet" ""
|
||||
"C source file|BACnet|Core" ""
|
||||
"C source file|BACnet|Handler" ""
|
||||
"C source file|RPDL" ""
|
||||
"C source file|bsp" ""
|
||||
"C source file|driver" ""
|
||||
"C source file|user-app" ""
|
||||
"Library file" "Library file"
|
||||
[GENERAL_DATA_PROJECT]
|
||||
"USE_CUSTOM_LINKAGE_ORDER" "0"
|
||||
[ON_DEMAND_COMPONENTS_LOADED]
|
||||
[SYNC_SESSION_NAMES]
|
||||
[SESSIONS]
|
||||
"DefaultSession" "C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\DefaultSession.hsf" 0
|
||||
"JLink" "C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\JLink.hsf" 0
|
||||
[GENERAL_DATA_SESSION_DefaultSession]
|
||||
[GENERAL_DATA_SESSION_JLink]
|
||||
[OPTIONS_Debug_Renesas OptLinker]
|
||||
"Single Shot" "0c5147307f9dbc10" 5
|
||||
[OPTIONS_Debug_Renesas RX Assembler]
|
||||
"Assembly source file" "091c6ad95f42bc10" 4
|
||||
"Linkage symbol file" "091c6ad95f42bc10" 4
|
||||
[OPTIONS_Debug_Renesas RX C/C++ Compiler]
|
||||
"C source file" "0e4b370aaf9dbc10" 2
|
||||
"C++ source file" "0e4b370aaf9dbc10" 3
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_dcc.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_npdu.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rd.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rp.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_rpm.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_whohas.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_whois.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\h_wp.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\noserv.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\s_iam.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\s_ihave.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\demo\handler\txbuf.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_ADC_10.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_ADC_12.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_BSC.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_CMT.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_DMAC.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_IIC.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_INTC.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_MTU.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_POE.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_SCI.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_SPI.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_TMR.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_WDT.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\RPDL\Interrupt_not_RPDL.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\bacnet.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\bo.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\device.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\ethernet.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\led.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\main.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\timer-hdw.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bacnet\timer.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\YRDKRX62N_RSPI_API.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\dbsct.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\hwsetup.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\lcd.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\resetprg.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\sbrk.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\bsp\switch.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\driver\phy.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\ports\rx62n\BACnet_Ethernet_RX62N\BACnet_Ethernet_RX62N\src\driver\r_ether.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\abort.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\apdu.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacapp.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacdcode.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacerror.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacint.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacprop.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacreal.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\bacstr.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\datetime.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\dcc.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\iam.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\ihave.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\memcopy.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\npdu.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rd.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\reject.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rp.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\rpm.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\version.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\whohas.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\whois.c" "0e4b370aaf9dbc10" 2
|
||||
"C:\Documents and Settings\VMWare\My Documents\bacnet-stack\src\wp.c" "0e4b370aaf9dbc10" 2
|
||||
[OPTIONS_Debug_Renesas RX C/C++ Library Generator]
|
||||
"Single Shot" "0bffac16d909bc10" 1
|
||||
[OPTIONS_Debug_Renesas RX Configurator]
|
||||
"Single Shot" "0f2016307f9dbc10" 6
|
||||
[OPTIONS_Debug]
|
||||
"" 0
|
||||
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0] [S|PATCH|RX610]" 6
|
||||
"[V|VERSION|1] [B|DEBUG|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|LISTFILE|0] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0] [S|PATCH|RX610]" 4
|
||||
"[V|VERSION|1] [S|LANG|CPP] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\src\bacnet^"|^"$(PROJDIR)\..\..\..\..\include^"|^"$(PROJDIR)\src\bsp^"|^"$(PROJDIR)\src\driver^"|^"$(PROJDIR)\src\RPDL^"] [S|DEFINE|BACDL_ETHERNET|MAX_TSM_TRANSACTIONS=0|MAX_CHARACTER_STRING_BYTES=64|MAX_OCTET_STRING_BYTES=64] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004_CHECK_RULE|ALL] [S|MISRA2004_RULE|1.1|3.4|4.1|5.2|5.3|5.4|5.5|5.6|5.7|6.1|6.2|6.3|6.4|6.5|7.1|8.1|8.2|8.3|8.5|8.6|8.7|8.8|8.11|8.12|9.2|9.3|10.1|10.2|10.3|10.4|10.5|10.6|11.1|11.2|11.3|11.4|11.5|12.1|12.2|12.3|12.4|12.5|12.6|12.7|12.8|12.9|12.10|12.11|12.12|12.13|13.1|13.2|13.3|13.4|13.7|14.1|14.2|14.3|14.4|14.5|14.6|14.7|14.8|14.9|14.10|15.1|15.2|15.3|15.4|15.5|16.1|16.2|16.3|16.4|16.5|16.6|16.8|16.9|17.3|17.4|17.5|17.6|18.1|18.2|18.4|19.1|20.2|20.4|20.5|20.7|20.8|20.9|20.10|20.11|20.12] [S|MISRA1998_CHECK_RULE|ALL] [S|MISRA1998_RULE|1|5|8|12|13|14|17|18|19|20|21|22|24|28|29|31|32|33|34|35|36|37|38|39|40|42|43|44|45|46|48|49|50|51|53|54|55|56|57|58|59|60|61|62|63|64|65|68|69|70|71|72|73|74|75|76|77|78|79|80|82|83|84|85|99|101|102|103|104|105|106|108|110|111|112|113|115|118|119|121|122|123|124|125|126|127] [S|MISRA_GROUP_FILE_PATH|^"$(PROJDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [S|PATCH|RX610]
|
||||
" 3
|
||||
"[V|VERSION|1] [S|LANG|C] [B|SJIS|1] [S|INCLUDE|^"$(PROJDIR)\src\bacnet^"|^"$(PROJDIR)\..\..\..\..\include^"|^"$(PROJDIR)\src\bsp^"|^"$(PROJDIR)\src\driver^"|^"$(PROJDIR)\src\RPDL^"] [S|DEFINE|BACDL_ETHERNET|MAX_TSM_TRANSACTIONS=0] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).obj^"] [B|DEBUG|1] [S|OPTIMIZE|0] [B|SIZE|1] [B|MAP|0] [I|INLINE|100] [I|LOOP|2] [S|MISRA2004_CHECK_RULE|ALL] [S|MISRA2004_RULE|1.1|3.4|4.1|5.2|5.3|5.4|5.5|5.6|5.7|6.1|6.2|6.3|6.4|6.5|7.1|8.1|8.2|8.3|8.5|8.6|8.7|8.8|8.11|8.12|9.2|9.3|10.1|10.2|10.3|10.4|10.5|10.6|11.1|11.2|11.3|11.4|11.5|12.1|12.2|12.3|12.4|12.5|12.6|12.7|12.8|12.9|12.10|12.11|12.12|12.13|13.1|13.2|13.3|13.4|13.7|14.1|14.2|14.3|14.4|14.5|14.6|14.7|14.8|14.9|14.10|15.1|15.2|15.3|15.4|15.5|16.1|16.2|16.3|16.4|16.5|16.6|16.8|16.9|17.3|17.4|17.5|17.6|18.1|18.2|18.4|19.1|20.2|20.4|20.5|20.7|20.8|20.9|20.10|20.11|20.12] [S|MISRA1998_CHECK_RULE|ALL] [S|MISRA1998_RULE|1|5|8|12|13|14|17|18|19|20|21|22|24|28|29|31|32|33|34|35|36|37|38|39|40|42|43|44|45|46|48|49|50|51|53|54|55|56|57|58|59|60|61|62|63|64|65|68|69|70|71|72|73|74|75|76|77|78|79|80|82|83|84|85|99|101|102|103|104|105|106|108|110|111|112|113|115|118|119|121|122|123|124|125|126|127] [S|MISRA_GROUP_FILE_PATH|^"$(PROJDIR)\$(PROJECTNAME).rde^"] [S|CPU|RX600] [S|BASE|00000000=NONE] [S|PATCH|RX610]
|
||||
" 2
|
||||
"[V|VERSION|1] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] [B|NEW|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|SIZE|1] [I|INLINE|100] [I|LOOP|2] [S|CPU|RX600] [S|BASE|00000000=NONE] [S|PATCH|RX610]
|
||||
" 1
|
||||
"[V|VERSION|6] [S|INPUTLIBRARY|^"$(PROJDIR)\src\RPDL\RX62N_library.lib^"] [S|PRELINK|SKIP] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [S|SHOW|METHODCUSTOM|] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [S|START|B_RX_DESC,B_TX_DESC,B_RX_BUFF_1,B_TX_BUFF_1,B_1,R_1,B_2,R_2,B,R,SU,SI(01000)|PResetPRG,C_1,C_2,C,C$*,D*,P,W*(0FFF80000)|C_FLASH_CONFIG_PARAMS_1(0FFFFFF00)|FIXEDVECT(0FFFFFFD0)]
|
||||
" 5
|
||||
[EXCLUDED_FILES_Debug]
|
||||
[LINKAGE_ORDER_Debug]
|
||||
[GENERAL_DATA_CONFIGURATION_Debug]
|
||||
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_DefaultSession]
|
||||
[SESSION_DATA_CONFIGURATION_SESSION_Debug_DefaultSession]
|
||||
"MEMORY_MAPPING_OPTIONS" ""
|
||||
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_JLink]
|
||||
[SESSION_DATA_CONFIGURATION_SESSION_Debug_JLink]
|
||||
"MEMORY_MAPPING_OPTIONS" ""
|
||||
[EXT_DEBUGGER_INFO]
|
||||
0 "" "" "" ""
|
||||
[END]
|
||||
+14
-14
@@ -26,23 +26,23 @@
|
||||
#include <stdbool.h>
|
||||
/* hardware layer includes */
|
||||
#include "hardware.h"
|
||||
#include "timer.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "led.h"
|
||||
/* BACnet Stack includes */
|
||||
#include "datalink.h"
|
||||
#include "npdu.h"
|
||||
#include "handlers.h"
|
||||
#include "client.h"
|
||||
#include "txbuf.h"
|
||||
#include "dcc.h"
|
||||
#include "iam.h"
|
||||
#include "device.h"
|
||||
#include "bo.h"
|
||||
#include "bacnet/datalink/datalink.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/basic/tsm/tsm.h"
|
||||
#include "bacnet/dcc.h"
|
||||
#include "bacnet/iam.h"
|
||||
#include "bacnet/basic/object/device.h"
|
||||
#include "bacnet/basic/object/bo.h"
|
||||
/* me */
|
||||
#include "bacnet.h"
|
||||
|
||||
/* timer for device communications control */
|
||||
static struct itimer DCC_Timer;
|
||||
static struct mstimer DCC_Timer;
|
||||
#define DCC_CYCLE_SECONDS 1
|
||||
|
||||
void bacnet_init(
|
||||
@@ -71,7 +71,7 @@ void bacnet_init(
|
||||
apdu_set_confirmed_handler(SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL,
|
||||
handler_device_communication_control);
|
||||
/* start the cyclic 1 second timer for DCC */
|
||||
timer_interval_start_seconds(&DCC_Timer, DCC_CYCLE_SECONDS);
|
||||
mstimer_set(&DCC_Timer, DCC_CYCLE_SECONDS*1000);
|
||||
/* Hello World! */
|
||||
Send_I_Am(&Handler_Transmit_Buffer[0]);
|
||||
}
|
||||
@@ -108,8 +108,8 @@ void bacnet_task(
|
||||
}
|
||||
}
|
||||
/* handle the communication timer */
|
||||
if (timer_interval_expired(&DCC_Timer)) {
|
||||
timer_interval_reset(&DCC_Timer);
|
||||
if (mstimer_expired(&DCC_Timer)) {
|
||||
mstimer_reset(&DCC_Timer);
|
||||
dcc_timer_seconds(DCC_CYCLE_SECONDS);
|
||||
}
|
||||
/* handle the messaging */
|
||||
|
||||
+7
-7
@@ -28,15 +28,15 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "bacdef.h"
|
||||
#include "bacdcode.h"
|
||||
#include "bacenum.h"
|
||||
#include "config.h" /* the custom stuff */
|
||||
#include "wp.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/config.h" /* the custom stuff */
|
||||
#include "bacnet/wp.h"
|
||||
#include "hardware.h"
|
||||
#include "led.h"
|
||||
#include "bo.h"
|
||||
#include "handlers.h"
|
||||
#include "bacnet/basic/object/bo.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
|
||||
#ifndef MAX_BINARY_OUTPUTS
|
||||
#define MAX_BINARY_OUTPUTS 2
|
||||
|
||||
+19
-18
@@ -26,26 +26,26 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h> /* for memmove */
|
||||
#include "bacdef.h"
|
||||
#include "bacdcode.h"
|
||||
#include "bacstr.h"
|
||||
#include "bacenum.h"
|
||||
#include "bacapp.h"
|
||||
#include "config.h" /* the custom stuff */
|
||||
#include "apdu.h"
|
||||
#include "wp.h" /* WriteProperty handling */
|
||||
#include "rp.h" /* ReadProperty handling */
|
||||
#include "dcc.h" /* DeviceCommunicationControl handling */
|
||||
#include "version.h"
|
||||
#include "device.h" /* me */
|
||||
#include "handlers.h"
|
||||
#include "datalink.h"
|
||||
#include "address.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacstr.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/bacapp.h"
|
||||
#include "bacnet/config.h" /* the custom stuff */
|
||||
#include "bacnet/apdu.h"
|
||||
#include "bacnet/wp.h" /* WriteProperty handling */
|
||||
#include "bacnet/rp.h" /* ReadProperty handling */
|
||||
#include "bacnet/dcc.h" /* DeviceCommunicationControl handling */
|
||||
#include "bacnet/version.h"
|
||||
#include "bacnet/basic/object/device.h" /* me */
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/datalink/datalink.h"
|
||||
#include "bacnet/basic/binding/address.h"
|
||||
/* os specfic includes */
|
||||
#include "timer.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
/* objects */
|
||||
#include "device.h"
|
||||
#include "bo.h"
|
||||
#include "bacnet/basic/object/device.h"
|
||||
#include "bacnet/basic/object/bo.h"
|
||||
|
||||
/* forward prototype */
|
||||
int Device_Read_Property_Local(
|
||||
@@ -88,6 +88,7 @@ static const char *Reinit_Password = "filister";
|
||||
static char My_Object_Name[MAX_DEV_NAME_LEN + 1] = "SimpleServer";
|
||||
static char Model_Name[MAX_DEV_MOD_LEN + 1] = "RX62N";
|
||||
static char Application_Software_Version[MAX_DEV_VER_LEN + 1] = "1.0";
|
||||
static const char *BACnet_Version = BACNET_VERSION_TEXT;
|
||||
static char Location[MAX_DEV_LOC_LEN + 1] = "USA";
|
||||
static char Description[MAX_DEV_DESC_LEN + 1] = "Renesas Rulz!";
|
||||
static uint32_t Database_Revision = 0;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
*********************************************************************/
|
||||
#include <stdint.h> /* for standard integer types uint8_t etc. */
|
||||
#include <stdbool.h> /* for the standard bool type. */
|
||||
#include "bacdef.h"
|
||||
#include "ethernet.h"
|
||||
#include "bacint.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/datalink/ethernet.h"
|
||||
#include "bacnet/bacint.h"
|
||||
#include "hardware.h"
|
||||
|
||||
/** @file rx62n/ethernet.c Provides Renesas RX62N-specific functions
|
||||
|
||||
+11
-9
@@ -23,10 +23,10 @@
|
||||
*********************************************************************/
|
||||
#include <stdint.h>
|
||||
#include "hardware.h"
|
||||
#include "timer.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "led.h"
|
||||
|
||||
static struct itimer Off_Delay_Timer[MAX_LEDS];
|
||||
static struct mstimer Off_Delay_Timer[MAX_LEDS];
|
||||
static bool LED_Status[MAX_LEDS];
|
||||
|
||||
#define LED_OFF (0)
|
||||
@@ -82,7 +82,7 @@ void led_on(
|
||||
}
|
||||
if (index < MAX_LEDS) {
|
||||
LED_Status[index] = LED_ON;
|
||||
timer_interval_no_expire(&Off_Delay_Timer[index]);
|
||||
mstimer_set(&Off_Delay_Timer[index], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void led_off(
|
||||
}
|
||||
if (index < MAX_LEDS) {
|
||||
LED_Status[index] = LED_OFF;
|
||||
timer_interval_no_expire(&Off_Delay_Timer[index]);
|
||||
mstimer_set(&Off_Delay_Timer[index], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ void led_off_delay(
|
||||
uint32_t delay_ms)
|
||||
{
|
||||
if (index < MAX_LEDS) {
|
||||
timer_interval_start(&Off_Delay_Timer[index], delay_ms);
|
||||
mstimer_set(&Off_Delay_Timer[index], delay_ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ void led_on_interval(
|
||||
{
|
||||
if (index < MAX_LEDS) {
|
||||
led_on(index);
|
||||
timer_interval_start(&Off_Delay_Timer[index], interval_ms);
|
||||
mstimer_set(&Off_Delay_Timer[index], interval_ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,9 +212,11 @@ void led_task(
|
||||
uint8_t i; /* loop counter */
|
||||
|
||||
for (i = 0; i < MAX_LEDS; i++) {
|
||||
if (timer_interval_expired(&Off_Delay_Timer[i])) {
|
||||
timer_interval_no_expire(&Off_Delay_Timer[i]);
|
||||
led_off(i);
|
||||
if (mstimer_interval(&Off_Delay_Timer[i]) > 0) {
|
||||
if (mstimer_expired(&Off_Delay_Timer[i])) {
|
||||
mstimer_set(&Off_Delay_Timer[i], 0);
|
||||
led_off(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "hardware.h"
|
||||
#include "ethernet.h"
|
||||
#include "timer.h"
|
||||
#include "bacnet/datalink/ethernet.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "led.h"
|
||||
|
||||
/** Main function of BACnet demo for RX62N evaluation board */
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "hardware.h"
|
||||
#include "timer.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
|
||||
/* counter for the the timer which wraps every 49.7 days */
|
||||
static volatile uint32_t Millisecond_Counter;
|
||||
static volatile uint8_t Millisecond_Counter_Byte;
|
||||
/* forward prototype for interrupt service routine */
|
||||
void int_cmt0_isr(
|
||||
void);
|
||||
@@ -42,7 +41,6 @@ static void timer_interrupt_handler(
|
||||
void)
|
||||
{
|
||||
Millisecond_Counter++;
|
||||
Millisecond_Counter_Byte++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -61,27 +59,16 @@ void int_cmt0_isr(
|
||||
* Returns: none
|
||||
* Notes: This method only disables the timer overflow interrupt.
|
||||
*************************************************************************/
|
||||
uint32_t timer_milliseconds(
|
||||
unsigned long mstimer_now(
|
||||
void)
|
||||
{
|
||||
uint32_t timer_value; /* return value */
|
||||
unsigned long timer_value; /* return value */
|
||||
|
||||
timer_value = Millisecond_Counter;
|
||||
|
||||
return timer_value;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: returns the current millisecond count
|
||||
* Returns: none
|
||||
* Notes: This method only disables the timer overflow interrupt.
|
||||
*************************************************************************/
|
||||
uint8_t timer_milliseconds_byte(
|
||||
void)
|
||||
{
|
||||
return Millisecond_Counter;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Initialization for Timer
|
||||
* Returns: none
|
||||
@@ -1,8 +1,9 @@
|
||||
BACnet Etherent
|
||||
Demonstrates the Ethernet peripheral by implmenting BACnet over Ethernet
|
||||
on the RX62N Development Kit. The project is compiled with the RX Standard
|
||||
on the RX62N Development Kit. The project is compiled with the RX Standard
|
||||
Toolchain, and the default drivers included with the RX62N kit.
|
||||
|
||||
The project does not use any additional hardware.
|
||||
|
||||
The project was tested using a BACnet/IP to BACnet Ethernet router, using the bacnet-tools from the BACnet Protocol Stack site.
|
||||
The project was tested using a BACnet/IP to BACnet Ethernet router,
|
||||
using the bacnet-tools from the BACnet Protocol Stack site.
|
||||
|
||||
@@ -1,431 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 Steve Karg <skarg@users.sourceforge.net>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*********************************************************************/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "timer.h"
|
||||
|
||||
/* generic elapsed timer handling */
|
||||
/* interval not to exceed 49.7 days */
|
||||
/* interval of 1ms may be 0 to 1ms */
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Sets the start time for an elapsed timer
|
||||
* Returns: the value of the start timer
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_elapsed_start(
|
||||
struct etimer *t)
|
||||
{
|
||||
uint32_t now = timer_milliseconds();
|
||||
|
||||
if (t) {
|
||||
t->start = now;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Gets the amount of elapsed time in milliseconds
|
||||
* Returns: elapsed time in milliseconds
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
uint32_t timer_elapsed_time(
|
||||
struct etimer *t)
|
||||
{
|
||||
uint32_t now = timer_milliseconds();
|
||||
uint32_t delta = 0;
|
||||
|
||||
if (t) {
|
||||
delta = now - t->start;
|
||||
}
|
||||
|
||||
return delta;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Sets the start time with an offset
|
||||
* Returns: elapsed time in milliseconds
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_elapsed_start_offset(
|
||||
struct etimer *t,
|
||||
uint32_t offset)
|
||||
{
|
||||
uint32_t now = timer_milliseconds();
|
||||
|
||||
if (t) {
|
||||
t->start = now + offset;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_milliseconds(
|
||||
struct etimer *t,
|
||||
uint32_t milliseconds)
|
||||
{
|
||||
return (timer_elapsed_time(t) >= milliseconds);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_seconds(
|
||||
struct etimer * t,
|
||||
uint32_t seconds)
|
||||
{
|
||||
uint32_t milliseconds = seconds;
|
||||
|
||||
milliseconds *= 1000L;
|
||||
|
||||
return timer_elapsed_milliseconds(t, milliseconds);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_minutes(
|
||||
struct etimer * t,
|
||||
uint32_t minutes)
|
||||
{
|
||||
uint32_t milliseconds = minutes;
|
||||
|
||||
milliseconds *= 1000L;
|
||||
milliseconds *= 60L;
|
||||
|
||||
return timer_elapsed_milliseconds(t, milliseconds);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_milliseconds_short(
|
||||
struct etimer * t,
|
||||
uint16_t value)
|
||||
{
|
||||
uint32_t milliseconds;
|
||||
|
||||
milliseconds = value;
|
||||
|
||||
return (timer_elapsed_time(t) >= milliseconds);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_seconds_short(
|
||||
struct etimer * t,
|
||||
uint16_t value)
|
||||
{
|
||||
return timer_elapsed_seconds(t, value);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_elapsed_minutes_short(
|
||||
struct etimer * t,
|
||||
uint16_t value)
|
||||
{
|
||||
return timer_elapsed_minutes(t, value);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Starts an interval timer
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_start(
|
||||
struct itimer *t,
|
||||
uint32_t interval)
|
||||
{
|
||||
if (t) {
|
||||
t->start = timer_milliseconds();
|
||||
t->interval = interval;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Starts an interval timer
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_start_seconds(
|
||||
struct itimer *t,
|
||||
uint32_t seconds)
|
||||
{
|
||||
uint32_t interval = seconds;
|
||||
|
||||
interval *= 1000L;
|
||||
timer_interval_start(t, interval);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Starts an interval timer
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_start_minutes(
|
||||
struct itimer *t,
|
||||
uint32_t minutes)
|
||||
{
|
||||
uint32_t interval = minutes;
|
||||
|
||||
interval *= 1000L;
|
||||
interval *= 60L;
|
||||
timer_interval_start(t, interval);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Determines the amount of time that has elapsed
|
||||
* Returns: elapsed milliseconds
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
uint32_t timer_interval_elapsed(
|
||||
struct itimer *t)
|
||||
{
|
||||
uint32_t now = timer_milliseconds();
|
||||
uint32_t delta = 0;
|
||||
|
||||
if (t) {
|
||||
delta = now - t->start;
|
||||
}
|
||||
|
||||
return delta;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Determines the amount of time that has elapsed
|
||||
* Returns: elapsed milliseconds
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
uint32_t timer_interval(
|
||||
struct itimer * t)
|
||||
{
|
||||
uint32_t interval = 0;
|
||||
|
||||
if (t) {
|
||||
interval = t->interval;
|
||||
}
|
||||
|
||||
return interval;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Tests to see if time has elapsed
|
||||
* Returns: true if time has elapsed
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
bool timer_interval_expired(
|
||||
struct itimer * t)
|
||||
{
|
||||
bool expired = false;
|
||||
|
||||
if (t) {
|
||||
if (t->interval) {
|
||||
expired = timer_interval_elapsed(t) >= t->interval;
|
||||
}
|
||||
}
|
||||
|
||||
return expired;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Sets the interval value to zero so it never expires
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_no_expire(
|
||||
struct itimer *t)
|
||||
{
|
||||
if (t) {
|
||||
t->interval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Adds another interval to the start time. Used for cyclic
|
||||
* timers that won't lose ticks.
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_reset(
|
||||
struct itimer *t)
|
||||
{
|
||||
if (t) {
|
||||
t->start += t->interval;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Restarts the timer with the same interval
|
||||
* Returns: nothing
|
||||
* Notes: none
|
||||
*************************************************************************/
|
||||
void timer_interval_restart(
|
||||
struct itimer *t)
|
||||
{
|
||||
if (t) {
|
||||
t->start = timer_milliseconds();
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Return the elapsed time
|
||||
* Returns: number of milliseconds elapsed
|
||||
* Notes: only up to 255ms elapsed
|
||||
**************************************************************************/
|
||||
uint8_t timer_milliseconds_delta(
|
||||
uint8_t start)
|
||||
{
|
||||
return (timer_milliseconds_byte() - start);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Description: Mark the start of a delta timer
|
||||
* Returns: mark timer starting tick
|
||||
* Notes: only up to 255ms elapsed
|
||||
**************************************************************************/
|
||||
uint8_t timer_milliseconds_mark(
|
||||
void)
|
||||
{
|
||||
return timer_milliseconds_byte();
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ctest.h"
|
||||
|
||||
static uint32_t Milliseconds;
|
||||
|
||||
uint32_t timer_milliseconds(
|
||||
void)
|
||||
{
|
||||
return Milliseconds;
|
||||
}
|
||||
|
||||
uint32_t timer_milliseconds_set(
|
||||
uint32_t value)
|
||||
{
|
||||
uint32_t old_value = Milliseconds;
|
||||
|
||||
Milliseconds = value;
|
||||
|
||||
return old_value;
|
||||
}
|
||||
|
||||
void testElapsedTimer(
|
||||
Test * pTest)
|
||||
{
|
||||
struct etimer t;
|
||||
uint32_t test_time = 0;
|
||||
|
||||
timer_milliseconds_set(test_time);
|
||||
timer_elapsed_start(&t);
|
||||
ct_test(pTest, timer_elapsed_time(&t) == test_time);
|
||||
test_time = 0xffff;
|
||||
timer_milliseconds_set(test_time);
|
||||
ct_test(pTest, timer_elapsed_time(&t) == test_time);
|
||||
test_time = 0xffffffff;
|
||||
timer_milliseconds_set(test_time);
|
||||
ct_test(pTest, timer_elapsed_time(&t) == test_time);
|
||||
}
|
||||
|
||||
void testIntervalTimer(
|
||||
Test * pTest)
|
||||
{
|
||||
struct itimer t;
|
||||
uint32_t interval = 0;
|
||||
uint32_t test_time = 0;
|
||||
|
||||
timer_milliseconds_set(test_time);
|
||||
timer_interval_start(&t, interval);
|
||||
test_time = 0xffff;
|
||||
timer_milliseconds_set(test_time);
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
ct_test(pTest, timer_interval_elapsed(&t) == test_time);
|
||||
test_time = 0xffffffff;
|
||||
timer_milliseconds_set(test_time);
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
ct_test(pTest, timer_interval_elapsed(&t) == test_time);
|
||||
test_time = 0;
|
||||
timer_milliseconds_set(test_time);
|
||||
interval = 0xffff;
|
||||
timer_interval_start(&t, interval);
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
interval = 0xffffffff;
|
||||
timer_interval_start(&t, interval);
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
|
||||
interval = 0;
|
||||
timer_interval_start_seconds(&t, interval);
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
interval = 60L;
|
||||
timer_interval_start_seconds(&t, interval);
|
||||
interval *= 1000L;
|
||||
ct_test(pTest, timer_interval(&t) == interval);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef TEST_TIMER
|
||||
int main(
|
||||
void)
|
||||
{
|
||||
Test *pTest;
|
||||
bool rc;
|
||||
|
||||
pTest = ct_create("Timer", NULL);
|
||||
|
||||
/* individual tests */
|
||||
rc = ct_addTestFunction(pTest, testElapsedTimer);
|
||||
assert(rc);
|
||||
rc = ct_addTestFunction(pTest, testIntervalTimer);
|
||||
assert(rc);
|
||||
|
||||
|
||||
ct_setStream(pTest, stdout);
|
||||
ct_run(pTest);
|
||||
(void) ct_report(pTest);
|
||||
|
||||
ct_destroy(pTest);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,115 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2009 Steve Karg <skarg@users.sourceforge.net>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*********************************************************************/
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* Timer Module */
|
||||
|
||||
/* elapsed timer structure */
|
||||
struct etimer {
|
||||
uint32_t start;
|
||||
};
|
||||
/* interval timer structure */
|
||||
struct itimer {
|
||||
uint32_t start;
|
||||
uint32_t interval;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* these 3 functions are created in the hardware specific module */
|
||||
void timer_init(
|
||||
void);
|
||||
uint32_t timer_milliseconds(
|
||||
void);
|
||||
uint8_t timer_milliseconds_byte(
|
||||
void);
|
||||
|
||||
/* these functions are in the generic timer.c module */
|
||||
|
||||
/* elapsed timer */
|
||||
void timer_elapsed_start(
|
||||
struct etimer *t);
|
||||
void timer_elapsed_start_offset(
|
||||
struct etimer *t,
|
||||
uint32_t offset);
|
||||
uint32_t timer_elapsed_time(
|
||||
struct etimer *t);
|
||||
bool timer_elapsed_milliseconds(
|
||||
struct etimer *t,
|
||||
uint32_t value);
|
||||
bool timer_elapsed_seconds(
|
||||
struct etimer *t,
|
||||
uint32_t value);
|
||||
bool timer_elapsed_minutes(
|
||||
struct etimer *t,
|
||||
uint32_t value);
|
||||
bool timer_elapsed_milliseconds_short(
|
||||
struct etimer *t,
|
||||
uint16_t value);
|
||||
bool timer_elapsed_seconds_short(
|
||||
struct etimer *t,
|
||||
uint16_t value);
|
||||
bool timer_elapsed_minutes_short(
|
||||
struct etimer *t,
|
||||
uint16_t value);
|
||||
|
||||
/* interval timer */
|
||||
void timer_interval_start(
|
||||
struct itimer *t,
|
||||
uint32_t interval);
|
||||
void timer_interval_start_seconds(
|
||||
struct itimer *t,
|
||||
uint32_t interval);
|
||||
void timer_interval_start_minutes(
|
||||
struct itimer *t,
|
||||
uint32_t interval);
|
||||
bool timer_interval_expired(
|
||||
struct itimer *t);
|
||||
uint32_t timer_interval(
|
||||
struct itimer *t);
|
||||
uint32_t timer_interval_elapsed(
|
||||
struct itimer *t);
|
||||
void timer_interval_no_expire(
|
||||
struct itimer *t);
|
||||
void timer_interval_reset(
|
||||
struct itimer *t);
|
||||
void timer_interval_restart(
|
||||
struct itimer *t);
|
||||
|
||||
/* special for 8-bit microcontrollers - limited to 255ms */
|
||||
uint8_t timer_milliseconds_delta(
|
||||
uint8_t start);
|
||||
uint8_t timer_milliseconds_mark(
|
||||
void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
Reference in New Issue
Block a user