aboutsummaryrefslogtreecommitdiffstats
path: root/demos/rt/RT-STM32F429-DISCOVERY/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/rt/RT-STM32F429-DISCOVERY/main.c')
-rw-r--r--demos/rt/RT-STM32F429-DISCOVERY/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/demos/rt/RT-STM32F429-DISCOVERY/main.c b/demos/rt/RT-STM32F429-DISCOVERY/main.c
index 0e96799e1..bb8e7ea2f 100644
--- a/demos/rt/RT-STM32F429-DISCOVERY/main.c
+++ b/demos/rt/RT-STM32F429-DISCOVERY/main.c
@@ -26,7 +26,7 @@
/*
* Red LED blinker thread, times are in milliseconds.
*/
-static WORKING_AREA(waThread1, 128);
+static THD_WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
(void)arg;
@@ -42,7 +42,7 @@ static msg_t Thread1(void *arg) {
/*
* Green LED blinker thread, times are in milliseconds.
*/
-static WORKING_AREA(waThread2, 128);
+static THD_WORKING_AREA(waThread2, 128);
static msg_t Thread2(void *arg) {
(void)arg;
@@ -62,8 +62,8 @@ static msg_t Thread2(void *arg) {
/* Virtual serial port over USB.*/
SerialUSBDriver SDU1;
-#define SHELL_WA_SIZE THD_WA_SIZE(2048)
-#define TEST_WA_SIZE THD_WA_SIZE(256)
+#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048)
+#define TEST_WA_SIZE THD_WORKING_AREA_SIZE(256)
static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
size_t n, size;
@@ -80,8 +80,8 @@ static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
}
static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
- static const char *states[] = {THD_STATE_NAMES};
- Thread *tp;
+ static const char *states[] = {CH_STATE_NAMES};
+ thread_t *tp;
(void)argv;
if (argc > 0) {
@@ -91,23 +91,23 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) {
chprintf(chp, " addr stack prio refs state time\r\n");
tp = chRegFirstThread();
do {
- chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s %lu\r\n",
+ chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s\r\n",
(uint32_t)tp, (uint32_t)tp->p_ctx.r13,
(uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1),
- states[tp->p_state], (uint32_t)tp->p_time);
+ states[tp->p_state]);
tp = chRegNextThread(tp);
} while (tp != NULL);
}
static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
- Thread *tp;
+ thread_t *tp;
(void)argv;
if (argc > 0) {
chprintf(chp, "Usage: test\r\n");
return;
}
- tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(),
+ tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriorityX(),
TestThread, chp);
if (tp == NULL) {
chprintf(chp, "out of memory\r\n");
@@ -136,7 +136,7 @@ static const ShellConfig shell_cfg1 = {
* Application entry point.
*/
int main(void) {
- Thread *shelltp = NULL;
+ thread_t *shelltp = NULL;
/*
* System initializations.
@@ -190,7 +190,7 @@ int main(void) {
}
else {
/* If the previous shell exited.*/
- if (chThdTerminated(shelltp)) {
+ if (chThdTerminatedX(shelltp)) {
/* Recovers memory of the previous shell.*/
chThdRelease(shelltp);
shelltp = NULL;