你好,罗迪姆,谢谢你的回答!-)我用和声来创建一个FrRetos应用程序,我也点击了BSP支持。因此,访问DEVE板的代码要么是由协调生成的,要么是包含在其中的一些静态代码。无论是哪种方式,我都不是作者。我在用户手册和代码中看到了,从我所看到的,下面是正确的:ReD1是RH0DEL2上的RH2LeD3是RH1,而实际上是LED的代码:在代码中:对于LED 1位PoPOS=0在代码中:对于LED 2位PoPs=1在代码中:对于LED 3BITPOS=2,这会给LeD2和LeD3带来错误的行为。重新分配BSPHE-LED常量解决了问题:但这意味着BSP码在错误上,据我所知。
以上来自于百度翻译
以下为原文
Hello rodims, Thanks for the answer! :-)
I used Harmony to create a FreeRTOS app and i also clicked for BSP support. So the code that accesses the dev. board is either generated by Harmony or some static code that is included. Either way I am not the author.
I did look in the user manual, and the code, and from what I can see, the following is true:
LED1 is on RH0
LED2 is on RH2
LED3 is on RH1
And the code that actually turns on the LEDs:
PLIB_TEMPLATE void PORTS_PinSet_MCU32_PPS( PORTS_MODULE_ID index , PORTS_CHANNEL channel , PORTS_BIT_POS bitPos )
{
*(&LATBSET + (channel - 1) * 0x40) = 1<
}
In the code: for LED 1 bitpos = 0
In the code: for LED 2 bitpos = 1
In the code: for LED 3 bitpos = 2
And this will give the wrong behaviour for LED2 and LED3. Redifining the BSP_LED constants solves the problem:
typedef enum
{
BSP_LED_3 = 1, //Used to be BSP_LED_3 = 0
BSP_LED_2 = 0, //Used to be BSP_LED_2 = 1
BSP_LED_1 = 2
} BSP_LED;
But that means that the bsp code is in error, as far as I can tell.
/cg