@@ -182,7 +182,7 @@ int lgw_spi_w(void *spi_target, uint8_t address, uint8_t data) {
182
182
k .tx_buf = (unsigned long ) out_buf ;
183
183
k .len = ARRAY_SIZE (out_buf );
184
184
k .speed_hz = SPI_SPEED ;
185
- k .cs_change = 1 ;
185
+ k .cs_change = SPI_CS_CHANGE ;
186
186
k .bits_per_word = 8 ;
187
187
a = ioctl (spi_device , SPI_IOC_MESSAGE (1 ), & k );
188
188
@@ -224,7 +224,7 @@ int lgw_spi_r(void *spi_target, uint8_t address, uint8_t *data) {
224
224
k .tx_buf = (unsigned long ) out_buf ;
225
225
k .rx_buf = (unsigned long ) in_buf ;
226
226
k .len = ARRAY_SIZE (out_buf );
227
- k .cs_change = 1 ;
227
+ k .cs_change = SPI_CS_CHANGE ;
228
228
a = ioctl (spi_device , SPI_IOC_MESSAGE (1 ), & k );
229
229
230
230
/* determine return code */
@@ -271,7 +271,7 @@ int lgw_spi_wb(void *spi_target, uint8_t address, uint8_t *data, uint16_t size)
271
271
k [0 ].tx_buf = (unsigned long ) & command ;
272
272
k [0 ].len = 1 ;
273
273
k [0 ].cs_change = 0 ;
274
- k [1 ].cs_change = 1 ;
274
+ k [1 ].cs_change = SPI_CS_CHANGE ;
275
275
for (i = 0 ; size_to_do > 0 ; ++ i ) {
276
276
chunk_size = (size_to_do < LGW_BURST_CHUNK ) ? size_to_do : LGW_BURST_CHUNK ;
277
277
offset = i * LGW_BURST_CHUNK ;
@@ -325,7 +325,7 @@ int lgw_spi_rb(void *spi_target, uint8_t address, uint8_t *data, uint16_t size)
325
325
k [0 ].tx_buf = (unsigned long ) & command ;
326
326
k [0 ].len = 1 ;
327
327
k [0 ].cs_change = 0 ;
328
- k [1 ].cs_change = 1 ;
328
+ k [1 ].cs_change = SPI_CS_CHANGE ;
329
329
for (i = 0 ; size_to_do > 0 ; ++ i ) {
330
330
chunk_size = (size_to_do < LGW_BURST_CHUNK ) ? size_to_do : LGW_BURST_CHUNK ;
331
331
offset = i * LGW_BURST_CHUNK ;
0 commit comments