Hi,
I have make a patch for the Pirelli DP-L10 created. You can enable and disable the patch in the makefile (src/target/firmware/Makefile). The Keypad layout is tested with rssi.bin app. Only the power button is not available.
regards Marco
I have make a patch for the Pirelli DP-L10 created. You can enable and disable the patch in the makefile (src/target/firmware/Makefile). The Keypad layout is tested with rssi.bin app. Only the power button is not available.
To be merge-able the patch would need to select at run time so that all built binaries built are functional at once. Right now this only creates a different set of wrong binaries ...
Cheers,
Sylvain
Hi Sylvain,
I have create a new patch. The patch select the uart at run time.
regards
marco
2012/7/18 Sylvain Munaut 246tnt@gmail.com:
I have make a patch for the Pirelli DP-L10 created. You can enable and disable the patch in the makefile (src/target/firmware/Makefile). The Keypad layout is tested with rssi.bin app. Only the power button is not available.
To be merge-able the patch would need to select at run time so that all built binaries built are functional at once. Right now this only creates a different set of wrong binaries ...
Cheers,
Sylvain
Marco Schwan wrote:
I have create a new patch. The patch select the uart at run time.
Please send it. Your email had no attachment. Remember to create a commit using git with a nice commit message, and run git format-patch to get the patch file. Alternatively, you can run git send-email to send commits directly via email, but that requires a bit more configuration.
//Peter
Hi,
Sorry. I had forgot to attach the patch. The patch is tested with the Pirelli DP-L10 and the Motorola C123.
regards
Marco
2012/8/14 Peter Stuge peter@stuge.se:
Marco Schwan wrote:
I have create a new patch. The patch select the uart at run time.
Please send it. Your email had no attachment. Remember to create a commit using git with a nice commit message, and run git format-patch to get the patch file. Alternatively, you can run git send-email to send commits directly via email, but that requires a bit more configuration.
//Peter
Marco Schwan wrote:
I have create a new patch. The patch select the uart at run time.
It looks like the UART number is still determined at compile time?
(By linking different init.c objects into the build.)
//Peter
Hi,
On 14.08.2012 21:55, Peter Stuge wrote:
It looks like the UART number is still determined at compile time?
(By linking different init.c objects into the build.)
Question is, where else do you want to store the initial mapping for the specific board? Also, Reconfiguring it while runtime seems a bit useless to me, how do you want to reconfigure it if you don't have a serial link since you're connected to the 'wrong' UART anyway?
I would be fine with this solution in init.c. At least until we have, if ever, something like stored settings in an NVRAM.
Regards, Steve
Steve Markgraf wrote:
I would be fine with this solution in init.c. At least until we have, if ever, something like stored settings in an NVRAM.
It's impossible to detect the particular hardware design at runtime?
//Peter
On 14.08.2012 22:15, Peter Stuge wrote:
It's impossible to detect the particular hardware design at runtime?
Yes, that's why we have different init.c files for each board. Okay, for the uart we could do some sort of auto-probing and listen on both uarts, but then again that would be sort of an overkill I guess.
Regards, Steve
Hi Marco,
thanks for your effort to provide another patch.
On Tue, Aug 14, 2012 at 09:48:23PM +0200, Marco Schwan wrote:
Sorry. I had forgot to attach the patch. The patch is tested with the Pirelli DP-L10 and the Motorola C123.
However, I see the following issues:
* it only addresses the UART, not the keypad * it introduces a function call for something that's compile determined
As discussed elsewhere in the thread, we cannot detect the model/board at runtime. That's OK, and you are note expected to change that.
However, introducing a function call just to get a constant value is probably a bit overkill. A simpler way would be simply introduce a 'const uint8_t' in the board-specific C files, declare it in some common header file and use it from within the UART code.
The even cleaner solution is to have something like a sercomm_init() call which each of the board init files call, specifying the UART number at that time.
The general rule is: * _within_ the board-specific part, you should always use the #define and not some kind of dynamic value or global variable.
* in generic code that is compiled once and used by multiple boards, all parameters such as UART numbers should be passed in at initialization time.
This rule should also apply for the keypad. The keymap has to move to some board-specific 'const' data structure which gets handed into the keypad driver at the time it is initialized. As all of the Compal boards share the same mapping, this should of course not be copied N times, but all refer to one common file. Only the pirelli would provide a different mapping.
Regards, Harald
baseband-devel@lists.osmocom.org