pico-scale
scale_adaptor.c File Reference
#include <assert.h>
#include <stddef.h>
#include "../include/scale_adaptor.h"

Go to the source code of this file.

Functions

bool scale_adaptor_init (scale_adaptor_t *const sa, void *data)
 
void * scale_adaptor_get_data (scale_adaptor_t *const sa)
 

Function Documentation

◆ scale_adaptor_get_data()

void* scale_adaptor_get_data ( scale_adaptor_t *const  sa)

Definition at line 35 of file scale_adaptor.c.

36  {
37  assert(sa != NULL);
38  return sa->_data;
39 }
void * _data
Arbitrary user data.
Definition: scale_adaptor.h:39

References scale_adaptor::_data.

Referenced by hx711_scale_adaptor_get_value(), and hx711_scale_adaptor_get_value_timeout().

◆ scale_adaptor_init()

bool scale_adaptor_init ( scale_adaptor_t *const  sa,
void *  data 
)

Definition at line 27 of file scale_adaptor.c.

29  {
30  assert(sa != NULL);
31  sa->_data = data;
32  return true;
33 }

References scale_adaptor::_data.

Referenced by hx711_scale_adaptor_init().