SJSU One API
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
firmware
default
lib
sys_config.h
Go to the documentation of this file.
1
/*
2
* SocialLedge.com - Copyright (C) 2013
3
*
4
* This file is part of free software framework for embedded processors.
5
* You can use it and/or distribute it as long as this copyright header
6
* remains unmodified. The code is free for personal use and requires
7
* permission to use in a commercial product.
8
*
9
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
10
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
11
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
12
* I SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
13
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
14
*
15
* You can reach the author of this software at :
16
* p r e e t . w i k i @ g m a i l . c o m
17
*/
18
23
#ifndef SYSCONFIG_H_
24
#define SYSCONFIG_H_
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
30
40
#define WIRELESS_NODE_ADDR 106
41
#define WIRELESS_CHANNEL_NUM 2499
42
#define WIRELESS_AIR_DATARATE_KBPS 2000
43
#define WIRELESS_NODE_NAME "node"
44
#define WIRELESS_RX_QUEUE_SIZE 3
45
#define WIRELESS_NODE_ADDR_FILE "naddr"
46
50
#define TERMINAL_USE_NRF_WIRELESS 0
51
#define TERMINAL_END_CHARS {3, 3, 4, 4}
52
#define TERMINAL_USE_CAN_BUS_HANDLER 0
53
54
55
56
#define SYS_CFG_SPI1_CLK_MHZ 24
57
#define SYS_CFG_SPI0_CLK_MHZ 8
58
#define SYS_CFG_I2C2_CLK_KHZ 100
59
60
//#define SYS_CFG_LOG_BOOT_INFO_FILENAME "boot.csv"
62
63
#define SYS_CFG_STARTUP_DELAY_MS 2000
64
#define SYS_CFG_CRASH_STARTUP_DELAY_MS 5000
65
#define SYS_CFG_INITIALIZE_LOGGER 1
66
#define SYS_CFG_LOGGER_TASK_PRIORITY 1
67
#define SYS_CFG_ENABLE_TLM 1
68
#define SYS_CFG_DISK_TLM_NAME "disk"
69
#define SYS_CFG_DEBUG_TLM_NAME "debug"
70
#define SYS_CFG_ENABLE_CFILE_IO 0
71
#define SYS_CFG_MAX_FILES_OPENED 3
72
73
74
82
#define SYS_CFG_SYS_TIMER 1
83
89
#define SYS_CFG_WATCHDOG_TIMEOUT_MS (3 * 1000)
90
96
unsigned
int
sys_get_cpu_clock
();
97
98
111
#define CLOCK_SOURCE_INTERNAL 0
112
#define CLOCK_SOURCE_EXTERNAL 1
113
#define CLOCK_SOURCE_RTC 2
114
#define SYS_CFG_CLOCK_SOURCE CLOCK_SOURCE_INTERNAL
115
117
#define INTERNAL_CLOCK (4 * 1000 * 1000UL)
118
#define EXTERNAL_CLOCK (12 * 1000 * 1000UL)
119
#define RTC_CLOCK (32768UL)
120
121
#define SYS_CFG_DESIRED_CPU_CLK (48 * 1000 * 1000UL)
122
#define SYS_CFG_DEFAULT_CPU_CLK (24 * 1000 * 1000UL)
123
124
125
133
#define SYS_CFG_REDUCED_PRINTF 0
134
#define SYS_CFG_UART0_BPS 38400
135
#define SYS_CFG_UART0_TXQ_SIZE 256
136
144
#define SYS_CFG_RTC_VALID_YEARS_RANGE {2010, 2025}
145
146
147
151
#if (SYS_CFG_ENABLE_TLM)
152
#undef SYS_CFG_ENABLE_CFILE_IO
153
#define SYS_CFG_ENABLE_CFILE_IO 1
154
#endif
155
156
157
158
#ifdef __cplusplus
159
}
160
#endif
161
#endif
/* SYSCONFIG_H_ */
sys_get_cpu_clock
unsigned int sys_get_cpu_clock()
Definition:
sys_clock.cpp:377
Generated by
1.8.11