#include <tucbot/tucbot.h>
void testTwi_lcdhex(uint8_t data);
void testTwi(void);
int main(void);
void testTwi_lcdhex(uint8_t data) {
uint8_t a;
a = data >> 4;
if (a < 10) {
} else {
}
a = data & 0x0F;
if (a < 10) {
} else {
}
}
void testTwi(void) {
uint8_t value = 0x05;
while (1) {
continue;
}
testTwi_lcdhex(value);
value+= 0x10;
continue;
}
}
}
}
}
int main (void) {
testTwi();
return (0);
}
void leds_set(eLedMask bitmask, uint8_t bool)
Sets the selected leds on or off.
void twi_reset(void)
Resets the TWI software.
@ kLedOn
constant (0xFF): turn leds on
Definition: leds.h:63
@ kLedRight
bit mask (0x04): right led
Definition: leds.h:46
void twi_wait(void)
Waits until the TWI is not busy anymore.
uint8_t twi_lock(void)
Locks the TWI for the user.
@ kRequestContinuous
constant (3): request continuous updates
Definition: update.h:37
uint8_t twiinp(void)
Gets one byte from the receive buffer of the twi.
@ kLedMiddle
bit mask (0x08): middle led
Definition: leds.h:44
@ kLedOff
constant (0x00): turn leds off
Definition: leds.h:61
void lcdclr(void)
Clears the display.
void twi_read(uint8_t count)
Starts the reception of data over the TWI.
void lcdxy(uint8_t x, uint8_t y)
Moves the cursor to a postion on the display.
@ kTwiPdMD_SensLineEnable
packet descriptor (0xA2): sMD_SensLineEnable
Definition: twi.h:856
void twi_unlock(void)
Unlocks the TWI by the user.
void twiout(uint8_t send_data)
Puts one byte in the transmit buffer of the twi.
void lcdstr_p(const char *send_data)
Writes a string located in the flash to the display.
void lcdout(uint8_t data)
Writes one byte to the display.
void init_tucbot(uint8_t enable_interrupts)
Initiates the TUC-Bot.
void mdelay(uint16_t mseconds)
Waits for the given time in milliseconds.
uint8_t twi_errorGet(void)
Returns the error value of the TWI.
uint8_t twistat(void)
Gets the number of bytes in the receive buffer of the twi.
void twi_write(void)
Starts the transmission of data over the TWI.