Lines Matching full:word

4  * simple SPI master driver.  Two do polled word-at-a-time I/O:
7 * expanding the per-word routines from the inline templates below.
51 u32 word, u8 bits) in bitbang_txrx_be_cpha0() argument
55 u32 oldbit = (!(word & (1<<(bits-1)))) << 31; in bitbang_txrx_be_cpha0()
57 for (word <<= (32 - bits); likely(bits); bits--) { in bitbang_txrx_be_cpha0()
61 if ((word & (1 << 31)) != oldbit) { in bitbang_txrx_be_cpha0()
62 setmosi(spi, word & (1 << 31)); in bitbang_txrx_be_cpha0()
63 oldbit = word & (1 << 31); in bitbang_txrx_be_cpha0()
72 word <<= 1; in bitbang_txrx_be_cpha0()
74 word |= getmiso(spi); in bitbang_txrx_be_cpha0()
77 return word; in bitbang_txrx_be_cpha0()
83 u32 word, u8 bits) in bitbang_txrx_be_cpha1() argument
87 u32 oldbit = (!(word & (1<<(bits-1)))) << 31; in bitbang_txrx_be_cpha1()
89 for (word <<= (32 - bits); likely(bits); bits--) { in bitbang_txrx_be_cpha1()
94 if ((word & (1 << 31)) != oldbit) { in bitbang_txrx_be_cpha1()
95 setmosi(spi, word & (1 << 31)); in bitbang_txrx_be_cpha1()
96 oldbit = word & (1 << 31); in bitbang_txrx_be_cpha1()
105 word <<= 1; in bitbang_txrx_be_cpha1()
107 word |= getmiso(spi); in bitbang_txrx_be_cpha1()
109 return word; in bitbang_txrx_be_cpha1()
115 u32 word, u8 bits) in bitbang_txrx_le_cpha0() argument
120 u32 oldbit = !(word & 1); in bitbang_txrx_le_cpha0()
126 if ((word & 1) != oldbit) { in bitbang_txrx_le_cpha0()
127 setmosi(spi, word & 1); in bitbang_txrx_le_cpha0()
128 oldbit = word & 1; in bitbang_txrx_le_cpha0()
137 word >>= 1; in bitbang_txrx_le_cpha0()
139 word |= getmiso(spi) << rxbit; in bitbang_txrx_le_cpha0()
142 return word; in bitbang_txrx_le_cpha0()
148 u32 word, u8 bits) in bitbang_txrx_le_cpha1() argument
153 u32 oldbit = !(word & 1); in bitbang_txrx_le_cpha1()
160 if ((word & 1) != oldbit) { in bitbang_txrx_le_cpha1()
161 setmosi(spi, word & 1); in bitbang_txrx_le_cpha1()
162 oldbit = word & 1; in bitbang_txrx_le_cpha1()
171 word >>= 1; in bitbang_txrx_le_cpha1()
173 word |= getmiso(spi) << rxbit; in bitbang_txrx_le_cpha1()
175 return word; in bitbang_txrx_le_cpha1()