Skip to content

Commit

Permalink
Small documentation cleanup, removed BUGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
keesj committed Dec 29, 2009
1 parent 65faa73 commit e3b13a5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 76 deletions.
34 changes: 0 additions & 34 deletions BUGS

This file was deleted.

13 changes: 0 additions & 13 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <unistd.h>

/* Command line arguments */

struct slogic_sample_rate *sample_rate = NULL;
const char *output_file_name = NULL;
size_t n_samples = 0;
Expand All @@ -21,7 +20,6 @@ size_t n_transfer_buffers = 0;
size_t libusb_debug_level = 0;
unsigned int transfer_timeout = 0;

/* */
const char *me = "main";

void short_usage(const char *message, ...)
Expand Down Expand Up @@ -164,17 +162,6 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}

/* KEJO: the slogic_open should not perform the firmware uploading
the hanlding should still be here */
/* Trygve: Why? It would be a pain for every user to have to handle
the uploading of the firmware. To be able to use the rest of the
API (which basically are the sampling methods) you would need a
(compatible) firmware to be uploaded before usage. */

/* does firmware upload work for you? I guess not. to upload the
firmware we need to connmect to an other VENDOR/PRODUCT. it really
deserves special hanling also because we currently fail to first
upload and continue */
struct slogic_handle *handle = slogic_open();
assert(handle);

Expand Down
2 changes: 0 additions & 2 deletions slogic.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ struct slogic_sample_rate *slogic_parse_sample_rate(const char *str)
/*
* Open / Close
*/

void slogic_upload_firmware(struct slogic_handle *handle)
{
int counter;
Expand Down Expand Up @@ -155,7 +154,6 @@ void slogic_tune(struct slogic_handle *handle, FILE * debug_file, size_t transfe
assert(handle);

/* TODO: Add validation that these values are sane. If not, don't modify but return an error. */

if (debug_file) {
handle->debug_file = debug_file;
}
Expand Down
29 changes: 2 additions & 27 deletions slogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <stdio.h>

struct slogic_sample_rate {
const uint8_t sample_delay; /* sample rates are translated into delays */
const char *text; /* A descriptive text for the sample rate ("24MHz") */
const uint8_t sample_delay; /* sample rates are translated into sampling delays */
const char *text; /* A descriptive text for the sample rate ("24MHz") */
const unsigned int samples_per_second;
};

Expand All @@ -21,32 +21,7 @@ enum slogic_recording_state {
UNKNOWN = 100,
};

/*
* I would really dump the tow method bellow, it not "critical" to the
* lib so just drop it to put it somewhere in the main.c - KEJO
*
* These are reusable utility methods which I think it not a part of
* the "core" api, but something that a many consumers of a library
* would like to use so I'd like to keep them. - Trygve
*
* The problem here is that some it gets hard to hardcode a sample
* rate you need to iterate over the sample rates of use what you call
* a utility method. - KEJO
*
* How about adding this:
*
* struct slogic_sample_rate *slogic_get_sample_rate(unsigned int samples_per_second);
*
* That way you could go like this in your code to get a sample reate
* of 1MHz:
*
* slogic_get_sample_rate(1000000);
*
* - Trygve
*/

void slogic_available_sample_rates(struct slogic_sample_rate **sample_rates_out, size_t * size);

struct slogic_sample_rate *slogic_parse_sample_rate(const char *str);

/*
Expand Down

0 comments on commit e3b13a5

Please sign in to comment.