Commit graph

25 commits

Author SHA1 Message Date
Jeff Epler
48a8ca2ae6 Fix unused-parameter diagnostics
.. mostly by hinting to the compiler that they are intended to be
unused.
2021-05-04 09:02:47 -05:00
Jeff Epler
9fcd70351c Check all I/O calls 2021-05-04 09:02:47 -05:00
Sebastian Kuzminsky
0d9357f60f serial_recv_packet(): add read error handling 2020-04-25 16:27:26 -06:00
Sebastian Kuzminsky
c7ff674377 serial_recv_packet(): make explicit what the read is doing, no behavioral change 2020-04-25 16:27:26 -06:00
Sebastian Kuzminsky
68b23a771b merge changes from JT's mesaflash version 2020-04-23 15:01:06 -06:00
Sebastian Kuzminsky
86ce0aa359 serial_boards: don't redefine _GNU_SOURCE, it's in CFLAGS now 2020-04-23 12:41:05 -06:00
Sebastian Kuzminsky
6c6d5a65d4 Merge remote-tracking branch 'origin/v3.3'
* origin/v3.3:
  read-hmid: report unknown pins better
  hm2_print_pin_file(): use find_module_name() instead of searching the list
  rename pin_find_module_name() to find_module_name()
  include gtag number of unknown gtags in pin list
  remove dead code
  7i96: fixup pins per connector
  don't segfault on unknown ethernet boards
  fix a typo in a comment
  fix SSR pin names
  fix sserial channel number in readhmid pin list
  rename the "Transformer" GTAG to "SSR", to match the linuxcnc hm2 driver
  7i96: make the connector list match the ioport list
  capitalize Ethernet consistently in --help message
  fix addr argument for ethernet boards in --help message
  consistent capitalization and punctuation in --help output
  fix formatting of --help output
  release 3.3.0~pre0+dfsg-0
  release mesaflash 3.2.1
  debian/changelog: new version
  pci_analog_write: include unistd.h, which declares usleep()
  sserial_module: declare sserial_write(), used by pci_analog_write
  pci_encoder_read: include unistd.h, for usleep()
  serial_boards: add some missing declarations
  spi_boards: include unistd.h
  spi_boards: include ctype.h
  add missing return value in spi_boards_init()
  spi_boards: include eeprom.h
  eeprom_local: include pci/pci.h
  hostmot2: add some missing function declarations
  pci_boards: move pci_read() and pci_write() to before the first use in the file
  pci_boards: include sys/time.h
  anyio: include missing serial_boards.h
  include bitfile.h in eeprom.c, for print_bitfile_header()
  function declarations shouldn't be marked inline
2020-04-23 12:40:29 -06:00
Damian Wrobel
889ab134af Fix linking errors
Fixes the following linking errors on gcc 10:
/usr/bin/ld: libanyio.a(spi_boards.o):spi_boards.c:41:
 multiple definition of `sd';
 libanyio.a(eth_boards.o):eth_boards.c:49: first defined here
/usr/bin/ld: libanyio.a(serial_boards.o):serial_boards.c:38:
 multiple definition of `sd';
 libanyio.a(eth_boards.o):eth_boards.c:49: first defined here
/usr/bin/ld: libanyio.a(lbp.o):mesaflash/lbp.c:31:
 multiple definition of `sd';
 libanyio.a(eth_boards.o):eth_boards.c:49: first defined here

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2020-04-20 16:33:41 +02:00
Sebastian Kuzminsky
9f2bb5e0fa Merge branch 'v3.2' into v3.3
Conflicts:
	debian/changelog
	eeprom_local.c
	pci_boards.c
2017-06-27 10:33:37 -06:00
Sebastian Kuzminsky
137bae5f33 serial_boards: add some missing declarations
ppoll() is a _GNU_SOURCE feature, and since mesaflash is GPL 2+ we can
enable _GNU_SOURCE here.
2017-06-25 20:43:06 -06:00
Jeff Epler
cab439923a Remove declarations of unused variables
All these produced a diagnostic when -Wunused-variables was specified.
2016-07-02 08:47:37 -05:00
Jeff Epler
b4a729c01d Fix compiler signedness warning
Before this fix, enabling -Wpointer-sign would produce a diagnostic.
lbp_recv_packet doesn't care about the sign of its argument, but
strcmp and strncpy do.
2016-07-02 08:44:50 -05:00
Jeff Epler
d2c6e70628 Fix field precision specifiers when used with sizeof
The compiler warns 'field precision specifier ‘.*’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’
[-Wformat=].  Add an explicit cast to int.
2016-07-02 08:37:01 -05:00
joe
2e616010c3 fixup implicit function declaration warnings 2015-10-06 18:25:40 -07:00
Michael Geszkiewicz
3106d0df2b anyio: refactor: unification of functions arguments in hostmot2 access interface
factor out common board structure initialisations to function

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2015-03-09 01:01:03 +01:00
Michael Geszkiewicz
77e5daee8a serial: support flash write and verify. Also increase timeouts on write and read to support waiting for long flash operations like erase and write_page
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-14 15:42:43 +02:00
Michael Geszkiewicz
4a55124038 serial: read and write uses ppoll for waiting for writing or data.
This resolve problems with lost bytes during flash id read or flash verification.

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-14 15:28:47 +02:00
Michael Geszkiewicz
9a208d9c96 lbp16: move FPGA reset and reload to common place as now both ethernet and serial hm2 boards use them
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-14 11:00:53 +02:00
Michael Geszkiewicz
a7e29560dd serial: finally working communcation at 115200
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-14 10:47:51 +02:00
Michael Geszkiewicz
c044b78dd6 libanyio: factor out ethernet and serial transport level details from lbp16
you must use lbp16_init with proper board type to setup SEND and RECV function pointers in lbp16.c
then you must call lbp16_send_packet and lbp16_recv_packet which will point to current transport layer functions

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-12 23:43:12 +02:00
Michael Geszkiewicz
c431de4ff9 libanyio: introduce types.h to hold global types definitions
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 23:00:03 +02:00
Michael Geszkiewicz
1d60db728c fix few typos
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 17:01:46 +02:00
Michael Geszkiewicz
f940efb289 libanyio: update support for board 7i90HD
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 12:12:51 +02:00
Michael Geszkiewicz
defef05285 fixes after rebase on master
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 12:12:51 +02:00
Michael Geszkiewicz
3ab90ca157 add support for serial lbp16 communication with 7i90
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 12:12:50 +02:00