Changeset 3b79ba5 in mainline
- Timestamp:
- 2012-04-03T09:37:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e06e9f
- Parents:
- f30ee571
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/time/cmos-rtc/cmos-rtc.c
rf30ee571 r3b79ba5 80 80 static void rtc_close(ddf_fun_t *fun); 81 81 static bool rtc_update_in_progress(rtc_t *rtc); 82 static int rtc_register_read(ioport8_t *port, int reg); 82 83 83 84 … … 222 223 } 223 224 225 /** Read a register from the CMOS memory 226 * 227 * @param port The I/O port assigned to the device 228 * @param reg The index of the register to read 229 * 230 * @return The value of the register 231 */ 232 static int 233 rtc_register_read(ioport8_t *port, int reg) 234 { 235 pio_write_8(port, reg); 236 return pio_read_8(port + 1); 237 } 238 224 239 /** Check if an update is in progress 225 240 * … … 231 246 rtc_update_in_progress(rtc_t *rtc) 232 247 { 233 pio_write_8(rtc->port, RTC_UPDATE); 234 return pio_read_8(rtc->port + 1) & RTC_MASK_UPDATE; 248 return rtc_register_read(rtc->port, RTC_UPDATE) & RTC_MASK_UPDATE; 235 249 } 236 250
Note:
See TracChangeset
for help on using the changeset viewer.