⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 triton_wled_test.c

📁 OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI的双核处理器
💻 C
字号:
#include "Triton_WLED_test.h"




void triton_WLED_test(void)
{

 MSI2C_InitConnectionAbb();
triton_WLED_A_enable();
triton_WLED_A_control(0x1);//cuurent 0~15,duty 50%
triton_WLED_A_control(0x2);//cuurent 0~15,duty 50%
triton_WLED_A_control(0x3);//cuurent 0~15,duty 50%
//trition_WLED_A_control(0x4);//cuurent 0~15,duty 50%
//trition_WLED_A_control(0x5);//cuurent 0~15,duty 50%
//trition_WLED_A_control(0x6);//cuurent 0~15,duty 50%
 triton_WLED_B_enable();


triton_WLED_B_control(0x1);//cuurent 0~15,duty 50%
triton_WLED_B_control(0x2);//cuurent 0~15,duty 50%
triton_WLED_B_control(0x3);//cuurent 0~15,duty 50%
triton_WLED_B_control(0x4);//cuurent 0~15,duty 50%
//trition_WLED_C_enable();
//trition_WLED_C_control(0x2);//cuurent 0~15,duty 50%

//trition_WLED_A_B_C_enable();


}




void triton_WLED_A_enable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x02);
}

void triton_WLED_B_enable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x08);
}
void triton_WLED_C_enable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x20);
}

void triton_WLED_A_B_C_enable(void)

{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x2A);
}


void triton_WLED_A_disable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x01);
}

void triton_WLED_B_disable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x04);
}
void triton_WLED_C_disable(void)
{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x10);
}

void triton_WLED_A_B_C_disable(void)

{
int previous_content;
MSI2C_AccessPage(WLED_page);
  previous_content = MSI2C_MasterPollingReceiveAbb(AUX_REG_PWDNSTATUS);
 MSI2C_MasterPollingSendAbb(AUX_REG_TOGGLE2,0x15);
}


void triton_WLED_A_control(UWORD8 current)
{
MSI2C_AccessPage(WLED_page);
MSI2C_MasterPollingSendAbb(WLED_CTRL_LEDA,(current<<4)|0x08);
}

void triton_WLED_B_control(UWORD8 current)
{
MSI2C_AccessPage(WLED_page);
MSI2C_MasterPollingSendAbb(WLED_CTRL_LEDB,(current<<4)|0x0f);
}

void triton_WLED_C_control(UWORD8 current)
{
MSI2C_AccessPage(WLED_page);
MSI2C_MasterPollingSendAbb(WLED_CTRL_LEDC,(current<<4)|0x08);
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -