8 #include "hardware/pio.h"
15 #define hx711_multi_reader_wrap_target 3
16 #define hx711_multi_reader_wrap 18
18 #define hx711_multi_reader_HZ 10000000
20 #define hx711_multi_reader_offset_bitloop_in_pins_bit_count 9u
54 pio_sm_config c = pio_get_default_sm_config();
56 sm_config_set_sideset(&c, 2,
true,
false);
83 #include "hardware/clocks.h"
84 #include "hardware/pio.h"
85 #include "hardware/pio_instructions.h"
86 #include "hardware/structs/clocks.h"
91 assert(hxm->
_pio != NULL);
118 assert(hxm->
_pio != NULL);
124 sm_config_set_clkdiv(
138 pio_sm_set_consecutive_pindirs(
144 sm_config_set_set_pins(
148 sm_config_set_out_pins(
152 sm_config_set_sideset_pins(
160 pio_sm_set_consecutive_pindirs(
166 sm_config_set_in_pins(
169 sm_config_set_in_shift(
#define HX711_MULTI_CONVERSION_DONE_IRQ_NUM
PIO interrupt number which is set by the reader PIO State Machine when a conversion period ends....
#define HX711_MULTI_DATA_READY_IRQ_NUM
PIO interrupt number which is used between the awaiter and reader PIO State Machines to indicate when...
#define hx711_multi_reader_wrap_target
#define hx711_multi_reader_offset_bitloop_in_pins_bit_count
#define hx711_multi_reader_wrap
void hx711_multi_reader_program_init(hx711_multi_t *const hxm)
static const struct pio_program hx711_multi_reader_program
static pio_sm_config hx711_multi_reader_program_get_default_config(uint offset)
void hx711_multi_pio_init(hx711_multi_t *const hxm)
static const uint16_t hx711_multi_reader_program_instructions[]
#define hx711_multi_reader_HZ
pio_sm_config _reader_default_config
bool util_routable_pio_interrupt_num_is_valid(const uint pio_interrupt_num)
Check whether a PIO interrupt number is a valid routable interrupt number.
void util_pio_gpio_contiguous_init(PIO const pio, const uint base, const uint len)
Inits GPIO pins for PIO from base to base + len.
bool util_pio_interrupt_num_is_valid(const uint pio_interrupt_num)
Check whether a PIO interrupt number is valid.