flinklib
flinklib: flink C library for Linux
ppwa.c File Reference

flink userspace library, subdevice function "ppwa". More...

#include "flinklib.h"
#include "types.h"
#include "error.h"
#include "log.h"
Include dependency graph for ppwa.c:

Go to the source code of this file.

Functions

int flink_ppwa_get_baseclock (flink_subdev *subdev, uint32_t *frequency)
 Reads the base clock of a PPWA subdevice. More...
 
int flink_ppwa_get_period (flink_subdev *subdev, uint32_t channel, uint32_t *period)
 Reads the PPWA period. More...
 
int flink_ppwa_get_hightime (flink_subdev *subdev, uint32_t channel, uint32_t *hightime)
 Reads the PPWA hightime. More...
 

Detailed Description

flink userspace library, subdevice function "ppwa".

Contains the high-level functions for a flink subdevice which realizes the function "ppwa".

Author
Urs Graf

Definition in file ppwa.c.

Function Documentation

int flink_ppwa_get_baseclock ( flink_subdev subdev,
uint32_t *  frequency 
)

Reads the base clock of a PPWA subdevice.

Parameters
subdevSubdevice.
frequencyContains the base clock in Hz.
Returns
int: 0 on success, -1 in case of failure.

Definition at line 35 of file ppwa.c.

int flink_ppwa_get_hightime ( flink_subdev subdev,
uint32_t  channel,
uint32_t *  hightime 
)

Reads the PPWA hightime.

Parameters
subdevSubdevice.
channelChannel number.
hightimeContains the hightime of the PPWA signal in multiples of the base clock.
Returns
int: 0 on success, -1 in case of failure.

Definition at line 79 of file ppwa.c.

int flink_ppwa_get_period ( flink_subdev subdev,
uint32_t  channel,
uint32_t *  period 
)

Reads the PPWA period.

Parameters
subdevSubdevice.
channelChannel number.
periodContains the period of the PPWA signal in multiples of the base clock.
Returns
int: 0 on success, -1 in case of failure.

Definition at line 57 of file ppwa.c.