aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-10-06 09:53:07 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-10-06 09:53:07 +0000
commit00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23 (patch)
tree4f6800f72e8ef9efbf6c2c57214738eda773a1ae /demos
parentd6d799ed48f8193bee286187132221f831726a07 (diff)
downloadChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.tar.gz
ChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.tar.bz2
ChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@40 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/ARM7-LPC214x-GCC/chcore.c2
-rw-r--r--demos/Win32-MSVS/chcore.c4
-rw-r--r--demos/Win32-MinGW/chcore.c4
3 files changed, 8 insertions, 2 deletions
diff --git a/demos/ARM7-LPC214x-GCC/chcore.c b/demos/ARM7-LPC214x-GCC/chcore.c
index 3d72c20db..d06e57657 100644
--- a/demos/ARM7-LPC214x-GCC/chcore.c
+++ b/demos/ARM7-LPC214x-GCC/chcore.c
@@ -145,6 +145,8 @@ void hwinit(void) {
void chSysPause(void) {
+ chThdSetPriority(IDLEPRIO);
+
while (TRUE) {
// Note, it is disabled because it causes trouble with the JTAG probe.
// Enable it in the final code only.
diff --git a/demos/Win32-MSVS/chcore.c b/demos/Win32-MSVS/chcore.c
index bb038a4d6..80fd11424 100644
--- a/demos/Win32-MSVS/chcore.c
+++ b/demos/Win32-MSVS/chcore.c
@@ -35,7 +35,7 @@ void InitCore(void) {
printf("QueryPerformanceFrequency() error");
exit(1);
}
- printf("Core Frequency %d Hz\n", slice.LowPart);
+ printf("Core Frequency %u Hz\n", slice.LowPart);
slice.QuadPart /= CH_FREQUENCY;
QueryPerformanceCounter(&nextcnt);
nextcnt.QuadPart += slice.QuadPart;
@@ -69,6 +69,8 @@ static void ChkIntSources(void) {
void __fastcall chSysPause(void) {
+ chThdSetPriority(IDLEPRIO);
+
while (TRUE) {
ChkIntSources();
diff --git a/demos/Win32-MinGW/chcore.c b/demos/Win32-MinGW/chcore.c
index 77195c44c..4f677b929 100644
--- a/demos/Win32-MinGW/chcore.c
+++ b/demos/Win32-MinGW/chcore.c
@@ -58,7 +58,7 @@ void InitCore(void) {
printf("QueryPerformanceFrequency() error");
exit(1);
}
- printf("Core Frequency %d Hz\n", (int)slice.LowPart);
+ printf("Core Frequency %u Hz\n", (int)slice.LowPart);
slice.QuadPart /= CH_FREQUENCY;
QueryPerformanceCounter(&nextcnt);
nextcnt.QuadPart += slice.QuadPart;
@@ -92,6 +92,8 @@ static void ChkIntSources(void) {
__attribute__((fastcall)) void chSysPause(void) {
+ chThdSetPriority(IDLEPRIO);
+
while (TRUE) {
ChkIntSources();