diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-04 18:33:40 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-04 18:33:40 -0400 |
commit | 021a901bc19f55a26062439885f6f9ea8b875524 (patch) | |
tree | 30a4d2217cebf74b174730881b18797ea765a2eb /watch-library/watch/watch.h | |
parent | 15050f8ace8b514f21ea3bbb29a8585ea349917c (diff) | |
download | Sensor-Watch-021a901bc19f55a26062439885f6f9ea8b875524.tar.gz Sensor-Watch-021a901bc19f55a26062439885f6f9ea8b875524.tar.bz2 Sensor-Watch-021a901bc19f55a26062439885f6f9ea8b875524.zip |
some I2C work
Diffstat (limited to 'watch-library/watch/watch.h')
-rw-r--r-- | watch-library/watch/watch.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/watch-library/watch/watch.h b/watch-library/watch/watch.h index ece87eed..04f1e486 100644 --- a/watch-library/watch/watch.h +++ b/watch-library/watch/watch.h @@ -8,7 +8,8 @@ void watch_init(); void watch_enable_display(); -void watch_display_pixel(uint8_t com, uint8_t seg); +void watch_set_pixel(uint8_t com, uint8_t seg); +void watch_clear_pixel(uint8_t com, uint8_t seg); void watch_display_string(char *string, uint8_t position); void watch_enable_led(bool pwm); @@ -23,7 +24,7 @@ bool watch_rtc_is_enabled(); void watch_set_date_time(struct calendar_date_time date_time); void watch_get_date_time(struct calendar_date_time *date_time); -void watch_enable_tick_callback(ext_irq_cb_t callback); +void watch_register_tick_callback(ext_irq_cb_t callback); void watch_enable_analog(const uint8_t pin); @@ -44,6 +45,11 @@ struct io_descriptor *I2C_0_io; void watch_enable_i2c(); void watch_i2c_send(int16_t addr, uint8_t *buf, uint16_t length); void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length); +void watch_i2c_write8(int16_t addr, uint8_t reg, uint8_t data); +uint8_t watch_i2c_read8(int16_t addr, uint8_t reg); +uint16_t watch_i2c_read16(int16_t addr, uint8_t reg); +uint32_t watch_i2c_read24(int16_t addr, uint8_t reg); +uint32_t watch_i2c_read32(int16_t addr, uint8_t reg); void watch_store_backup_data(uint32_t data, uint8_t reg); uint32_t watch_get_backup_data(uint8_t reg); |