Merge pull request #807 from yegorich/src-typos
Fix typos all over the code
This commit is contained in:
commit
a91e389a5e
|
@ -115,7 +115,7 @@ programmer type can be used to directly connect to and program a chip
|
|||
using the built in interfaces on the computer. The requirements to use
|
||||
this type are that an SPI interface is exposed along with one GPIO
|
||||
pin. The GPIO serves as the reset output since the Linux SPI drivers
|
||||
do not hold slave select down when a transfer is not occuring and thus
|
||||
do not hold slave select down when a transfer is not occurring and thus
|
||||
it cannot be used as the reset pin. A readily available level
|
||||
translator should be used between the SPI bus/reset GPIO and the chip
|
||||
to avoid potentially damaging the computer's SPI controller in the
|
||||
|
@ -244,7 +244,7 @@ The Micronucleus bootloader is supported for both protocol version V1
|
|||
and V2. As the bootloader does not support reading from flash memory,
|
||||
use the
|
||||
.Fl V
|
||||
option to prevent AVRDUDE from verifing the flash memory.
|
||||
option to prevent AVRDUDE from verifying the flash memory.
|
||||
See the section on
|
||||
.Em extended parameters
|
||||
for Micronucleus specific options.
|
||||
|
@ -558,9 +558,9 @@ be specified as
|
|||
Libhidapi support is required on Unix and Mac OS but not on Windows. For more
|
||||
information about AVR-Doper see http://www.obdev.at/avrusb/avrdoper.html.
|
||||
.Pp
|
||||
For the USBtinyISP, which is a simplicistic device not implementing
|
||||
For the USBtinyISP, which is a simplistic device not implementing
|
||||
serial numbers, multiple devices can be distinguished by their
|
||||
location in the USB hierarchy. See the the respective
|
||||
location in the USB hierarchy. See the respective
|
||||
.Em Troubleshooting
|
||||
entry in the detailed documentation for examples.
|
||||
.Pp
|
||||
|
@ -608,10 +608,10 @@ Posix systems (by now).
|
|||
Disable (or quell) output of the progress bar while reading or writing
|
||||
to the device. Specify it a second time for even quieter operation.
|
||||
.It Fl s
|
||||
Disable safemode prompting. When safemode discovers that one or more
|
||||
Disable safemode prompting. When safemode discovers that one or more
|
||||
fuse bits have unintentionally changed, it will prompt for
|
||||
confirmation regarding whether or not it should attempt to recover the
|
||||
fuse bit(s). Specifying this flag disables the prompt and assumes
|
||||
fuse bit(s). Specifying this flag disables the prompt and assumes
|
||||
that the fuse bit(s) should be recovered without asking for
|
||||
confirmation first.
|
||||
.It Fl t
|
||||
|
|
|
@ -33,15 +33,15 @@ extern char progbuf[]; /* spaces same length as progname */
|
|||
|
||||
extern int ovsigck; /* override signature check (-F) */
|
||||
extern int verbose; /* verbosity level (-v, -vv, ...) */
|
||||
extern int quell_progress; /* quiteness level (-q, -qq) */
|
||||
extern int quell_progress; /* quietness level (-q, -qq) */
|
||||
|
||||
int avrdude_message(const int msglvl, const char *format, ...);
|
||||
|
||||
#define MSG_INFO (0) /* no -v option, can be supressed with -qq */
|
||||
#define MSG_INFO (0) /* no -v option, can be suppressed with -qq */
|
||||
#define MSG_NOTICE (1) /* displayed with -v */
|
||||
#define MSG_NOTICE2 (2) /* displayed with -vv, used rarely */
|
||||
#define MSG_DEBUG (3) /* displayed with -vvv */
|
||||
#define MSG_TRACE (4) /* displayed with -vvvv, show trace commuication */
|
||||
#define MSG_TRACE (4) /* displayed with -vvvv, show trace communication */
|
||||
#define MSG_TRACE2 (5) /* displayed with -vvvvv */
|
||||
|
||||
#if defined(WIN32NATIVE)
|
||||
|
|
|
@ -285,7 +285,7 @@ prog_def :
|
|||
id = ldata(lfirst(current_prog->id));
|
||||
existing_prog = locate_programmer(programmers, id);
|
||||
if (existing_prog) {
|
||||
{ /* temporarly set lineno to lineno of programmer start */
|
||||
{ /* temporarily set lineno to lineno of programmer start */
|
||||
int temp = lineno; lineno = current_prog->lineno;
|
||||
yywarning("programmer %s overwrites previous definition %s:%d.",
|
||||
id, existing_prog->config_file, existing_prog->lineno);
|
||||
|
@ -377,7 +377,7 @@ part_def :
|
|||
|
||||
existing_part = locate_part(part_list, current_part->id);
|
||||
if (existing_part) {
|
||||
{ /* temporarly set lineno to lineno of part start */
|
||||
{ /* temporarily set lineno to lineno of part start */
|
||||
int temp = lineno; lineno = current_part->lineno;
|
||||
yywarning("part %s overwrites previous definition %s:%d.",
|
||||
current_part->id,
|
||||
|
|
|
@ -234,7 +234,7 @@ AC_CHECK_LIB([ws2_32], [puts])
|
|||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday usleep getaddrinfo])
|
||||
|
||||
AC_MSG_CHECKING([for a Win32 HID libray])
|
||||
AC_MSG_CHECKING([for a Win32 HID library])
|
||||
SAVED_LIBS="${LIBS}"
|
||||
case $target in
|
||||
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
||||
|
@ -435,7 +435,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# If we are compiling with gcc, enable all warning and make warnings errors.
|
||||
# If we are compiling with gcc, enable all warnings and make warnings errors.
|
||||
if test "$GCC" = yes; then
|
||||
ENABLE_WARNINGS="-Wall"
|
||||
|
||||
|
@ -519,7 +519,7 @@ AC_CONFIG_FILES([
|
|||
|
||||
# The procedure to create avrdude.conf involves two steps. First,
|
||||
# normal autoconf substitution will be applied, resulting in
|
||||
# avrdude.conf.tmp. Finally, a sed command will be applied to filter
|
||||
# avrdude.conf.tmp. Finally, a sed command will be applied to filter
|
||||
# out unwanted parts (currently the parallel port programmer types)
|
||||
# based on previous configuration results, thereby producing the final
|
||||
# avrdude.conf file.
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <libelf/libelf.h>
|
||||
#endif
|
||||
#ifndef EM_AVR32
|
||||
# define EM_AVR32 0x18ad /* inofficial */
|
||||
# define EM_AVR32 0x18ad /* unofficial */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -273,9 +273,9 @@ static int ihex_readrec(struct ihexrec * ihex, char * rec)
|
|||
/*
|
||||
* Intel Hex to binary buffer
|
||||
*
|
||||
* Given an open file 'inf' which contains Intel Hex formated data,
|
||||
* Given an open file 'inf' which contains Intel Hex formatted data,
|
||||
* parse the file and lay it out within the memory buffer pointed to
|
||||
* by outbuf. The size of outbuf, 'bufsize' is honored; if data would
|
||||
* by outbuf. The size of outbuf, 'bufsize' is honored; if data would
|
||||
* fall outsize of the memory buffer outbuf, an error is generated.
|
||||
*
|
||||
* Return the maximum memory address within 'outbuf' that was written.
|
||||
|
@ -1120,7 +1120,7 @@ static int fileio_imm(struct fioparms * fio,
|
|||
p = strtok(filename, " ,");
|
||||
while (p != NULL && loc < size) {
|
||||
b = strtoul(p, &e, 0);
|
||||
/* check for binary formated (0b10101001) strings */
|
||||
/* check for binary formatted (0b10101001) strings */
|
||||
b = (strncmp (p, "0b", 2))?
|
||||
strtoul (p, &e, 0):
|
||||
strtoul (p + 2, &e, 2);
|
||||
|
|
|
@ -215,7 +215,7 @@ int flip2_initialize(PROGRAMMER* pgm, AVRPART *part)
|
|||
/* A note about return values. Negative return values from this function are
|
||||
* interpreted as failure by main(), from where this function is called.
|
||||
* However such failures are interpreted as a device signature check failure
|
||||
* and the user is adviced to use the -F option to override this check. In
|
||||
* and the user is advised to use the -F option to override this check. In
|
||||
* our case, this is misleading, so we defer reporting an error until another
|
||||
* function is called. Thus, we always return 0 (success) from initialize().
|
||||
* I don't like this, but I don't want to mess with main().
|
||||
|
|
|
@ -66,7 +66,7 @@ static int fd_spidev, fd_gpiochip, fd_linehandle;
|
|||
|
||||
/**
|
||||
* @brief Sends/receives a message in full duplex mode
|
||||
* @return -1 on failure, otherwise number of bytes sent/recieved
|
||||
* @return -1 on failure, otherwise number of bytes sent/received
|
||||
*/
|
||||
static int linuxspi_spi_duplex(PROGRAMMER *pgm, const unsigned char *tx, unsigned char *rx, int len)
|
||||
{
|
||||
|
|
|
@ -1113,7 +1113,7 @@ int main(int argc, char * argv [])
|
|||
pgm->vfy_led(pgm, OFF);
|
||||
|
||||
/*
|
||||
* initialize the chip in preperation for accepting commands
|
||||
* initialize the chip in preparation for accepting commands
|
||||
*/
|
||||
init_ok = (rc = pgm->initialize(pgm, p)) >= 0;
|
||||
if (!init_ok) {
|
||||
|
|
|
@ -146,7 +146,7 @@ int pgm_fill_old_pins(struct programmer_t * const pgm) {
|
|||
/**
|
||||
* This function returns a string representation of pins in the mask eg. 1,3,5-7,9,12
|
||||
* Another execution of this function will overwrite the previous result in the static buffer.
|
||||
* Consecutive pin number are representated as start-end.
|
||||
* Consecutive pin number are represented as start-end.
|
||||
*
|
||||
* @param[in] pinmask the pin mask for which we want the string representation
|
||||
* @returns pointer to a static string.
|
||||
|
|
|
@ -141,7 +141,7 @@ int updi_read_data(PROGRAMMER * pgm, uint32_t address, uint8_t * buffer, uint16_
|
|||
self.logger.debug("Reading %d bytes from 0x%04X", size, address)
|
||||
# Range check
|
||||
if size > constants.UPDI_MAX_REPEAT_SIZE:
|
||||
raise PymcuprogError("Cant read that many bytes in one go")
|
||||
raise PymcuprogError("Can't read that many bytes in one go")
|
||||
|
||||
# Store the address
|
||||
self.datalink.st_ptr(address)
|
||||
|
@ -242,7 +242,7 @@ int updi_read_data_words(PROGRAMMER * pgm, uint32_t address, uint8_t * buffer, u
|
|||
|
||||
# Range check
|
||||
if words > constants.UPDI_MAX_REPEAT_SIZE >> 1:
|
||||
raise PymcuprogError("Cant read that many words in one go")
|
||||
raise PymcuprogError("Can't read that many words in one go")
|
||||
|
||||
# Store the address
|
||||
self.datalink.st_ptr(address)
|
||||
|
|
|
@ -109,7 +109,7 @@ static int usb_control (PROGRAMMER * pgm,
|
|||
USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
requestid,
|
||||
val, index, // 2 bytes each of data
|
||||
NULL, 0, // no data buffer in control messge
|
||||
NULL, 0, // no data buffer in control message
|
||||
USB_TIMEOUT ); // default timeout
|
||||
if(nbytes < 0){
|
||||
avrdude_message(MSG_INFO, "\n%s: error: usbtiny_transmit: %s\n", progname, usb_strerror());
|
||||
|
@ -128,7 +128,7 @@ static int usb_in (PROGRAMMER * pgm,
|
|||
int timeout;
|
||||
int i;
|
||||
|
||||
// calculate the amout of time we expect the process to take by
|
||||
// calculate the amount of time we expect the process to take by
|
||||
// figuring the bit-clock time and buffer size and adding to the standard USB timeout.
|
||||
timeout = USB_TIMEOUT + (buflen * bitclk) / 1000;
|
||||
|
||||
|
@ -167,7 +167,7 @@ static int usb_out (PROGRAMMER * pgm,
|
|||
int nbytes;
|
||||
int timeout;
|
||||
|
||||
// calculate the amout of time we expect the process to take by
|
||||
// calculate the amount of time we expect the process to take by
|
||||
// figuring the bit-clock time and buffer size and adding to the standard USB timeout.
|
||||
timeout = USB_TIMEOUT + (buflen * bitclk) / 1000;
|
||||
|
||||
|
@ -186,7 +186,7 @@ static int usb_out (PROGRAMMER * pgm,
|
|||
return nbytes;
|
||||
}
|
||||
|
||||
/* Reverse the bits in a byte. Needed since TPI uses little-endian
|
||||
/* Reverse the bits in a byte. Needed since TPI uses little-endian
|
||||
bit order (LSB first) whereas SPI uses big-endian (MSB first).*/
|
||||
static unsigned char reverse(unsigned char b) {
|
||||
return
|
||||
|
@ -200,7 +200,7 @@ static unsigned char reverse(unsigned char b) {
|
|||
| ((b & 0x80) >> 7);
|
||||
}
|
||||
|
||||
/* Calculate even parity. */
|
||||
/* Calculate even parity. */
|
||||
static unsigned char tpi_parity(unsigned char b)
|
||||
{
|
||||
unsigned char parity = 0;
|
||||
|
@ -215,9 +215,9 @@ static unsigned char tpi_parity(unsigned char b)
|
|||
}
|
||||
|
||||
/* Encode 1 start bit (0), 8 data bits, 1 parity, 2 stop bits (1)
|
||||
inside 16 bits. The data is padded to 16 bits by 4 leading 1s
|
||||
(which will be ignored since they're not start bits). This layout
|
||||
enables a write to be followed by a read. */
|
||||
inside 16 bits. The data is padded to 16 bits by 4 leading 1s
|
||||
(which will be ignored since they're not start bits). This layout
|
||||
enables a write to be followed by a read. */
|
||||
static unsigned short tpi_frame(unsigned char b) {
|
||||
return LITTLE_TO_BIG_16(0xf000 |
|
||||
(reverse(b) << 3) |
|
||||
|
@ -225,8 +225,8 @@ static unsigned short tpi_frame(unsigned char b) {
|
|||
TPI_STOP_BITS);
|
||||
}
|
||||
|
||||
/* Transmit a single byte encapsulated in a 32-bit transfer. Unused
|
||||
bits are padded with 1s. */
|
||||
/* Transmit a single byte encapsulated in a 32-bit transfer. Unused
|
||||
bits are padded with 1s. */
|
||||
static int usbtiny_tpi_tx(PROGRAMMER *pgm, unsigned char b0)
|
||||
{
|
||||
unsigned char res[4];
|
||||
|
@ -239,8 +239,8 @@ static int usbtiny_tpi_tx(PROGRAMMER *pgm, unsigned char b0)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Transmit a two bytes encapsulated in a 32-bit transfer. Unused
|
||||
bits are padded with 1s. */
|
||||
/* Transmit a two bytes encapsulated in a 32-bit transfer. Unused
|
||||
bits are padded with 1s. */
|
||||
static int usbtiny_tpi_txtx(PROGRAMMER *pgm,
|
||||
unsigned char b0, unsigned char b1)
|
||||
{
|
||||
|
@ -269,11 +269,11 @@ static int usbtiny_tpi_txrx(PROGRAMMER *pgm, unsigned char b0)
|
|||
return -1;
|
||||
|
||||
w = (res[2] << 8) | res[3];
|
||||
/* Look for start bit (there shoule be no more than two 1 bits): */
|
||||
/* Look for start bit (there should be no more than two 1 bits): */
|
||||
while (w < 0)
|
||||
w <<= 1;
|
||||
/* Now that we found the start bit, the top 9 bits contain the start
|
||||
bit and the 8 data bits, but the latter in reverse order. */
|
||||
bit and the 8 data bits, but the latter in reverse order. */
|
||||
r = reverse(w >> 7);
|
||||
if (tpi_parity(r) != ((w >> 6) & 1)) {
|
||||
fprintf(stderr, "%s: parity bit is wrong\n", __func__);
|
||||
|
@ -336,7 +336,7 @@ static int usbtiny_open(PROGRAMMER* pgm, char* name)
|
|||
}
|
||||
|
||||
usb_init(); // initialize the libusb system
|
||||
usb_find_busses(); // have libusb scan all the usb busses available
|
||||
usb_find_busses(); // have libusb scan all the usb buses available
|
||||
usb_find_devices(); // have libusb scan all the usb devices available
|
||||
|
||||
PDATA(pgm)->usb_handle = NULL;
|
||||
|
@ -357,7 +357,7 @@ static int usbtiny_open(PROGRAMMER* pgm, char* name)
|
|||
}
|
||||
|
||||
|
||||
// now we iterate through all the busses and devices
|
||||
// now we iterate through all the buses and devices
|
||||
for ( bus = usb_busses; bus; bus = bus->next ) {
|
||||
for ( dev = bus->devices; dev; dev = dev->next ) {
|
||||
if (dev->descriptor.idVendor == vid
|
||||
|
@ -557,9 +557,9 @@ int usbtiny_cmd_tpi(PROGRAMMER * pgm, const unsigned char *cmd,
|
|||
int tx, rx, r;
|
||||
|
||||
/* Transmits command two bytes at the time until we're down to 0 or
|
||||
1 command byte. Then we're either done or we transmit the final
|
||||
byte optionally followed by reading 1 byte. With the current TPI
|
||||
protocol, we never receive more than one byte. */
|
||||
1 command byte. Then we're either done or we transmit the final
|
||||
byte optionally followed by reading 1 byte. With the current TPI
|
||||
protocol, we never receive more than one byte. */
|
||||
for (tx = rx = 0; tx < cmd_len; ) {
|
||||
b0 = cmd[tx++];
|
||||
if (tx < cmd_len) {
|
||||
|
@ -714,7 +714,7 @@ static int usbtiny_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
|||
m->buf + addr, // Pointer to data
|
||||
chunk, // Number of bytes to write
|
||||
32 * PDATA(pgm)->sck_period + delay // each byte gets turned into a
|
||||
// 4-byte SPI cmd usb_out() multiplies
|
||||
// 4-byte SPI cmd usb_out() multiplies
|
||||
// this per byte. Then add the cmd-delay
|
||||
) < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue