[PATCH] Fix typos and harmonize spaces
From: Yegor Yefremov --- src/ftdi.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index 0a7fb27..3a51b26 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -83,7 +83,7 @@ static void ftdi_usb_close_internal (struct ftdi_context *ftdi) \retval 0: all fine \retval -1: couldn't allocate read buffer -\retval -2: couldn't allocate struct buffer +\retval -2: couldn't allocate struct buffer \retval -3: libusb_init() failed \remark This should be called before all functions @@ -112,7 +112,7 @@ int ftdi_init(struct ftdi_context *ftdi) ftdi_error_return(-3, "libusb_init() failed"); ftdi_set_interface(ftdi, INTERFACE_ANY); -ftdi->bitbang_mode = 1; /* when bitbang is enabled this holds the number of the mode */ +ftdi->bitbang_mode = 1; /* when bitbang is enabled this holds the number of the mode */ eeprom = (struct ftdi_eeprom *)malloc(sizeof(struct ftdi_eeprom)); if (eeprom == 0) @@ -298,7 +298,7 @@ struct ftdi_version_info ftdi_get_library_version(void) /** Finds all ftdi devices with given VID:PID on the usb bus. Creates a new ftdi_device_list which needs to be deallocated by ftdi_list_free() after -use. With VID:PID 0:0, search for the default devices +use. With VID:PID 0:0, search for the default devices (0x403:0x6001, 0x403:0x6010, 0x403:0x6011, 0x403:0x6014, 0x403:0x6015) \param ftdi pointer to ftdi_context @@ -639,7 +639,7 @@ int ftdi_usb_open_dev(struct ftdi_context *ftdi, libusb_device *dev) ftdi_error_return(-12, "libusb_get_configuration () failed"); // set configuration (needed especially for windows) // tolerate EBUSY: one device with one configuration, but two interfaces -//and libftdi sessions to both interfaces (e.g. FT2232) +// and libftdi sessions to both interfaces (e.g. FT2232) if (desc.bNumConfigurations > 0 && cfg != cfg0) { if (libusb_set_configuration(ftdi->usb_dev, cfg0) < 0) @@ -1316,7 +1316,7 @@ static int ftdi_to_clkbits_AM(int baudrate, unsigned long *encoded_divisor) return best_baud; } -/* ftdi_to_clkbits Convert a requested baudrate for a given system clock and predivisor +/* ftdi_to_clkbits Convert a requested baudrate for a given system clock and predivisor to encoded divisor and the achievable baudrate Function is only used internally \internal @@ -3072,7 +3072,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) i = 0xa0; break; } -/* Wrap around 0x80 for 128 byte EEPROMS (Internale and 93x46) */ +/* Wrap around 0x80 for 128 byte EEPROMS (Internal and 93x46) */ eeprom_size_mask = eeprom->size -1; free_end = i & eeprom_size_mask; @@ -3136,7 +3136,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) } /* Bytes and Bits specific to (some) types - Write linear, as this allows easier fixing*/ + Write linear, as this allows easier fixing */ switch (ftdi->type) { case TYPE_AM: @@ -3208,7 +3208,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) if (eeprom->external_oscillator) output[0x00] |= 0x02; -output[0x01] = 0x40; /* Hard coded Endpoint Size*/ +output[0x01] = 0x40; /* Hard coded Endpoint Size */ if (eeprom->suspend_pull_downs) output[0x0A] |= 0x4; @@ -3440,7 +3440,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) case TYPE_230X: output[0x00] = 0x80; /* Actually, leave the default value */ /*FIXME: Make DBUS & CBUS Control configurable*/ -output[0x0c] = 0;/* DBUS drive 4mA, CBUS drive 4 mA like factory default */ +output[0x0c] = 0;/* DBUS drive 4mA, CBUS drive 4mA like factory default */ for (j = 0; j <= 6; j++) { output[0x1a + j] = eeprom->cbus_function[j]; -- 2.34.1 -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com
Re: [PATCH] Fix typos
Hi Yegor, You wrote on Thu, Jan 16, 2020 at 08:44:48AM +0100: > > From: Yegor Yefremov > > > > Signed-off-by: Yegor Yefremov > > --- > > cmake/FindConfuse.cmake | 2 +- > > examples/async.c| 4 ++-- > > examples/serial_test.c | 2 +- > > examples/stream_test.c | 4 ++-- > > ftdipp/CMakeLists.txt | 2 +- > > ftdipp/ftdi.cpp | 2 +- > > I have found out that both ftdipp/ftdi.cpp and ftdipp/ftdi.hpp are > UTF-8 encoded. How can we fix this? I've applied your patch, thanks a lot. Is there a problem with UTF-8 encoded files? Does some tool complain? I don't mind UTF-8 too much, in fact I embrace it to keep umlauts or other non-ASCII chars intact. Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com
Re: [PATCH] Fix typos
Hi Thomas, On Thu, Jan 16, 2020 at 8:42 AM wrote: > > From: Yegor Yefremov > > Signed-off-by: Yegor Yefremov > --- > cmake/FindConfuse.cmake | 2 +- > examples/async.c| 4 ++-- > examples/serial_test.c | 2 +- > examples/stream_test.c | 4 ++-- > ftdipp/CMakeLists.txt | 2 +- > ftdipp/ftdi.cpp | 2 +- I have found out that both ftdipp/ftdi.cpp and ftdipp/ftdi.hpp are UTF-8 encoded. How can we fix this? Yegor > python/examples/cbus.py | 2 +- > src/CMakeLists.txt | 2 +- > src/ftdi.c | 2 +- > src/ftdi_i.h| 6 +++--- > 10 files changed, 14 insertions(+), 14 deletions(-) > > diff --git a/cmake/FindConfuse.cmake b/cmake/FindConfuse.cmake > index ab25eef..f6af7d5 100644 > --- a/cmake/FindConfuse.cmake > +++ b/cmake/FindConfuse.cmake > @@ -6,7 +6,7 @@ > # CONFUSE_INCLUDE_DIR - where to find confuse.h > # CONFUSE_INCLUDE_DIRS - confuse includes > # CONFUSE_LIBRARY - where to find the Confuse library > -# CONFUSE_LIBRARIES - aditional libraries > +# CONFUSE_LIBRARIES - additional libraries > # CONFUSE_ROOT_DIR - root dir (ex. /usr/local) > > > #= > diff --git a/examples/async.c b/examples/async.c > index 18989c1..241bb7f 100644 > --- a/examples/async.c > +++ b/examples/async.c > @@ -3,7 +3,7 @@ > This program is distributed under the GPL, version 2 > */ > > -/* This programm switches to MPSSE mode, and sets and then reads back > +/* This program switches to MPSSE mode, and sets and then reads back > * the high byte 3 times with three different values. > * The expected read values are hard coded in ftdi_init > * with 0x00, 0x55 and 0xaa > @@ -167,7 +167,7 @@ int main(int argc, char **argv) > } > } > if (i < 1) { > -printf("Async read unsuccessfull\n"); > +printf("Async read unsuccessful\n"); > } > } > printf("Read %02x %02x %02x\n", data[0], data[1], data[2]); > diff --git a/examples/serial_test.c b/examples/serial_test.c > index 289dd97..0631504 100644 > --- a/examples/serial_test.c > +++ b/examples/serial_test.c > @@ -134,7 +134,7 @@ int main(int argc, char **argv) > * > * TODO: Make these parameters settable from the command line > * > - * Parameters are choosen that sending a continous stream of 0x55 > + * Parameters are chosen that sending a continuous stream of 0x55 > * should give a square wave > * > */ > diff --git a/examples/stream_test.c b/examples/stream_test.c > index 43abea9..10e0977 100644 > --- a/examples/stream_test.c > +++ b/examples/stream_test.c > @@ -10,7 +10,7 @@ > * 3* uint32_t dont_care > * > * After start, data will be read in streaming until the program is aborted > - * Progess information wil be printed out > + * Progress information will be printed out > * If a filename is given on the command line, the data read will be > * written to that file > * > @@ -52,7 +52,7 @@ usage(const char *argv0) > "[-n] don't check for special block structure\n" > "\n" > "If some filename is given, write data read to that file\n" > - "Progess information is printed each second\n" > + "Progress information is printed each second\n" > "Abort with ^C\n" > "\n" > "Options:\n" > diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt > index a9e3418..fac5bcc 100644 > --- a/ftdipp/CMakeLists.txt > +++ b/ftdipp/CMakeLists.txt > @@ -14,7 +14,7 @@ include_directories(${Boost_INCLUDE_DIRS}) > # Shared library > add_library(ftdipp1 SHARED ${cpp_sources}) > > -math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")# Compatiblity with > previous releases > +math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")# Compatibility with > previous releases > set_target_properties(ftdipp1 PROPERTIES VERSION > ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 3) > > # Prevent clobbering each other during the build > diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp > index dd777be..f82b865 100644 > --- a/ftdipp/ftdi.cpp > +++ b/ftdipp/ftdi.cpp > @@ -1,5 +1,5 @@ > /*** > - ftdi.cpp - C++ wraper for libftdi > + ftdi.cpp - C++ wrapper for libftdi > --- > begin: Mon Oct 13 2008 > copyright: (C) 2008-2017 by Marek Vavruša / libftdi > developers > diff --git a/python/examples/cbus.py b/python/examples/cbus.py > index 3ab9512..9c0356c 100644 > --- a/python/examples/cbus.py > +++ b/python/examples/cbus.py > @@ -6,7 +6,7 @@ This program is distributed under the GPL, version 2. > > Demonstrate how to configure the FT230X USB UART bridge as follows: >max_power 500 mA > - CBUS3 Drive 1 (accomodate PCB error) > + CBUS3 Drive 1
[PATCH] Fix typos
From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- cmake/FindConfuse.cmake | 2 +- examples/async.c| 4 ++-- examples/serial_test.c | 2 +- examples/stream_test.c | 4 ++-- ftdipp/CMakeLists.txt | 2 +- ftdipp/ftdi.cpp | 2 +- python/examples/cbus.py | 2 +- src/CMakeLists.txt | 2 +- src/ftdi.c | 2 +- src/ftdi_i.h| 6 +++--- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmake/FindConfuse.cmake b/cmake/FindConfuse.cmake index ab25eef..f6af7d5 100644 --- a/cmake/FindConfuse.cmake +++ b/cmake/FindConfuse.cmake @@ -6,7 +6,7 @@ # CONFUSE_INCLUDE_DIR - where to find confuse.h # CONFUSE_INCLUDE_DIRS - confuse includes # CONFUSE_LIBRARY - where to find the Confuse library -# CONFUSE_LIBRARIES - aditional libraries +# CONFUSE_LIBRARIES - additional libraries # CONFUSE_ROOT_DIR - root dir (ex. /usr/local) #= diff --git a/examples/async.c b/examples/async.c index 18989c1..241bb7f 100644 --- a/examples/async.c +++ b/examples/async.c @@ -3,7 +3,7 @@ This program is distributed under the GPL, version 2 */ -/* This programm switches to MPSSE mode, and sets and then reads back +/* This program switches to MPSSE mode, and sets and then reads back * the high byte 3 times with three different values. * The expected read values are hard coded in ftdi_init * with 0x00, 0x55 and 0xaa @@ -167,7 +167,7 @@ int main(int argc, char **argv) } } if (i < 1) { -printf("Async read unsuccessfull\n"); +printf("Async read unsuccessful\n"); } } printf("Read %02x %02x %02x\n", data[0], data[1], data[2]); diff --git a/examples/serial_test.c b/examples/serial_test.c index 289dd97..0631504 100644 --- a/examples/serial_test.c +++ b/examples/serial_test.c @@ -134,7 +134,7 @@ int main(int argc, char **argv) * * TODO: Make these parameters settable from the command line * - * Parameters are choosen that sending a continous stream of 0x55 + * Parameters are chosen that sending a continuous stream of 0x55 * should give a square wave * */ diff --git a/examples/stream_test.c b/examples/stream_test.c index 43abea9..10e0977 100644 --- a/examples/stream_test.c +++ b/examples/stream_test.c @@ -10,7 +10,7 @@ * 3* uint32_t dont_care * * After start, data will be read in streaming until the program is aborted - * Progess information wil be printed out + * Progress information will be printed out * If a filename is given on the command line, the data read will be * written to that file * @@ -52,7 +52,7 @@ usage(const char *argv0) "[-n] don't check for special block structure\n" "\n" "If some filename is given, write data read to that file\n" - "Progess information is printed each second\n" + "Progress information is printed each second\n" "Abort with ^C\n" "\n" "Options:\n" diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt index a9e3418..fac5bcc 100644 --- a/ftdipp/CMakeLists.txt +++ b/ftdipp/CMakeLists.txt @@ -14,7 +14,7 @@ include_directories(${Boost_INCLUDE_DIRS}) # Shared library add_library(ftdipp1 SHARED ${cpp_sources}) -math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")# Compatiblity with previous releases +math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")# Compatibility with previous releases set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 3) # Prevent clobbering each other during the build diff --git a/ftdipp/ftdi.cpp b/ftdipp/ftdi.cpp index dd777be..f82b865 100644 --- a/ftdipp/ftdi.cpp +++ b/ftdipp/ftdi.cpp @@ -1,5 +1,5 @@ /*** - ftdi.cpp - C++ wraper for libftdi + ftdi.cpp - C++ wrapper for libftdi --- begin: Mon Oct 13 2008 copyright: (C) 2008-2017 by Marek Vavruša / libftdi developers diff --git a/python/examples/cbus.py b/python/examples/cbus.py index 3ab9512..9c0356c 100644 --- a/python/examples/cbus.py +++ b/python/examples/cbus.py @@ -6,7 +6,7 @@ This program is distributed under the GPL, version 2. Demonstrate how to configure the FT230X USB UART bridge as follows: max_power 500 mA - CBUS3 Drive 1 (accomodate PCB error) + CBUS3 Drive 1 (accommodate PCB error) """ import sys diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9fd86a6..17b3617 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,7 +23,7 @@ set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c h add_library(ftdi1 SHARED ${c_sources}) -math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1")# Compatiblity with previous releases