13
13
14
14
using namespace tle94112 ;
15
15
16
+ /* ! \brief SPI address commands */
17
+ #define TLE94112_CMD_WRITE 0x80 ;
18
+ #define TLE94112_CMD_CLEAR 0x80 ;
19
+
16
20
#define TLE94112_STATUS_INV_MASK (Tle94112::TLE_POWER_ON_RESET)
17
21
22
+ /* ! \brief time in milliseconds to wait for chipselect signal raised */
23
+ #define TLE94112_CS_RISETIME 2
24
+
25
+ /* ! \brief micro rise time to wait for chipselect signal raised */
26
+ #define TLE94112_CS_MICRO_RISETIME 250
27
+
28
+
18
29
Tle94112::Tle94112 (void )
19
30
{
20
31
sBus = NULL ;
@@ -268,14 +279,6 @@ void Tle94112::init(void)
268
279
269
280
}
270
281
271
- /* ! \brief SPI address commands */
272
- #define TLE94112_CMD_WRITE 0x80 ;
273
- #define TLE94112_CMD_CLEAR 0x80 ;
274
-
275
- #define TLE94112_STATUS_INV_MASK (Tle94112::TLE_POWER_ON_RESET)
276
-
277
- /* ! \brief time in milliseconds to wait for chipselect signal raised */
278
- #define TLE94112_CS_RISETIME 2
279
282
280
283
void Tle94112::directWriteReg (uint8_t reg, uint8_t data)
281
284
{
@@ -289,7 +292,7 @@ void Tle94112::directWriteReg(uint8_t reg, uint8_t data)
289
292
sBus ->transfer (address, byte0);
290
293
sBus ->transfer (data, byte1);
291
294
cs->enable ();
292
- timer->delayMilli (TLE94112_CS_RISETIME );
295
+ timer->delayMicro (TLE94112_CS_MICRO_RISETIME );
293
296
}
294
297
295
298
void Tle94112::writeReg (uint8_t reg, uint8_t mask, uint8_t shift, uint8_t data)
0 commit comments