File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ static_assert((1u << FIFO_PHASE_BIT) >= GENERIC_BUFFER_SIZE,
349
349
#define RXFIFO_LEN sizeof(uint32_t)
350
350
#define TXFIFO_LEN sizeof(uint32_t)
351
351
352
- #define SPI_DEFAULT_TX_VALUE 0xffu
352
+ #define SPI_DEFAULT_TX_VALUE ((uint8_t) 0xffu)
353
353
#define SPI_FLASH_BUFFER_SIZE 256u
354
354
355
355
typedef enum {
@@ -2243,7 +2243,7 @@ static void ot_spi_device_chr_handle_header(OtSPIDeviceState *s)
2243
2243
2244
2244
static void ot_spi_device_chr_send_discard (OtSPIDeviceState * s , unsigned count )
2245
2245
{
2246
- const uint8_t buf [1u ] = { ( uint8_t ) 0xffu };
2246
+ const uint8_t buf [1u ] = { SPI_DEFAULT_TX_VALUE };
2247
2247
2248
2248
while (count -- ) {
2249
2249
if (qemu_chr_fe_backend_connected (& s -> chr )) {
@@ -2284,7 +2284,7 @@ static void ot_spi_device_chr_recv_flash(OtSPIDeviceState *s,
2284
2284
static void ot_spi_device_chr_send_generic (OtSPIDeviceState * s , unsigned count )
2285
2285
{
2286
2286
if (ot_spi_device_is_tx_fifo_in_reset (s )) {
2287
- uint8_t buf [] = { 0xff };
2287
+ uint8_t buf [] = { SPI_DEFAULT_TX_VALUE };
2288
2288
trace_ot_spi_device_gen_fifo_error ("TXF in reset" );
2289
2289
while (count -- ) {
2290
2290
qemu_chr_fe_write (& s -> chr , buf , sizeof (buf ));
You can’t perform that action at this time.
0 commit comments