hx711-pico-c
common.c File Reference
#include <assert.h>
#include <stddef.h>
#include "hardware/pio.h"
#include "../include/common.h"
#include "../include/hx711.h"
#include "../include/hx711_reader.pio.h"
#include "../include/hx711_multi.h"
#include "../include/hx711_multi_awaiter.pio.h"
#include "../include/hx711_multi_reader.pio.h"

Go to the source code of this file.

Functions

void hx711_get_default_config (hx711_config_t *const cfg)
 
void hx711_multi_get_default_config (hx711_multi_config_t *const cfg)
 

Variables

const hx711_config_t HX711__DEFAULT_CONFIG
 
const hx711_multi_config_t HX711__MULTI_DEFAULT_CONFIG
 

Function Documentation

◆ hx711_get_default_config()

void hx711_get_default_config ( hx711_config_t *const  cfg)

Definition at line 56 of file common.c.

56  {
57  assert(cfg != NULL);
58  *cfg = HX711__DEFAULT_CONFIG;
59 }
const hx711_config_t HX711__DEFAULT_CONFIG
Definition: common.c:33

References HX711__DEFAULT_CONFIG.

◆ hx711_multi_get_default_config()

void hx711_multi_get_default_config ( hx711_multi_config_t *const  cfg)

Definition at line 61 of file common.c.

61  {
62  assert(cfg != NULL);
64 }
const hx711_multi_config_t HX711__MULTI_DEFAULT_CONFIG
Definition: common.c:42

References HX711__MULTI_DEFAULT_CONFIG.

Variable Documentation

◆ HX711__DEFAULT_CONFIG

const hx711_config_t HX711__DEFAULT_CONFIG
Initial value:
= {
.clock_pin = 0,
.data_pin = 0,
.pio = pio0,
.pio_init = hx711_reader_pio_init,
.reader_prog = &hx711_reader_program,
.reader_prog_init = hx711_reader_program_init
}
static const struct pio_program hx711_reader_program
void hx711_reader_program_init(hx711_t *const hx)
void hx711_reader_pio_init(hx711_t *const hx)

Definition at line 33 of file common.c.

Referenced by hx711_get_default_config().

◆ HX711__MULTI_DEFAULT_CONFIG

const hx711_multi_config_t HX711__MULTI_DEFAULT_CONFIG
Initial value:
= {
.clock_pin = 0,
.data_pin_base = 0,
.chips_len = 0,
.pio = pio0,
.pio_init = hx711_multi_pio_init,
.awaiter_prog = &hx711_multi_awaiter_program,
.awaiter_prog_init = hx711_multi_awaiter_program_init,
.reader_prog = &hx711_multi_reader_program,
.reader_prog_init = hx711_multi_reader_program_init
}
#define HX711_MULTI_ASYNC_PIO_IRQ_IDX
IRQ index defaults for PIO and DMA.
Definition: hx711_multi.h:65
#define HX711_MULTI_ASYNC_DMA_IRQ_IDX
Definition: hx711_multi.h:66
static const struct pio_program hx711_multi_awaiter_program
void hx711_multi_awaiter_program_init(hx711_multi_t *const hxm)
void hx711_multi_reader_program_init(hx711_multi_t *const hxm)
static const struct pio_program hx711_multi_reader_program
void hx711_multi_pio_init(hx711_multi_t *const hxm)

Definition at line 42 of file common.c.

Referenced by hx711_multi_get_default_config().