Skip to content

Commit

Permalink
fix CI check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
firas-hamdi committed Mar 19, 2024
1 parent 438debe commit 398a1e2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
2 changes: 2 additions & 0 deletions dist/tools/doccheck/exclude_simple
Original file line number Diff line number Diff line change
Expand Up @@ -8424,3 +8424,5 @@ warning: Member LSM6DSXX_PARAM_GYRO_FIFO_DEC (macro definition) of file lsm6dsxx
warning: Member LSM6DSXX_PARAMS (macro definition) of file lsm6dsxx_params.h is not documented.
warning: Member LSM6DSXX_SAUL_INFO (macro definition) of file lsm6dsxx_params.h is not documented.
RIOTDoxygenLayout.xml:8: warning: the type 'topics' is not supported for the entry tag within a navindex! Check your layout file!
Error: Member stby_pin (variable) of struct at6561_trx is not documented.
Error: Member trx (variable) of struct at6561_trx is not documented.
46 changes: 23 additions & 23 deletions drivers/at6561/at6561.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,38 @@ static int _init(can_trx_t *can_trx);
static int _set_mode(can_trx_t *can_trx, can_trx_mode_t mode);

const trx_driver_t at6561_driver = {
.init = _init,
.set_mode = _set_mode,
.init = _init,
.set_mode = _set_mode,
};

static int _init(can_trx_t *can_trx)
{
at6561_trx_t *dev = container_of(can_trx, at6561_trx_t, trx);
at6561_trx_t *dev = container_of(can_trx, at6561_trx_t, trx);

gpio_init(dev->stby_pin, GPIO_OUT);
/* A high level on the standby pin of the CAN transceiver will
select the standby mode. Check AT6560/1 datasheet, table 1-1 */
gpio_set(dev->stby_pin);
gpio_init(dev->stby_pin, GPIO_OUT);
/* A high level on the standby pin of the CAN transceiver will
select the standby mode. Check AT6560/1 datasheet, table 1-1 */
gpio_set(dev->stby_pin);

return 1;
return 1;
}

/* Set the mode of the CAN transceiver */
static int _set_mode(can_trx_t *can_trx, can_trx_mode_t mode)
{
at6561_trx_t *dev = container_of(can_trx, at6561_trx_t, trx);

/* Check AT6560/1 datasheet, table 1-1 */
switch (mode) {
case TRX_NORMAL_MODE:
gpio_clear(dev->stby_pin);
break;
case TRX_SLEEP_MODE:
gpio_set(dev->stby_pin);
break;
default:
assert(0);
}

return 1;
at6561_trx_t *dev = container_of(can_trx, at6561_trx_t, trx);

/* Check AT6560/1 datasheet, table 1-1 */
switch (mode) {
case TRX_NORMAL_MODE:
gpio_clear(dev->stby_pin);
break;
case TRX_SLEEP_MODE:
gpio_set(dev->stby_pin);
break;
default:
assert(0);
}

return 1;
}
27 changes: 21 additions & 6 deletions drivers/include/at6561.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,33 @@
* @author Firas Hamdi <firas.hamdi@ml-pa.com>
*/

#ifndef AT6561_H
#define AT6561_H

#include "periph/gpio.h"
#include "can/can_trx.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief AT6561 CAN transceiver descriptor
*/
typedef struct at6561_trx {
/* AT6561 standby pin */
gpio_t stby_pin;
/* AT6561 interface */
can_trx_t trx;
/* AT6561 standby pin */
gpio_t stby_pin;

Check failure on line 33 in drivers/include/at6561.h

View workflow job for this annotation

GitHub Actions / static-tests

Member stby_pin (variable) of struct at6561_trx is not documented.
/* AT6561 interface */
can_trx_t trx;

Check failure on line 35 in drivers/include/at6561.h

View workflow job for this annotation

GitHub Actions / static-tests

Member trx (variable) of struct at6561_trx is not documented.
} at6561_trx_t;

/* AT6561 driver */
extern const trx_driver_t at6561_driver;
/**
* @brief AT6561 driver
*/
extern const trx_driver_t at6561_driver;

#ifdef __cplusplus
}
#endif

#endif /* AT6561_H */

0 comments on commit 398a1e2

Please sign in to comment.