#include "uip.h"
#include "ej1.h"
#include <msp430x16x.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#define          B1                 BIT4&P4IN         //B1 - P4.4
#define          B2                 BIT5&P4IN         //B2 - P4.5
#define          B3                 BIT6&P4IN         //B3 - P4.6
#define          B4                 BIT7&P4IN         //B4 - P4.7


void ej1_3_init(void) {
               uip_listen(HTONS(1234));
	       //"OK"
	       }
	       
void ej1_appcall(void){      
                  if((B1)==0) uip_send("1\n",2);
                  
                  if((B2)==0) uip_send("2\n",2);
                  
                  if((B3)==0) uip_send("3\n",2);
                 
                  if((B4)==0) uip_send("4\n",2);
              }

