Hola buenas noches, tengo una duda con una linea de código, la cuál es un bucle while y no tiene las llaves {}, esperando me puedan despejar esa duda les adjunto el código. Gracias.
#include <16f887.h>
#include <stdio.h>
#FUSES NOWDT //No Watch Dog Timer !!!
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT !!!
#FUSES NOPUT //No Power Up Timer
#FUSES NOMCLR //Master Clear pin used for I/O !!!
#FUSES NOPROTECT //Code not protected from reading !!!
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O !!!
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected !!!
#FUSES BORV40 //Brownout reset at 4.0V
#FUSES RESERVED //Used to set the reserved FUSE bits
#use delay(clock=4000000)
#define LARGO 28 //Longitud de la tabla
#define LED PIN_B0
#define ON_OFF PIN_C2
int LETRERO();
void main()
{
setup_comparator(nc_nc_nc_nc);// si puede funcionar como comparador setup_comparator(NC_NC_NC_NC); lo deshabilita, y si te fijas también era viable escribir setup_comparator(NC_NC);
output_low(LED); // Condicion inicial
while(TRUE)
{
if(!input(ON_OFF)) //Esta presionado? Si lo esta entro
{
output_toggle(LED); // Cambio el estado del LED
delay_ms(10); // Delay rebote
while(!input(ON_OFF)); // ESTA ES LA LINEA CON LA CUAL TENGO DUDA, ¿POR QUÉ NO TIENE LLAVES?
}
}