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_SPI.pio.h (2824B)

      1 // -------------------------------------------------- //
      2 // This file is autogenerated by pioasm; do not edit! //
      3 // 8 + 16 bit SPI - no auto colour conversion         //
      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 27
     17 #define tft_io_wrap 31
     18 
     19 #define tft_io_offset_start_8 0u
     20 #define tft_io_offset_set_addr_window 3u
     21 #define tft_io_offset_block_fill 17u
     22 #define tft_io_offset_start_tx 27u
     23 
     24 static const uint16_t tft_io_program_instructions[] = {
     25     0x90a0, //  0: pull   block           side 0     
     26     0x6019, //  1: out    pins, 25                   
     27     0x181e, //  2: jmp    30              side 1     
     28     0xf022, //  3: set    x, 2            side 0     
     29     0xe000, //  4: set    pins, 0                    
     30     0x90a0, //  5: pull   block           side 0     
     31     0x6019, //  6: out    pins, 25                   
     32     0xb842, //  7: nop                    side 1     
     33     0x7001, //  8: out    pins, 1         side 0     
     34     0x18e8, //  9: jmp    !osre, 8        side 1     
     35     0xf001, // 10: set    pins, 1         side 0     
     36     0x003b, // 11: jmp    !x, 27                     
     37     0x80a0, // 12: pull   block                      
     38     0x7001, // 13: out    pins, 1         side 0     
     39     0x18ed, // 14: jmp    !osre, 13       side 1     
     40     0x1044, // 15: jmp    x--, 4          side 0     
     41     0x001b, // 16: jmp    27                         
     42     0x90a0, // 17: pull   block           side 0     
     43     0xa027, // 18: mov    x, osr                     
     44     0x80a0, // 19: pull   block                      
     45     0xa047, // 20: mov    y, osr                     
     46     0xb0e1, // 21: mov    osr, x          side 0     
     47     0x7011, // 22: out    pins, 17        side 0     
     48     0xb842, // 23: nop                    side 1     
     49     0x7001, // 24: out    pins, 1         side 0     
     50     0x18f8, // 25: jmp    !osre, 24       side 1     
     51     0x1095, // 26: jmp    y--, 21         side 0     
     52             //     .wrap_target
     53     0x90a0, // 27: pull   block           side 0     
     54     0x7011, // 28: out    pins, 17        side 0     
     55     0xb842, // 29: nop                    side 1     
     56     0x7001, // 30: out    pins, 1         side 0     
     57     0x18fe, // 31: jmp    !osre, 30       side 1     
     58             //     .wrap
     59 };
     60 
     61 #if !PICO_NO_HARDWARE
     62 static const struct pio_program tft_io_program = {
     63     .instructions = tft_io_program_instructions,
     64     .length = 32,
     65     .origin = -1,
     66 };
     67 
     68 static inline pio_sm_config tft_io_program_get_default_config(uint offset) {
     69     pio_sm_config c = pio_get_default_sm_config();
     70     sm_config_set_wrap(&c, offset + tft_io_wrap_target, offset + tft_io_wrap);
     71     sm_config_set_sideset(&c, 2, true, false);
     72     return c;
     73 }
     74 #endif