打开上次制作的工程
#define LED0_PIN GET_PIN(B, 8)
static int stm32_putc(struct rt_serial_device *serial, char c)
注销最后的死循环
做出HEX吓到板子 没有动静!!!
重来一次 找问题
修改MX---修改board。c--ENV做3个指令--直接在编译【之前的2出修改依旧保留着】
看到GPIO可以了
/* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 8)
#define LED1_PIN GET_PIN(B, 9)
int main(void)
{
int count = 1;
/* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);
while (count++)
{
rt_pin_write(LED0_PIN, PIN_HIGH);
rt_pin_write(LED1_PIN, PIN_LOW);
rt_thread_mdelay(500);
rt_pin_write(LED0_PIN, PIN_LOW);
rt_pin_write(LED1_PIN, PIN_HIGH);
rt_thread_mdelay(500);
}
return RT_EOK;
}
但是串口没有输出 寻找问题吧