Changeset b2f265ab in rtems


Ignore:
Timestamp:
Dec 14, 2020, 1:10:24 PM (8 months ago)
Author:
Christian Mauderer <christian.mauderer@…>
Branches:
master
Children:
36b4e8c
Parents:
d9794a1
git-author:
Christian Mauderer <christian.mauderer@…> (12/14/20 13:10:24)
git-committer:
Christian Mauderer <christian.mauderer@…> (01/21/21 09:17:31)
Message:

cpukit/spi: Allow driver specific ioctl

This allows a SPI driver to add a hardware specific ioctl.

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/dev/spi/spi-bus.c

    rd9794a1 rb2f265ab  
    200200          IOCPARM_LEN(command) / sizeof(struct spi_ioc_transfer)
    201201        );
     202      } else if (bus->ioctl != NULL) {
     203        err = (*bus->ioctl)(bus, command, arg);
    202204      } else {
    203205        err = -EINVAL;
     
    301303  bus->setup = spi_bus_setup_default;
    302304  bus->destroy = destroy;
     305  bus->ioctl = NULL;
    303306  bus->bits_per_word = 8;
    304307
  • cpukit/include/dev/spi/spi.h

    rd9794a1 rb2f265ab  
    142142   */
    143143  uint16_t delay_usecs;
     144
     145  /**
     146   * @brief Driver specific ioctl.
     147   *
     148   * @param[in] bus The bus control.
     149   */
     150  int (*ioctl)(spi_bus *bus, ioctl_command_t command, void *arg);
    144151};
    145152
Note: See TracChangeset for help on using the changeset viewer.