acidportal

- 😈 Worlds smallest Evil Portal on a LilyGo T-QT
git clone git://git.acid.vegas/acidportal.git
Log | Files | Refs | Archive | README | LICENSE

pio_8bit_parallel_18bpp.pio.h (2768B)

      1 // -------------------------------------------------- //
      2 // This file is autogenerated by pioasm; do not edit! //
      3 // -------------------------------------------------- //
      4 
      5 #pragma once
      6 
      7 #if !PICO_NO_HARDWARE
      8 #include "hardware/pio.h"
      9 #endif
     10 
     11 // ------ //
     12 // tft_io //
     13 // ------ //
     14 
     15 #define tft_io_wrap_target 11
     16 #define tft_io_wrap 31
     17 
     18 #define tft_io_offset_block_fill 0u
     19 #define tft_io_offset_start_tx 11u
     20 #define tft_io_offset_start_8 18u
     21 #define tft_io_offset_set_addr_window 21u
     22 
     23 static const uint16_t tft_io_program_instructions[] = {
     24     0x98a0, //  0: pull   block           side 1     
     25     0xa027, //  1: mov    x, osr                     
     26     0x80a0, //  2: pull   block                      
     27     0xa047, //  3: mov    y, osr                     
     28     0xb8e1, //  4: mov    osr, x          side 1     
     29     0x7110, //  5: out    pins, 16        side 0 [1] 
     30     0xb942, //  6: nop                    side 1 [1] 
     31     0x7108, //  7: out    pins, 8         side 0 [1] 
     32     0xb942, //  8: nop                    side 1 [1] 
     33     0x7108, //  9: out    pins, 8         side 0 [1] 
     34     0x1884, // 10: jmp    y--, 4          side 1     
     35             //     .wrap_target
     36     0x98a0, // 11: pull   block           side 1     
     37     0x7110, // 12: out    pins, 16        side 0 [1] 
     38     0xb942, // 13: nop                    side 1 [1] 
     39     0x7108, // 14: out    pins, 8         side 0 [1] 
     40     0xb942, // 15: nop                    side 1 [1] 
     41     0x7108, // 16: out    pins, 8         side 0 [1] 
     42     0x180b, // 17: jmp    11              side 1     
     43     0x98a0, // 18: pull   block           side 1     
     44     0x7100, // 19: out    pins, 32        side 0 [1] 
     45     0x180b, // 20: jmp    11              side 1     
     46     0xf822, // 21: set    x, 2            side 1     
     47     0xe000, // 22: set    pins, 0                    
     48     0x80a0, // 23: pull   block                      
     49     0x7000, // 24: out    pins, 32        side 0     
     50     0x003e, // 25: jmp    !x, 30                     
     51     0x98a0, // 26: pull   block           side 1     
     52     0xe001, // 27: set    pins, 1                    
     53     0x7108, // 28: out    pins, 8         side 0 [1] 
     54     0x19fc, // 29: jmp    !osre, 28       side 1 [1] 
     55     0x1856, // 30: jmp    x--, 22         side 1     
     56     0xe001, // 31: set    pins, 1                    
     57             //     .wrap
     58 };
     59 
     60 #if !PICO_NO_HARDWARE
     61 static const struct pio_program tft_io_program = {
     62     .instructions = tft_io_program_instructions,
     63     .length = 32,
     64     .origin = -1,
     65 };
     66 
     67 static inline pio_sm_config tft_io_program_get_default_config(uint offset) {
     68     pio_sm_config c = pio_get_default_sm_config();
     69     sm_config_set_wrap(&c, offset + tft_io_wrap_target, offset + tft_io_wrap);
     70     sm_config_set_sideset(&c, 2, true, false);
     71     return c;
     72 }
     73 #endif