mirror of https://github.com/rusefi/ChibiOS.git
Bug 2890382.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1263 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
bf464a835d
commit
639d957e5e
|
@ -19,15 +19,16 @@
|
|||
|
||||
#include <ch.h>
|
||||
#include <pal.h>
|
||||
#include <serial.h>
|
||||
#include <spi.h>
|
||||
#include <test.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "serial.h"
|
||||
|
||||
/*
|
||||
* Red LEDs blinker thread, times are in milliseconds.
|
||||
*/
|
||||
static WORKING_AREA(waThread1, 128);
|
||||
static WORKING_AREA(waThread1, 512);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
(void)arg;
|
||||
|
@ -40,6 +41,10 @@ static msg_t Thread1(void *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static SPIConfig spicfg = {
|
||||
16, IOPORT1, 4, 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Entry point, note, the main() function is already a thread in the system
|
||||
* on entry.
|
||||
|
@ -59,6 +64,11 @@ int main(int argc, char **argv) {
|
|||
*/
|
||||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||
|
||||
palSetPadMode(IOPORT1, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(IOPORT1, 4);
|
||||
spiStart(&SPID1, &spicfg);
|
||||
spiStop(&SPID1);
|
||||
|
||||
/*
|
||||
* Normal main() thread activity, in this demo it does nothing except
|
||||
* sleeping in a loop and check the button state.
|
||||
|
|
|
@ -92,22 +92,22 @@ void SVCallVector(Thread *otp, Thread *ntp) {
|
|||
asm volatile ("mrs r3, BASEPRI \n\t" \
|
||||
"mrs r12, PSP \n\t" \
|
||||
"stmdb r12!, {r3-r6,r8-r11, lr} \n\t" \
|
||||
"str r12, [%0, #16] \n\t" \
|
||||
"ldr r12, [%1, #16] \n\t" \
|
||||
"str r12, [r0, #16] \n\t" \
|
||||
"ldr r12, [r1, #16] \n\t" \
|
||||
"ldmia r12!, {r3-r6,r8-r11, lr} \n\t" \
|
||||
"msr PSP, r12 \n\t" \
|
||||
"msr BASEPRI, r3 \n\t" \
|
||||
"bx lr" : : "r" (otp), "r" (ntp));
|
||||
"bx lr ");
|
||||
#else
|
||||
asm volatile ("mrs r3, BASEPRI \n\t" \
|
||||
"mrs r12, PSP \n\t" \
|
||||
"stmdb r12!, {r3-r11, lr} \n\t" \
|
||||
"str r12, [%0, #16] \n\t" \
|
||||
"ldr r12, [%1, #16] \n\t" \
|
||||
"str r12, [r0, #16] \n\t" \
|
||||
"ldr r12, [r1, #16] \n\t" \
|
||||
"ldmia r12!, {r3-r11, lr} \n\t" \
|
||||
"msr PSP, r12 \n\t" \
|
||||
"msr BASEPRI, r3 \n\t" \
|
||||
"bx lr" : : "r" (otp), "r" (ntp));
|
||||
"bx lr ");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 1.3.4 ***
|
||||
- FIX: Fixed problem with ARM-CM3 context switch when compiled at level
|
||||
-O0 (bug 2890382).
|
||||
- FIX: Fixed wrong conditional in chschd.c (bug 2888836).
|
||||
- FIX: Fixed wrong macro in chheap.c (bug 2888833).
|
||||
- FIX: Fixed AIC initialization in AT91SAM7X support (bug 2888583).
|
||||
|
|
Loading…
Reference in New Issue