本章目的是把开发板上的3个三色LED灯点亮。
1.硬件连接
先看下硬件的LED接线如下:
由上图可知:
IO_12:LED_G
IO_13:LED_R
IO_14:LED_B
IO输出低电平"0",LED点亮,IO输出高电平"1",LED熄灭。
2.软件编写
在 kendryte-standalone-sdk/src 目录下创建gpio_led文件夹,如下:
main.c 代码如下:
/* Copyright 2018 Canaan Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma