Documentos de Académico
Documentos de Profesional
Documentos de Cultura
h"
#include <stdint.h>
#include <math.h>
//Configura el PF0,4 COMO entradas (pulsadores)
//SW1 corresponde a PF4
//SW2 corresponde a PF0
void config_portF (void)
{
unsigned int temp ;
SYSCTL_RCGC2_R |= (1<<5) ;
temp= SYSCTL_RCGC2_R ;
GPIO_PORTF_LOCK_R =0x4C4F434B;
GPIO_PORTF_CR_R |=((1<<0)| (1<<4));
GPIO_PORTF_AMSEL_R &= ~ ((1<<1)|(1<<0)|(1<<4));
GPIO_PORTF_PCTL_R&= ~ ((1<<1)|(1<<0)|(1<<4));
GPIO_PORTF_DIR_R &=~ ((1<<0)| (1<<4));
GPIO_PORTF_DIR_R |= 0X02; //PF1 como salida
}while (((GPIO_PORTF_DATA_R)&(1<<0))==1);
}