acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

pio_8bit_parallel.pio.h (2607B)

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