RocketLogger  1.0
rl_hw.h File Reference
#include "types.h"
#include "util.h"
#include "gpio.h"
#include "pwm.h"
#include "pru.h"
+ Include dependency graph for rl_hw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FHR1_GPIO   30
 Linux GPIO number for forcing I1 high. More...
 
#define FHR2_GPIO   60
 Linux GPIO number for forcing I2 high. More...
 
#define LED_STATUS_GPIO   45
 Linux GPIO number of status LED. More...
 
#define LED_ERROR_GPIO   44
 Linux GPIO number of error LED. More...
 

Functions

void hw_init (struct rl_conf *conf)
 
void hw_close (struct rl_conf *conf)
 
int hw_sample (struct rl_conf *conf)
 

Macro Definition Documentation

#define FHR1_GPIO   30

Linux GPIO number for forcing I1 high.

Copyright (c) 2016-2017, ETH Zurich, Computer Engineering Group

Definition at line 12 of file rl_hw.h.

Referenced by hw_close(), and hw_init().

#define FHR2_GPIO   60

Linux GPIO number for forcing I2 high.

Definition at line 14 of file rl_hw.h.

Referenced by hw_close(), and hw_init().

#define LED_ERROR_GPIO   44

Linux GPIO number of error LED.

Definition at line 18 of file rl_hw.h.

Referenced by hw_init(), and hw_sample().

#define LED_STATUS_GPIO   45

Linux GPIO number of status LED.

Definition at line 16 of file rl_hw.h.

Referenced by hw_close(), and hw_init().

Function Documentation

void hw_close ( struct rl_conf conf)

Close all hardware modules

Parameters
confPointer to current rl_conf configuration

Definition at line 56 of file rl_hw.c.

References rl_status::buffer_number, FHR1_GPIO, FHR2_GPIO, gpio_set_value(), gpio_unexport(), LED_STATUS_GPIO, LIMIT, rl_conf::mode, pru_close(), pru_stop(), pwm_close(), rl_status::samples_taken, status, and write_status().

Referenced by rl_start().

+ Here is the call graph for this function:

void hw_init ( struct rl_conf conf)
int hw_sample ( struct rl_conf conf)

Hardware sampling function

Parameters
confPointer to current rl_conf configuration
Returns
SUCCESS on success, FAILURE otherwise

Definition at line 85 of file rl_hw.c.

References ERROR, FAILURE, rl_conf::file_format, rl_conf::file_name, gpio_set_value(), LED_ERROR_GPIO, NO_FILE, pru_sample(), read_calibration(), rl_log(), SUCCESS, and WARNING.

Referenced by rl_start().

+ Here is the call graph for this function: