Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Ipod i2c commands
« previous next »
  • Print
Pages: [1]

Author Topic: Ipod i2c commands  (Read 3397 times)

Offline mssc

  • Member
  • *
  • Posts: 3
Ipod i2c commands
« on: August 24, 2019, 10:55:39 AM »
Hi!
I'm planning on making this famous "bluetooth in ipod classic" mod in my own u2 5g. I don't like the idea of making holes in device housing, but I need a way to turn module and pairing mode on/off. My idea is to use some kind of i2c gpio expander (like SC16IS752), connect it to the ipods' i2c dataline (propably TEA1211 pins) and control it using rockbox plugin. I'm unsure whether plugin can even do something like this, I've found i2c_begin(), i2c_end() and i2c_write() functions in plugin.h but I don't know if they will work or not. Can someone from dev team shed light on this subject?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9369
Re: Ipod i2c commands
« Reply #1 on: August 24, 2019, 06:21:39 PM »
Assuming you have access to an i2c line on the device, you could add whatever driver functions you wanted to the plugin API, or even just put the i2c code directly into your plugin.  On simple devices like the ipods there is no memory management unit, and hardware registers can be directly accessed by anything.
Logged

Offline mssc

  • Member
  • *
  • Posts: 3
Re: Ipod i2c commands
« Reply #2 on: August 25, 2019, 05:58:51 AM »
Great, I have one more question, how to interact with CPU register with plugin code? Is there even such functionality or I need to extend plugin library?
Logged

Offline __builtin

  • Developer
  • Member
  • *
  • Posts: 409
  • iPod 6G, c200v1 (RIP), e200v1 (RIP)
    • FWEI.TK
Re: Ipod i2c commands
« Reply #3 on: August 25, 2019, 12:53:13 PM »
Most registers are memory-mapped. See your target's header files. Ex: https://github.com/Rockbox/rockbox/blob/master/firmware/export/pp5020.h
Logged
No support questions by PM, please.

Offline mssc

  • Member
  • *
  • Posts: 3
Re: Ipod i2c commands
« Reply #4 on: August 26, 2019, 03:09:02 AM »
Thanks, but how can I interact with these adresses using plugin code? Is it even possible or do I need to write additional middleware myself?
Logged

Offline __builtin

  • Developer
  • Member
  • *
  • Posts: 409
  • iPod 6G, c200v1 (RIP), e200v1 (RIP)
    • FWEI.TK
Re: Ipod i2c commands
« Reply #5 on: August 26, 2019, 12:44:45 PM »
You should be able to access them by name in C code. Like so:
Code: [Select]
GPIOA_ENABLE = 1;
Logged
No support questions by PM, please.

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9369
Re: Ipod i2c commands
« Reply #6 on: August 26, 2019, 11:08:12 PM »
Take a look at the I2C driver for your device, should make it clear how it works. 
Logged

Offline Tomesp32

  • Member
  • *
  • Posts: 1
Re: Ipod i2c commands
« Reply #7 on: June 16, 2024, 03:57:16 PM »
did you ever get to this working?
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Ipod i2c commands
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.134 seconds with 20 queries.