Lines Matching defs: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.
49 u32 word, u8 bits)
53 u32 oldbit = (!(word & (1<<(bits-1)))) << 31;
55 for (word <<= (32 - bits); likely(bits); bits--) {
59 if ((word & (1 << 31)) != oldbit) {
60 setmosi(spi, word & (1 << 31));
61 oldbit = word & (1 << 31);
70 word <<= 1;
72 word |= getmiso(spi);
75 return word;
81 u32 word, u8 bits)
85 u32 oldbit = (!(word & (1<<(bits-1)))) << 31;
87 for (word <<= (32 - bits); likely(bits); bits--) {
92 if ((word & (1 << 31)) != oldbit) {
93 setmosi(spi, word & (1 << 31));
94 oldbit = word & (1 << 31);
103 word <<= 1;
105 word |= getmiso(spi);
107 return word;