Giter VIP home page Giter VIP logo

tiny-i2c-spi's People

Contributors

zschroeder6212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tiny-i2c-spi's Issues

Build issues, Arch Linux Arm Pinephone

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

Lack of sensor documentation

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?

IC power consumption

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?

Wrong Bit resetting

Hi!
I am currently looking at the source code as inspiration for another project and I am very confused:

Looking at

SPI_DDR |= (0 << _miso);

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.