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.
51 u32 word, u8 bits)
55 u32 oldbit = (!(word & (1<<(bits-1)))) << 31;
57 for (word <<= (32 - bits); likely(bits); bits--) {
61 if ((word & (1 << 31)) != oldbit) {
62 setmosi(spi, word & (1 << 31));
63 oldbit = word & (1 << 31);
72 word <<= 1;
74 word |= getmiso(spi);
77 return word;
83 u32 word, u8 bits)
87 u32 oldbit = (!(word & (1<<(bits-1)))) << 31;
89 for (word <<= (32 - bits); likely(bits); bits--) {
94 if ((word & (1 << 31)) != oldbit) {
95 setmosi(spi, word & (1 << 31));
96 oldbit = word & (1 << 31);
105 word <<= 1;
107 word |= getmiso(spi);
109 return word;
115 u32 word, u8 bits)
120 u32 oldbit = !(word & 1);
126 if ((word & 1) != oldbit) {
127 setmosi(spi, word & 1);
128 oldbit = word & 1;
137 word >>= 1;
139 word |= getmiso(spi) << rxbit;
142 return word;
148 u32 word, u8 bits)
153 u32 oldbit = !(word & 1);
160 if ((word & 1) != oldbit) {
161 setmosi(spi, word & 1);
162 oldbit = word & 1;
171 word >>= 1;
173 word |= getmiso(spi) << rxbit;
175 return word;