当前位置: 首页>>代码示例>>C++>>正文


C++ palSetPad函数代码示例

本文整理汇总了C++中palSetPad函数的典型用法代码示例。如果您正苦于以下问题:C++ palSetPad函数的具体用法?C++ palSetPad怎么用?C++ palSetPad使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了palSetPad函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Thread1

static msg_t Thread1(void *arg) {
    (void)arg;
    chRegSetThreadName("blinker1");
    while (TRUE) {
        palClearPad(GPIOC, GPIOC_LED4);
        chThdSleepMilliseconds(500);
        palSetPad(GPIOC, GPIOC_LED4);
        chThdSleepMilliseconds(500);
    }

    return RDY_OK;
}
开发者ID:dobromyslov,项目名称:stm32f0-chibios-template,代码行数:12,代码来源:main.c

示例2: backlight_set

void backlight_set(uint8_t level) {
    printf("backlight_set(%d)\n", level);
    #ifdef BACKLIGHT_ENABLE
    if (level == 0) {
        // Turn backlight off
        palSetPad(GPIOB, 8);
    } else {
        // Turn backlight on
        palClearPad(GPIOB, 8);
    }
    #endif
}
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:12,代码来源:led.c

示例3: Thread1

static msg_t Thread1(void *arg) {

  (void)arg;
  chRegSetThreadName("blinker");
  while (TRUE) {
    palClearPad(BL_PORT, BL_PIN);
    chThdSleepMilliseconds(30);
    palSetPad(BL_PORT, BL_PIN);
    chThdSleepMilliseconds(30);
  }
 return 0;
}
开发者ID:jharvey,项目名称:rusefi,代码行数:12,代码来源:main.c

示例4: THD_FUNCTION

static THD_FUNCTION(Thread1, arg) {

  (void)arg;
  chRegSetThreadName("Blinker");

  while (true) {
    palClearPad(IOPORT5, PORTE_LED);
    chThdSleepMilliseconds(1000);
    palSetPad(IOPORT5, PORTE_LED);
    chThdSleepMilliseconds(100);
  }
}
开发者ID:rusefi,项目名称:ChibiOS,代码行数:12,代码来源:main.c

示例5: extcb

static void extcb(EXTDriver *extp, expchannel_t channel) {

  (void)extp;
  (void)channel;

  if (PWR->CSR & PWR_CSR_PVDO){ /* voltage lover than threshold */
    palClearPad(GPIOB, GPIOB_LED_B); /* switch off LED*/
  }
  else{
    palSetPad(GPIOB, GPIOB_LED_B); /* switch on LED*/
  }
}
开发者ID:Ankhbayar,项目名称:mlab-chibios,代码行数:12,代码来源:main.c

示例6: rxchar

/*
 * This callback is invoked when a character is received but the application
 * was not ready to receive it, the character is passed as parameter.
 */
static void rxchar(UARTDriver *uartp, uint16_t c) {

  (void)uartp;
  (void)c;
  /* Flashing the LED each time a character is received.*/
  palSetPad(GPIOD, GPIOD_LED4);
  chSysLockFromIsr();
  if (chVTIsArmedI(&vt2))
    chVTResetI(&vt2);
  chVTSetI(&vt2, MS2ST(200), ledoff, NULL);
  chSysUnlockFromIsr();
}
开发者ID:Ozhvankov,项目名称:STM32-GPS-Tracker,代码行数:16,代码来源:main.c

示例7: Thread1

static msg_t Thread1(void *arg) {

  (void)arg;
  chRegSetThreadName("blinker");
  while (TRUE) {
    systime_t time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
    palClearPad(GPIOC, GPIOC_LED1);
    chThdSleepMilliseconds(time);
    palSetPad(GPIOC, GPIOC_LED1);
    chThdSleepMilliseconds(time);
  }
}
开发者ID:mgsdk,项目名称:ChibiOS,代码行数:12,代码来源:main.c

示例8: extcb1

