UdonLibrary 1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
SquareWave.pio.hpp
[詳解]
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# include <pico/stdlib.h>
10
11#endif
12
13namespace Udon
14{
15 namespace Pio
16 {
17 namespace Sqwave
18 {
19
20 // ---------- //
21 // squarewave //
22 // ---------- //
23
24 static const uint16_t squarewave_program_instructions[] = {
25 // .wrap_target
26 0xe081, // 0: set pindirs, 1
27 0xe101, // 1: set pins, 1 [1]
28 0xe000, // 2: set pins, 0
29 0x0001, // 3: jmp 1
30 // .wrap
31 };
32
33#if !PICO_NO_HARDWARE
34 static const struct pio_program squarewave_program = {
35 .instructions = squarewave_program_instructions,
36 .length = 4,
37 .origin = -1,
38 };
39
40# define squarewave_wrap_target 0
41# define squarewave_wrap 3
42 static inline pio_sm_config squarewave_program_get_default_config(uint offset)
43 {
44 pio_sm_config c = pio_get_default_sm_config();
45 sm_config_set_wrap(&c, offset + squarewave_wrap_target, offset + squarewave_wrap);
46 return c;
47 }
48# undef squarewave_wrap_target
49# undef squarewave_wrap
50#endif
51 } // namespace Sqwave
52 } // namespace Pio
53} // namespace Udon
#define squarewave_wrap
Definition SquareWave.pio.hpp:41
#define squarewave_wrap_target
Definition SquareWave.pio.hpp:40
Definition Bit.hpp:12