22
33//! Generic SPI interface for display drivers
44
5- use embedded_hal:: blocking:: spi ;
6- use embedded_hal:: digital:: v2 :: OutputPin ;
5+ use embedded_hal:: spi :: blocking:: Write ;
6+ use embedded_hal:: digital:: blocking :: OutputPin ;
77
88use display_interface:: { DataFormat , DisplayError , WriteOnlyDataCommand } ;
99
1010type Result = core:: result:: Result < ( ) , DisplayError > ;
1111
12- fn send_u8 < SPI : spi :: Write < u8 > > ( spi : & mut SPI , words : DataFormat < ' _ > ) -> Result {
12+ fn send_u8 < SPI : Write < u8 > > ( spi : & mut SPI , words : DataFormat < ' _ > ) -> Result {
1313 match words {
1414 DataFormat :: U8 ( slice) => spi. write ( slice) . map_err ( |_| DisplayError :: BusWriteError ) ,
1515 DataFormat :: U16 ( slice) => {
@@ -115,7 +115,7 @@ pub struct SPIInterface<SPI, DC, CS> {
115115
116116impl < SPI , DC , CS > SPIInterface < SPI , DC , CS >
117117where
118- SPI : spi :: Write < u8 > ,
118+ SPI : Write < u8 > ,
119119 DC : OutputPin ,
120120 CS : OutputPin ,
121121{
@@ -149,7 +149,7 @@ where
149149
150150impl < SPI , DC , CS > WriteOnlyDataCommand for SPIInterface < SPI , DC , CS >
151151where
152- SPI : spi :: Write < u8 > ,
152+ SPI : Write < u8 > ,
153153 DC : OutputPin ,
154154 CS : OutputPin ,
155155{
@@ -172,7 +172,7 @@ pub struct SPIInterfaceNoCS<SPI, DC> {
172172
173173impl < SPI , DC > SPIInterfaceNoCS < SPI , DC >
174174where
175- SPI : spi :: Write < u8 > ,
175+ SPI : Write < u8 > ,
176176 DC : OutputPin ,
177177{
178178 /// Create new SPI interface for communciation with a display driver
@@ -189,7 +189,7 @@ where
189189
190190impl < SPI , DC > WriteOnlyDataCommand for SPIInterfaceNoCS < SPI , DC >
191191where
192- SPI : spi :: Write < u8 > ,
192+ SPI : Write < u8 > ,
193193 DC : OutputPin ,
194194{
195195 fn send_commands ( & mut self , cmds : DataFormat < ' _ > ) -> Result {
0 commit comments