+
+
+ process (gpio11) --nufunguje preo piny 11,17,27 funguje pro 4,18,22,ext_sclk,10
+ begin
+ --if (gpio11'event and gpio11 = '1') then -- rising edge of SCK
+ if (rising_edge(gpio11)) then
+ --if (gpio7 = '0') then -- SPI CS must be selected
+ -- shift serial data into dat_reg on each rising edge
+ -- of SCK, MSB first
+ dat_reg(7 downto 0) <= dat_reg(6 downto 0) & gpio10;
+
+ -- gpio4 <= dat_reg(7);
+ --gpio17 <= dat_reg(6);
+ --gpio18 <= dat_reg(5);
+ --gpio27 <= dat_reg(4);
+ --gpio22 <= dat_reg(3);
+ gpio23 <= dat_reg(2);
+ --gpio24 <= dat_reg(1);
+ -- gpio25 <= dat_reg(0);
+
+
+ -- end if;
+ end if;
+ end process;
+
+-- process (gpio11)
+-- begin
+-- if (rising_edge(gpio11)) then
+-- gpio25 <= '1';
+-- elsif (falling_edge(gpio11)) then
+-- gpio25 <= '0';
+-- end if;
+-- end process;
+