Commit 4e2d795da888bef4803bb52e6402d2e37a8be482

Authored by henyxia
1 parent 0907768b

Four pixels successfully drawn

Showing 1 changed file with 31 additions and 3 deletions   Show diff stats
... ... @@ -111,11 +111,39 @@ int main(void)
111 111  
112 112 sleep(2);
113 113  
114   - printf("Sending command\n");
  114 + printf("Sending GREEN command\n");
115 115  
116 116 //libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, data, MAX_SIZE_OUT, &transfered, 0);
117   - unsigned char data[] = {0x81, 0x07, 0xFF};
118   - libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, data, 3, &transfered, 0);
  117 + unsigned char odata[] = {0x81, 0xF8, 0x1F};
  118 + libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, odata, 3, &transfered, 0);
  119 +
  120 + sleep(2);
119 121  
  122 + printf("Sending BLUE command\n");
  123 +
  124 + odata[0] = 0x81;
  125 + odata[1] = 0x07;
  126 + odata[2] = 0xFF;
  127 + libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, odata, 3, &transfered, 0);
  128 +
  129 + sleep(2);
  130 +
  131 + printf("Sending PIXEL command\n");
  132 +
  133 + unsigned char data[] = {0x82, 0x0A, 0x00, 0x0A, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
  134 +
  135 + libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, data, 18, &transfered, 0);
  136 +/*
  137 + data[0] = 0x02;
  138 + data[1] = 0x00;
  139 + data[2] = 0x00;
  140 + data[3] = 0x1F;
  141 + data[4] = 0x00;
  142 + data[5] = 0x00;
  143 + data[6] = 0x00;
  144 + data[7] = 0x00;
  145 +
  146 + libusb_bulk_transfer(screenHandle, ENDPOINT_OUT, data, 3, &transfered, 0);
  147 +*/
120 148 return 0;
121 149 }
... ...