ds3234.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 SKF AB
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
26 #include <periph/gpio.h>
27 #include <periph/spi.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 typedef struct {
37  spi_t spi;
39  gpio_t cs;
41 
46  DS3234_OK = 0,
47  DS3234_NO_DEV = 1,
48  DS3234_NO_SPI = 2
49 };
50 
62 int ds3234_pps_init(const ds3234_params_t *params);
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
spi_clk_t
Definition: periph_cpu.h:351
Low-level GPIO peripheral driver interface definitions.
int ds3234_pps_init(const ds3234_params_t *params)
Initialize the DS3234 RTC as a PPS device.
ds3234_return_codes
Return codes for the DS3234 device driver.
Definition: ds3234.h:45
Low-level SPI peripheral driver interface definition.
Parameters for the DS3234 device driver.
Definition: ds3234.h:36
spi_clk_t clk
SPI bus clock speed.
Definition: ds3234.h:38
gpio_t cs
CS pin GPIO handle.
Definition: ds3234.h:39
spi_t spi
SPI bus the sensor is connected to.
Definition: ds3234.h:37