Tape write functions¶
#include "write.h"
Typedefs
-
typedef PulseConfig const *const PCP¶
Constant pulse config pointer.
Functions
-
void writeGap(FILE *const output, uint32_t *const size, int const n, PCP pulseConfig)¶
Write a gap of
nshort pulses.- Parameters:
output – [out] Output file.
size – [inout] Size of
output.n – [in] Number of pulses.
pulseConfig – [in] Pulse config.
-
void writeTapeMark(FILE *const output, uint32_t *const size, int const n, PCP pulseConfig)¶
Write a tape mark of
nlong pulses,nshort pulses and one long pulse.- Parameters:
output – [out] Output file.
size – [inout] Size of
output.n – [in] Number of pulses.
pulseConfig – [in] Pulse config.
-
uint16_t writeByte(FILE *const output, uint32_t *const size, uint8_t const data, PCP pulseConfig)¶
Write a byte and count the number of ones for the checksum.
- Parameters:
output – [out] Output file.
size – [inout] Size of
output.data – [in] Data.
pulseConfig – [in] Pulse config.
- Returns:
Number of ones in
data.
-
struct Pulse¶
-
struct PulseConfig¶