embedded: LPC17xx register access routines for hwspecops defined.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Mon, 13 Feb 2012 17:12:08 +0000 (18:12 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Mon, 13 Feb 2012 17:12:08 +0000 (18:12 +0100)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
embedded/app/usbcan/lpc17xx_can.c

index 5565d8c..383b6c7 100644 (file)
@@ -101,15 +101,11 @@ int can_lmc1_init_obj_data(struct canchip_t *chip, int objnr){
 }
 
 void can_lmc1_write_register(unsigned data, unsigned long address){
-
-       printf("UNSUPPORTED NOW\n");
+       (*(volatile uint32_t*)(address)) = data;
 }
 
 unsigned can_lmc1_read_register(unsigned long address){
-
-       printf("UNSUPPORTED NOW\n");
-       return 0;
-
+       return (*(volatile uint32_t*)(address));
 }
 
 int can_lmc1_request_io(struct candevice_t *candev)