[KINETIS] Moved time variable definition in blinker thread
This commit is contained in:
parent
17acbeb15f
commit
c523fa6f7a
|
@ -26,12 +26,12 @@ SerialConfig s0cfg = {
|
||||||
*/
|
*/
|
||||||
static THD_WORKING_AREA(waBlinkThread, 128);
|
static THD_WORKING_AREA(waBlinkThread, 128);
|
||||||
static THD_FUNCTION(BlinkThread, arg) {
|
static THD_FUNCTION(BlinkThread, arg) {
|
||||||
|
systime_t time = 500;
|
||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
chRegSetThreadName("blinker");
|
chRegSetThreadName("blinker");
|
||||||
while (true) {
|
while (true) {
|
||||||
systime_t time = 500;
|
|
||||||
palTogglePad(GPIO_LED_BLUE, PIN_LED_BLUE);
|
palTogglePad(GPIO_LED_BLUE, PIN_LED_BLUE);
|
||||||
chThdSleepMilliseconds(time);
|
chThdSleepMilliseconds(time);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,12 +91,12 @@ static const ShellConfig shell_cfg1 = {
|
||||||
*/
|
*/
|
||||||
static THD_WORKING_AREA(waThread1, 128);
|
static THD_WORKING_AREA(waThread1, 128);
|
||||||
static THD_FUNCTION(Thread1, arg) {
|
static THD_FUNCTION(Thread1, arg) {
|
||||||
|
systime_t time;
|
||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
chRegSetThreadName("blinker");
|
chRegSetThreadName("blinker");
|
||||||
while (true) {
|
while (true) {
|
||||||
systime_t time;
|
|
||||||
|
|
||||||
time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
|
time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
|
||||||
palClearPad(GPIO_LED_RED, PIN_LED_RED);
|
palClearPad(GPIO_LED_RED, PIN_LED_RED);
|
||||||
chThdSleepMilliseconds(time);
|
chThdSleepMilliseconds(time);
|
||||||
|
|
|
@ -91,12 +91,12 @@ static const ShellConfig shell_cfg1 = {
|
||||||
*/
|
*/
|
||||||
static THD_WORKING_AREA(waThread1, 128);
|
static THD_WORKING_AREA(waThread1, 128);
|
||||||
static THD_FUNCTION(Thread1, arg) {
|
static THD_FUNCTION(Thread1, arg) {
|
||||||
|
systime_t time;
|
||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
chRegSetThreadName("blinker");
|
chRegSetThreadName("blinker");
|
||||||
while (true) {
|
while (true) {
|
||||||
systime_t time;
|
|
||||||
|
|
||||||
time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
|
time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
|
||||||
palClearPad(GPIO_LED_RED, PIN_LED_RED);
|
palClearPad(GPIO_LED_RED, PIN_LED_RED);
|
||||||
chThdSleepMilliseconds(time);
|
chThdSleepMilliseconds(time);
|
||||||
|
|
Loading…
Reference in New Issue