Changeset 78ca12b in mainline
- Timestamp:
- 2012-09-04T20:11:22Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3ccba14
- Parents:
- ac31040
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/time/cmos-rtc/cmos-rtc.c
rac31040 r78ca12b 57 57 58 58 #define REG_COUNT 2 59 60 #define REG_SEL_PORT(port) (port) 61 #define REG_RW_PORT(port) ((port) + 1) 59 62 60 63 typedef struct rtc { … … 267 270 rtc_register_read(rtc_t *rtc, int reg) 268 271 { 269 pio_write_8( rtc->port, reg);270 return pio_read_8( rtc->port + 1);272 pio_write_8(REG_SEL_PORT(rtc->port), reg); 273 return pio_read_8(REG_RW_PORT(rtc->port)); 271 274 } 272 275 … … 280 283 rtc_register_write(rtc_t *rtc, int reg, int data) 281 284 { 282 pio_write_8( rtc->port, reg);283 pio_write_8( rtc->port + 1, data);285 pio_write_8(REG_SEL_PORT(rtc->port), reg); 286 pio_write_8(REG_RW_PORT(rtc->port), data); 284 287 } 285 288
Note:
See TracChangeset
for help on using the changeset viewer.