Basically use proper register names instead of magic values.
PP5002-based ipods (ie ipod1g-3g) use UART1 to drive the piezo vs
PWM of the newer models.
Change-Id: Ia333717a825ac6a0ebf43850fc31fca34178dd88
ata-creativezen looks like a legit memory-trashing bug, the rtc fixes
are bitwise inversion of a bool, and the remaining are just unused
static variables.
Change-Id: I1a818d4839cd3a54ca6e85f26feb743a4a9d29dc
Therefore, turn on MAX_VARIABLE_LOG_SECTOR so we can support 512B and 4K
sector sizes. Additionally, correct the interpretation of identify info
word 106 in CE-ATA mode.
Change-Id: I24dc7dd4a8617fcb60ed87c0c1be98d00dbdfa30
There are numerous sub-commands, this makes it possible to call the others.
Also in this patch is the ability for the "default" ATA driver to
query smart data too
Change-Id: Ie3aaf9e0b2d7a5d25d09dea34e4f10ee29047e1b
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* font manipulation, caching, rendering, and generation
* on-screen keyboard
* FAT filesystem (parsing and generating utf16 LFNs)
* WIN32 simulator platform code
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Appears to work on:
* hosted linux, native, linux simulator in both 16/32-bit modes.
Needs testing on:
* windows and macos simulator (16bit+32bit)
Change-Id: Iba111b27d2433019b6bff937cf1ebd2c4353a0e8
* move all state into IRAM
* eliminate dummy variables
* get rid of 'naked' attribute and (slightly wasteful) hand-written asm
in favor of auto-created 'interrupt' code
Change-Id: Ie6a2e12a4c1a0faa6ae89504cf931657044bd457
By default STMP3700 launches from negative edge for capture on positive edge.
If we leave DPL (bit 13 of reg 0x13) to 0, it will be captured on falling edge,
resulting in a potentially undefined behavior. Some make sure LCD captures on
rising edge. Alternatively we could change the dotclk polarity in VDCTRL0.
Change-Id: I4ceb2f5a9be88e07f0af9bf493b7881883320fda
Battery time estimation works now.
This commit also changes the mksquashfs path to FUNKEY_SDK_PATH.
Change-Id: Ic0aa4c40011b0716f1c36c014377eaccb486e841
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* on-screen keyboard
* font manipulation, caching, rendering, and generation
* VFAT code parses and generates utf16 dirents
* WIN32 simulator reads and writes utf16 filenames
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Known bugs:
* Native players in 32-bit unicode mode generate mangled filename
entries if they include UTF16 surrogate codepoints. Root cause
is unclear, and may reside in core dircache code.
Needs testing on:
* windows simulator (16bit+32bit)
Change-Id: I193a00fe2a11a4181ddc82df2d71be52bf00b6e6
iap_reset_state() and iap_getc() are now passed the logical IAP port
(0 is dock/only connector, 1 is headphone connector)
Change-Id: I97421146a8cab032b90c9b4eb55b50aa00d73312
Actually power off the handheld with the sleep timer and idle poweroff functions instead of closing rockbox.
This commit also moves setting system volume to max from the launch script to system-sdl.c so it works when running rockbox via instant play.
Change-Id: I174b67c6abef451faa05f4a8f52b8d9eeed98a22
...Except for simulators, those always need the cursor
In practice this only affects the RG Nano as it is currently our
only SDL target that lacks a touchscreen.
Change-Id: I292f923848528c233da518b062d9ccd8a03515dd
Instant play is a Funkey OS feature that allows it to relaunch at boot the last program it was running before shutting down, which means that if the handheld is powered off (holding the power button) while rockbox is running the next time it's powered on rockbox will launch at boot.
This commit also handles system brightness/volume in rockbox itself instead of the launch script, so the values are properly reset when powering off the handheld while rockbox is running.
Change-Id: Ie1adbf71069aeed5fbf6670971718a2f718716a3
* Move to a structure instead of pointers to registers
* Autobaud operates per-uart
* When explitily setting uart speed, it applies to all uarts
This allows both UARTs to be enabled and serviced simultaneously,
allowing either accessory port to be used. Note that the last
port to receive something is where subsequent transmits are directed,
and only one set of IAP state is maintained.
To change this, we will need to revamp IAP to support more than
one state machine, and then extend the serial API to allow for both
UARTs to be used independently. Probably not worth the effort.
Change-Id: I0142f0906706fc0c4ee6d6d7aa6b0515e1a749dd
This caused the devices to crash a few seconds after sending the command. A small power consumption increase is possible when the screen is off with this patch, but Rockbox doesn't crash anymore. Type 0 and 1 are not affected as they use a completely different sequence.
Tested on iPod 6G LCD type 1 and LCD type 2. Type 0 is similar to Type 1, Type 3 is similar to Type 2, so it should cover all available LCD types.
Change-Id: I3e8a653ca22bf59e3db38e1d26e747b358e62cb2
A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.
This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.
Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
This should allow either accesspory port to be used for IAP comms.
No regressions on an ipodphoto and mini2g through the dock connector,
but I don't have any headset-attached accessories to test against.
Change-Id: If217d8147ee871b20ad5f81ba95542379eb9f2dc
This lets us have multiple serial ports enabled, which will help with
4th-gen ipods that have a serial port in the HP jack as well in the dock.
Change-Id: I6a00a776020848a6908413e05a6f27bad65b2d8e
Instead of using the generic hosted sysfs code, which expects
a full path, the ibasso code's sysfs code uses an enumeration.
Unfortunatley the generic power input/charging code used the former
API but linked with the latter. oops.
Correct this by placing a private copy of these functions in
the ibasso-specific port, and removing the generic version from
that build.
(A "proper" fix would be to rework all 17 of the ibasso sysfs calls
to use the generic sysfs API)
Change-Id: Ic13adc9782d85560f0c74d77f60a629619d38668
* Use 16-bit audio output
* More audio tweaks (mute on startup, working volume control)
* Treat the rotary input as a scroll wheel (works now)
To-dos:
* Better global keymap (incorporate touchscreen)
* Turn on plugins and define the approximately eight bajillion keymaps
* Still have some audible pops when we turn on, need to figure out why
* Default Cabbiev2 comes off as rather crappy on this device
...I don't know how much work I will do on this thing, as the limited
number of physical controls (and a lack of a line-out) mean I'd never
want to use this thing myself.
Change-Id: I37229d92766495219ee989d9ae48b5ed79bd45f5
* Add a crude keymap
* Use native "hardware mute" for audiohw_mute()
* Properly handle touchscreen inputs
* Can now play back music, with some warts..
Broken:
* rotary wheel still doesn't work
* audio garbled/distorted a bit
* no volume control
Change-Id: I040217035a7bf3983b0e269fca3408eedd972cd0
Some screens (eg Surfans F28) only report absolute positioning
via "EV_ABS" events, and the actual "touch on, touch off" happens
via a separate "EV_KEY" event. So handle this.
This also fixes a nasty bug introduced in 3270daf2c4.
Change-Id: If73d390679ba6ffe37541442f631c03b73774fbb
* Only bootloader builds
* Plugins disabled
* No keymaps to anything else
* No simulator
* Touchscreen not wired up yet
* Audio still untested
Bugs:
* rotary encoder does nothing in bootloader
(might be bootloader bug, might be something else)
Other stuff pulled in:
* Unify all of the (identical!) hibyos makefiles
* Rename the "bootloader" to more generic name
Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
We expect a fixed FRAMEBUFFER_SIZE that's width*height*bitdepth, and we
mmap()ed that in. However, when doing the initial fb clear, we
were using the hardware-provided 'finfo.smem_len' which could be
larger than FRAMEBUFFER_SIZE. This overran our mmap and triggered
a segfault.
Correct this by mmaping (and clearing) the entire smem_len. As a safety
measure, panic if smem_len is smaller than our expected FRAMEBUFFER_SIZE
Change-Id: I3222139c7aed6e8e8ee232b1730edd5cd70065ff
A function that returned bool was an alias for a function that returned
an int. While that original function was limited to returning either 0
or 1, this aliasing is technially a no-no. So create a small shim to
make the warning go away.
Change-Id: I4d7807730234928bd59d75f13a4e4adeabbf655e