Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LED_Init ( void ) {
- GPIO_InitTypeDef PORT_InitStruct ; // estructura donde se pone la configuracion deseada
- __HAL_RCC_PORTE_CLK_ENABLE (); // darle reloj al periferico , AHORA VIVE !
- /* Configure the PORT_LED pin */
- PORT_InitStruct.Pin = PORT_PIN_7 ; // pin que desamos configurar
- PORT_InitStruct.Mode = PORT_MODE_OUTPUT_OD ; // lo vamos a usar como salida en open-drain
- PORT_InitStruct.Pull = PORT_NOPULL ; // desactivar pulls
- PORT_InitStruct.Speed = PORT_SPEED_FREQ_LOW ; // actualizacion pin
- HAL_PORT_Init(PORTE,&PORT_InitStruct ); // hacer efectiva configuracion puerto
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement