From: Uwe Hermann Date: Thu, 20 Aug 2015 18:27:10 +0000 (+0200) Subject: ds1307: Add a test-case. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=25546be5074011dd0d639be34920dcdc881581fa;p=sigrok-test.git ds1307: Add a test-case. --- diff --git a/decoder/test/ds1307/rtc_ds1307_200khz.output b/decoder/test/ds1307/rtc_ds1307_200khz.output new file mode 100644 index 0000000..be6e223 --- /dev/null +++ b/decoder/test/ds1307/rtc_ds1307_200khz.output @@ -0,0 +1,232 @@ +43-59 ds1307: reg-seconds: "Seconds" "Sec" "S" +43-45 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +45-59 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +61-77 ds1307: reg-minutes: "Minutes" "Min" "M" +61-63 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +63-77 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +79-95 ds1307: reg-hours: "Hours" "H" +79-81 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +81-83 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +83-95 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +97-113 ds1307: reg-day: "Day of week" "Day" "D" +97-99 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +99-101 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +101-103 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +103-105 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +105-107 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +107-113 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +115-131 ds1307: reg-date: "Date" "D" +115-117 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +117-119 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +119-131 ds1307: bit-date: "Date: 10" "D: 10" "D" +133-149 ds1307: reg-month: "Month" "Mon" "M" +133-135 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +135-137 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +137-139 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +139-149 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +151-167 ds1307: reg-year: "Year" "Y" +151-167 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +0-171 ds1307: write-datetime: "Written date/time: Sunday, 10.03.2013 23:35:30" +343-359 ds1307: reg-seconds: "Seconds" "Sec" "S" +343-345 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +345-359 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +361-377 ds1307: reg-minutes: "Minutes" "Min" "M" +361-363 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +363-377 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +379-395 ds1307: reg-hours: "Hours" "H" +379-381 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +381-383 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +383-395 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +397-413 ds1307: reg-day: "Day of week" "Day" "D" +397-399 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +399-401 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +401-403 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +403-405 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +405-407 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +407-413 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +415-431 ds1307: reg-date: "Date" "D" +415-417 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +417-419 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +419-431 ds1307: bit-date: "Date: 10" "D: 10" "D" +433-449 ds1307: reg-month: "Month" "Mon" "M" +433-435 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +435-437 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +437-439 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +439-449 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +451-467 ds1307: reg-year: "Year" "Y" +451-467 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +253-471 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +3628-3644 ds1307: reg-seconds: "Seconds" "Sec" "S" +3628-3630 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +3630-3644 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +3646-3662 ds1307: reg-minutes: "Minutes" "Min" "M" +3646-3648 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3648-3662 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +3664-3680 ds1307: reg-hours: "Hours" "H" +3664-3666 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3666-3668 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +3668-3680 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +3682-3698 ds1307: reg-day: "Day of week" "Day" "D" +3682-3684 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3684-3686 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3686-3688 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3688-3690 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3690-3692 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3692-3698 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +3700-3716 ds1307: reg-date: "Date" "D" +3700-3702 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3702-3704 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3704-3716 ds1307: bit-date: "Date: 10" "D: 10" "D" +3718-3734 ds1307: reg-month: "Month" "Mon" "M" +3718-3720 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3720-3722 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3722-3724 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +3724-3734 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +3736-3752 ds1307: reg-year: "Year" "Y" +3736-3752 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +3548-3756 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +7549-7565 ds1307: reg-seconds: "Seconds" "Sec" "S" +7549-7551 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +7551-7565 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +7567-7583 ds1307: reg-minutes: "Minutes" "Min" "M" +7567-7569 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7569-7583 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +7585-7601 ds1307: reg-hours: "Hours" "H" +7585-7587 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7587-7589 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +7589-7601 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +7603-7619 ds1307: reg-day: "Day of week" "Day" "D" +7603-7605 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7605-7607 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7607-7609 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7609-7611 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7611-7613 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7613-7619 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +7621-7637 ds1307: reg-date: "Date" "D" +7621-7623 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7623-7625 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7625-7637 ds1307: bit-date: "Date: 10" "D: 10" "D" +7639-7655 ds1307: reg-month: "Month" "Mon" "M" +7639-7641 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7641-7643 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7643-7645 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +7645-7655 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +7657-7673 ds1307: reg-year: "Year" "Y" +7657-7673 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +7470-7677 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +11486-11502 ds1307: reg-seconds: "Seconds" "Sec" "S" +11486-11488 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +11488-11502 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +11504-11520 ds1307: reg-minutes: "Minutes" "Min" "M" +11504-11506 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11506-11520 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +11522-11538 ds1307: reg-hours: "Hours" "H" +11522-11524 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11524-11526 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +11526-11538 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +11540-11556 ds1307: reg-day: "Day of week" "Day" "D" +11540-11542 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11542-11544 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11544-11546 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11546-11548 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11548-11550 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11550-11556 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +11558-11574 ds1307: reg-date: "Date" "D" +11558-11560 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11560-11562 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11562-11574 ds1307: bit-date: "Date: 10" "D: 10" "D" +11576-11592 ds1307: reg-month: "Month" "Mon" "M" +11576-11578 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11578-11580 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11580-11582 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +11582-11592 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +11594-11610 ds1307: reg-year: "Year" "Y" +11594-11610 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +11405-11614 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +15420-15436 ds1307: reg-seconds: "Seconds" "Sec" "S" +15420-15422 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +15422-15436 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +15438-15454 ds1307: reg-minutes: "Minutes" "Min" "M" +15438-15440 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15440-15454 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +15456-15472 ds1307: reg-hours: "Hours" "H" +15456-15458 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15458-15460 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +15460-15472 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +15474-15490 ds1307: reg-day: "Day of week" "Day" "D" +15474-15476 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15476-15478 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15478-15480 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15480-15482 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15482-15484 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15484-15490 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +15492-15508 ds1307: reg-date: "Date" "D" +15492-15494 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15494-15496 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15496-15508 ds1307: bit-date: "Date: 10" "D: 10" "D" +15510-15526 ds1307: reg-month: "Month" "Mon" "M" +15510-15512 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15512-15514 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15514-15516 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +15516-15526 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +15528-15544 ds1307: reg-year: "Year" "Y" +15528-15544 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +15332-15548 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +19379-19395 ds1307: reg-seconds: "Seconds" "Sec" "S" +19379-19381 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +19381-19395 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +19397-19413 ds1307: reg-minutes: "Minutes" "Min" "M" +19397-19399 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19399-19413 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +19415-19431 ds1307: reg-hours: "Hours" "H" +19415-19417 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19417-19419 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +19419-19431 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +19433-19449 ds1307: reg-day: "Day of week" "Day" "D" +19433-19435 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19435-19437 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19437-19439 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19439-19441 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19441-19443 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19443-19449 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +19451-19467 ds1307: reg-date: "Date" "D" +19451-19453 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19453-19455 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19455-19467 ds1307: bit-date: "Date: 10" "D: 10" "D" +19469-19485 ds1307: reg-month: "Month" "Mon" "M" +19469-19471 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19471-19473 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19473-19475 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +19475-19485 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +19487-19503 ds1307: reg-year: "Year" "Y" +19487-19503 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +19253-19507 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" +23319-23335 ds1307: reg-seconds: "Seconds" "Sec" "S" +23319-23321 ds1307: bit-clock-halt: "Clock halt: 0" "Clk hlt: 0" "CH: 0" "CH" +23321-23335 ds1307: bit-seconds: "Second: 30" "Sec: 30" "S: 30" "S" +23337-23353 ds1307: reg-minutes: "Minutes" "Min" "M" +23337-23339 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23339-23353 ds1307: bit-minutes: "Minute: 35" "Min: 35" "M: 35" "M" +23355-23371 ds1307: reg-hours: "Hours" "H" +23355-23357 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23357-23359 ds1307: bit-12-24-hours: "24-hour mode" "24h mode" "24h" +23359-23371 ds1307: bit-hours: "Hour: 23" "H: 23" "H" +23373-23389 ds1307: reg-day: "Day of week" "Day" "D" +23373-23375 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23375-23377 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23377-23379 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23379-23381 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23381-23383 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23383-23389 ds1307: bit-day: "Weekday: Sunday" "WD: Sunday" "WD" "W" +23391-23407 ds1307: reg-date: "Date" "D" +23391-23393 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23393-23395 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23395-23407 ds1307: bit-date: "Date: 10" "D: 10" "D" +23409-23425 ds1307: reg-month: "Month" "Mon" "M" +23409-23411 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23411-23413 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23413-23415 ds1307: bit-reserved: "Reserved bit" "Reserved" "Rsvd" "R" +23415-23425 ds1307: bit-month: "Month: 3" "Mon: 3" "M: 3" "M" +23427-23443 ds1307: reg-year: "Year" "Y" +23427-23443 ds1307: bit-year: "Year: 13" "Y: 13" "Y" +23211-23447 ds1307: read-datetime: "Read date/time: Sunday, 10.03.2013 23:35:30" diff --git a/decoder/test/ds1307/test.conf b/decoder/test/ds1307/test.conf new file mode 100644 index 0000000..8bf0650 --- /dev/null +++ b/decoder/test/ds1307/test.conf @@ -0,0 +1,6 @@ +test rtc_ds1307_200khz + protocol-decoder i2c channel scl=0 channel sda=1 + protocol-decoder ds1307 + stack i2c ds1307 + input i2c/rtc_dallas_ds1307/rtc_ds1307_200khz.sr + output ds1307 annotation match rtc_ds1307_200khz.output