mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
6c1481b6ee
Some CAN transceivers have a standby pin that has to be pulled low in order to use it. If the interface is disabled we can set it to high again to save some power.
77 lines
2.0 KiB
C
77 lines
2.0 KiB
C
/*
|
|
* Copyright (C) 2019 Juergen Fitschen <me@jue.yt>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* @ingroup drivers_dose
|
|
* @{
|
|
* @file
|
|
* @brief Default configuration for the Differentially Operated Serial Ethernet driver
|
|
*
|
|
* @author Juergen Fitschen <me@jue.yt>
|
|
*/
|
|
|
|
#ifndef DOSE_PARAMS_H
|
|
#define DOSE_PARAMS_H
|
|
|
|
#include "board.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @name Set default configuration parameters for the DOSE driver
|
|
* @{
|
|
*/
|
|
#ifndef DOSE_PARAM_UART
|
|
#define DOSE_PARAM_UART (UART_DEV(1))
|
|
#endif
|
|
#ifndef DOSE_PARAM_BAUDRATE
|
|
#define DOSE_PARAM_BAUDRATE (115200)
|
|
#endif
|
|
#ifndef DOSE_PARAM_SENSE_PIN
|
|
#define DOSE_PARAM_SENSE_PIN (GPIO_UNDEF)
|
|
#endif
|
|
#ifndef DOSE_PARAM_STANDBY_PIN
|
|
#define DOSE_PARAM_STANDBY_PIN (GPIO_UNDEF) /**< Standby/Silent mode */
|
|
#endif
|
|
|
|
#ifndef DOSE_PARAMS
|
|
#ifdef MODULE_PERIPH_UART_RXSTART_IRQ
|
|
#define DOSE_PARAMS { \
|
|
.uart = DOSE_PARAM_UART, \
|
|
.baudrate = DOSE_PARAM_BAUDRATE, \
|
|
.standby_pin = DOSE_PARAM_STANDBY_PIN, \
|
|
}
|
|
#else /* MODULE_PERIPH_UART_RXSTART_IRQ */
|
|
#define DOSE_PARAMS { \
|
|
.uart = DOSE_PARAM_UART, \
|
|
.baudrate = DOSE_PARAM_BAUDRATE, \
|
|
.standby_pin = DOSE_PARAM_STANDBY_PIN, \
|
|
.sense_pin = DOSE_PARAM_SENSE_PIN, \
|
|
}
|
|
#endif /* !MODULE_PERIPH_UART_RXSTART_IRQ */
|
|
#endif
|
|
/**@}*/
|
|
|
|
/**
|
|
* @brief DOSE configuration
|
|
*/
|
|
static const dose_params_t dose_params[] =
|
|
{
|
|
DOSE_PARAMS
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* DOSE_PARAMS_H */
|
|
/** @} */
|