43 #include "esos_pc_stdio.h"
47 #include <sys/select.h>
58 #define CONFIG_LED1() CONFIG_RB15_AS_DIG_OUTPUT()
61 #define CONFIG_LED1() printf("called CONFIG_LED1()\n");
66 #define WAITING_FOR_FALLING_EDGE ESOS_USER_FLAG_0
67 #define CAPTURED_FLAG ESOS_USER_FLAG_1
73 char psz_CRNL[3]= {0x0D, 0x0A, 0};
74 char psz_prompt[] =
"Press button...";
75 char psz_r1[] =
"Pulse width = ";
76 char psz_r2[] =
"us\n";
80 volatile UINT32 U32_lastCapture;
81 volatile UINT32 U32_thisCapture;
86 CONFIG_RB13_AS_DIG_INPUT();
93 void configTimer23(
void) {
94 T2CON = T2_OFF | T2_IDLE_CON | T2_GATE_OFF
120 u32_delta = U32_thisCapture.
u32 - U32_lastCapture.
u32;
193 __esos_unsafe_PutString( HELLO_MSG );