Commit bb2e984b authored by Projects's avatar Projects

USB mass storage application in release mode.

parent 141383cb
......@@ -294,148 +294,22 @@ static const uint8_t comp_circle_data[] = {
0x20};
const struct rle_bitmap comp_circle = { 80, 80, comp_circle_data };
static const uint8_t battery_data[] = {
0x8d,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x8d,
0x00};
const struct rle_bitmap battery = { 15, 12, battery_data };
static const uint8_t game_ico_data[] = {
0x8f,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x02,
0x83,
0x05,
0x81,
0x01,
0x85,
0x04,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x01,
0x85,
0x04,
0x81,
0x02,
0x83,
0x05,
0x81,
0x0c,
0x8f};
const struct rle_bitmap game_ico = { 15, 15, game_ico_data };
static const uint8_t battery_charging_data[] = {
0x8d,
0x00,
0x80,
0x0b,
static const uint8_t gps_disconnected_data[] = {
0x0a,
0x80,
0x00,
0x0d,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x05,
0x81,
0x03,
0x82,
0x04,
0x84,
0x01,
0x82,
0x00,
0x86,
0x03,
0x82,
0x00,
0x86,
0x03,
0x82,
0x04,
0x84,
0x01,
0x82,
0x05,
0x81,
0x03,
0x82,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x8d,
0x00};
const struct rle_bitmap battery_charging = { 15, 12, battery_charging_data };
static const uint8_t gps_searching_data[] = {
0x0c,
0x80,
0x0c,
0x80,
0x13,
0x82,
0x03,
0x80,
0x05,
0x81,
0x04,
0x81,
0x06,
0x80,
0x05,
0x03,
0x81,
0x03,
0x81,
......@@ -470,2344 +344,2560 @@ static const uint8_t gps_searching_data[] = {
0x08,
0x86,
0x05};
const struct rle_bitmap gps_searching = { 15, 15, gps_searching_data };
const struct rle_bitmap gps_disconnected = { 15, 15, gps_disconnected_data };
static const uint8_t clock_icon_data[] = {
0x03,
0x00,
0x84,
0x07,
0x00,
0x80,
0x04,
static const uint8_t comp_circle3_data[] = {
0x33,
0x90,
0x62,
0x9a,
0x59,
0x89,
0x06,
0x80,
0x00,
0x04,
0x06,
0x89,
0x52,
0x87,
0x0b,
0x80,
0x03,
0x0b,
0x87,
0x4c,
0x86,
0x0f,
0x80,
0x03,
0x0f,
0x86,
0x47,
0x85,
0x12,
0x80,
0x02,
0x00,
0x04,
0x12,
0x85,
0x43,
0x84,
0x15,
0x80,
0x04,
0x00,
0x01,
0x15,
0x84,
0x3f,
0x84,
0x17,
0x80,
0x04,
0x17,
0x84,
0x3b,
0x84,
0x19,
0x80,
0x04,
0x19,
0x84,
0x38,
0x83,
0x1b,
0x80,
0x00,
0x00,
0x05,
0x1b,
0x83,
0x35,
0x83,
0x1d,
0x80,
0x05,
0x00,
0x1d,
0x83,
0x32,
0x83,
0x1e,
0x80,
0x05,
0x1e,
0x83,
0x2f,
0x83,
0x20,
0x80,
0x05,
0x81,
0x05,
0x20,
0x83,
0x2c,
0x83,
0x21,
0x80,
0x05,
0x81,
0x06,
0x21,
0x83,
0x2a,
0x83,
0x22,
0x80,
0x04,
0x22,
0x83,
0x28,
0x82,
0x24,
0x80,
0x00,
0x07,
0x24,
0x82,
0x26,
0x82,
0x25,
0x80,
0x03,
0x00,
0x00,
0x25,
0x82,
0x24,
0x82,
0x26,
0x80,
0x0a,
0x26,
0x82,
0x22,
0x82,
0x27,
0x80,
0x01,
0x00,
0x0a,
0x00,
0x02,
0x27,
0x82,
0x20,
0x83,
0x27,
0x80,
0x08,
0x27,
0x83,
0x1e,
0x82,
0x01,
0x80,
0x04,
0x00,
0x26,
0x80,
0x04,
0x26,
0x80,
0x00,
0x07,
0x00,
0x01,
0x82,
0x00,
0x04};
const struct rle_bitmap clock_icon = { 15, 15, clock_icon_data };
static const uint8_t comp_ico_data[] = {
0x04,
0x80,
0x02,
0x1c,
0x82,
0x03,
0x80,
0x09,
0x81,
0x01,
0x25,
0x80,
0x09,
0x25,
0x80,
0x00,
0x03,
0x82,
0x1a,
0x82,
0x05,
0x80,
0x00,
0x24,
0x80,
0x09,
0x24,
0x80,
0x01,
0x81,
0x09,
0x05,
0x82,
0x18,
0x82,
0x07,
0x80,
0x02,
0x23,
0x80,
0x1a,
0x23,
0x80,
0x0c,
0x07,
0x82,
0x0a,
0x17,
0x82,
0x08,
0x80,
0x00,
0x22,
0x80,
0x00,
0x22,
0x80,
0x0b,
0x08,
0x82,
0x16,
0x82,
0x0a,
0x80,
0x0d,
0x21,
0x80,
0x0d,
0x21,
0x80,
0x0d,
0x0a,
0x82,
0x14,
0x82,
0x0c,
0x80,
0x0d,
0x20,
0x80,
0x0d,
0x20,
0x80,
0x06};
const struct rle_bitmap comp_ico = { 15, 15, comp_ico_data };
static const uint8_t gps_disconnected_data[] = {
0x0a,
0x0c,
0x82,
0x13,
0x81,
0x0e,
0x80,
0x0d,
0x1f,
0x80,
0x0b,
0x84,
0x03,
0x82,
0x04,
0x1f,
0x80,
0x04,
0x0e,
0x81,
0x06,
0x12,
0x82,
0x0f,
0x80,
0x03,
0x81,
0x03,
0x81,
0x06,
0x1e,
0x80,
0x1e,
0x80,
0x0f,
0x82,
0x00,
0x83,
0x06,
0x10,
0x82,
0x02,
0x80,
0x07,
0x83,
0x01,
0x11,
0x80,
0x01,
0x1d,
0x80,
0x05,
0x83,
0x03,
0x1d,
0x80,
0x06,
0x84,
0x00,
0x81,
0x07,
0x85,
0x0a,
0x11,
0x82,
0x0f,
0x81,
0x09,
0x84,
0x08,
0x86,
0x05};
const struct rle_bitmap gps_disconnected = { 15, 15, gps_disconnected_data };
static const uint8_t date_icon_data[] = {
0x10,
0x8a,
0x03,
0x13,
0x80,
0x08,
0x1c,
0x80,
0x03,
0x8a,
0x03,
0x1c,
0x80,
0x08,
0x13,
0x81,
0x0e,
0x82,
0x14,
0x80,
0x03,
0x1b,
0x80,
0x01,
0x83,
0x02,
0x1b,
0x80,
0x03,
0x14,
0x82,
0x0d,
0x81,
0x16,
0x80,
0x04,
0x1a,
0x80,
0x02,
0x1a,
0x80,
0x03,
0x16,
0x81,
0x0c,
0x82,
0x17,
0x80,
0x03,
0x19,
0x80,
0x03,
0x19,
0x80,
0x03,
0x17,
0x82,
0x0b,
0x81,
0x19,
0x80,
0x04,
0x18,
0x80,
0x02,
0x18,
0x80,
0x03,
0x19,
0x81,
0x0a,
0x82,
0x1a,
0x80,
0x01,
0x17,
0x80,
0x01,
0x17,
0x80,
0x02,
0x1a,
0x82,
0x09,
0x81,
0x1c,
0x80,
0x03,
0x16,
0x80,
0x02,
0x16,
0x80,
0x1c,
0x81,
0x01,
0x08,
0x82,
0x03,
0x1d,
0x80,
0x05,
0x15,
0x80,
0x01,
0x15,
0x80,
0x03,
0x1d,
0x82,
0x07,
0x81,
0x1f,
0x80,
0x05,
0x14,
0x80,
0x00,
0x14,
0x80,
0x04,
0x88,
0x12};
const struct rle_bitmap date_icon = { 15, 15, date_icon_data };
static const uint8_t comp_arrow_data[] = {
0x05,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0a,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x08,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x1f,
0x81,
0x07,
0x86,
0x06,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x04,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x02,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x00,
0xad,
0x0c,
0x81,
0x0c,
0x20,
0x80,
0x00,
0x13,
0x80,
0x0a,
0x13,
0x80,
0x01,
0x20,
0x81,
0x06,
0x82,
0x21,
0x80,
0x0a,
0x12,
0x80,
0x01,
0x12,
0x80,
0x0a,
0x21,
0x82,
0x05,
0x81,
0x23,
0x80,
0x01,
0x11,
0x80,
0x0a,
0x11,
0x80,
0x01,
0x23,
0x81,
0x05,
0x81,
0x24,
0x80,
0x0a,
0x10,
0x80,
0x01,
0x10,
0x80,
0x0a,
0x24,
0x81,
0x04,
0x82,
0x25,
0x80,
0x02,
0x0f,
0x80,
0x08,
0x0f,
0x80,
0x25,
0x82,
0x03,
0x81,
0x27,
0x80,
0x08,
0x80,
0x03,
0x0e,
0x80,
0x08,
0x0e,
0x80,
0x27,
0x81,
0x03,
0x81,
0x28,
0x80,
0x08,
0x0d,
0x80,
0x0d,
0x80,
0x28,
0x81,
0x03,
0x81,
0x29,
0x80,
0x08,
0x0c,
0x80,
0x03,
0x0c,
0x80,
0x08,
0x29,
0x81,
0x02,
0x82,
0x2a,
0x80,
0x04,
0x0b,
0x80,
0x06,
0x0b,
0x80,
0x05,
0x2a,
0x82,
0x01,
0x81,
0x2c,
0x80,
0x06,
0x0a,
0x80,
0x05,
0x0a,
0x80,
0x06,
0x2c,
0x81,
0x01,
0x81,
0x2d,
0x80,
0x05,
0x09,
0x80,
0x06,
0x09,
0x80,
0x05,
0x2d,
0x81,
0x01,
0x81,
0x2e,
0x80,
0x06,
0x08,
0x80,
0x06,
0x08,
0x80,
0x04,
0x2e,
0x81,
0x01,
0x81,
0x2f,
0x80,
0x07,
0x80,
0x04,
0x80,
0x07,
0x80,
0x04,
0x2f,
0x81,
0x00,
0x82,
0x30,
0x80,
0x07,
0x06,
0x80,
0x04,
0x06,
0x80,
0x07,
0x30,
0x84,
0x32,
0x80,
0x04,
0x05,
0x80,
0x07,
0x05,
0x80,
0x32,
0x83,
0x33,
0x80,
0x04,
0x80,
0x08,
0x04,
0x80,
0x02,
0x33,
0x83,
0x34,
0x80,
0x09,
0x03,
0x80,
0x02,
0x03,
0x80,
0x09,
0x34,
0x83,
0x35,
0x80,
0x02,
0x80,
0x09,
0x80,
0x02,
0x80,
0x09,
0x35,
0x83,
0x36,
0x80,
0x02,
0x01,
0x80,
0x09,
0x01,
0x80,
0x02,
0x80,
0x0a,
0x36,
0x83,
0x37,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x82,
0x05};
const struct rle_bitmap comp_arrow = { 15, 70, comp_arrow_data };
static const uint8_t comp_circle2_data[] = {
0x33,
0x8f,
0x61,
0x86,
0x0d,
0x86,
0x57,
0x84,
0x19,
0x84,
0x50,
0x83,
0x21,
0x37,
0x83,
0x4b,
0x82,
0x27,
0x82,
0x47,
0x38,
0x82,
0x2b,
0x38,
0xfc,
0x38,
0x82,
0x42,
0x83,
0x2f,
0x38,
0x83,
0x3e,
0x81,
0x35,
0x81,
0x3b,
0x82,
0x37,
0x82,
0x37,
0x82,
0x3b,
0x82,
0x34,
0x81,
0x3f,
0x81,
0x31,
0x82,
0x41,
0x82,
0x2e,
0x81,
0x45,
0x81,
0x2c,
0x81,
0x47,
0x81,
0x2a,
0x81,
0x49,
0x81,
0x27,
0x82,
0x4b,
0x82,
0x24,
0x81,
0x4f,
0x81,
0x22,
0x81,
0x51,
0x81,
0x20,
0x81,
0x53,
0x81,
0x1e,
0x81,
0x55,
0x81,
0x1d,
0x80,
0x57,
0x00,
0x80,
0x1c,
0x81,
0x57,
0x81,
0x1a,
0x81,
0x59,
0x81,
0x18,
0x81,
0x5b,
0x81,
0x16,
0x81,
0x5d,
0x81,
0x15,
0x00,
0x80,
0x5f,
0x37,
0x83,
0x36,
0x80,
0x14,
0x81,
0x5f,
0x81,
0x12,
0x81,
0x61,
0x81,
0x11,
0x01,
0x80,
0x63,
0x01,
0x80,
0x10,
0x81,
0x63,
0x81,
0x0f,
0x36,
0x83,
0x35,
0x80,
0x65,
0x02,
0x80,
0x0e,
0x81,
0x65,
0x81,
0x0c,
0x81,
0x67,
0x81,
0x0b,
0x02,
0x80,
0x69,
0x35,
0x83,
0x34,
0x80,
0x0b,
0x03,
0x80,
0x69,
0x03,
0x80,
0x0a,
0x81,
0x69,
0x81,
0x09,
0x34,
0x83,
0x33,
0x80,
0x6b,
0x04,
0x80,
0x08,
0x81,
0x6b,
0x81,
0x07,
0x04,
0x80,
0x6d,
0x33,
0x83,
0x32,
0x80,
0x06,
0x81,
0x6d,
0x81,
0x05,
0x80,
0x6f,
0x80,
0x05,
0x80,
0x6f,
0x80,
0x04,
0x81,
0x6f,
0x81,
0x03,
0x32,
0x84,
0x30,
0x80,
0x71,
0x06,
0x80,
0x03,
0x06,
0x80,
0x71,
0x30,
0x82,
0x00,
0x81,
0x2f,
0x80,
0x03,
0x07,
0x80,
0x71,
0x07,
0x80,
0x02,
0x81,
0x71,
0x2f,
0x81,
0x01,
0x81,
0x2e,
0x80,
0x73,
0x80,
0x01,
0x08,
0x80,
0x73,
0x08,
0x80,
0x2e,
0x81,
0x01,
0x81,
0x2d,
0x80,
0x73,
0x09,
0x80,
0x09,
0x80,
0x2d,
0x81,
0x01,
0x81,
0x2c,
0x80,
0x73,
0x0a,
0x80,
0x0a,
0x80,
0x2c,
0x81,
0x01,
0x82,
0x2a,
0x80,
0x73,
0x0b,
0x80,
0x00,
0x81,
0x73,
0x0b,
0x80,
0x2a,
0x82,
0x75,
0x02,
0x81,
0x75,
0x29,
0x80,
0x0c,
0x80,
0x0c,
0x80,
0x29,
0x81,
0x75,
0x03,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x28,
0x80,
0x0d,
0x80,
0x0d,
0x80,
0x28,
0x81,
0x75,
0x82,
0x73,
0x03,
0x81,
0x00,
0x80,
0x73,
0x27,
0x80,
0x01,
0x0e,
0x80,
0x73,
0x0e,
0x80,
0x01,
0x27,
0x81,
0x03,
0x82,
0x25,
0x80,
0x73,
0x0f,
0x80,
0x01,
0x0f,
0x80,
0x73,
0x25,
0x82,
0x04,
0x81,
0x24,
0x80,
0x01,
0x10,
0x80,
0x73,
0x10,
0x80,
0x01,
0x24,
0x81,
0x71,
0x05,
0x81,
0x02,
0x23,
0x80,
0x71,
0x11,
0x80,
0x03,
0x11,
0x80,
0x71,
0x23,
0x81,
0x05,
0x82,
0x21,
0x80,
0x03,
0x12,
0x80,
0x71,
0x12,
0x80,
0x03,
0x81,
0x6f,
0x21,
0x82,
0x06,
0x81,
0x04,
0x80,
0x6f,
0x20,
0x80,
0x05,
0x13,
0x80,
0x6f,
0x13,
0x80,
0x05,
0x20,
0x81,
0x6d,
0x07,
0x81,
0x06,
0x1f,
0x80,
0x6d,
0x14,
0x80,
0x07,
0x81,
0x6b,
0x14,
0x80,
0x1f,
0x81,
0x08,
0x07,
0x82,
0x1d,
0x80,
0x6b,
0x15,
0x80,
0x09,
0x81,
0x69,
0x81,
0x0a,
0x15,
0x80,
0x69,
0x1d,
0x82,
0x08,
0x81,
0x1c,
0x80,
0x0b,
0x16,
0x80,
0x69,
0x16,
0x80,
0x0b,
0x81,
0x67,
0x81,
0x0c,
0x81,
0x65,
0x1c,
0x81,
0x0e,
0x09,
0x82,
0x1a,
0x80,
0x65,
0x17,
0x80,
0x0f,
0x81,
0x63,
0x17,
0x80,
0x1a,
0x82,
0x0a,
0x81,
0x10,
0x19,
0x80,
0x63,
0x18,
0x80,
0x11,
0x81,
0x61,
0x81,
0x12,
0x81,
0x5f,
0x18,
0x80,
0x19,
0x81,
0x14,
0x0b,
0x82,
0x17,
0x80,
0x5f,
0x19,
0x80,
0x15,
0x81,
0x5d,
0x19,
0x80,
0x17,
0x82,
0x0c,
0x81,
0x16,
0x81,
0x5b,
0x81,
0x18,
0x81,
0x59,
0x81,
0x80,
0x1a,
0x80,
0x1a,
0x80,
0x16,
0x81,
0x57,
0x0d,
0x82,
0x14,
0x80,
0x1b,
0x80,
0x1b,
0x80,
0x14,
0x82,
0x0e,
0x81,
0x13,
0x80,
0x1c,
0x80,
0x57,
0x1c,
0x80,
0x1d,
0x81,
0x55,
0x13,
0x81,
0x0f,
0x82,
0x11,
0x80,
0x1d,
0x80,
0x1d,
0x80,
0x11,
0x82,
0x10,
0x82,
0x0f,
0x80,
0x1e,
0x80,
0x1e,
0x80,
0x0f,
0x82,
0x12,
0x81,
0x53,
0x0e,
0x80,
0x1f,
0x80,
0x1f,
0x80,
0x0e,
0x81,
0x13,
0x82,
0x0c,
0x80,
0x20,
0x81,
0x51,
0x81,
0x22,
0x81,
0x4f,
0x81,
0x24,
0x80,
0x20,
0x80,
0x0c,
0x82,
0x4b,
0x14,
0x82,
0x27,
0x81,
0x49,
0x81,
0x2a,
0x81,
0x47,
0x81,
0x2c,
0x81,
0x45,
0x81,
0x2e,
0x0a,
0x80,
0x21,
0x80,
0x21,
0x80,
0x0a,
0x82,
0x41,
0x16,
0x82,
0x31,
0x81,
0x3f,
0x81,
0x34,
0x08,
0x80,
0x22,
0x80,
0x22,
0x80,
0x08,
0x82,
0x3b,
0x17,
0x82,
0x37,
0x07,
0x80,
0x23,
0x80,
0x23,
0x80,
0x07,
0x82,
0x37,
0x18,
0x82,
0x3b,
0x81,
0x35,
0x81,
0x3e,
0x05,
0x80,
0x24,
0x80,
0x24,
0x80,
0x05,
0x82,
0x1a,
0x82,
0x03,
0x80,
0x25,
0x80,
0x25,
0x80,
0x03,
0x82,
0x1c,
0x82,
0x01,
0x80,
0x26,
0x80,
0x26,
0x80,
0x01,
0x82,
0x1e,
0x83,
0x2f,
0x27,
0x80,
0x27,
0x83,
0x42,
0x20,
0x82,
0x2b,
0x27,
0x80,
0x27,
0x82,
0x47,
0x22,
0x82,
0x27,
0x26,
0x80,
0x26,
0x82,
0x4b,
0x24,
0x82,
0x25,
0x80,
0x25,
0x82,
0x26,
0x82,
0x24,
0x80,
0x24,
0x82,
0x28,
0x83,
0x22,
0x80,
0x22,
0x83,
0x2a,
0x83,
0x21,
0x80,
0x21,
0x83,
0x50,
0x2c,
0x83,
0x20,
0x80,
0x20,
0x83,
0x2f,
0x83,
0x1e,
0x80,
0x1e,
0x83,
0x32,
0x83,
0x1d,
0x80,
0x1d,
0x83,
0x35,
0x83,
0x1b,
0x80,
0x1b,
0x83,
0x38,
0x84,
0x19,
0x80,
0x19,
0x84,
0x57,
0x3b,
0x84,
0x17,
0x80,
0x17,
0x84,
0x3f,
0x84,
0x15,
0x80,
0x15,
0x84,
0x43,
0x85,
0x12,
0x80,
0x12,
0x85,
0x47,
0x86,
0x0d,
0x0f,
0x80,
0x0f,
0x86,
0x61,
0x8f,
0x4c,
0x87,
0x0b,
0x80,
0x0b,
0x87,
0x52,
0x89,
0x06,
0x80,
0x06,
0x89,
0x59,
0x9a,
0x62,
0x90,
0x33};
const struct rle_bitmap comp_circle2 = { 120, 120, comp_circle2_data };
const struct rle_bitmap comp_circle3 = { 121, 121, comp_circle3_data };
static const uint8_t gps_receiving_data[] = {
0x06,
0x83,
0x0e,
static const uint8_t date_icon_data[] = {
0x10,
0x8a,
0x03,
0x80,
0x08,
0x80,
0x03,
0x8a,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x0a,
0x81,
0x01,
0x83,
0x02,
0x80,
0x03,
0x80,
0x04,
0x82,
0x80,
0x02,
0x80,
0x03,
0x80,
0x01,
0x03,
0x80,
0x03,
0x80,
0x03,
0x80,
0x04,
0x80,
0x02,
0x81,
0x06,
0x80,
0x00,
0x03,
0x80,
0x01,
0x81,
0x03,
0x81,
0x80,
0x01,
0x80,
0x00,
0x02,
0x80,
0x01,
0x82,
0x00,
0x83,
0x03,
0x80,
0x02,
0x81,
0x01,
0x82,
0x02,
0x03,
0x80,
0x07,
0x83,
0x01,
0x05,
0x80,
0x01,
0x80,
0x05,
0x83,
0x03,
0x80,
0x06,
0x84,
0x05,
0x80,
0x00,
0x81,
0x07,
0x85,
0x0a,
0x81,
0x09,
0x84,
0x08,
0x86,
0x05};
const struct rle_bitmap gps_receiving = { 15, 15, gps_receiving_data };
0x80,
0x04,
0x88,
0x12};
const struct rle_bitmap date_icon = { 15, 15, date_icon_data };
static const uint8_t settings_icon_data[] = {
static const uint8_t comp_ico_data[] = {
0x04,
0x80,
0x02,
0x81,
0x0d,
0x81,
0x0c,
0x81,
0x08,
0x80,
0x01,
0x82,
0x08,
0x85,
0x09,
0x85,
0x0c,
0x82,
0x0c,
0x82,
0x0c,
0x82,
0x0c,
0x85,
0x09,
0x85,
0x08,
0x82,
0x81,
0x01,
0x80,
0x08,
0x81,
0x0c,
0x81,
0x0d,
0x81,
0x02};
const struct rle_bitmap settings_icon = { 15, 15, settings_icon_data };
static const uint8_t comp_arrow2_data[] = {
0x05,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0a,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x08,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x06,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x04,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x02,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x80,
0x00,
0xcb,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x80,
0x00,
0x80,
0x0a,
0x09,
0x80,
0x01,
0x81,
0x09,
0x80,
0x0a,
0x02,
0x80,
0x01,
0x1a,
0x80,
0x0c,
0x82,
0x0a,
0x80,
0x01,
0x00,
0x80,
0x0a,
0x00,
0x80,
0x01,
0x0b,
0x80,
0x0a,
0x0d,
0x80,
0x01,
0x0d,
0x80,
0x0a,
0x0d,
0x80,
0x01,
0x0d,
0x80,
0x0a,
0x0d,
0x80,
0x01,
0x06};
const struct rle_bitmap comp_ico = { 15, 15, comp_ico_data };
static const uint8_t gps_receiving_data[] = {
0x06,
0x83,
0x0e,
0x80,
0x0a,
0x80,
0x81,
0x01,
0x80,
0x0a,
0x80,
0x02,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x04,
0x82,
0x03,
0x80,
0x08,
0x01,
0x80,
0x03,
0x02,
0x81,
0x06,
0x80,
0x08,
0x00,
0x80,
0x01,
0x81,
0x03,
0x81,
0x01,
0x80,
0x08,
0x00,
0x80,
0x01,
0x82,
0x00,
0x83,
0x03,
0x80,
0x08,
0x80,
0x04,
0x80,
0x06,
0x01,
0x82,
0x02,
0x80,
0x05,
0x07,
0x83,
0x01,
0x80,
0x06,
0x01,
0x80,
0x05,
0x83,
0x03,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x06,
0x80,
0x04,
0x80,
0x07,
0x80,
0x04,
0x80,
0x84,
0x00,
0x81,
0x07,
0x85,
0x0a,
0x81,
0x09,
0x84,
0x08,
0x86,
0x05};
const struct rle_bitmap gps_receiving = { 15, 15, gps_receiving_data };
static const uint8_t comp_circle2_data[] = {
0x33,
0x8f,
0x61,
0x86,
0x0d,
0x86,
0x57,
0x84,
0x19,
0x84,
0x50,
0x83,
0x21,
0x83,
0x4b,
0x82,
0x27,
0x82,
0x47,
0x82,
0x2b,
0x82,
0x42,
0x83,
0x2f,
0x83,
0x3e,
0x81,
0x35,
0x81,
0x3b,
0x82,
0x37,
0x82,
0x37,
0x82,
0x3b,
0x82,
0x34,
0x81,
0x3f,
0x81,
0x31,
0x82,
0x41,
0x82,
0x2e,
0x81,
0x45,
0x81,
0x2c,
0x81,
0x47,
0x81,
0x2a,
0x81,
0x49,
0x81,
0x27,
0x82,
0x4b,
0x82,
0x24,
0x81,
0x4f,
0x81,
0x22,
0x81,
0x51,
0x81,
0x20,
0x81,
0x53,
0x81,
0x1e,
0x81,
0x55,
0x81,
0x1d,
0x80,
0x04,
0x57,
0x80,
0x07,
0x1c,
0x81,
0x57,
0x81,
0x1a,
0x81,
0x59,
0x81,
0x18,
0x81,
0x5b,
0x81,
0x16,
0x81,
0x5d,
0x81,
0x15,
0x80,
0x04,
0x5f,
0x80,
0x07,
0x14,
0x81,
0x5f,
0x81,
0x12,
0x81,
0x61,
0x81,
0x11,
0x80,
0x04,
0x63,
0x80,
0x07,
0x10,
0x81,
0x63,
0x81,
0x0f,
0x80,
0x04,
0x65,
0x80,
0x07,
0x0e,
0x81,
0x65,
0x81,
0x0c,
0x81,
0x67,
0x81,
0x0b,
0x80,
0x04,
0x69,
0x80,
0x07,
0x0b,
0x80,
0x04,
0x69,
0x80,
0x07,
0x0a,
0x81,
0x69,
0x81,
0x09,
0x80,
0x04,
0x6b,
0x80,
0x08,
0x81,
0x6b,
0x81,
0x07,
0x80,
0x02,
0x80,
0x09,
0x80,
0x02,
0x80,
0x09,
0x6d,
0x80,
0x02,
0x06,
0x81,
0x6d,
0x81,
0x05,
0x80,
0x09,
0x6f,
0x80,
0x02,
0x05,
0x80,
0x09,
0x6f,
0x80,
0x02,
0x04,
0x81,
0x6f,
0x81,
0x03,
0x80,
0x09,
0x71,
0x80,
0x02,
0x03,
0x80,
0x09,
0x71,
0x80,
0x02,
0x03,
0x80,
0x09,
0x71,
0x80,
0x02,
0x81,
0x71,
0x81,
0x01,
0x80,
0x09,
0x73,
0x80,
0x02,
0x01,
0x80,
0x0a,
0x73,
0x80,
0x00,
0x01,
0x80,
0x0b,
0x73,
0x80,
0x00,
0x01,
0x80,
0x0b,
0x73,
0x80,
0x00,
0x01,
0x80,
0x0b,
0x73,
0x80,
0x00,
0x81,
0x73,
0x82,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x81,
0x75,
0x82,
0x73,
0x81,
0x00,
0x80,
0x0b,
0x82,
0x05};
const struct rle_bitmap comp_arrow2 = { 15, 110, comp_arrow2_data };
static const uint8_t comp_circle3_data[] = {
0x33,
0x90,
0x62,
0x9a,
0x59,
0x89,
0x06,
0x80,
0x06,
0x89,
0x52,
0x87,
0x0b,
0x80,
0x0b,
0x87,
0x4c,
0x86,
0x0f,
0x80,
0x0f,
0x86,
0x47,
0x85,
0x12,
0x80,
0x12,
0x85,
0x43,
0x84,
0x15,
0x80,
0x15,
0x84,
0x3f,
0x84,
0x17,
0x80,
0x17,
0x84,
0x3b,
0x84,
0x19,
0x73,
0x80,
0x19,
0x84,
0x38,
0x83,
0x1b,
0x01,
0x80,
0x1b,
0x83,
0x35,
0x83,
0x1d,
0x73,
0x80,
0x1d,
0x83,
0x32,
0x83,
0x1e,
0x01,
0x80,
0x1e,
0x83,
0x2f,
0x83,
0x20,
0x73,
0x80,
0x20,
0x83,
0x2c,
0x83,
0x21,
0x01,
0x80,
0x21,
0x83,
0x2a,
0x83,
0x22,
0x73,
0x80,
0x22,
0x83,
0x28,
0x82,
0x24,
0x01,
0x80,
0x24,
0x82,
0x26,
0x82,
0x25,
0x73,
0x80,
0x25,
0x82,
0x24,
0x82,
0x26,
0x01,
0x81,
0x71,
0x81,
0x02,
0x80,
0x26,
0x82,
0x22,
0x82,
0x27,
0x71,
0x80,
0x27,
0x82,
0x20,
0x83,
0x27,
0x03,
0x80,
0x27,
0x83,
0x1e,
0x82,
0x01,
0x71,
0x80,
0x26,
0x03,
0x80,
0x26,
0x71,
0x80,
0x01,
0x82,
0x1c,
0x82,
0x03,
0x81,
0x6f,
0x81,
0x04,
0x80,
0x25,
0x80,
0x25,
0x6f,
0x80,
0x03,
0x82,
0x1a,
0x82,
0x05,
0x80,
0x24,
0x80,
0x24,
0x6f,
0x80,
0x05,
0x82,
0x18,
0x82,
0x07,
0x80,
0x23,
0x81,
0x6d,
0x81,
0x06,
0x80,
0x23,
0x6d,
0x80,
0x07,
0x82,
0x17,
0x82,
0x81,
0x6b,
0x81,
0x08,
0x80,
0x22,
0x80,
0x22,
0x6b,
0x80,
0x08,
0x82,
0x16,
0x82,
0x09,
0x81,
0x69,
0x81,
0x0a,
0x80,
0x21,
0x80,
0x21,
0x80,
0x0a,
0x82,
0x14,
0x82,
0x0c,
0x69,
0x80,
0x20,
0x0b,
0x80,
0x20,
0x69,
0x80,
0x0b,
0x81,
0x67,
0x81,
0x0c,
0x82,
0x13,
0x81,
0x65,
0x81,
0x0e,
0x80,
0x1f,
0x65,
0x80,
0x1f,
0x0f,
0x81,
0x63,
0x81,
0x10,
0x80,
0x0e,
0x63,
0x80,
0x11,
0x81,
0x61,
0x81,
0x12,
0x82,
0x0f,
0x81,
0x5f,
0x81,
0x14,
0x80,
0x1e,
0x5f,
0x80,
0x1e,
0x80,
0x0f,
0x82,
0x10,
0x82,
0x11,
0x80,
0x1d,
0x80,
0x1d,
0x80,
0x11,
0x82,
0x0f,
0x81,
0x13,
0x80,
0x1c,
0x80,
0x1c,
0x80,
0x13,
0x15,
0x81,
0x0e,
0x82,
0x14,
0x80,
0x1b,
0x80,
0x1b,
0x80,
0x14,
0x82,
0x0d,
0x5d,
0x81,
0x16,
0x80,
0x1a,
0x80,
0x1a,
0x80,
0x16,
0x81,
0x0c,
0x82,
0x17,
0x80,
0x19,
0x80,
0x19,
0x80,
0x17,
0x82,
0x0b,
0x5b,
0x81,
0x19,
0x80,
0x18,
0x80,
0x18,
0x80,
0x19,
0x81,
0x0a,
0x82,
0x1a,
0x80,
0x17,
0x80,
0x17,
0x80,
0x59,
0x81,
0x1a,
0x82,
0x09,
0x81,
0x1c,
0x80,
0x16,
0x80,
0x16,
0x80,
0x1c,
0x57,
0x81,
0x08,
0x82,
0x1d,
0x80,
0x15,
0x1c,
0x80,
0x15,
0x57,
0x80,
0x1d,
0x82,
0x07,
0x81,
0x1f,
0x80,
0x14,
0x80,
0x14,
0x80,
0x1f,
0x55,
0x81,
0x07,
0x1e,
0x81,
0x53,
0x81,
0x20,
0x80,
0x13,
0x80,
0x13,
0x80,
0x20,
0x81,
0x06,
0x82,
0x21,
0x80,
0x12,
0x80,
0x12,
0x80,
0x21,
0x82,
0x05,
0x51,
0x81,
0x23,
0x80,
0x11,
0x80,
0x11,
0x80,
0x23,
0x22,
0x81,
0x05,
0x4f,
0x81,
0x24,
0x80,
0x10,
0x80,
0x10,
0x80,
0x24,
0x81,
0x04,
0x82,
0x25,
0x80,
0x0f,
0x80,
0x0f,
0x80,
0x25,
0x4b,
0x82,
0x03,
0x81,
0x27,
0x80,
0x0e,
0x80,
0x0e,
0x80,
0x27,
0x81,
0x03,
0x81,
0x28,
0x80,
0x0d,
0x80,
0x0d,
0x80,
0x28,
0x81,
0x03,
0x81,
0x29,
0x80,
0x0c,
0x80,
0x0c,
0x80,
0x29,
0x49,
0x81,
0x02,
0x82,
0x2a,
0x80,
0x0b,
0x80,
0x0b,
0x80,
0x2a,
0x82,
0x01,
0x81,
0x2c,
0x80,
0x0a,
0x80,
0x0a,
0x80,
0x47,
0x81,
0x2c,
0x81,
0x01,
0x45,
0x81,
0x2d,
0x80,
0x09,
0x80,
0x09,
0x80,
0x2d,
0x2e,
0x82,
0x41,
0x82,
0x31,
0x81,
0x01,
0x3f,
0x81,
0x2e,
0x80,
0x08,
0x80,
0x08,
0x80,
0x2e,
0x34,
0x82,
0x3b,
0x82,
0x37,
0x82,
0x37,
0x82,
0x3b,
0x81,
0x01,
0x35,
0x81,
0x3e,
0x83,
0x2f,
0x80,
0x07,
0x80,
0x07,
0x80,
0x2f,
0x81,
0x00,
0x83,
0x42,
0x82,
0x30,
0x80,
0x06,
0x80,
0x06,
0x80,
0x30,
0x2b,
0x82,
0x47,
0x82,
0x27,
0x82,
0x4b,
0x83,
0x21,
0x83,
0x50,
0x84,
0x32,
0x19,
0x84,
0x57,
0x86,
0x0d,
0x86,
0x61,
0x8f,
0x33};
const struct rle_bitmap comp_circle2 = { 120, 120, comp_circle2_data };
static const uint8_t comp_arrow_data[] = {
0x05,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0a,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x08,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x06,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x04,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x02,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x00,
0xad,
0x0c,
0x81,
0x0c,
0x80,
0x00,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x02,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x03,
0x80,
0x08,
0x80,
0x04,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x32,
0x83,
0x33,
0x06,
0x80,
0x05,
0x80,
0x06,
0x80,
0x06,
0x80,
0x04,
0x80,
0x07,
0x80,
0x04,
0x80,
0x33,
0x83,
0x34,
0x07,
0x80,
0x03,
0x04,
0x80,
0x03,
0x07,
0x80,
0x34,
0x83,
0x35,
0x04,
0x80,
0x07,
0x80,
0x04,
0x80,
0x07,
0x80,
0x04,
0x80,
0x08,
0x80,
0x02,
0x80,
0x09,
0x80,
0x02,
0x80,
0x09,
0x80,
0x02,
0x80,
0x35,
0x83,
0x36,
0x09,
0x80,
0x01,
0x02,
0x80,
0x01,
0x09,
0x80,
0x36,
0x83,
0x37,
0x02,
0x80,
0x09,
0x80,
0x02,
0x80,
0x0a,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x37,
0x83,
0x38,
0x82,
0x38,
0xfc,
0x38,
0x0b,
0x82,
0x38,
0x83,
0x37,
0x05};
const struct rle_bitmap comp_arrow = { 15, 70, comp_arrow_data };
static const uint8_t usb_ms_icon_data[] = {
0x03,
0x86,
0x07,
0x80,
0x04,
0x80,
0x07,
0x80,
0x00,
0x80,
0x00,
0x80,
0x00,
0x80,
0x07,
0x80,
0x00,
0x80,
0x00,
0x80,
0x00,
0x80,
0x06,
0x88,
0x05,
0x80,
0x06,
0x80,
0x05,
0x80,
0x00,
0x84,
0x00,
0x80,
0x05,
0x80,
0x00,
0x80,
0x02,
0x80,
0x00,
0x80,
0x05,
0x80,
0x00,
0x80,
0x02,
0x80,
0x00,
0x80,
0x05,
0x80,
0x00,
0x80,
0x02,
0x80,
0x00,
0x80,
0x05,
0x80,
0x00,
0x80,
0x02,
0x80,
0x00,
0x80,
0x05,
0x80,
0x00,
0x80,
0x02,
0x80,
0x00,
0x80,
0x05,
0x80,
0x01,
0x82,
0x01,
0x80,
0x06,
0x80,
0x04,
0x80,
0x08,
0x84,
0x04};
const struct rle_bitmap usb_ms_icon = { 15, 15, usb_ms_icon_data };
static const uint8_t battery_data[] = {
0x8d,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x8d,
0x00};
const struct rle_bitmap battery = { 15, 12, battery_data };
static const uint8_t clock_icon_data[] = {
0x03,
0x00,
0x84,
0x07,
0x00,
0x80,
0x04,
0x80,
0x00,
0x04,
0x80,
0x03,
0x80,
0x03,
0x80,
0x02,
0x00,
0x04,
0x80,
0x04,
0x00,
0x01,
0x80,
0x04,
0x80,
0x04,
0x80,
0x00,
0x00,
0x05,
0x80,
0x05,
0x00,
0x80,
0x05,
0x80,
0x05,
0x81,
0x05,
0x80,
0x05,
0x81,
0x06,
0x80,
0x04,
0x80,
0x00,
0x07,
0x80,
0x03,
0x00,
0x00,
0x80,
0x0a,
0x80,
0x01,
0x00,
0x0a,
0x00,
0x02,
0x80,
0x08,
0x80,
0x04,
0x00,
0x80,
0x04,
0x80,
0x00,
0x07,
0x00,
0x82,
0x00,
0x04};
const struct rle_bitmap clock_icon = { 15, 15, clock_icon_data };
static const uint8_t example_icon_data[] = {
0x2e,
0x81,
0x05,
0x81,
0x04,
0x81,
0x05,
0x82,
0x16,
0x80,
0x0d,
0x80,
0x0d,
0x80,
0x08,
0x80,
0x09,
0x80,
0x02,
0x80,
0x08,
0x81,
0x02,
0x81,
0x06,
0x81,
0x04,
0x83,
0x01,
0x82,
0x08,
0x83,
0x14};
const struct rle_bitmap example_icon = { 15, 15, example_icon_data };
static const uint8_t battery_charging_data[] = {
0x8d,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x80,
0x05,
0x81,
0x03,
0x82,
0x04,
0x84,
0x01,
0x82,
0x00,
0x86,
0x03,
0x82,
0x00,
0x86,
0x03,
0x82,
0x04,
0x84,
0x01,
0x82,
0x05,
0x81,
0x03,
0x82,
0x0b,
0x80,
0x00,
0x80,
0x0b,
0x80,
0x00,
0x8d,
0x00};
const struct rle_bitmap battery_charging = { 15, 12, battery_charging_data };
static const uint8_t gps_searching_data[] = {
0x0c,
0x80,
0x0c,
0x80,
0x13,
0x82,
0x03,
0x80,
0x05,
0x81,
0x04,
0x80,
0x05,
0x81,
0x03,
0x81,
0x06,
0x82,
0x00,
0x83,
0x06,
0x82,
0x02,
0x80,
0x07,
0x83,
0x01,
0x80,
0x01,
0x80,
0x05,
0x83,
0x03,
0x80,
0x06,
0x84,
0x00,
0x81,
0x07,
0x85,
0x0a,
0x81,
0x09,
0x84,
0x08,
0x86,
0x05};
const struct rle_bitmap gps_searching = { 15, 15, gps_searching_data };
static const uint8_t settings_icon_data[] = {
0x02,
0x81,
0x0d,
0x81,
0x0c,
0x81,
0x08,
0x80,
0x01,
0x82,
0x08,
0x85,
0x09,
0x85,
0x0c,
0x82,
0x0c,
0x82,
0x0c,
0x82,
0x0c,
0x85,
0x09,
0x85,
0x08,
0x82,
0x01,
0x80,
0x08,
0x81,
0x0c,
0x81,
0x0d,
0x81,
0x02};
const struct rle_bitmap settings_icon = { 15, 15, settings_icon_data };
static const uint8_t game_ico_data[] = {
0x8f,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x02,
0x83,
0x05,
0x81,
0x01,
0x85,
0x04,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x00,
0x87,
0x03,
0x81,
0x01,
0x85,
0x04,
0x81,
0x02,
0x83,
0x05,
0x81,
0x0c,
0x8f};
const struct rle_bitmap game_ico = { 15, 15, game_ico_data };
static const uint8_t comp_arrow2_data[] = {
0x05,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0b,
0x82,
0x0a,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x09,
0x84,
0x08,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x07,
0x86,
0x06,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x05,
0x88,
0x04,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x03,
0x8a,
0x02,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x01,
0x8c,
0x00,
0xcb,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x81,
0x0c,
0x80,
0x00,
0x80,
0x37,
0x83,
0x36,
0x80,
0x01,
0x0a,
0x80,
0x01,
0x80,
0x36,
0x83,
0x35,
0x80,
0x02,
0x80,
0x02,
0x80,
0x35,
0x83,
0x34,
0x80,
0x03,
0x80,
0x03,
0x80,
0x34,
0x83,
0x33,
0x80,
0x04,
0x80,
0x04,
0x80,
0x33,
0x83,
0x32,
0x80,
0x05,
0x80,
0x05,
0x80,
0x32,
0x84,
0x30,
0x80,
0x06,
0x0a,
0x80,
0x06,
0x01,
0x80,
0x30,
0x82,
0x00,
0x81,
0x2f,
0x0a,
0x80,
0x07,
0x01,
0x80,
0x07,
0x0a,
0x80,
0x2f,
0x81,
0x01,
0x81,
0x2e,
0x80,
0x08,
0x80,
0x08,
0x0a,
0x80,
0x2e,
0x81,
0x01,
0x81,
0x2d,
0x80,
0x09,
0x80,
0x09,
0x0a,
0x80,
0x2d,
0x81,
0x01,
0x81,
0x2c,
0x80,
0x0a,
0x80,
0x01,
0x80,
0x0a,
0x80,
0x2c,
0x81,
0x01,
0x82,
0x2a,
0x80,
0x0b,
0x80,
0x0b,
0x0a,
0x80,
0x2a,
0x82,
0x02,
0x81,
0x29,
0x80,
0x0c,
0x80,
0x0c,
0x08,
0x80,
0x29,
0x81,
0x03,
0x81,
0x28,
0x80,
0x0d,
0x80,
0x0d,
0x08,
0x80,
0x28,
0x81,
0x03,
0x81,
0x27,
0x80,
0x0e,
0x80,
0x0e,
0x08,
0x80,
0x27,
0x81,
0x03,
0x82,
0x25,
0x80,
0x0f,
0x80,
0x0f,
0x80,
0x25,
0x82,
0x04,
0x81,
0x24,
0x80,
0x10,
0x80,
0x10,
0x80,
0x24,
0x81,
0x05,
0x81,
0x23,
0x80,
0x11,
0x80,
0x11,
0x80,
0x23,
0x81,
0x05,
0x82,
0x21,
0x80,
0x12,
0x80,
0x12,
0x80,
0x21,
0x82,
0x06,
0x81,
0x20,
0x80,
0x13,
0x80,
0x13,
0x80,
0x20,
0x81,
0x07,
0x81,
0x1f,
0x80,
0x14,
0x80,
0x14,
0x80,
0x1f,
0x81,
0x07,
0x82,
0x1d,
0x80,
0x15,
0x80,
0x15,
0x80,
0x1d,
0x82,
0x08,
0x81,
0x1c,
0x80,
0x16,
0x80,
0x16,
0x80,
0x1c,
0x81,
0x09,
0x82,
0x1a,
0x80,
0x17,
0x03,
0x80,
0x17,
0x08,
0x80,
0x1a,
0x82,
0x0a,
0x81,
0x19,
0x03,
0x80,
0x18,
0x08,
0x80,
0x18,
0x03,
0x80,
0x19,
0x81,
0x0b,
0x82,
0x17,
0x08,
0x80,
0x19,
0x03,
0x80,
0x19,
0x08,
0x80,
0x17,
0x82,
0x0c,
0x81,
0x16,
0x03,
0x80,
0x1a,
0x08,
0x80,
0x1a,
0x04,
0x80,
0x16,
0x81,
0x0d,
0x82,
0x14,
0x06,
0x80,
0x1b,
0x05,
0x80,
0x1b,
0x06,
0x80,
0x14,
0x82,
0x0e,
0x81,
0x13,
0x05,
0x80,
0x1c,
0x06,
0x80,
0x1c,
0x05,
0x80,
0x13,
0x81,
0x0f,
0x82,
0x11,
0x06,
0x80,
0x1d,
0x05,
0x80,
0x1d,
0x06,
0x80,
0x11,
0x82,
0x10,
0x82,
0x0f,
0x05,
0x80,
0x1e,
0x06,
0x80,
0x1e,
0x05,
0x80,
0x0f,
0x82,
0x12,
0x81,
0x0e,
0x06,
0x80,
0x1f,
0x05,
0x80,
0x1f,
0x06,
0x80,
0x0e,
0x81,
0x13,
0x82,
0x0c,
0x05,
0x80,
0x20,
0x06,
0x80,
0x20,
0x06,
0x80,
0x0c,
0x82,
0x14,
0x82,
0x0a,
0x04,
0x80,
0x21,
0x07,
0x80,
0x21,
0x04,
0x80,
0x0a,
0x82,
0x16,
0x82,
0x08,
0x07,
0x80,
0x22,
0x04,
0x80,
0x22,
0x07,
0x80,
0x04,
0x80,
0x08,
0x82,
0x17,
0x82,
0x07,
0x80,
0x23,
0x04,
0x80,
0x23,
0x07,
0x80,
0x04,
0x80,
0x07,
0x82,
0x18,
0x82,
0x05,
0x80,
0x24,
0x04,
0x80,
0x24,
0x07,
0x80,
0x05,
0x82,
0x1a,
0x82,
0x03,
0x04,
0x80,
0x25,
0x07,
0x80,
0x25,
0x04,
0x80,
0x03,
0x82,
0x1c,
0x82,
0x01,
0x08,
0x80,
0x26,
0x02,
0x80,
0x26,
0x09,
0x80,
0x01,
0x82,
0x1e,
0x83,
0x27,
0x02,
0x80,
0x27,
0x83,
0x20,
0x82,
0x27,
0x09,
0x80,
0x27,
0x82,
0x22,
0x82,
0x26,
0x02,
0x80,
0x26,
0x82,
0x24,
0x82,
0x25,
0x09,
0x80,
0x25,
0x82,
0x26,
0x82,
0x24,
0x02,
0x80,
0x24,
0x82,
0x28,
0x83,
0x22,
0x09,
0x80,
0x22,
0x83,
0x2a,
0x83,
0x21,
0x02,
0x80,
0x21,
0x83,
0x2c,
0x83,
0x20,
0x09,
0x80,
0x20,
0x83,
0x2f,
0x83,
0x1e,
0x02,
0x80,
0x1e,
0x83,
0x32,
0x83,
0x1d,
0x09,
0x80,
0x1d,
0x83,
0x35,
0x83,
0x1b,
0x02,
0x80,
0x1b,
0x83,
0x38,
0x84,
0x19,
0x09,
0x80,
0x19,
0x84,
0x3b,
0x84,
0x17,
0x02,
0x80,
0x17,
0x84,
0x3f,
0x84,
0x15,
0x09,
0x80,
0x15,
0x84,
0x43,
0x85,
0x12,
0x02,
0x80,
0x12,
0x85,
0x47,
0x86,
0x0f,
0x0a,
0x80,
0x0f,
0x86,
0x4c,
0x87,
0x0b,
0x00,
0x80,
0x0b,
0x87,
0x52,
0x89,
0x06,
0x80,
0x06,
0x89,
0x59,
0x9a,
0x62,
0x90,
0x33};
const struct rle_bitmap comp_circle3 = { 121, 121, comp_circle3_data };
static const uint8_t example_icon_data[] = {
0x2e,
0x81,
0x05,
0x81,
0x04,
0x81,
0x05,
0x82,
0x16,
0x80,
0x0d,
0x00,
0x80,
0x0d,
0x0b,
0x80,
0x08,
0x00,
0x80,
0x09,
0x0b,
0x80,
0x02,
0x00,
0x80,
0x08,
0x81,
0x02,
0x81,
0x06,
0x81,
0x04,
0x83,
0x01,
0x0b,
0x82,
0x08,
0x83,
0x14};
const struct rle_bitmap example_icon = { 15, 15, example_icon_data };
0x05};
const struct rle_bitmap comp_arrow2 = { 15, 110, comp_arrow2_data };
......@@ -11,20 +11,21 @@ struct rle_bitmap
};
extern const struct rle_bitmap comp_circle;
extern const struct rle_bitmap battery;
extern const struct rle_bitmap game_ico;
extern const struct rle_bitmap battery_charging;
extern const struct rle_bitmap gps_searching;
extern const struct rle_bitmap clock_icon;
extern const struct rle_bitmap comp_ico;
extern const struct rle_bitmap gps_disconnected;
extern const struct rle_bitmap comp_circle3;
extern const struct rle_bitmap date_icon;
extern const struct rle_bitmap comp_arrow;
extern const struct rle_bitmap comp_circle2;
extern const struct rle_bitmap comp_ico;
extern const struct rle_bitmap gps_receiving;
extern const struct rle_bitmap comp_circle2;
extern const struct rle_bitmap comp_arrow;
extern const struct rle_bitmap usb_ms_icon;
extern const struct rle_bitmap battery;
extern const struct rle_bitmap clock_icon;
extern const struct rle_bitmap example_icon;
extern const struct rle_bitmap battery_charging;
extern const struct rle_bitmap gps_searching;
extern const struct rle_bitmap settings_icon;
extern const struct rle_bitmap game_ico;
extern const struct rle_bitmap comp_arrow2;
extern const struct rle_bitmap comp_circle3;
extern const struct rle_bitmap example_icon;
#endif /* BITMAPS_H */
/***************************************************************************//**
* @file msdbot.c
* @brief Implements the host side of the Bulk Only Transport protocol for
* USB Mass Storage class Devices.
* @author Energy Micro AS
* @version 3.20.2
*******************************************************************************
* @section License
* <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
*******************************************************************************
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
* 4. The source and compiled code may only be used on Energy Micro "EFM32"
* microcontrollers and "EFR4" radios.
*
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
* obligation to support this Software. Energy Micro AS is providing the
* Software "AS IS", with no express or implied warranties of any kind,
* including, but not limited to, any implied warranties of merchantability
* or fitness for any particular purpose or warranties against infringement
* of any proprietary rights of a third party.
*
* Energy Micro AS will not be liable for any consequential, incidental, or
* special damages, or any other relief, or for any claim by any third party,
* arising from your use of this Software.
*
*****************************************************************************/
#include "em_usb.h"
#include "msdbot.h"
/** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
#define TIMEOUT_1SEC 1000
#define TIMEOUT_2SEC 2000
#define DEFAULT_TIMEOUT TIMEOUT_2SEC
/* Bulk endpoint "handles". */
static USBH_Ep_TypeDef *epOut = NULL;
static USBH_Ep_TypeDef *epIn = NULL;
/* Bulk transfer timeout scale factor. */
static int timeoutFactor;
/* CSW buffer. */
STATIC_UBUF(csw, CSW_LEN);
static MSDBOT_CSW_TypeDef *pCsw = (MSDBOT_CSW_TypeDef*) csw;
/* Function prototypes. */
static bool CswMeaningful(MSDBOT_CBW_TypeDef *pCbw);
static bool CswValid(MSDBOT_CBW_TypeDef *pCbw);
static void ResetRecovery(void);
/** @endcond */
/***************************************************************************//**
* @brief
* MSDBOT module initialization.
*
* @param[in] out
* Pointer to an MSD bulk OUT endpoint structure.
*
* @param[in] in
* Pointer to an MSD bulk IN endpoint structure.
*
* @return
* @ref MSDBOT_STATUS_OK on success, else @ref MSDBOT_INIT_ERROR.
******************************************************************************/
int MSDBOT_Init(USBH_Ep_TypeDef *out, USBH_Ep_TypeDef *in)
{
/* Check if typedef's are properly packed. */
if ((sizeof(MSDBOT_CBW_TypeDef) != CBW_LEN) ||
(sizeof(MSDBOT_CSW_TypeDef) != CSW_LEN))
{
DEBUG_USB_API_PUTS("\nMSDBOT_Init(), typedef size error");
EFM_ASSERT(false);
return MSDBOT_INIT_ERROR;
}
/* Keep a local copy of bulk IN/OUT endpoint handles. */
epOut = out;
epIn = in;
/* Transfer timeouts are scaled according to device bus speed. */
if (epIn->parentDevice->speed == PORT_FULL_SPEED)
timeoutFactor = 512;
else
timeoutFactor = 64;
return MSDBOT_STATUS_OK;
}
/***************************************************************************//**
* @brief
* Perform an MSD Bulk Only Transfer (BOT).
*
* @param[in] cbw
* Pointer to a Command Block Wrapper (CBW) data structure.
*
* @param[in] data
* Data buffer for data to be transferred.
*
* @return
* A positive (or zero) value indicating the number of bytes transferred.
* @n A negative value indicates a transfer error code enumerated in
* @ref MSDBOT_Status_TypeDef.
******************************************************************************/
int MSDBOT_Xfer(void* cbw, void* data)
{
uint32_t len;
int timeout, result, direction, retVal;
MSDBOT_CBW_TypeDef *pCbw = (MSDBOT_CBW_TypeDef*) cbw;
/* Send CBW. */
result = USBH_WriteB(epOut, cbw, CBW_LEN, DEFAULT_TIMEOUT);
if (result != CBW_LEN)
{
ResetRecovery();
return MSDBOT_XFER_ERROR;
}
retVal = 0;
direction = pCbw->Direction;
len = pCbw->dCBWDataTransferLength;
/* Send/receive data (optional phase). */
if (len)
{
timeout = DEFAULT_TIMEOUT + (len / timeoutFactor);
if (direction)
result = USBH_ReadB(epIn, data, len, timeout);
else
result = USBH_WriteB(epOut, data, len, timeout);
retVal = result;
if (result == USB_STATUS_EP_STALLED)
{
if (direction)
USBH_UnStallEpB(epIn);
else
USBH_UnStallEpB(epOut);
}
else if (result <= 0)
{
ResetRecovery();
return MSDBOT_XFER_ERROR;
}
}
/* Retrieve CSW. */
result = USBH_ReadB(epIn, csw, CSW_LEN, DEFAULT_TIMEOUT);
if (result != CSW_LEN)
{
if (result == USB_STATUS_EP_STALLED)
{
if (direction)
USBH_UnStallEpB(epIn);
else
USBH_UnStallEpB(epOut);
result = USBH_ReadB(epIn, csw, CSW_LEN, DEFAULT_TIMEOUT);
if (result != CSW_LEN)
{
ResetRecovery();
return MSDBOT_XFER_ERROR;
}
}
else
{
ResetRecovery();
return MSDBOT_XFER_ERROR;
}
}
if (CswValid(pCbw) && CswMeaningful(pCbw))
{
if (pCsw->bCSWStatus == USB_CLASS_MSD_CSW_CMDPASSED)
{
return retVal;
}
return MSDBOT_CMD_FAILED;
}
ResetRecovery();
return MSDBOT_XFER_ERROR;
}
/** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
/***************************************************************************//**
* @brief
* Check if a Command Status Wrapper (CSW) is meaningful.
* The term "meaningful" is defined in the MSD BOT standard.
*
* @param[in] cbw
* Pointer to a Command Block Wrapper (CBW) data structure.
*
* @return
* True if the CSW is meaningful, false otherwise.
******************************************************************************/
static bool CswMeaningful(MSDBOT_CBW_TypeDef *cbw)
{
if (((pCsw->bCSWStatus == USB_CLASS_MSD_CSW_CMDPASSED) ||
(pCsw->bCSWStatus == USB_CLASS_MSD_CSW_CMDFAILED)) &&
(pCsw->dCSWDataResidue <= cbw->dCBWDataTransferLength))
return true;
return false;
}
/***************************************************************************//**
* @brief
* Check if a Command Status Wrapper (CSW) is valid.
* The term "valid" is defined in the MSD BOT standard.
*
* @param[in] cbw
* Pointer to a Command Block Wrapper (CBW) data structure.
*
* @return
* True if the CSW is valid, false otherwise.
******************************************************************************/
static bool CswValid(MSDBOT_CBW_TypeDef *cbw)
{
if ((pCsw->dCSWSignature == CSW_SIGNATURE) &&
(pCsw->dCSWTag == cbw->dCBWTag))
return true;
return false;
}
/***************************************************************************//**
* @brief
* Perform an MSD BOT reset recovery operation.
******************************************************************************/
static void ResetRecovery(void)
{
USBH_ControlMsgB(&epIn->parentDevice->ep0,
USB_SETUP_DIR_H2D | USB_SETUP_RECIPIENT_INTERFACE |
USB_SETUP_TYPE_CLASS_MASK, /* bmRequestType */
USB_MSD_BOTRESET, /* bRequest */
0, /* wValue */
0, /* wIndex */
0, /* wLength */
NULL, /* void* data */
TIMEOUT_1SEC); /* int timeout */
USBH_UnStallEpB(epIn);
USBH_UnStallEpB(epOut);
}
/** @endcond */
/***************************************************************************//**
* @file msdscsi.c
* @brief SCSI interface for Mass Storage Devices (MSD).
* @author Energy Micro AS
* @version 3.20.2
*******************************************************************************
* @section License
* <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
*******************************************************************************
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
* 4. The source and compiled code may only be used on Energy Micro "EFM32"
* microcontrollers and "EFR4" radios.
*
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
* obligation to support this Software. Energy Micro AS is providing the
* Software "AS IS", with no express or implied warranties of any kind,
* including, but not limited to, any implied warranties of merchantability
* or fitness for any particular purpose or warranties against infringement
* of any proprietary rights of a third party.
*
* Energy Micro AS will not be liable for any consequential, incidental, or
* special damages, or any other relief, or for any claim by any third party,
* arising from your use of this Software.
*
*****************************************************************************/
#include "em_usb.h"
#include "msdscsi.h"
#include "msdbot.h"
/** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Read10 command.
*****************************************************************************/
#define CBW_SCSI_READ10_INIT_DEFAULT \
{ \
CBW_SIGNATURE, /* CBW Signature, ascii USBC */ \
0x78563412, /* CBW Tag */ \
0x00000000, /* CBW Data Transfer Length */ \
{ { 0, 0, 1 } }, /* CBW Flags */ \
{ { 0, 0 } }, /* CBW Lun */ \
{ { 10, 0 } }, /* CBW CBLength */ \
{ SCSI_READ10, /* CBW CB */ \
0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0 } \
}
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Write10 command.
*****************************************************************************/
#define CBW_SCSI_WRITE10_INIT_DEFAULT \
{ \
CBW_SIGNATURE, /* CBW Signature, ascii USBC */ \
0x78563412, /* CBW Tag */ \
0x00000000, /* CBW Data Transfer Length */ \
{ { 0, 0, 0 } }, /* CBW Flags */ \
{ { 0, 0 } }, /* CBW Lun */ \
{ { 10, 0 } }, /* CBW CBLength */ \
{ SCSI_WRITE10, /* CBW CB */ \
0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0 } \
}
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Inquiry command.
*****************************************************************************/
EFM32_ALIGN(4)
static const char cbwInquiry[ CBW_LEN ] __attribute__ ((aligned(4))) =
{
'U', 'S', 'B', 'C', /* CBW Signature */
0x12, 0x34, 0x56, 0x78, /* CBW Tag */
SCSI_INQUIRYDATA_LEN, /* CBW Data Transfer Length */
0x00, 0x00, 0x00,
BOT_DIR_IN, 0x00, 6, /* CBW Flags, CBW Lun, CBW CB Length */
SCSI_INQUIRY, 0x00, 0x00, /* 6 byte CBW CB */
0x00, SCSI_INQUIRYDATA_LEN,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
};
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Read Capacity command.
*****************************************************************************/
EFM32_ALIGN(4)
static const char cbwReadCap[ CBW_LEN ] __attribute__ ((aligned(4))) =
{
'U', 'S', 'B', 'C', /* CBW Signature */
0x12, 0x34, 0x56, 0x78, /* CBW Tag */
SCSI_READCAPACITYDATA_LEN, /* CBW Data Transfer Length */
0x00, 0x00, 0x00,
BOT_DIR_IN, 0x00, 10, /* CBW Flags, CBW Lun, CBW CB Length */
SCSI_READCAPACITY, /* 10 byte CBW CB */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
};
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Request Sense command.
*****************************************************************************/
EFM32_ALIGN(4)
static const char cbwRs[ CBW_LEN ] __attribute__ ((aligned(4))) =
{
'U', 'S', 'B', 'C', /* CBW Signature */
0x12, 0x34, 0x56, 0x78, /* CBW Tag */
SCSI_REQUESTSENSEDATA_LEN, /* CBW Data Transfer Length */
0x00, 0x00, 0x00,
BOT_DIR_IN, 0x00, 6, /* CBW Flags, CBW Lun, CBW CB Length */
SCSI_REQUESTSENSE, 0x00, /* 6 byte CBW CB */
0x00, 0x00,
SCSI_REQUESTSENSEDATA_LEN,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
};
/**************************************************************************//**
* @brief Default Command Block Wrapper (CBW) data for
* SCSI Test Unit Ready command.
*****************************************************************************/
EFM32_ALIGN(4)
static const char cbwTur[ CBW_LEN ] __attribute__ ((aligned(4))) =
{
'U', 'S', 'B', 'C', /* CBW Signature */
0x12, 0x34, 0x56, 0x78, /* CBW Tag */
0x00, 0x00, 0x00, 0x00, /* CBW Data Transfer Length */
BOT_DIR_IN, 0x00, 6, /* CBW Flags, CBW Lun, CBW CB Length */
SCSI_TESTUNIT_READY, 0x00, /* 6 byte CBW CB */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00
};
/* Media properties. */
static uint32_t lbaCount = 0;
static uint32_t lbaSize = 0;
/** @endcond */
/***************************************************************************//**
* @brief
* MSDSCSI module initialization.
*
* @param[in] out
* Pointer to an MSD bulk OUT endpoint structure.
*
* @param[in] in
* Pointer to an MSD bulk IN endpoint structure.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_Init(USBH_Ep_TypeDef *out, USBH_Ep_TypeDef *in)
{
/* Check if all typedef's are properly packed. */
if ((sizeof(MSDSCSI_Read10_TypeDef) != SCSI_READ10_LEN) ||
(sizeof(MSDSCSI_Write10_TypeDef) != SCSI_WRITE10_LEN) ||
(sizeof(MSDSCSI_InquiryData_TypeDef) != SCSI_INQUIRYDATA_LEN) ||
(sizeof(MSDSCSI_RequestSenseData_TypeDef) != SCSI_REQUESTSENSEDATA_LEN) ||
(sizeof(MSDSCSI_ReadCapacityData_TypeDef) != SCSI_READCAPACITYDATA_LEN))
{
DEBUG_USB_API_PUTS("\nMSDSCSI_Init(), typedef size error");
EFM_ASSERT(false);
return false;
}
/* Initialize the Bulk-Only-Transport (BOT) module. */
if (MSDBOT_Init(out, in) != MSDBOT_STATUS_OK)
return false;
return true;
}
/***************************************************************************//**
* @brief
* Issue a SCSI Inquiry command.
*
* @param[out] data
* Inquiry response data buffer.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_Inquiry(MSDSCSI_InquiryData_TypeDef *data)
{
if (MSDBOT_Xfer((void*) cbwInquiry, data) == SCSI_INQUIRYDATA_LEN)
return true;
return false;
}
/***************************************************************************//**
* @brief
* Issue a SCSI Read(10) command.
*
* @param[in] lba
* Sector address (LBA) of first sector to read.
*
* @param[in] sectors
* Number of sectors to read.
*
* @param[out] data
* Data buffer through which data is returned to caller.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_Read10(uint32_t lba, uint16_t sectors, void *data)
{
EFM32_ALIGN(4)
MSDBOT_CBW_TypeDef cbw __attribute__ ((aligned(4))) = CBW_SCSI_READ10_INIT_DEFAULT;
MSDSCSI_Read10_TypeDef *cb = (MSDSCSI_Read10_TypeDef*) &cbw.CBWCB;
cbw.dCBWDataTransferLength = sectors * lbaSize;
cb->Lba = __REV(lba);
cb->TransferLength = __REV16(sectors);
if ((uint32_t) MSDBOT_Xfer(&cbw, data) == cbw.dCBWDataTransferLength)
return true;
return false;
}
/***************************************************************************//**
* @brief
* Issue a SCSI Read Capacity command.
*
* @param[out] data
* Read Capacity response data buffer.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_ReadCapacity(MSDSCSI_ReadCapacityData_TypeDef *data)
{
if (MSDBOT_Xfer((void*) cbwReadCap, data) == SCSI_READCAPACITYDATA_LEN)
{
/* Big to Little endian conversion, keep local copy of lba count and size */
lbaCount = __REV(data->LogicalBlockAddress);
lbaSize = __REV(data->LogicalBlockLength);
data->LogicalBlockAddress = lbaCount;
data->LogicalBlockLength = lbaSize;
return true;
}
return false;
}
/***************************************************************************//**
* @brief
* Issue a SCSI Request Sense command.
*
* @param[out] data
* Request Sense response data buffer.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_RequestSense(MSDSCSI_RequestSenseData_TypeDef *data)
{
if (MSDBOT_Xfer((void*) cbwRs, data) == SCSI_REQUESTSENSEDATA_LEN)
return true;
return false;
}
/***************************************************************************//**
* @brief
* Issue a SCSI Test Unit Ready command.
*
* @return
* Returns true if device ready, false if device not ready or cmd
* transfer error.
******************************************************************************/
bool MSDSCSI_TestUnitReady(void)
{
if (MSDBOT_Xfer((void*) cbwTur, NULL) == MSDBOT_STATUS_OK)
return true;
return false;
}
/***************************************************************************//**
* @brief
* Perform a SCSI Write(10) command.
*
* @param[in] lba
* Sector address (LBA) of first sector to write.
*
* @param[in] sectors
* Number of sectors to write.
*
* @param[out] data
* Data buffer containing data to be written.
*
* @return
* Returns true on success, false otherwise.
******************************************************************************/
bool MSDSCSI_Write10(uint32_t lba, uint16_t sectors, const void *data)
{
EFM32_ALIGN(4)
MSDBOT_CBW_TypeDef cbw __attribute__ ((aligned(4))) = CBW_SCSI_WRITE10_INIT_DEFAULT;
MSDSCSI_Write10_TypeDef *cb = (MSDSCSI_Write10_TypeDef*) &cbw.CBWCB;
cbw.dCBWDataTransferLength = sectors * lbaSize;
cb->Lba = __REV(lba);
cb->TransferLength = __REV16(sectors);
if ((uint32_t) MSDBOT_Xfer(&cbw, (void*) data) == cbw.dCBWDataTransferLength)
return true;
return false;
}
......@@ -82,8 +82,119 @@ static int XferBotDataCallback(USB_Status_TypeDef status, uint32_t xf
static int XferBotDataIndirectCallback(USB_Status_TypeDef status, uint32_t xferred, uint32_t remaining);
/*** Include device descriptor definitions. ***/
EFM32_ALIGN(4)
static const USB_DeviceDescriptor_TypeDef deviceDesc __attribute__ ((aligned(4)))=
{
.bLength = USB_DEVICE_DESCSIZE,
.bDescriptorType = USB_DEVICE_DESCRIPTOR,
.bcdUSB = 0x0200,
.bDeviceClass = 0,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.bMaxPacketSize0 = USB_EP0_SIZE,
.idVendor = 0x2544,
.idProduct = 0x0004,
.bcdDevice = 0x0000,
.iManufacturer = 1,
.iProduct = 2,
.iSerialNumber = 3,
.bNumConfigurations = 1
};
#include "descriptors.h"
EFM32_ALIGN(4)
static const uint8_t configDesc[] __attribute__ ((aligned(4)))=
{
/*** Configuration descriptor ***/
USB_CONFIG_DESCSIZE, /* bLength */
USB_CONFIG_DESCRIPTOR, /* bDescriptorType */
USB_CONFIG_DESCSIZE + /* wTotalLength (LSB) */
USB_INTERFACE_DESCSIZE +
(USB_ENDPOINT_DESCSIZE * NUM_EP_USED),
(USB_CONFIG_DESCSIZE + /* wTotalLength (MSB) */
USB_INTERFACE_DESCSIZE +
(USB_ENDPOINT_DESCSIZE * NUM_EP_USED))>>8,
1, /* bNumInterfaces */
1, /* bConfigurationValue */
0, /* iConfiguration */
#if defined(BUSPOWERED)
CONFIG_DESC_BM_RESERVED_D7, /* bmAttrib: Bus powered */
#else
CONFIG_DESC_BM_RESERVED_D7 | /* bmAttrib: Self powered */
CONFIG_DESC_BM_SELFPOWERED,
#endif
CONFIG_DESC_MAXPOWER_mA( 50 ), /* bMaxPower: 50 mA */
/*** Interface descriptor ***/
USB_INTERFACE_DESCSIZE, /* bLength */
USB_INTERFACE_DESCRIPTOR,/* bDescriptorType */
0, /* bInterfaceNumber */
0, /* bAlternateSetting */
NUM_EP_USED, /* bNumEndpoints */
USB_CLASS_MSD, /* bInterfaceClass */
USB_CLASS_MSD_SCSI_CMDSET, /* bInterfaceSubClass */
USB_CLASS_MSD_BOT_TRANSPORT,/* bInterfaceProtocol*/
0, /* iInterface */
/*** Endpoint descriptors ***/
USB_ENDPOINT_DESCSIZE, /* bLength */
USB_ENDPOINT_DESCRIPTOR,/* bDescriptorType */
BULK_OUT, /* bEndpointAddress (OUT)*/
USB_EPTYPE_BULK, /* bmAttributes */
USB_MAX_EP_SIZE, /* wMaxPacketSize (LSB) */
0, /* wMaxPacketSize (MSB) */
0, /* bInterval */
USB_ENDPOINT_DESCSIZE, /* bLength */
USB_ENDPOINT_DESCRIPTOR,/* bDescriptorType */
BULK_IN, /* bEndpointAddress (IN) */
USB_EPTYPE_BULK, /* bmAttributes */
USB_MAX_EP_SIZE, /* wMaxPacketSize (LSB) */
0, /* wMaxPacketSize (MSB) */
0, /* bInterval */
};
STATIC_CONST_STRING_DESC_LANGID( langID, 0x04, 0x09 );
STATIC_CONST_STRING_DESC( iManufacturer, 'o','h','w','r','.','o','r', 'g' );
STATIC_CONST_STRING_DESC( iProduct , 'F','*','w','a','t','c','h' );
STATIC_CONST_STRING_DESC( iSerialNumber, '0','0','0','0','1','2', \
'3','4','5','6','7','8' );
static const void * const strings[] =
{
&langID,
&iManufacturer,
&iProduct,
&iSerialNumber
};
/* Endpoint buffer sizes */
/* 1 = single buffer, 2 = double buffering, 3 = tripple buffering ... */
static const uint8_t bufferingMultiplier[ NUM_EP_USED + 1 ] = { 1, 2, 2 };
static const USBD_Callbacks_TypeDef callbacks =
{
.usbReset = NULL,
.usbStateChange = UsbStateChangeEvent,
.setupCmd = UsbSetupCmd,
.isSelfPowered = NULL,
.sofInt = NULL
};
static const USBD_Init_TypeDef initstruct =
{
.deviceDescriptor = &deviceDesc,
.configDescriptor = configDesc,
.stringDescriptors = strings,
.numberOfStrings = sizeof(strings)/sizeof(void*),
.callbacks = &callbacks,
.bufferingMultiplier = bufferingMultiplier,
.reserved = 0
};
/*** Variables ***/
......@@ -130,7 +241,7 @@ static const MSDSCSI_InquiryData_TypeDef InquiryData __attribute__ ((aligned(4))
.Sync = 0, .Wbus16 = 0, .Obsolete4 = 0 },
.T10VendorId = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
.ProductId = { 'E', 'F', 'M', '3', '2', ' ', 'M', 'S', 'D', ' ', 'D', 'e', 'v', 'i', 'c', 'e' },
.ProductId = { 'F', '*', 'w', 'a', 't', 'c', 'h' },
.ProductRevisionLevel ={ '1', '.', '0', '0' }
};
......
/***************************************************************************//**
* @file usbconfig.h
* @brief USB protocol stack library, application supplied configuration options.
* @author Energy Micro AS
* @version 3.20.3
*******************************************************************************
* @section License
* <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
*******************************************************************************
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
* 4. The source and compiled code may only be used on Energy Micro "EFM32"
* microcontrollers and "EFR4" radios.
*
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
* obligation to support this Software. Energy Micro AS is providing the
* Software "AS IS", with no express or implied warranties of any kind,
* including, but not limited to, any implied warranties of merchantability
* or fitness for any particular purpose or warranties against infringement
* of any proprietary rights of a third party.
*
* Energy Micro AS will not be liable for any consequential, incidental, or
* special damages, or any other relief, or for any claim by any third party,
* arising from your use of this Software.
*
*****************************************************************************/
#ifndef __USBCONFIG_H
#define __USBCONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
//#define BUSPOWERED /* Uncomment to build buspowered device */
#define USB_DEVICE /* Compile stack for device mode. */
#if defined(BUSPOWERED)
#define USB_PWRSAVE_MODE (USB_PWRSAVE_MODE_ONSUSPEND)
#else
#define USB_PWRSAVE_MODE (USB_PWRSAVE_MODE_ONSUSPEND | USB_PWRSAVE_MODE_ONVBUSOFF)
#endif
/****************************************************************************
** **
** Specify number of endpoints used (in addition to EP0). **
** **
*****************************************************************************/
#define NUM_EP_USED 2
/****************************************************************************
** **
** Specify number of application timers you need. **
** **
*****************************************************************************/
#define NUM_APP_TIMERS 1
/****************************************************************************
** **
** Configure serial port debug output. **
** **
*****************************************************************************/
#if 0
#if !defined(BUSPOWERED)
/* Define a function for transmitting a single char on the serial port. */
extern int RETARGET_WriteChar(char c);
#define USER_PUTCHAR RETARGET_WriteChar
/* Debug USB API functions (illegal input parameters etc.) */
#define DEBUG_USB_API
#endif /* !defined(BUSPOWERED) */
#endif
#ifdef __cplusplus
}
#endif
#endif /* __USBCONFIG_H */
/***************************************************************************//**
* @file usbconfig.h
* @brief USB protocol stack library, application supplied configuration options.
* @version 3.20.5
*******************************************************************************
* @section License
* <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
*******************************************************************************
*
* This file is licensensed under the Silabs License Agreement. See the file
* "Silabs_License_Agreement.txt" for details. Before using this software for
* any purpose, you must agree to the terms of that agreement.
*
******************************************************************************/
#ifndef __USBCONFIG_H
#define __USBCONFIG_H
#ifdef __cplusplus
extern "C" {
#ifdef DEBUG
#include "usbdbg_config.h"
#else
#include "msdd_config.h"
#endif
#define USB_DEVICE /* Compile stack for device mode. */
/****************************************************************************
** **
** Specify number of endpoints used (in addition to EP0). **
** **
*****************************************************************************/
#define NUM_EP_USED 3
/****************************************************************************
** **
** Specify number of application timers you need. **
** **
*****************************************************************************/
#define NUM_APP_TIMERS 1
#ifdef __cplusplus
}
#endif
#endif /* __USBCONFIG_H */
......@@ -112,6 +112,7 @@ void usbdbg_init()
*****************************************************************************/
int usbdbg_puts(const char *s)
{
#ifdef DEBUG
int cnt = 0;
static char __attribute__((aligned(4))) buf[USBDBG_BULK_EP_SIZE];
......@@ -130,6 +131,7 @@ int usbdbg_puts(const char *s)
/* Call USB stack function we're so desperately trying to hide */
USBD_Write(USBDBG_EP_DATA_OUT, (void *)buf, strlen(buf), NULL);
#endif /* DEBUG */
return 1;
}
......
/***************************************************************************//**
* @file usbconfig.h
* @brief USB protocol stack library, application supplied configuration options.
* @version 3.20.5
*******************************************************************************
* @section License
* <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
*******************************************************************************
*
* This file is licensensed under the Silabs License Agreement. See the file
* "Silabs_License_Agreement.txt" for details. Before using this software for
* any purpose, you must agree to the terms of that agreement.
*
******************************************************************************/
#ifndef __USBCONFIG_H
#define __USBCONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
#define USB_DEVICE /* Compile stack for device mode. */
/****************************************************************************
** **
** Specify number of endpoints used (in addition to EP0). **
** **
*****************************************************************************/
#define NUM_EP_USED 3
/****************************************************************************
** **
** Specify number of application timers you need. **
** **
*****************************************************************************/
#define NUM_APP_TIMERS 1
#ifdef __cplusplus
}
#endif
#endif /* __USBCONFIG_H */
......@@ -117,11 +117,13 @@ INCLUDEPATHS += \
-I../common/CMSIS/Include \
-I../common/Device/EnergyMicro/EFM32GG/Include \
-I../common \
-I../common/drivers \
-I../common/usb \
-I../common/usb/inc \
-I../common/emlib/inc \
-I../common/emdrv/sleep/inc \
-I../common/nmealib/include
-I../common/nmealib/include \
-I../common/reptile/fatfs/inc
####################################################################
# Files #
......@@ -155,6 +157,7 @@ C_SRC += \
../common/drivers/i2cdrv.c \
../common/drivers/light_sensor.c \
../common/drivers/max17047.c \
../common/drivers/microsd.c \
../common/drivers/rtc.c \
../common/drivers/vibra.c \
../common/drivers/lsm303c.c \
......@@ -172,6 +175,8 @@ C_SRC += \
../common/gfx/font_xm5x8.c \
../common/gfx/gfx.c \
../common/gfx/ui.c \
../common/reptile/fatfs/src/diskio.c \
../common/reptile/fatfs/src/ff.c \
../common/sincos.c \
../common/eeprom_emulation.c \
../common/usb/src/em_usbd.c \
......@@ -181,6 +186,8 @@ C_SRC += \
../common/usb/src/em_usbdint.c \
../common/usb/src/em_usbtimer.c \
../common/usb/usbdbg.c \
../common/usb/msddmedia.c \
../common/usb/msdd.c \
../common/nmealib/src/context.c \
../common/nmealib/src/generate.c \
../common/nmealib/src/generator.c \
......@@ -214,6 +221,7 @@ src/apps/menu.c \
src/apps/menu_struct.c \
src/apps/gpscoord.c \
src/apps/reset.c \
src/apps/usb_mass_storage.c \
src/main.c \
src/battery_task.c \
src/blight_task.c \
......
......@@ -37,6 +37,7 @@ extern application compass;
extern application game;
extern application gpscoord;
extern application reset;
extern application usb_ms;
#endif /* APP_LIST_H */
......@@ -67,8 +67,11 @@ menu_list main_menu = {
{ APP, &comp_ico, { .app = &compass } },
{ APP, &game_ico, { .app = &game} },
{ APP, &gps_receiving, { .app = &gpscoord} },
{ APP, NULL, { .app = &reset} },
{ SUBMENU, &settings_icon, { .submenu = &settings_menu } },
#ifndef DEBUG
{ APP, &usb_ms_icon, { .app = &usb_ms } },
#endif /* DEBUG */
{ APP, NULL, { .app = &reset} },
{ END, NULL, { NULL } }
}
};
......
/*
* Copyright (C) 2014 Julian Lewis
* @author Maciej Suminski <maciej.suminski@cern.ch>
* @author Matthieu Cattin <matthieu.cattin@cern.ch>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* USB mass storage mode.
*/
#include "application.h"
#include "widgets/status_bar.h"
#include "msdd.h"
#include "msddmedia.h"
#include "em_usb.h"
static bool init_ok;
static void usb_ms_redraw(struct ui_widget *w)
{
gfx_clear(&w->dc, 0);
gfx_centered_text(&w->dc, &font_helv17b, 30, "USB mass storage", 1);
if(init_ok) {
gfx_centered_text(&w->dc, &font_helv17b, 30 + 18, "enabled", 1);
gfx_centered_text(&w->dc, &font_helv11, 80, "unmount the device", 1);
gfx_centered_text(&w->dc, &font_helv11, 80 + 12, "before unplugging", 1);
} else {
gfx_centered_text(&w->dc, &font_helv17b, 80, "media error", 1);
}
}
struct ui_widget usb_ms_screen = {
usb_ms_redraw,
NULL,
{ 0, 0, 127, 127 },
0,
WF_ACTIVE | WF_VISIBLE,
NULL
};
void usb_ms_main(void* params) {
(void)(params); // suppress unused parameter warning
struct event evt;
ui_clear();
ui_init_widget(&usb_ms_screen);
ui_add_widget(&usb_ms_screen);
ui_init_widget(&status_bar);
ui_add_widget(&status_bar);
init_ok = MSDDMEDIA_Init();
ui_update(NULL);
if(init_ok) {
MSDD_Init(-1, -1);
}
while(1) {
if(xQueueReceive(appQueue, &evt, 1)) {
switch(evt.type) {
case BUTTON_PRESSED:
if(evt.data.button == BUT_TL) {
USBD_Stop();
return; // go back to the main menu
}
break;
default: // suppress warnings
// ignore events that were not mentioned above
ui_update(&evt);
break;
}
}
else
{
MSDD_Handler();
}
}
}
application usb_ms = {
.name = "USB drive",
.main = usb_ms_main
};
......@@ -46,6 +46,9 @@
#include "blight_task.h"
#include "state.h"
#include "gpsbkgnd_task.h"
#include "msdd.h"
#include "msddmedia.h"
#include "usbconfig.h"
#ifdef DEBUG
#include <usbdbg.h>
......@@ -58,6 +61,7 @@ int main(void)
// Enable clocks
CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFXO);
CMU_OscillatorEnable(cmuOsc_LFXO, true, false);
CMU_ClockEnable(cmuClock_HFPER, true);
CMU_ClockEnable(cmuClock_GPIO, true);
......
......@@ -166,8 +166,7 @@ C_SRC += \
../common/gfx/font_helv17b.c \
../common/gfx/font_xm4x5.c \
../common/gfx/font_xm4x6.c \
../common/pp_printf/vsprintf-xint.c \
../common/udelay.c \
../common/pp_printf/vsprintf-xint.c
main.c
#../common/drivers/display.c \
#../common/drivers/displayls013b7dh03.c \
......
......@@ -134,6 +134,7 @@ INCLUDEPATHS += \
-I../common/emlib/inc \
-I../common/drivers \
-I../common/gfx \
-I../common/usb \
-I../common/usb/inc \
-I../common \
-I../common/reptile/fatfs/inc \
......@@ -165,18 +166,18 @@ C_SRC += \
../common/gfx/font_helv17b.c \
../common/gfx/font_xm4x5.c \
../common/gfx/font_xm4x6.c \
../common/delay.c \
../common/reptile/fatfs/src/diskio.c \
../common/reptile/fatfs/src/ff.c \
../common/drivers/microsd.c \
../common/drivers/msdd.c \
../common/usb/src/em_usbd.c \
../common/usb/src/em_usbdch9.c \
../common/usb/src/em_usbhal.c \
../common/usb/src/em_usbdep.c \
../common/usb/src/em_usbdint.c \
../common/usb/src/em_usbtimer.c \
msddmedia.c \
../common/usb/msdd.c \
../common/delay.c \
../common/msddmedia.c \
main.c
s_SRC +=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment