From: Sebski123 Date: Tue, 4 Aug 2020 15:04:40 +0000 (-0400) Subject: max7219: Add tests for cascading chips X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b544524696d6235fe5dc0563fbba20eafc39b618;p=sigrok-test.git max7219: Add tests for cascading chips --- diff --git a/decoder/test/max7219/max7219_cascaded_chips.output b/decoder/test/max7219/max7219_cascaded_chips.output new file mode 100644 index 0000000..58d6c92 --- /dev/null +++ b/decoder/test/max7219/max7219_cascaded_chips.output @@ -0,0 +1,75 @@ +52-412 max7219: chip: "Chip 1:" +417-777 max7219: chip: "Chip 2:" +783-1144 max7219: chip: "Chip 3:" +1148-1508 max7219: chip: "Chip 4:" +1548-1908 max7219: chip: "Chip 1:" +1913-2285 max7219: chip: "Chip 2:" +2290-2649 max7219: chip: "Chip 3:" +2655-3014 max7219: chip: "Chip 4:" +3054-3416 max7219: chip: "Chip 1:" +3420-3780 max7219: chip: "Chip 2:" +3785-4159 max7219: chip: "Chip 3:" +4163-4523 max7219: chip: "Chip 4:" +4563-4925 max7219: chip: "Chip 1:" +4929-5289 max7219: chip: "Chip 2:" +5295-5655 max7219: chip: "Chip 3:" +5660-6022 max7219: chip: "Chip 4:" +6061-6433 max7219: chip: "Chip 1:" +6438-6798 max7219: chip: "Chip 2:" +6804-7165 max7219: chip: "Chip 3:" +7169-7529 max7219: chip: "Chip 4:" +7569-7928 max7219: chip: "Chip 1:" +7933-8305 max7219: chip: "Chip 2:" +8310-8669 max7219: chip: "Chip 3:" +8675-9034 max7219: chip: "Chip 4:" +9074-9434 max7219: chip: "Chip 1:" +9439-9798 max7219: chip: "Chip 2:" +9803-10164 max7219: chip: "Chip 3:" +10168-10539 max7219: chip: "Chip 4:" +10580-10939 max7219: chip: "Chip 1:" +10945-11304 max7219: chip: "Chip 2:" +11309-11669 max7219: chip: "Chip 3:" +11674-12033 max7219: chip: "Chip 4:" +12074-12445 max7219: chip: "Chip 1:" +12451-12810 max7219: chip: "Chip 2:" +12815-13174 max7219: chip: "Chip 3:" +13180-13539 max7219: chip: "Chip 4:" +13579-13939 max7219: chip: "Chip 1:" +13944-14304 max7219: chip: "Chip 2:" +14309-14682 max7219: chip: "Chip 3:" +14686-15045 max7219: chip: "Chip 4:" +15086-15445 max7219: chip: "Chip 1:" +15451-15810 max7219: chip: "Chip 2:" +15815-16175 max7219: chip: "Chip 3:" +16180-16552 max7219: chip: "Chip 4:" +16592-16952 max7219: chip: "Chip 1:" +16957-17317 max7219: chip: "Chip 2:" +17322-17682 max7219: chip: "Chip 3:" +17687-18047 max7219: chip: "Chip 4:" +18088-18471 max7219: chip: "Chip 1:" +18464-18823 max7219: chip: "Chip 2:" +18829-19188 max7219: chip: "Chip 3:" +19193-19552 max7219: chip: "Chip 4:" +19593-19954 max7219: chip: "Chip 1:" +19958-20317 max7219: chip: "Chip 2:" +20323-20696 max7219: chip: "Chip 3:" +20700-21061 max7219: chip: "Chip 4:" +221104-221475 max7219: chip: "Chip 1:" +221480-221839 max7219: chip: "Chip 2:" +221845-222205 max7219: chip: "Chip 3:" +422244-422603 max7219: chip: "Chip 1:" +422609-422969 max7219: chip: "Chip 2:" +422973-423332 max7219: chip: "Chip 3:" +423337-423696 max7219: chip: "Chip 4:" +624117-624477 max7219: chip: "Chip 1:" +624482-624856 max7219: chip: "Chip 2:" +624860-625220 max7219: chip: "Chip 3:" +625225-625587 max7219: chip: "Chip 4:" +1625575-1625936 max7219: chip: "Chip 1:" +1625940-1626312 max7219: chip: "Chip 2:" +1626317-1626676 max7219: chip: "Chip 3:" +1626682-1627041 max7219: chip: "Chip 4:" +2627037-2627396 max7219: chip: "Chip 1:" +2627413-2627773 max7219: chip: "Chip 2:" +2627778-2628137 max7219: chip: "Chip 3:" +2628143-2628502 max7219: chip: "Chip 4:" diff --git a/decoder/test/max7219/max7219_cascaded_digits.output b/decoder/test/max7219/max7219_cascaded_digits.output new file mode 100644 index 0000000..dafbedc --- /dev/null +++ b/decoder/test/max7219/max7219_cascaded_digits.output @@ -0,0 +1,40 @@ +7569-7928 max7219: digit: "Digit 1: 00" +7933-8305 max7219: digit: "Digit 1: 00" +8310-8669 max7219: digit: "Digit 1: 00" +8675-9034 max7219: digit: "Digit 1: 00" +9074-9434 max7219: digit: "Digit 2: 00" +9439-9798 max7219: digit: "Digit 2: 00" +9803-10164 max7219: digit: "Digit 2: 00" +10168-10539 max7219: digit: "Digit 2: 00" +10580-10939 max7219: digit: "Digit 3: 00" +10945-11304 max7219: digit: "Digit 3: 00" +11309-11669 max7219: digit: "Digit 3: 00" +11674-12033 max7219: digit: "Digit 3: 00" +12074-12445 max7219: digit: "Digit 4: 00" +12451-12810 max7219: digit: "Digit 4: 00" +12815-13174 max7219: digit: "Digit 4: 00" +13180-13539 max7219: digit: "Digit 4: 00" +13579-13939 max7219: digit: "Digit 5: 00" +13944-14304 max7219: digit: "Digit 5: 00" +14309-14682 max7219: digit: "Digit 5: 00" +14686-15045 max7219: digit: "Digit 5: 00" +15086-15445 max7219: digit: "Digit 6: 00" +15451-15810 max7219: digit: "Digit 6: 00" +15815-16175 max7219: digit: "Digit 6: 00" +16180-16552 max7219: digit: "Digit 6: 00" +16592-16952 max7219: digit: "Digit 7: 00" +16957-17317 max7219: digit: "Digit 7: 00" +17322-17682 max7219: digit: "Digit 7: 00" +17687-18047 max7219: digit: "Digit 7: 00" +18088-18471 max7219: digit: "Digit 8: 00" +18464-18823 max7219: digit: "Digit 8: 00" +18829-19188 max7219: digit: "Digit 8: 00" +19193-19552 max7219: digit: "Digit 8: 00" +1625575-1625936 max7219: digit: "Digit 4: 08" +1625940-1626312 max7219: digit: "Digit 3: 04" +1626317-1626676 max7219: digit: "Digit 2: 02" +1626682-1627041 max7219: digit: "Digit 1: 01" +2627037-2627396 max7219: digit: "Digit 4: 00" +2627413-2627773 max7219: digit: "Digit 3: 00" +2627778-2628137 max7219: digit: "Digit 2: 00" +2628143-2628502 max7219: digit: "Digit 1: 00" diff --git a/decoder/test/max7219/max7219_cascaded_registers.output b/decoder/test/max7219/max7219_cascaded_registers.output new file mode 100644 index 0000000..f759119 --- /dev/null +++ b/decoder/test/max7219/max7219_cascaded_registers.output @@ -0,0 +1,31 @@ +52-412 max7219: register: "Display test: on" +417-777 max7219: register: "Display test: on" +783-1144 max7219: register: "Display test: on" +1148-1508 max7219: register: "Display test: on" +1548-1908 max7219: register: "Decode: 0b00000000" +1913-2285 max7219: register: "Decode: 0b00000000" +2290-2649 max7219: register: "Decode: 0b00000000" +2655-3014 max7219: register: "Decode: 0b00000000" +3054-3416 max7219: register: "Intensity: 7" +3420-3780 max7219: register: "Intensity: 7" +3785-4159 max7219: register: "Intensity: 7" +4163-4523 max7219: register: "Intensity: 7" +4563-4925 max7219: register: "Scan limit: 8" +4929-5289 max7219: register: "Scan limit: 8" +5295-5655 max7219: register: "Scan limit: 8" +5660-6022 max7219: register: "Scan limit: 8" +6061-6433 max7219: register: "Display test: off" +6438-6798 max7219: register: "Display test: off" +6804-7165 max7219: register: "Display test: off" +7169-7529 max7219: register: "Display test: off" +19593-19954 max7219: register: "Shutdown: off" +19958-20317 max7219: register: "Shutdown: off" +20323-20696 max7219: register: "Shutdown: off" +20700-21061 max7219: register: "Shutdown: off" +221104-221475 max7219: register: "No-op: " +221480-221839 max7219: register: "No-op: " +221845-222205 max7219: register: "No-op: " +422244-422603 max7219: register: "No-op: " +422609-422969 max7219: register: "No-op: " +422973-423332 max7219: register: "No-op: " +423337-423696 max7219: register: "No-op: " diff --git a/decoder/test/max7219/max7219_cascaded_warnings.output b/decoder/test/max7219/max7219_cascaded_warnings.output new file mode 100644 index 0000000..0a828f2 --- /dev/null +++ b/decoder/test/max7219/max7219_cascaded_warnings.output @@ -0,0 +1,6 @@ +221086-222200 max7219: warning: "Short write" +422226-424068 max7219: warning: "Overlong write" +624117-624477 max7219: warning: "Unknown register 0E" +624482-624856 max7219: warning: "Unknown register 0D" +624860-625220 max7219: warning: "Unknown register 0E" +625225-625587 max7219: warning: "Unknown register 0D" diff --git a/decoder/test/max7219/test.conf b/decoder/test/max7219/test.conf index 092f4b0..cd2604a 100644 --- a/decoder/test/max7219/test.conf +++ b/decoder/test/max7219/test.conf @@ -6,3 +6,13 @@ test max7219 output max7219 annotation class register match max7219_register.output output max7219 annotation class digit match max7219_digit.output output max7219 annotation class warning match max7219_warnings.output + +test max7219_cascaded + protocol-decoder spi channel miso=0 channel cs=1 channel mosi=2 channel clk=3 + protocol-decoder max7219 option numofdrivers=4 + stack spi max7219 + input spi/max7219/max7219_4x_cascaded_chips.sr + output max7219 annotation class chip match max7219_cascaded_chips.output + output max7219 annotation class register match max7219_cascaded_registers.output + output max7219 annotation class digit match max7219_cascaded_digits.output + output max7219 annotation class warning match max7219_cascaded_warnings.output