/*auto_address*/ static const unsigned char *cmd_auto_address[]={ (unsigned char []) {0x09,0x3C, 0xFF, 0xF8, 0x78, 0x10, 0x00, 0x00, 0xC0, 0xC3}, NULL }; static const unsigned char *cmd_set_384M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0xF4, 0x00, 0xFF}, NULL }; static const unsigned char *cmd_set_450M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0xB4, 0x00, 0xDE}, NULL }; static const unsigned char *cmd_set_480M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0xB4, 0x00, 0xEF}, NULL }; static const unsigned char *cmd_set_540M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x94, 0x00, 0xE1}, NULL }; static const unsigned char *cmd_set_576M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xBF}, NULL }; static const unsigned char *cmd_set_600M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF,0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x94, 0x00, 0xFA}, NULL }; static const unsigned char *cmd_set_612M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xcb}, NULL }; static const unsigned char *cmd_set_625M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xcf}, NULL }; static const unsigned char *cmd_set_636M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xd3}, NULL }; static const unsigned char *cmd_set_648M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xd7}, NULL }; static const unsigned char *cmd_set_660M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xdb}, NULL }; static const unsigned char *cmd_set_672M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xDF}, NULL }; static const unsigned char *cmd_set_684M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xe3}, NULL }; static const unsigned char *cmd_set_700M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xE7}, NULL }; static const unsigned char *cmd_set_720M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x54, 0x00, 0xB3}, NULL }; static const unsigned char *cmd_set_744M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xf7}, NULL }; static const unsigned char *cmd_set_756M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xfb}, NULL }; static const unsigned char *cmd_set_768M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xdf, 0xb7, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x74, 0x00, 0xff}, NULL }; static const unsigned char *cmd_set_800M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x54, 0x00, 0xC7}, NULL }; static const unsigned char *cmd_set_912M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xCF, 0xB3, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x34, 0x00, 0x97}, NULL }; static const unsigned char *cmd_set_1020M[]={ (unsigned char []) {0x08, 0x3F, 0xFF, 0xF8, 0x30, 0xDF, 0xB5, 0x00, 0x00}, (unsigned char []) {0x08, 0x3C, 0xFF, 0xF8, 0x00, 0x05, 0x34, 0x00, 0xA9}, NULL }; #define ARRAY_LEN 21 struct frequency { int freq; unsigned char *cmd; }fre_array[ARRAY_LEN]={{384, cmd_set_384M}, {450, cmd_set_450M}, {480, cmd_set_480M}, {540, cmd_set_540M}, {576, cmd_set_576M}, {600, cmd_set_600M}, {612, cmd_set_612M}, {625, cmd_set_625M}, {636, cmd_set_636M}, {648, cmd_set_648M}, {660, cmd_set_660M}, {672, cmd_set_672M}, {684, cmd_set_684M}, {700, cmd_set_700M}, {720, cmd_set_720M}, {744, cmd_set_744M}, {756, cmd_set_756M}, {768, cmd_set_768M}, {800, cmd_set_800M}, {912, cmd_set_912M}, {1020,cmd_set_1020M}}; /* reset gcp */ static const unsigned char *gcp_cmd_reset[] = { //(unsigned char[]) {0x10, 0x3c, 0xff, 0xc0, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}, (unsigned char[]) {0x09, 0x3c,0xff, 0xf8, 0x1e,0x02,0x00,0x00,0x00,0xc3}, //reset core (unsigned char[]) {0x09, 0x3c,0xff, 0xf8, 0x1e,0x03,0x00,0x00,0x00,0xc3}, //reset core NULL }; /* commands for single LTC mode */ static const unsigned char *single_cmd_init[] = { /* set # of chips to 5 */ (unsigned char[]) {0x10, 0x3c, 0xff, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}, /* disable btc cores */ (unsigned char[]) {0x18, 0x3c, 0xff, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* enable ltc */ (unsigned char[]) {0x08, 0x3c, 0xff, 0xef, 0x30, 0x20, 0x00, 0x00, 0x00}, NULL }; static const unsigned char *single_cmd_reset[] = { /* reset ltc calculation unit */ (unsigned char[]) {0x08, 0x3c, 0xff, 0x1f, 0x28, 0x16, 0x00, 0x00, 0x00}, /* clear reset */ (unsigned char[]) {0x08, 0x3c, 0xff, 0x1f, 0x28, 0x17, 0x00, 0x00, 0x00}, NULL }; static const unsigned char *firmware_request_cmd[] = { (unsigned char[]) {0x10, 0x3c, 0xff, 0xc0, 0x00, 0x90, 0x90, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00}, NULL };