libmsr  dc2dc9c
Functions
libmsr.c File Reference
#include <stdio.h>
#include "libmsr.h"
Include dependency graph for libmsr.c:

Functions

int msr_dumpbits (uint8_t *buf, int len)
 
int msr_getbit (uint8_t *buf, uint8_t len, int bit)
 
int msr_setbit (uint8_t *buf, uint8_t len, int bit, int val)
 
int msr_decode (uint8_t *inbuf, uint8_t inlen, uint8_t *outbuf, uint8_t *outlen, int bpc)
 
int msr_reverse_tracks (msr_tracks_t *tracks)
 Reverse a msr_tracks_t structure in-place. More...
 
int msr_reverse_track (msr_track_t *track)
 Reverse a msr_track_t structure in-place. More...
 
void msr_pretty_output_hex (int fd, msr_tracks_t tracks)
 Dump a "pretty" hexadecimal representation of tracks to a fd. More...
 
void msr_pretty_output_string (int fd, msr_tracks_t tracks)
 Dump a "pretty" string representation of tracks to a fd. More...
 
void msr_pretty_output_bits (int fd, msr_tracks_t tracks)
 Dump a "pretty" binary representation of tracks to a fd. More...
 
void msr_pretty_printer_hex (msr_tracks_t tracks)
 Dump a "pretty" hexadecimal representation of tracks to stdout. More...
 
void msr_pretty_printer_string (msr_tracks_t tracks)
 Dump a "pretty" string representation of tracks to stdout. More...
 
void msr_pretty_printer_bits (msr_tracks_t tracks)
 Dump a "pretty" binary representation of tracks to stdout. More...
 
const unsigned char msr_reverse_byte (const unsigned char byte)
 Reverse a single byte. More...
 

Function Documentation

◆ msr_decode()

int msr_decode ( uint8_t *  inbuf,
uint8_t  inlen,
uint8_t *  outbuf,
uint8_t *  outlen,
int  bpc 
)

◆ msr_dumpbits()

int msr_dumpbits ( uint8_t *  buf,
int  len 
)

◆ msr_getbit()

int msr_getbit ( uint8_t *  buf,
uint8_t  len,
int  bit 
)

◆ msr_pretty_output_bits()

void msr_pretty_output_bits ( int  fd,
msr_tracks_t  tracks 
)

Dump a "pretty" binary representation of tracks to a fd.

Parameters
fdThe fd to write to.
tracksThe tracks to dump.

◆ msr_pretty_output_hex()

void msr_pretty_output_hex ( int  fd,
msr_tracks_t  tracks 
)

Dump a "pretty" hexadecimal representation of tracks to a fd.

Parameters
fdThe fd to write to.
tracksThe tracks to dump.

◆ msr_pretty_output_string()

void msr_pretty_output_string ( int  fd,
msr_tracks_t  tracks 
)

Dump a "pretty" string representation of tracks to a fd.

Parameters
fdThe fd to write to.
tracksThe tracks to dump.

◆ msr_pretty_printer_bits()

void msr_pretty_printer_bits ( msr_tracks_t  tracks)

Dump a "pretty" binary representation of tracks to stdout.

Parameters
tracksThe tracks to dump.

◆ msr_pretty_printer_hex()

void msr_pretty_printer_hex ( msr_tracks_t  tracks)

Dump a "pretty" hexadecimal representation of tracks to stdout.

Parameters
tracksThe tracks to dump.

◆ msr_pretty_printer_string()

void msr_pretty_printer_string ( msr_tracks_t  tracks)

Dump a "pretty" string representation of tracks to stdout.

Parameters
tracksThe tracks to dump.

◆ msr_reverse_byte()

const unsigned char msr_reverse_byte ( const unsigned char  byte)

Reverse a single byte.

Parameters
byteThe byte to reverse.
Returns
The reversed byte.

◆ msr_reverse_track()

int msr_reverse_track ( msr_track_t track)

Reverse a msr_track_t structure in-place.

Parameters
trackA point to the msr_track_t to reverse.
Returns
LIBMSR_ERR_OK

◆ msr_reverse_tracks()

int msr_reverse_tracks ( msr_tracks_t tracks)

Reverse a msr_tracks_t structure in-place.

Parameters
tracksA pointer to the msr_tracks_t to reverse.
Returns
LIBMSR_ERR_OK

◆ msr_setbit()

int msr_setbit ( uint8_t *  buf,
uint8_t  len,
int  bit,
int  val 
)