aboutsummaryrefslogtreecommitdiff
path: root/shared/pb/moddrv.h
blob: b48f4db8f029d3821908408bb95199184f3bb846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

/**
 * \file puzzle bus driver implementation
 *
 * Most \c pbdrv_* functions have a weak implementation, which may be
 * overwritten by a custom implementation. This allows you to use the default
 * implementation where possible, and only implement extensions required for
 * your puzzle module. Please see spec.adoc for more information about how to
 * use the puzzle bus driver library.
 */

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

#include "types.h"

extern const char * PBDRV_MOD_NAME;
extern const i2c_addr_t PBDRV_MOD_ADDR;

#ifdef __cplusplus
extern "C" {
#endif

void pbdrv_i2c_recv(const uint8_t * buf, size_t sz);
void pbdrv_i2c_send(i2c_addr_t i2c_addr, const uint8_t * buf, size_t sz);

#ifdef __cplusplus
}
#endif