Lines Matching refs:config

52                                          struct rt_spi_configuration *config,  in spi_xfer_4line_data8()  argument
80 if (config->mode & RT_SPI_MSB) { bit = tx_data & (0x1 << (7 - i)); } in spi_xfer_4line_data8()
90 if (config->mode & RT_SPI_MSB) in spi_xfer_4line_data8()
110 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 7)) in spi_xfer_4line_data8()
127 struct rt_spi_configuration *config, in spi_xfer_4line_data16() argument
155 if (config->mode & RT_SPI_MSB) { bit = tx_data & (0x1 << (15 - i)); } in spi_xfer_4line_data16()
165 if (config->mode & RT_SPI_MSB) in spi_xfer_4line_data16()
185 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 15)) in spi_xfer_4line_data16()
202 struct rt_spi_configuration *config, in spi_xfer_3line_data8() argument
243 if (config->mode & RT_SPI_MSB) { bit = tx_data & (0x1 << (7 - i)); } in spi_xfer_3line_data8()
255 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 7)) in spi_xfer_3line_data8()
271 if (config->mode & RT_SPI_MSB) in spi_xfer_3line_data8()
291 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 7)) in spi_xfer_3line_data8()
315 struct rt_spi_configuration *config, in spi_xfer_3line_data16() argument
356 if (config->mode & RT_SPI_MSB) { bit = tx_data & (0x1 << (15 - i)); } in spi_xfer_3line_data16()
368 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 15)) in spi_xfer_3line_data16()
384 if (config->mode & RT_SPI_MSB) in spi_xfer_3line_data16()
404 if (!(config->mode & RT_SPI_CPHA) || (size != 0) || (i < 15)) in spi_xfer_3line_data16()
463 rt_memcpy(&obj->config, configuration, sizeof(struct rt_spi_configuration)); in spi_bit_configure()
472 struct rt_spi_configuration *config = &obj->config; in spi_bit_xfer() local
495 if (message->cs_take && !(device->config.mode & RT_SPI_NO_CS) && (cs_pin != PIN_NONE)) in spi_bit_xfer()
498 if (device->config.mode & RT_SPI_CS_HIGH) in spi_bit_xfer()
510 if ((config->mode & RT_SPI_CPHA)) in spi_bit_xfer()
515 if (config->mode & RT_SPI_3WIRE) in spi_bit_xfer()
517 if (config->data_width <= 8) in spi_bit_xfer()
519 … length = spi_xfer_3line_data8(ops, config, message->send_buf, message->recv_buf, message->length); in spi_bit_xfer()
521 else if (config->data_width <= 16) in spi_bit_xfer()
523 …length = spi_xfer_3line_data16(ops, config, message->send_buf, message->recv_buf, message->length); in spi_bit_xfer()
528 if (config->data_width <= 8) in spi_bit_xfer()
530 … length = spi_xfer_4line_data8(ops, config, message->send_buf, message->recv_buf, message->length); in spi_bit_xfer()
532 else if (config->data_width <= 16) in spi_bit_xfer()
534 …length = spi_xfer_4line_data16(ops, config, message->send_buf, message->recv_buf, message->length); in spi_bit_xfer()
538 if (message->cs_release && !(device->config.mode & RT_SPI_NO_CS) && (cs_pin != PIN_NONE)) in spi_bit_xfer()
541 if ((config->mode & RT_SPI_CPOL) && !GET_SCLK(ops)) in spi_bit_xfer()
547 if (device->config.mode & RT_SPI_CS_HIGH) in spi_bit_xfer()
573 obj->config.data_width = 8; in rt_spi_bit_add_bus()
574 obj->config.max_hz = 1 * 1000 * 1000; in rt_spi_bit_add_bus()
575 obj->config.mode = RT_SPI_MASTER | RT_SPI_MSB | RT_SPI_MODE_0; in rt_spi_bit_add_bus()