wave: add header
This commit is contained in:
parent
963cd1059e
commit
960c8956b2
20
wave/wave.h
Normal file
20
wave/wave.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
struct pdmout {
|
||||||
|
volatile uint16_t amplitude;
|
||||||
|
volatile uint16_t flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define PDMOUT_FLAG_ENABLE_pos 0
|
||||||
|
#define PDMOUT_FLAG_ENABLE_msk (1 << PDMOUT_FLAG_ENABLE_pos)
|
||||||
|
|
||||||
|
struct square {
|
||||||
|
volatile uint16_t period;
|
||||||
|
volatile uint16_t high_val;
|
||||||
|
volatile uint16_t low_val;
|
||||||
|
volatile uint16_t output_address;
|
||||||
|
volatile uint16_t flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SQUARE_FLAG_ENABLE_pos 0
|
||||||
|
#define SQUARE_FLAG_ENABLE_msk (1 << SQUARE_FLAG_ENABLE_pos)
|
Loading…
Reference in New Issue
Block a user