summaryrefslogtreecommitdiff
path: root/additions/SW/usb-ir-toy-lirc/JessH.patch
blob: 798314b7ac6612465284e8054aa677508682e22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Index: pic_bootloader.cpp
===================================================================
--- pic_bootloader.cpp (revision 2023)
+++ pic_bootloader.cpp (working copy)
@@ -187,7 +187,7 @@
  switch (memory)
  {
  case MEM_FLASH:
- return 2;
+ return 32;
  case MEM_EEPROM:
  return 8;
  case MEM_ID:
@@ -215,11 +215,17 @@
  {
  show_progress(OP_ERASING, type(), memory, 0);
  open(params);
- // erase 0x800-0x4000 //!!! 18f24j50 change
+ // erase 0x800-0x4000
  command.erase_flash.echo = ++command_id;
  command.erase_flash.addr_hi = 0x08;
  command.erase_flash.addr_lo = 0x00;
- command.erase_flash.size_x64 = 0x0D;
+                command.erase_flash.size_x64 = 0xE0;
+                transaction(&command, &response);
+                // erase 0x4000-0x6000
+                command.erase_flash.echo = ++command_id;
+                command.erase_flash.addr_hi = 0x40;
+                command.erase_flash.addr_lo = 0x00;
+                command.erase_flash.size_x64 = 0x80;
  transaction(&command, &response);
  close();
  show_progress(OP_ERASING, type(), memory, OPERATION_DONE);
@@ -379,9 +385,8 @@
  command.write_flash.echo = ++command_id;
  command.write_flash.addr_hi = (unsigned char)((address >> 8) & 0xFF);
  command.write_flash.addr_lo = (unsigned char)(address & 0xFF);
- command.write_flash.flush = (unsigned char) 0xff;
  // size must be 8 dividable
- //eAssert(size % 8 == 0);
+ eAssert(size % 8 == 0);
  command.write_flash.size8 = size;
  transaction(&command, &response);
  show_progress(OP_PROGRAMMING, type(), memory, buffer->progress());