Fixed bug 3579734.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4787 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
950cacebb0
commit
8d9074541c
|
@ -56,7 +56,7 @@ int main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 2 using the driver default configuration.
|
* Activates the serial driver 1 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD1, NULL);
|
sdStart(&SD1, NULL);
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ int main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 2 using the driver default configuration.
|
* Activates the serial driver 1 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD1, NULL);
|
sdStart(&SD1, NULL);
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ int main(void) {
|
||||||
System::Init();
|
System::Init();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 2 using the driver default configuration.
|
* Activates the serial driver 1 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD1, NULL);
|
sdStart(&SD1, NULL);
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ int main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 2 using the driver default configuration.
|
* Activates the serial driver 1 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD1, NULL);
|
sdStart(&SD1, NULL);
|
||||||
|
|
||||||
|
@ -93,7 +93,8 @@ int main(void) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Normal main() thread activity, in this demo it does nothing except
|
* Normal main() thread activity, in this demo it does nothing except
|
||||||
* sleeping in a loop and check the buttons state.
|
* sleeping in a loop and check the buttons state and run test procedure
|
||||||
|
* or print "Hello World!" on serial driver 1.
|
||||||
*/
|
*/
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (!palReadPad(IOPORT1, PA_BUTTON1))
|
if (!palReadPad(IOPORT1, PA_BUTTON1))
|
||||||
|
|
|
@ -209,7 +209,7 @@ int main(void) {
|
||||||
palSetGroupMode(GPIOC, PAL_PORT_BIT(0), 0, PAL_MODE_INPUT_ANALOG);
|
palSetGroupMode(GPIOC, PAL_PORT_BIT(0), 0, PAL_MODE_INPUT_ANALOG);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initializes the PWM driver 1, re-routes the TIM3 outputs, programs the
|
* Initializes the PWM driver 3, re-routes the TIM3 outputs, programs the
|
||||||
* pins as alternate functions.
|
* pins as alternate functions.
|
||||||
* Note, the AFIO access routes the TIM3 output pins on the PC6...PC9
|
* Note, the AFIO access routes the TIM3 output pins on the PC6...PC9
|
||||||
* where the LEDs are connected.
|
* where the LEDs are connected.
|
||||||
|
|
|
@ -335,7 +335,7 @@ int main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 2 using the driver default configuration.
|
* Activates the serial driver 3 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD3, NULL);
|
sdStart(&SD3, NULL);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ static msg_t Thread1(void *arg) {
|
||||||
(void)arg;
|
(void)arg;
|
||||||
chRegSetThreadName("blinker");
|
chRegSetThreadName("blinker");
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
/* TODO */
|
||||||
// palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
|
// palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
// palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
|
// palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
|
||||||
|
@ -54,6 +55,8 @@ int main(void) {
|
||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
|
/* TODO: inialize serial driver 1 or 2 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates the example thread.
|
* Creates the example thread.
|
||||||
*/
|
*/
|
||||||
|
@ -62,10 +65,10 @@ int main(void) {
|
||||||
/*
|
/*
|
||||||
* Normal main() thread activity, in this demo it does nothing except
|
* Normal main() thread activity, in this demo it does nothing except
|
||||||
* sleeping in a loop and check the button state, when the button is
|
* sleeping in a loop and check the button state, when the button is
|
||||||
* pressed the test procedure is launched with output on the serial
|
* pressed the test procedure is launched.
|
||||||
* driver 2.
|
|
||||||
*/
|
*/
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
/* TODO */
|
||||||
// if (palReadPad(GPIOA, GPIOA_BUTTON))
|
// if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
// TestThread(&SD2);
|
// TestThread(&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
|
|
|
@ -151,8 +151,8 @@ static const SPIConfig spi2cfg = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing
|
* This is a periodic thread that reads accelerometer and outputs
|
||||||
* a LED.
|
* result to SPI2 and PWM.
|
||||||
*/
|
*/
|
||||||
static WORKING_AREA(waThread1, 128);
|
static WORKING_AREA(waThread1, 128);
|
||||||
static msg_t Thread1(void *arg) {
|
static msg_t Thread1(void *arg) {
|
||||||
|
@ -306,10 +306,8 @@ int main(void) {
|
||||||
NORMALPRIO + 10, Thread1, NULL);
|
NORMALPRIO + 10, Thread1, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Normal main() thread activity, in this demo it does nothing except
|
* Normal main() thread activity, in this demo it just performs
|
||||||
* sleeping in a loop and check the button state, when the button is
|
* a shell respawn upon its termination.
|
||||||
* pressed the test procedure is launched with output on the serial
|
|
||||||
* driver 2.
|
|
||||||
*/
|
*/
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
if (!shelltp) {
|
if (!shelltp) {
|
||||||
|
|
|
@ -9,10 +9,10 @@ The demo runs on an ST STM32F4-Discovery board.
|
||||||
** The Demo **
|
** The Demo **
|
||||||
|
|
||||||
The demo shows how to use PWM and SPI drivers using synchronous APIs. The PWM
|
The demo shows how to use PWM and SPI drivers using synchronous APIs. The PWM
|
||||||
driver the four board lets with the data read from the LIS320DL accelerometer.
|
driver the four board LEDs with the data read from the LIS320DL accelerometer.
|
||||||
The data is also transmitted on the SPI2 port.
|
The data is also transmitted on the SPI2 port.
|
||||||
By pressing the button located on the board the test procedure is activated
|
A simple command shell is activated on virtual serial port SD2 via USB-CDC
|
||||||
with output on the serial port SD2 (USART2).
|
driver (use micro-USB plug on STM32F4-Discovery board).
|
||||||
|
|
||||||
** Build Procedure **
|
** Build Procedure **
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ I/O is simulated over TCP/IP sockets.
|
||||||
|
|
||||||
The demo listens on the two serial ports, when a connection is detected a
|
The demo listens on the two serial ports, when a connection is detected a
|
||||||
thread is started that serves a small command shell.
|
thread is started that serves a small command shell.
|
||||||
The demo shows how create/terminate threads at runtime, how listen to events,
|
The demo shows how to create/terminate threads at runtime, how to listen to
|
||||||
how ho work with serial ports, how use the messages.
|
events, how to work with serial ports, how to use the messages.
|
||||||
You can develop your ChibiOS/RT application using this demo as a simulator
|
You can develop your ChibiOS/RT application using this demo as a simulator
|
||||||
then you can recompile it for a different architecture.
|
then you can recompile it for a different architecture.
|
||||||
See demo.c for details.
|
See demo.c for details.
|
||||||
|
|
|
@ -53,7 +53,7 @@ void main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 1 using the driver default configuration.
|
* Activates the serial driver 2 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD2, NULL);
|
sdStart(&SD2, NULL);
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ void main(void) {
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Activates the serial driver 1 using the driver default configuration.
|
* Activates the serial driver 2 using the driver default configuration.
|
||||||
*/
|
*/
|
||||||
sdStart(&SD2, NULL);
|
sdStart(&SD2, NULL);
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,9 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 2.5.1 ***
|
*** 2.5.1 ***
|
||||||
|
- FIX: Fixed double chSysInit() call in MSP430F1611 demo (bug 3581304)
|
||||||
|
(backported to 2.2.10 and 2.4.3).
|
||||||
|
- FIX: Fixed patch for various demos (bug 3579734).
|
||||||
- FIX: Fixed bug in abstract file interface (bug 3579660)(backported to
|
- FIX: Fixed bug in abstract file interface (bug 3579660)(backported to
|
||||||
2.2.10 and 2.4.3).
|
2.2.10 and 2.4.3).
|
||||||
- FIX: Fixed wrong type for UART config registers (bug 3579434).
|
- FIX: Fixed wrong type for UART config registers (bug 3579434).
|
||||||
|
|
Loading…
Reference in New Issue