zschroeder6212 / tiny-i2c-spi Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I'm running into a build issue on my Pinephone running Arch Linux Arm
avr-gcc -mmcu=attiny84 -Wall -Os -o i2c-spi-bridge.elf main.c USI_TWI_Slave.c SoftSPI.c SoftwareSerial.c
USI_TWI_Slave.c: In function 'usiTwiTransmitByte':
USI_TWI_Slave.c:196:13: warning: unused variable 'tmphead' [-Wunused-variable]
196 | uint8_t tmphead;
| ^~~~~~~
SoftwareSerial.c: In function 'softSerialBegin':
SoftwareSerial.c:302:27: warning: comparison of constant '255' with boolean expression is always false [-Wbool-compare]
302 | if ( ! error && ! rxpin == SOFTWARE_SERIAL_RX_DISABLED )
| ^~
SoftwareSerial.c:302:27: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
SoftwareSerial.c:302:19: note: add parentheses around left hand side expression to silence this warning
302 | if ( ! error && ! rxpin == SOFTWARE_SERIAL_RX_DISABLED )
| ^~~~~~~
| ( )
/usr/bin/avr-ld: /tmp/cc17Mj8z.o:(.bss+0x0): multiple definition of `usi_onReceiverPtr'; /tmp/ccr2v1aC.o:(.bss+0x82): first defined here
/usr/bin/avr-ld: /tmp/cc17Mj8z.o:(.bss+0x2): multiple definition of `usi_onRequestPtr'; /tmp/ccr2v1aC.o:(.bss+0x84): first defined here
/usr/bin/avr-ld: /tmp/cc17Mj8z.o:(.bss+0x4): multiple definition of `_onTwiDataRequest'; /tmp/ccr2v1aC.o:(.bss+0x86): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x2): multiple definition of `_mosi'; /tmp/ccr2v1aC.o:(.bss+0x8a): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x3): multiple definition of `_miso'; /tmp/ccr2v1aC.o:(.bss+0x8b): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x1): multiple definition of `_sck'; /tmp/ccr2v1aC.o:(.bss+0x89): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x4): multiple definition of `_delay'; /tmp/ccr2v1aC.o:(.bss+0x8c): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x6): multiple definition of `_cke'; /tmp/ccr2v1aC.o:(.bss+0x8e): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x5): multiple definition of `_ckp'; /tmp/ccr2v1aC.o:(.bss+0x8d): first defined here
/usr/bin/avr-ld: /tmp/ccfRN7Qx.o:(.bss+0x0): multiple definition of `_order'; /tmp/ccr2v1aC.o:(.bss+0x88): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:5: all] Error 1
It's on https://github.com/egormanga/spi-i2c-tiny6212.
Yes, I named the chip after you because of the need to identify it somehow. :)
I'm too tired to write a proper issue text here today after the long work on the driver, sorry.
I'm a relatively experienced system software developer and hardware enthusiast. I'd like to help with the development of a libfprint driver for this project (PinePhone fingerprint sensor case), but there's no actual datasheet for the SPI protocol available out there. I've been told it's solely your project. So, assuming that you've got documentation for the sensor you picked, could you kindly share it, so people like me could contribute to the development?
How much power does your bridge draw when idle? Have you considered any low-power states and/or power saving features of the attiny instead of an infinite loop?
Hi!
I am currently looking at the source code as inspiration for another project and I am very confused:
Looking at
Line 55 in a4e1b82
That Line should do nothing in my understanding - you can bit-shift a 0 however you like, you will end up with 0b00000000.
And 0x?? | 0x00
will leave the value completly untouched afaik.
AFAIK setting a bit to zero is:
REGISTERx &= ~(1<<Bit);
Best regards!
Thomas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.