コード例 #1
0
ファイル: btstack_port.c プロジェクト: Sim-jaeil/btstack
// reset Bluetooth using n_shutdown
static void bluetooth_power_cycle(void){
    printf("Bluetooth power cycle Reset ON\n");
    SYS_PORTS_PinClear(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
    msleep(250);
    printf("Bluetooth power cycle Reset OFF\n");
    SYS_PORTS_PinSet(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
}
コード例 #2
0
ファイル: btstack_port.c プロジェクト: Sim-jaeil/btstack
static void sys_tick_handler (  uintptr_t context, uint32_t alarmCount ){
    if (!ledIsOn) {
        ledIsOn = true;
        SYS_PORTS_PinSet(PORTS_ID_0, APP_LED_PORT, APP_LED_PIN);
    }
    else
    {
        ledIsOn = false;
        SYS_PORTS_PinClear(PORTS_ID_0, APP_LED_PORT, APP_LED_PIN);
    }

    (*tick_handler)();
}
コード例 #3
0
void WDRV_GPIO_OutHigh(int board)      
{
    switch (board) {
    case MZ_ESK_BD:
        PLIB_PORTS_PinModePerPortSelect(PORTS_ID_0, WF_TEST_PORT_CHANNEL,WF_TEST_BIT_POS,PORTS_PIN_MODE_DIGITAL);
        PLIB_PORTS_PinDirectionOutputSet(PORTS_ID_0,WF_TEST_PORT_CHANNEL,WF_TEST_BIT_POS);
        SYS_PORTS_PinSet    (PORTS_ID_0, WF_TEST_PORT_CHANNEL,WF_TEST_BIT_POS);
        break;
    case MX_ESK_BD:
        break;
    case EXP16_BD:
        break;
    case MEB2_BD:
        break;
    default:
        WDRV_ASSERT(false, "Unsupported board");
        break;
    }
}
コード例 #4
0
ファイル: timerCallbacks.c プロジェクト: kyleimh/Embedded
void lineTimerCallback( TimerHandle_t pxTimer )
{
    
    outputEvent(LINE_READING_START);
    
    if(!wait)
        if( xTimerStart( lineTimer, 0 ) != pdPASS )
            outputEvent(LINETIMER_NOT_STARTED);
   
    
    //Set Pins to digital output and HIGH
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_B, PORTS_BIT_POS_11);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_B, PORTS_BIT_POS_12);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_B, PORTS_BIT_POS_13);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_G, PORTS_BIT_POS_8);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_A, PORTS_BIT_POS_10);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_F, PORTS_BIT_POS_0);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_F, PORTS_BIT_POS_1);
    SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, PORT_CHANNEL_D, PORTS_BIT_POS_6);
    
    
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_B, PORTS_BIT_POS_11);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_B, PORTS_BIT_POS_13);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_B, PORTS_BIT_POS_12);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_G, PORTS_BIT_POS_8);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_A, PORTS_BIT_POS_10);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_0);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_F, PORTS_BIT_POS_1);
    SYS_PORTS_PinSet(PORTS_ID_0, PORT_CHANNEL_D, PORTS_BIT_POS_6);
    
    //Start timer to charge cap and read data
    validData = false;
    if( xTimerStart( readTimer, 0 ) != pdPASS ){
        outputEvent(READTIMER_NOT_STARTED);
    }
}
コード例 #5
0
static void CS_Deassert()
{
    SYS_PORTS_PinSet(PORTS_ID_0, WF_CS_PORT_CHANNEL, WF_CS_BIT_POS);
}