/* Triggered when the button is pressed or released. The LED4 is set to ON.*/
static void extcb1(EXTDriver *extp, expchannel_t channel) {
    static virtual_timer_t vt4;

    (void)extp;
    (void)channel;
    palSetPad(GPIOB, GPIOB_LED4);
    chSysLockFromISR();
    chVTResetI(&vt4);
    /* LED4 set to OFF after 200mS.*/
    chVTDoSetI(&vt4, MS2ST(200), led4off, NULL);
    chSysUnlockFromISR();
}
开发者ID:uavcam,项目名称:ChibiOS,代码行数:13,代码来源:main.c

示例9: Thread1

static msg_t Thread1(void *p) {

  (void)p;
  chRegSetThreadName("blinker");
  while (TRUE) {
    palSetPad(IOPORT2, PIOB_LCD_BL);
    chThdSleepMilliseconds(100);
    palClearPad(IOPORT2, PIOB_LCD_BL);
    chThdSleepMilliseconds(900);
  }
  return 0;
}
开发者ID:CNCBASHER,项目名称:ChibiOS,代码行数:12,代码来源:main.c

示例10: panic

void panic(const char *err)
{
    kfly_error = err;

    while (1)
    {
        palClearPad(GPIOC, GPIOC_LED_ERR);
        chThdSleepMilliseconds(200);
        palSetPad(GPIOC, GPIOC_LED_ERR);
        chThdSleepMilliseconds(200);
    }
}
开发者ID:MauroMombelli,项目名称:KFly_ChibiOS,代码行数:12,代码来源:main.c

示例11: THD_FUNCTION

static THD_FUNCTION(blinkerThread, arg) {
  (void)arg;
  chRegSetThreadName("blinkerThread");

  while(true) {
    systime_t time = USB_DRIVER.state == USB_ACTIVE ? 250 : 500;
    palClearPad(LED_GPIO, LED_PIN);
    chThdSleepMilliseconds(time);
    palSetPad(LED_GPIO, LED_PIN);
    chThdSleepMilliseconds(time);
  }
}
开发者ID:flabbergast,项目名称:chibios-projects,代码行数:12,代码来源:main.c

示例12: Thread1

static msg_t Thread1(void *arg) {

  (void)arg;
  chRegSetThreadName("blinker");
  while (TRUE) {
    palSetPad(GPIOE, GPIOE_LED10_RED);
    chThdSleepMilliseconds(500);
    palClearPad(GPIOE, GPIOE_LED10_RED);
    chThdSleepMilliseconds(500);
  }
  return 0;
}
开发者ID:GuzTech,项目名称:senoko-chibios-3,代码行数:12,代码来源:main.c

示例13: THD_FUNCTION

static THD_FUNCTION(Thread1, arg) {

  (void)arg;

  chRegSetThreadName("blinker");
  while (true) {
    palSetPad(GPIOC, GPIOC_LED);
    chThdSleepMilliseconds(500);
    palClearPad(GPIOC, GPIOC_LED);
    chThdSleepMilliseconds(500);
  }
}
开发者ID:GuzTech,项目名称:senoko-chibios-3,代码行数:12,代码来源:main.c

示例14: Thread2

static msg_t Thread2(void *arg) {

  (void)arg;
  chRegSetThreadName("blinker2");
  while (TRUE) {
    palClearPad(IOPORT1, PA_LEDUSB);
    chThdSleepMilliseconds(200);
    palSetPad(IOPORT1, PA_LEDUSB);
    chThdSleepMilliseconds(300);
  }
  return 0;
}
开发者ID:AbuShaqra,项目名称:chibios-rt-arduino-due,代码行数:12,代码来源:main.c

示例15: THD_FUNCTION

static THD_FUNCTION(Thread1, arg) {

  (void)arg;
  chRegSetThreadName("blinker");
  while (true) {
    systime_t time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
    palClearPad(GPIOA, GPIOA_LED_BLUE);
    chThdSleepMilliseconds(time);
    palSetPad(GPIOA, GPIOA_LED_BLUE);
    chThdSleepMilliseconds(time);
  }
}
开发者ID:Babody,项目名称:ChibiOS,代码行数:12,代码来源:main.c


注:本文中的palSetPad函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。