//Globals
#ifdef STM32F767xx
volatile char uartf = 0;
+char buf[128];
#else
struct timeval tv1;
int sock_fd = -1;
bool input_available(){
#ifdef STM32F767xx
- return false;
+ return true;
#else
struct timeval tv;
fd_set fds;
#endif
}
+void write_dpin(uint8_t i, bool b)
+{
+#ifdef STM32F767xx
+#else
+ debug("dwrite %d: %d\n", i, b);
+#endif
+}
+
+bool read_dpin(uint8_t i)
+{
+#ifdef STM32F767xx
+ return false;
+#else
+ debug("dread %d\n", i);
+ return false;
+#endif
+}
+
+void write_apin(uint8_t i, uint8_t a)
+{
+#ifdef STM32F767xx
+ if(i == 1){
+ SET_LED_RED;
+ RESET_LED_BLUE;
+ RESET_LED_GREEN;
+ } else if(i == 2){
+ RESET_LED_RED;
+ SET_LED_BLUE;
+ RESET_LED_GREEN;
+ } else if(i == 3){
+ RESET_LED_RED;
+ RESET_LED_BLUE;
+ SET_LED_GREEN;
+ }
+#else
+ debug("awrite %d: %d\n", i, a);
+#endif
+}
+
+uint8_t read_apin(uint8_t i)
+{
+#ifdef STM32F767xx
+ return 0;
+#else
+ debug("aread %d\n", i);
+ return 0;
+#endif
+}
+
void delay(long ms)
{
#ifdef STM32F767xx