{"id":634,"date":"2014-02-25T16:59:06","date_gmt":"2014-02-25T07:59:06","guid":{"rendered":"http:\/\/www.gvc-on.net\/?page_id=634"},"modified":"2014-02-25T16:59:06","modified_gmt":"2014-02-25T07:59:06","slug":"gvc%e7%94%a8%e5%85%b1%e9%80%9a%e3%83%98%e3%83%83%e3%83%80%e3%83%95%e3%82%a1%e3%82%a4%e3%83%abgvc_init-h","status":"publish","type":"page","link":"https:\/\/www.gvc-on.net\/?page_id=634","title":{"rendered":"GVC\u7528\u5171\u901a\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb(gvc_init.h)"},"content":{"rendered":"<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\/\/ --------------------------------------------------\r\n\/\/ Global Versatile Controler http:\/\/www.gvc-on.net\/\r\n\/\/ --------------------------------------------------\r\n\/\/ --------------------------------------------------\r\n\/\/ Revision Memo (Y.M.D Editor\/Memo)\r\n\/\/ --------------------------------------------------\r\n\/\/ \r\n\/\/ 2013.05.08 T.Kabu\r\n\/\/ GVC Rev.2\u3068\u3057\u3066\u306e\u3082\u308d\u3082\u308d\u3092\u5b9a\u7fa9\r\n\/\/ \r\n\/\/ --------------------\r\n\/\/ \u4eca\u307e\u3067\u306e\u8a18\u9332\r\n\/\/ 2011.11.04 T.Kabu\r\n\/\/ 2011.11.18 H.A.\r\n\/\/ 2011.12.02 Arduino-IDE VerUp to 1.0\r\n\/\/ 2011.12.13 T.Kabu \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30d9\u30fc\u30b9\u306a\u306e\u3067\u3001\u5b9a\u6570\u3092\u5404\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u5225\u9014\u8a18\u8ff0\u3068\u3057\u305f\r\n\/\/ 2012.01.19 T.Kabu gvcd\u5074\u304b\u3089\u306e\u30b3\u30de\u30f3\u30c9\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3088\u3046\u306b\u3057\u305f\u30d9\u30fc\u30b9\r\n\/\/ 2012.02.07 T.Kabu gvcd\u5074\u304b\u3089GVC\u306b\u5bfe\u3057\u3066\u9001\u3089\u308c\u3066\u304d\u305f\u30b3\u30de\u30f3\u30c9\u3092\u51e6\u7406\u3059\u308b\u3088\u3046\u306b\u3057\u305f\r\n\/\/ 2012.03.02 T.Kabu \u5b9a\u6570\u3084\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306a\u3069\u3092\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306b\u5206\u96e2\u3057\u305f\r\n\/\/ 2012.10.15 T.Kabu Arduino\u306f\u30e1\u30e2\u30ea\u306e\u5236\u9650\u304c\u3042\u308b\u306e\u3067\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u30c6\u30fc\u30d6\u30eb\u3092\u30dd\u30a4\u30f3\u30bf\u69cb\u9020\u4f53\u3068\u3057\u3066\u6271\u3046\u305f\u3081\u30d5\u30a1\u30a4\u30eb\u3092\u5225\u3051\u308b\r\n\/\/ 2013.12.20 T.Kabu \u6e05\u66f8\u3068\u3001\u8d64\u5916\u7dda\u30c7\u30fc\u30bf\u306e\u30b5\u30a4\u30ba\u306e\u95a2\u4fc2\u3067\u6271\u3048\u308b\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u3092\u30d8\u30c3\u30c0\u8fbc\u307f\u3067\u6700\u59271600\u30d0\u30a4\u30c8\u307e\u3067\u306b\u7d71\u4e00\u3059\u308b\r\n\/\/ \r\n\/\/ \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306fArduino\u306eWire\u30e9\u30a4\u30d6\u30e9\u30ea\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u300cgvc.h\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u5bc4\u751f\u8a2d\u7f6e\u3059\u308b\u3053\u3068\r\n\/\/ \u4f8b\u2192C:\\Documents and Settings\\User\\\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\\arduino-1.0\\libraries\\Wire\\gvc.h\r\n\/\/ --------------------\r\n\r\n\/\/---------------------------------------------------\r\n\/\/ include\r\n\/\/---------------------------------------------------\r\n\/\/ Standard Liblary\r\n\/\/ \r\n\/\/ \u3053\u3053\u3067\u306f\u6a19\u6e96\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u307f\u8fbc\u307e\u306a\u3044\u3053\u3068\r\n\/\/ \r\n\r\n\/\/ --------------------------------------------------\r\n\/\/ GVC Parameter define and initialize\r\n\/\/ --------------------------------------------------\r\n\/\/ \u52d5\u4f5c\u78ba\u8a8d\u7528LED\u3092\u63a5\u7d9a\u3059\u308b\u30dd\u30fc\u30c8\r\n#define\tPORT_STATUS_LED\t\tPORTAbits.RA4\r\n#define\tPORT_RESULT_LED\t\tPORTAbits.RA5\r\n\r\n\/\/ STATUS\u7528LED\u3092\u9752\u8272\u3001RESULT\u7528LED\u3092\u8d64\u8272\u3001\u3068\u3057\u3066\u3044\u308b\r\n#define\tPORT_BLUE_LED\t\tPORTAbits.RA4\r\n#define\tPORT_RED_LED\t\tPORTAbits.RA5\r\n\r\n\/\/ \u8d64\u5916\u7dda\u4fe1\u53f7\u53d7\u4fe1\u30dd\u30fc\u30c8\r\n#define\tPORT_IR_RX\t\t\tPORTCbits.RC0\r\n#define\tPORT_IR_TX\t\t\tPORTCbits.RC1\t\t\/\/ \u8d64\u5916\u7ddaLED\u30dd\u30fc\u30c8(0\u30921\u3068\u3057\u3066\u53cd\u8ee2\u51fa\u529b\u3059\u308b\u3053\u3068)\r\n\r\n\/\/ \u8d64\u5916\u7dda\u4fe1\u53f7\u9001\u4fe1\u30dd\u30fc\u30c8(0\u30921\u3068\u3057\u3066\u53cd\u8ee2\u51fa\u529b\u3059\u308b\u3053\u3068)\r\n#define\tPORT_IR_TX\t\t\tPORTCbits.RC1\r\n\r\n\/\/ LED\u306eON\/OFF\u7528\u30b9\u30a4\u30c3\u30c1\r\n#define\tLED_ON\t\t\t\t0;\r\n#define\tLED_OFF\t\t\t\t1;\r\n\r\n\/\/ \u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7\r\n#define GVC_CMD_REQUEST_VERSION\t\t0x01\t\t\/\/ \u30d0\u30fc\u30b8\u30e7\u30f3\u8981\u6c42\u30b3\u30de\u30f3\u30c9\r\n#define GVC_CMD_REQUEST_MODULEINFO\t0x02\t\t\/\/ \u63a5\u7d9a\u30e2\u30b8\u30e5\u30fc\u30eb\u60c5\u5831\u8981\u6c42\u30b3\u30de\u30f3\u30c9\r\n#define GVC_CMD_REQUEST_MODULEDATA\t0x03\t\t\/\/ \u30e2\u30b8\u30e5\u30fc\u30eb\u30c7\u30fc\u30bf\u53d6\u5f97\u8981\u6c42\u30b3\u30de\u30f3\u30c9\r\n#define GVC_MSG_0x04\t\t\t\t0x04\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_ENQ\t\t\t\t\t0x05\t\t\/\/ GVC\u3078\u306e\u5404\u7a2e\u8981\u6c42\r\n#define GVC_MSG_0x06\t\t\t\t0x06\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x07\t\t\t\t0x07\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x08\t\t\t\t0x08\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x09\t\t\t\t0x09\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0a\t\t\t\t0x0a\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0b\t\t\t\t0x0b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0c\t\t\t\t0x0c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0d\t\t\t\t0x0d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0e\t\t\t\t0x0e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x0f\t\t\t\t0x0f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_MSG_0x10\t\t\t\t0x10\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x11\t\t\t\t0x11\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x12\t\t\t\t0x12\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x13\t\t\t\t0x13\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x14\t\t\t\t0x14\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x15\t\t\t\t0x15\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x16\t\t\t\t0x16\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x17\t\t\t\t0x17\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x18\t\t\t\t0x18\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x19\t\t\t\t0x19\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1a\t\t\t\t0x1a\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1b\t\t\t\t0x1b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1c\t\t\t\t0x1c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1d\t\t\t\t0x1d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1e\t\t\t\t0x1e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x1f\t\t\t\t0x1f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_MSG_0x20\t\t\t\t0x20\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_OTHER\t\t\t\t0x21\t\t\/\/ \u5404\u7a2e\u60c5\u5831\u30e1\u30c3\u30bb\u30fc\u30b8\r\n#define GVC_MSG_0x22\t\t\t\t0x22\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x23\t\t\t\t0x23\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x24\t\t\t\t0x24\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x25\t\t\t\t0x25\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x26\t\t\t\t0x26\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x27\t\t\t\t0x27\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x28\t\t\t\t0x28\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x29\t\t\t\t0x29\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2a\t\t\t\t0x2a\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2b\t\t\t\t0x2b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2c\t\t\t\t0x2c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2d\t\t\t\t0x2d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2e\t\t\t\t0x2e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x2f\t\t\t\t0x2f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_MSG_0x30\t\t\t\t0x30\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x31\t\t\t\t0x31\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x32\t\t\t\t0x32\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x33\t\t\t\t0x33\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x34\t\t\t\t0x34\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x35\t\t\t\t0x35\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x36\t\t\t\t0x36\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x37\t\t\t\t0x37\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x38\t\t\t\t0x38\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x39\t\t\t\t0x39\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3a\t\t\t\t0x3a\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3b\t\t\t\t0x3b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3c\t\t\t\t0x3c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3d\t\t\t\t0x3d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3e\t\t\t\t0x3e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x3f\t\t\t\t0x3f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_MSG_0x40\t\t\t\t0x40\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x41\t\t\t\t0x41\t\t\/\/ 'A' Acceleration (TBD)\r\n#define GVC_MSG_0x42\t\t\t\t0x42\t\t\/\/ 'B' xxx (TBD)\r\n#define GVC_MSG_0x43\t\t\t\t0x43\t\t\/\/ 'C' Compass (TBD)\r\n#define GVC_MSG_DIST\t\t\t\t0x44\t\t\/\/ 'D' Distance (TBD)\r\n#define GVC_MSG_0x45\t\t\t\t0x45\t\t\/\/ 'E' xxx (TBD)\r\n#define GVC_MSG_0x46\t\t\t\t0x46\t\t\/\/ 'F' xxx (TBD)\r\n#define GVC_MSG_0x47\t\t\t\t0x47\t\t\/\/ 'G' Gyro (TBD)\r\n#define GVC_MSG_HUMI\t\t\t\t0x48\t\t\/\/ 'H' Humidity (TBD)\r\n#define GVC_MSG_IR\t\t\t\t\t0x49\t\t\/\/ 'I' Infrared (TBD)\r\n#define GVC_MSG_0x4a\t\t\t\t0x4a\t\t\/\/ 'J' xxx (TBD)\r\n#define GVC_MSG_0x4b\t\t\t\t0x4b\t\t\/\/ 'K' xxx (TBD)\r\n#define GVC_MSG_LIGHT\t\t\t\t0x4c\t\t\/\/ 'L' LIGHT (TBD)\r\n#define GVC_MSG_0x4d\t\t\t\t0x4d\t\t\/\/ 'M' xxx (TBD)\r\n#define GVC_MSG_0x4e\t\t\t\t0x4e\t\t\/\/ 'N' xxx (TBD)\r\n#define GVC_MSG_0x4f\t\t\t\t0x4f\t\t\/\/ 'O' xxx (TBD)\r\n\r\n#define GVC_MSG_PRESS\t\t\t\t0x50\t\t\/\/ 'P' Pressure (TBD)\r\n#define GVC_MSG_0x51\t\t\t\t0x51\t\t\/\/ 'Q' xxx (TBD)\r\n#define GVC_MSG_0x52\t\t\t\t0x52\t\t\/\/ 'R' xxx (TBD)\r\n#define GVC_MSG_0x53\t\t\t\t0x53\t\t\/\/ 'S' xxx (TBD)\r\n#define GVC_MSG_TEMP\t\t\t\t0x54\t\t\/\/ 'T' Templeture (TBD)\r\n#define GVC_MSG_0x55\t\t\t\t0x55\t\t\/\/ 'U' xxx (TBD)\r\n#define GVC_MSG_0x56\t\t\t\t0x56\t\t\/\/ 'V' xxx (TBD)\r\n#define GVC_MSG_0x57\t\t\t\t0x57\t\t\/\/ 'W' xxx (TBD)\r\n#define GVC_MSG_0x58\t\t\t\t0x58\t\t\/\/ 'X' xxx (TBD)\r\n#define GVC_MSG_0x59\t\t\t\t0x59\t\t\/\/ 'Y' xxx (TBD)\r\n#define GVC_MSG_0x5a\t\t\t\t0x5a\t\t\/\/ 'Z' xxx (TBD)\r\n#define GVC_MSG_0x5b\t\t\t\t0x5b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x5c\t\t\t\t0x5c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x5d\t\t\t\t0x5d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x5e\t\t\t\t0x5e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x5f\t\t\t\t0x5f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_MSG_0x60\t\t\t\t0x60\t\t\/\/ 'a' xxx (TBD)\r\n#define GVC_MSG_0x61\t\t\t\t0x61\t\t\/\/ 'b' xxx (TBD)\r\n#define GVC_MSG_0x62\t\t\t\t0x62\t\t\/\/ 'c' xxx (TBD)\r\n#define GVC_MSG_0x63\t\t\t\t0x63\t\t\/\/ 'd' xxx (TBD)\r\n#define GVC_MSG_0x64\t\t\t\t0x64\t\t\/\/ 'e' xxx (TBD)\r\n#define GVC_MSG_0x65\t\t\t\t0x65\t\t\/\/ 'f' xxx (TBD)\r\n#define GVC_MSG_0x66\t\t\t\t0x66\t\t\/\/ 'g' xxx (TBD)\r\n#define GVC_MSG_0x67\t\t\t\t0x67\t\t\/\/ 'h' xxx (TBD)\r\n#define GVC_MSG_0x68\t\t\t\t0x68\t\t\/\/ 'X' xxx (TBD)\r\n#define GVC_MSG_0x69\t\t\t\t0x69\t\t\/\/ 'i' xxx (TBD)\r\n#define GVC_MSG_0x6a\t\t\t\t0x6a\t\t\/\/ 'j' xxx (TBD)\r\n#define GVC_MSG_0x6b\t\t\t\t0x6b\t\t\/\/ 'k' xxx (TBD)\r\n#define GVC_MSG_0x6c\t\t\t\t0x6c\t\t\/\/ 'l' xxx (TBD)\r\n#define GVC_MSG_0x6d\t\t\t\t0x6d\t\t\/\/ 'm' xxx (TBD)\r\n#define GVC_MSG_0x6e\t\t\t\t0x6e\t\t\/\/ 'n' xxx (TBD)\r\n#define GVC_MSG_0x6f\t\t\t\t0x6f\t\t\/\/ 'o' xxx (TBD)\r\n\r\n#define GVC_MSG_0x70\t\t\t\t0x70\t\t\/\/ 'p' xxx (TBD)\r\n#define GVC_MSG_0x71\t\t\t\t0x71\t\t\/\/ 'q' xxx (TBD)\r\n#define GVC_MSG_0x72\t\t\t\t0x72\t\t\/\/ 'r' xxx (TBD)\r\n#define GVC_MSG_0x73\t\t\t\t0x73\t\t\/\/ 's' xxx (TBD)\r\n#define GVC_MSG_0x74\t\t\t\t0x74\t\t\/\/ 't' xxx (TBD)\r\n#define GVC_MSG_0x75\t\t\t\t0x75\t\t\/\/ 'u' xxx (TBD)\r\n#define GVC_MSG_0x76\t\t\t\t0x76\t\t\/\/ 'v' xxx (TBD)\r\n#define GVC_MSG_0x77\t\t\t\t0x77\t\t\/\/ 'w' xxx (TBD)\r\n#define GVC_MSG_0x78\t\t\t\t0x78\t\t\/\/ 'x' xxx (TBD)\r\n#define GVC_MSG_0x79\t\t\t\t0x79\t\t\/\/ 'y' xxx (TBD)\r\n#define GVC_MSG_0x7a\t\t\t\t0x7a\t\t\/\/ 'z' xxx (TBD)\r\n#define GVC_MSG_0x7b\t\t\t\t0x7b\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x7c\t\t\t\t0x7c\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x7d\t\t\t\t0x7d\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x7e\t\t\t\t0x7e\t\t\/\/ xxx (TBD)\r\n#define GVC_MSG_0x7f\t\t\t\t0x7f\t\t\/\/ xxx (TBD)\r\n\r\n#define GVC_DEV_00\t\t\t\t\t0\t\t\t\/\/ GVC DEVICE NO 0 (DO NOT USE THIS!!)\r\n#define GVC_DEV_01\t\t\t\t\t1\t\t\t\/\/ GVC DEVICE NO 1\r\n#define GVC_DEV_02\t\t\t\t\t2\t\t\t\/\/ GVC DEVICE NO 2\r\n#define GVC_DEV_03\t\t\t\t\t3\t\t\t\/\/ GVC DEVICE NO 3\r\n#define GVC_DEV_04\t\t\t\t\t4\t\t\t\/\/ GVC DEVICE NO 4\r\n#define GVC_DEV_05\t\t\t\t\t5\t\t\t\/\/ GVC DEVICE NO 5\r\n#define GVC_DEV_06\t\t\t\t\t6\t\t\t\/\/ GVC DEVICE NO 6\r\n#define GVC_DEV_07\t\t\t\t\t7\t\t\t\/\/ GVC DEVICE NO 7\r\n#define GVC_DEV_08\t\t\t\t\t8\t\t\t\/\/ GVC DEVICE NO 8\r\n#define GVC_DEV_09\t\t\t\t\t9\t\t\t\/\/ GVC DEVICE NO 9\r\n\r\n#define GVC_I2C_MESSAGE_HEADER_SIZE\t4\t\t\t\/\/ I2C\u4e0a\u3092\u6d41\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u90e8\u5206(format,cmd,data_len)\u306e\u9577\u3055\r\n#define GVC_SERIAL_MESSAGE_HEADER_SIZE\t6\t\t\/\/ \u30b7\u30ea\u30a2\u30eb\u4e0a\u3092\u6d41\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u90e8\u5206(msg_type, dev_num, format,cmd,data_len)\u306e\u9577\u3055\r\n\r\n#define\tGVC_IR_DATALEN_MAX\t\t\t1568\t\t\/\/ \u8d64\u5916\u7dda\u30c7\u30fc\u30bf\u306e\u6700\u5927\u9577 2013.12.20 \u4eee\u6c7a\u5b9a\r\n\r\n\/\/ GVC\u306e\u5404\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30e1\u30a4\u30f3\/\u30b5\u30d6\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\r\n#define GVC_MAINBUFF_SIZE\t\t\t2560\t\t\/\/ \u30e1\u30a4\u30f3\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\r\n#define GVC_SUBBUFF_SIZE\t\t\t256\t\t\t\/\/ \u30e1\u30a4\u30f3\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\r\n\r\n\/\/ --------------------------------------------------\r\n\/\/ Structure \r\n\/\/ --------------------------------------------------\r\n\/\/  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |\r\n\/\/ ------------------------------\r\n\/\/ GVC I2C MESSAGE (GVC &lt;-I2C-&gt; Module)\r\n\/\/ ------------------------------\r\ntypedef struct _GVC_I2C_MESSAGE_T_\r\n{\r\n\tunsigned char format;\t\t\t\t\t\t\t\t\/\/ format\r\n\tunsigned char cmd;\t\t\t\t\t\t\t\t\t\/\/ cmd\r\n\tunsigned int  data_len;\t\t\t\t\t\t\t\t\/\/ data length\r\n\tunsigned char data&#x5B;];\t\t\t\t\t\t\t\t\/\/ data array (\u6700\u4f4e3\u30d0\u30a4\u30c8\u3067\u3001\u305d\u306e\u6700\u5f8c\u306fchecksum\u304c\u5165\u308b)\r\n} GVC_I2C_MESSAGE_t;\r\n\r\n\r\n\/\/ ------------------------------\r\n\/\/ GVC SERIAL MESSAGE (gvcd &lt;-Serial-&gt; GVC)\r\n\/\/ ------------------------------\r\ntypedef struct _GVC_SERIAL_MESSAGE_T_\r\n{\r\n\tunsigned char msg_type;\t\t\t\t\t\t\t\t\/\/ message type\r\n\tunsigned char dev_num;\t\t\t\t\t\t\t\t\/\/ device number\r\n\tunsigned char format;\t\t\t\t\t\t\t\t\/\/ format\r\n\tunsigned char cmd;\t\t\t\t\t\t\t\t\t\/\/ cmd\r\n\tunsigned int  data_len;\t\t\t\t\t\t\t\t\/\/ data length\r\n\tunsigned char data&#x5B;];\t\t\t\t\t\t\t\t\/\/ data array (\u6700\u4f4e3\u30d0\u30a4\u30c8\u3067\u3001\u305d\u306e\u6700\u5f8c\u306fchecksum\u304c\u5165\u308b)\r\n} GVC_SERIAL_MESSAGE_t;\r\n\/\/ union\u3067\u8907\u6570\u69cb\u6210\u306b\u3057\u3066\u3082\u3044\u3044\u304b\u306a\u3068\u601d\u3063\u305f\u3051\u3069\u3001\u307e\u3041\u305d\u3053\u307e\u3067\u3044\u3058\u308b\u3088\u308a\u3082\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u30dd\u30a4\u30f3\u30bf\u53c2\u7167\u3067\u5165\u308c\u3066\u3044\u3063\u305f\u307b\u3046\u304c\u65e9\u3044\u3057\u2026\r\n\r\n\/\/ --------------------------------------------------\r\n\/\/ Variable Param prototype\r\n\/\/ --------------------------------------------------\r\nextern\tunsigned char reg_SSP1STAT;\t\t\t\t\t\t\/\/ SSP1\u30b9\u30c6\u30fc\u30bf\u30b9\u30ec\u30b8\u30b9\u30bf\r\n\r\n\/\/ --------------------------------------------------\r\n\/\/ Function prototype\r\n\/\/ --------------------------------------------------\r\n\/\/ ------------------------------\r\n\/\/ STATUS LED Brink (ON=300ms\/OFF=100ms)\r\n\/\/ ------------------------------\r\nextern void led_status_brink(char);\r\n\r\n\/\/ ------------------------------\r\n\/\/ RESULT LED Brink (ON=300ms\/OFF=100ms)\r\n\/\/ ------------------------------\r\nextern void led_result_brink(char);\r\n\r\n\/\/ ------------------------------\r\n\/\/ STATUS\/RESULT LED Brink (ON=300ms\/OFF=100ms)\r\n\/\/ ------------------------------\r\nextern void led_brink(char);\r\n\r\n\/\/ ------------------------------\r\n\/\/ LED Brink (Start Up Sign)\r\n\/\/ ------------------------------\r\nextern void led_brink3(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ LED light\r\n\/\/ ------------------------------\r\nextern void led_light(char, char);\r\n\r\n\/\/ ------------------------------\r\n\/\/ CRC8\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8a08\u7b97\r\n\/\/ ------------------------------\r\nextern unsigned char GetCRC8(const void *, size_t);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send CR\r\n\/\/ ------------------------------\r\nextern void send_cr(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send LF\r\n\/\/ ------------------------------\r\nextern void send_lf(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send CR\/LF\r\n\/\/ ------------------------------\r\nextern void send_crlf(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send STR DATA\r\n\/\/ ------------------------------\r\nextern void send_strdata(const char *);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send intdata\r\n\/\/ ------------------------------\r\nextern void send_intdata(int);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send hexdata\r\n\/\/ ------------------------------\r\nextern void send_hexdata(char);\r\n\r\n\/\/ ------------------------------\r\n\/\/ Send DATA\r\n\/\/ ------------------------------\r\nextern void send_serial(const char *, int);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C wait Clear buffer\r\n\/\/ ------------------------------\r\nextern void i2c_waitClearbuffer(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C begin Transmission\r\n\/\/ ------------------------------\r\nextern void i2c_beginTransmission(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C end Transmission\r\n\/\/ ------------------------------\r\nextern void i2c_endTransmission(void);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C write\r\n\/\/ ------------------------------\r\nextern int i2c_write(char, char *, int);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C read\r\n\/\/ ------------------------------\r\nextern int i2c_read(char, char *, int);\r\n\r\n\/\/ ------------------------------\r\n\/\/ I2C Scan\r\n\/\/ ------------------------------\r\nextern char i2c_slave_check(unsigned char);\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; \/\/ Global Versatile Controler http:\/\/www.gvc-on.net\/ \/\/  &hellip; <a href=\"https:\/\/www.gvc-on.net\/?page_id=634\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":622,"menu_order":20,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-634","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/pages\/634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=634"}],"version-history":[{"count":1,"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/pages\/634\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/pages\/634\/revisions\/635"}],"up":[{"embeddable":true,"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=\/wp\/v2\/pages\/622"}],"wp:attachment":[{"href":"https:\/\/www.gvc-on.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}