X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=libaltos%2Flibaltos_common.c;h=713a775c6f70c9acee6011705b5aa6256cd06bc2;hb=HEAD;hp=6f0cbe6137d898ce2998de3628eb46213cd78575;hpb=88cf92175a4524143349491a817c9037dd8c39ef;p=fw%2Faltos diff --git a/libaltos/libaltos_common.c b/libaltos/libaltos_common.c index 6f0cbe61..a2f25735 100644 --- a/libaltos/libaltos_common.c +++ b/libaltos/libaltos_common.c @@ -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 - 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); }