Subversion Repositories HomeAutomation

Rev

Rev 67 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 67 Rev 68
Line 232... Line 232...
232
 
232
 
233
            case pgsWRITE_PROGRAM:
233
            case pgsWRITE_PROGRAM:
234
 
234
 
235
 
235
 
236
                // Write program and send ack.
236
                // Write program and send ack.
-
 
237
 
-
 
238
                // Check addr limit
-
 
239
                if (pgmAddress<RM_RESET_VECTOR)
-
 
240
                {              
-
 
241
                    errMsg          = ERR_ERROR;
-
 
242
                    pgs             = pgsSEND_ACK;
-
 
243
                    //Not allowed to write here!
-
 
244
                   
-
 
245
                }
237
 
246
 
238
                //Load Table pointer registers with base address to erase.
247
                //Load Table pointer registers with base address to erase.
239
                TBLPTRU = (BYTE)((pgmAddress & 0xFF0000)>>16);
248
                TBLPTRU = (BYTE)((pgmAddress & 0xFF0000)>>16);
240
                TBLPTRH = (BYTE)((pgmAddress & 0xFF00)>>8);
249
                TBLPTRH = (BYTE)((pgmAddress & 0xFF00)>>8);
241
                TBLPTRL = (BYTE)(pgmAddress & 0xFF);
250
                TBLPTRL = (BYTE)(pgmAddress & 0xFF);