S32k312 EVB switch

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,571件の閲覧回数
LEEYM
Contributor III

Hello.

I'm using the S32k312 EVB board

I'm going to use an example of a switch

I don't think the if statement of the main loop is written

 

int main(void)

{

/* Initialize all pins using the Port driver */

Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);

 

Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 1U);

 

if(1 == Siul2_Dio_Ip_ReadPin(SW5_PORT, SW5_PIN) ){

 

Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 0U);

}

else{

Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 1U);

}

 

}



Debugging works properly, but the LED does not turn off when you press the switch.

Is there anything I missed?

 

LEEYM_0-1750381305556.png

 

タグ(1)
0 件の賞賛
返信
1 解決策
1,559件の閲覧回数
LEEYM
Contributor III

I checked, and the switch seems to be working

It seems like the light is not completely extinguished and only the brightness is decreasing..

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,560件の閲覧回数
LEEYM
Contributor III

I checked, and the switch seems to be working

It seems like the light is not completely extinguished and only the brightness is decreasing..

0 件の賞賛
返信