first cut at turnon scripts for EasyTimer v2
[fw/altos] / libaltos / libaltos_common.c
index 6f0cbe6137d898ce2998de3628eb46213cd78575..a2f257358ab973b11dca67e01fdc1413b6e90842 100644 (file)
@@ -89,10 +89,10 @@ static const struct bt_vendor_map altos_bt_vendor_map[] = {
        { .vendor = "00:12:6f:", 1 },   /* Rayson */
        { .vendor = "8c:de:52:", 6 },   /* ISSC */
        { .vendor = "d8:80:39:", 6 },   /* Microchip */
+       { .vendor = "04:91:62:", 6 },   /* New Microchip */
 };
 
 #define NUM_BT_VENDOR_MAP      (sizeof altos_bt_vendor_map / sizeof altos_bt_vendor_map[0])
-#define BT_PORT_DEFAULT                1
 
 static inline int
 ao_tolower(int c) {
@@ -114,19 +114,15 @@ int altos_bt_port(struct altos_bt_device *device) {
                                break;
                }
        }
-       return BT_PORT_DEFAULT;
+       return 0;
 }
 
-#include <time.h>
-
 PUBLIC void
 altos_free(struct altos_file *file)
 {
        int i;
        altos_close(file);
-       for (i = 0; i < 10 && file->busy; i++) {
-               struct timespec delay = { .tv_sec = 1, .tv_nsec = 0 };
-               nanosleep(&delay, NULL);
-       }
+       for (i = 0; i < 10 && file->busy; i++)
+               altos_pause_one_second();
        free(file);
 }