Stack Overflow на русском Asked on December 22, 2020
не могу настроить шим на RIOT OS. Пытался сделать согласно документации, но ничего не вышло.
#include <stdio.h>
#include "periph/pwm.h"
#define PW_LED PWM_DEV(0)
int main(void) {
printf("%snr", RIOT_APPLICATION);
printf("Boardt%s.nr", RIOT_BOARD);
printf("MCUt%s.nr", RIOT_MCU);
printf("init pwm...");
pwm_init(PW_LED, PWM_RIGHT, 52, 10);
pwm_set(PW_LED, PORT_A, 5);
printf("OKnr");
return 0;
}
Прилетело на порт:
2020-08-09 01:29:52,010 # main(): This is RIOT! (Version: 2020.10-devel-596-g01e6b)
2020-08-09 01:29:52,011 # blink
2020-08-09 01:29:52,013 # Board nucleo-l152re.
2020-08-09 01:29:52,014 # MCU stm32.
2020-08-09 01:29:52,015 # init pwm...OK
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP