* [ECOS] I2C and SPI porting help @ 2005-10-28 14:12 Carlos Sobrinho 2005-10-28 14:20 ` Will Wagner 0 siblings, 1 reply; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 14:12 UTC (permalink / raw) To: ecos-discuss [-- Attachment #1: Type: text/plain, Size: 868 bytes --] Hello there. I'm working with a AEB-1 board and I implemented the SPI and I2C buses with bit bang but now I would like to migrate my code to use the cyg_i2c_* and cyg_spi_* infrastructure. I read the hardware porting guide but I still need some more info. Can anyone point me in the right direction? Maybe give a example? I read that I only need some basic io in some functions and I need to pass the function pointer to the I2C/SPI struct. Do I need to add something in the packages/dev/spi... or can I use it in my own application? Any information would be gladly appreciated WBR Carlos Sobrinho -- ############################################################################# # How do I get HOME? # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:12 [ECOS] I2C and SPI porting help Carlos Sobrinho @ 2005-10-28 14:20 ` Will Wagner 2005-10-28 14:22 ` Carlos Sobrinho 2005-10-28 14:27 ` Gary Thomas 0 siblings, 2 replies; 13+ messages in thread From: Will Wagner @ 2005-10-28 14:20 UTC (permalink / raw) To: eCos Discussion Carlos Sobrinho wrote: > Hello there. > > I'm working with a AEB-1 board and I implemented the SPI and I2C buses with > bit bang but now I would like to migrate my code to use the cyg_i2c_* and > cyg_spi_* infrastructure. > > I read the hardware porting guide but I still need some more info. > Can anyone point me in the right direction? Maybe give a example? > I read that I only need some basic io in some functions and I need to pass the > function pointer to the I2C/SPI struct. > > Do I need to add something in the packages/dev/spi... or can I use it in my > own application? > > Any information would be gladly appreciated I can send you my implementation of SPI using an MPC866P if you want an example. > > WBR > Carlos Sobrinho -- ------------------------------------------------------------------------ Will Wagner will_wagner@carallon.com Senior Project Engineer Office Tel: 0207 371 2032 Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA ------------------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:20 ` Will Wagner @ 2005-10-28 14:22 ` Carlos Sobrinho 2005-10-28 14:27 ` Gary Thomas 1 sibling, 0 replies; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 14:22 UTC (permalink / raw) To: ecos-discuss; +Cc: Will Wagner [-- Attachment #1: Type: text/plain, Size: 446 bytes --] Em Sexta, 28 de Outubro de 2005 15:21, o Will Wagner escreveu: > I can send you my implementation of SPI using an MPC866P if you want an > example. Sure. Thank you very much. WBR Carlos Sobrinho -- ############################################################################# # "...balance the budget? Tax religion." [Jello Biafra] # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:20 ` Will Wagner 2005-10-28 14:22 ` Carlos Sobrinho @ 2005-10-28 14:27 ` Gary Thomas 2005-10-28 14:37 ` Will Wagner 2005-10-28 14:39 ` Carlos Sobrinho 1 sibling, 2 replies; 13+ messages in thread From: Gary Thomas @ 2005-10-28 14:27 UTC (permalink / raw) To: Will Wagner; +Cc: eCos Discussion On Fri, 2005-10-28 at 15:21 +0100, Will Wagner wrote: > Carlos Sobrinho wrote: > > Hello there. > > > > I'm working with a AEB-1 board and I implemented the SPI and I2C buses with > > bit bang but now I would like to migrate my code to use the cyg_i2c_* and > > cyg_spi_* infrastructure. > > > > I read the hardware porting guide but I still need some more info. > > Can anyone point me in the right direction? Maybe give a example? > > I read that I only need some basic io in some functions and I need to pass the > > function pointer to the I2C/SPI struct. > > > > Do I need to add something in the packages/dev/spi... or can I use it in my > > own application? > > > > Any information would be gladly appreciated > > I can send you my implementation of SPI using an MPC866P if you want an > example. > Could you post it here (so we may all benefit)? Does it use the cyg_XXX infrastructure? Thanks -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:27 ` Gary Thomas @ 2005-10-28 14:37 ` Will Wagner 2005-10-28 14:51 ` Gary Thomas 2005-10-28 14:39 ` Carlos Sobrinho 1 sibling, 1 reply; 13+ messages in thread From: Will Wagner @ 2005-10-28 14:37 UTC (permalink / raw) To: eCos Discussion Gary Thomas wrote: > On Fri, 2005-10-28 at 15:21 +0100, Will Wagner wrote: >> Carlos Sobrinho wrote: >>> Hello there. >>> >>> I'm working with a AEB-1 board and I implemented the SPI and I2C buses with >>> bit bang but now I would like to migrate my code to use the cyg_i2c_* and >>> cyg_spi_* infrastructure. >>> >>> I read the hardware porting guide but I still need some more info. >>> Can anyone point me in the right direction? Maybe give a example? >>> I read that I only need some basic io in some functions and I need to pass the >>> function pointer to the I2C/SPI struct. >>> >>> Do I need to add something in the packages/dev/spi... or can I use it in my >>> own application? >>> >>> Any information would be gladly appreciated >> I can send you my implementation of SPI using an MPC866P if you want an >> example. >> > > Could you post it here (so we may all benefit)? Very happy to post it. Should I be posting it here or the ecos devel mailing list? I would like to just tidy it up a bit first before submitting it. I also have a whole load of other changes to support the 866P that I'd like to submit, I thought I'd tidy it all up and then submit it all at once. > > Does it use the cyg_XXX infrastructure? Yes it uses the cyg SPI infrastructure. It is heavily based on the arm at91 code checked into anoncvs. > > Thanks > -- ------------------------------------------------------------------------ Will Wagner will_wagner@carallon.com Senior Project Engineer Office Tel: 0207 371 2032 Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA ------------------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:37 ` Will Wagner @ 2005-10-28 14:51 ` Gary Thomas 0 siblings, 0 replies; 13+ messages in thread From: Gary Thomas @ 2005-10-28 14:51 UTC (permalink / raw) To: Will Wagner; +Cc: eCos Discussion On Fri, 2005-10-28 at 15:38 +0100, Will Wagner wrote: > Gary Thomas wrote: > > On Fri, 2005-10-28 at 15:21 +0100, Will Wagner wrote: > >> Carlos Sobrinho wrote: > >>> Hello there. > >>> > >>> I'm working with a AEB-1 board and I implemented the SPI and I2C buses with > >>> bit bang but now I would like to migrate my code to use the cyg_i2c_* and > >>> cyg_spi_* infrastructure. > >>> > >>> I read the hardware porting guide but I still need some more info. > >>> Can anyone point me in the right direction? Maybe give a example? > >>> I read that I only need some basic io in some functions and I need to pass the > >>> function pointer to the I2C/SPI struct. > >>> > >>> Do I need to add something in the packages/dev/spi... or can I use it in my > >>> own application? > >>> > >>> Any information would be gladly appreciated > >> I can send you my implementation of SPI using an MPC866P if you want an > >> example. > >> > > > > Could you post it here (so we may all benefit)? > > Very happy to post it. Should I be posting it here or the ecos devel > mailing list? I would like to just tidy it up a bit first before > submitting it. I also have a whole load of other changes to support the > 866P that I'd like to submit, I thought I'd tidy it all up and then > submit it all at once. > That's fine. You can send it to the devel list, or just as a patch to ecos-patches@ecos.sourceware.org Also don't forget we'll need a copyright assignment (we have to have very clear ownership of anything included into CVS). Review the documents at http://ecos.sourceware.org/ecos/assign.html > > > > Does it use the cyg_XXX infrastructure? > > Yes it uses the cyg SPI infrastructure. It is heavily based on the arm > at91 code checked into anoncvs. > > > > > Thanks > > > > -- > ------------------------------------------------------------------------ > Will Wagner will_wagner@carallon.com > Senior Project Engineer Office Tel: 0207 371 2032 > Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA > ------------------------------------------------------------------------ > -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:27 ` Gary Thomas 2005-10-28 14:37 ` Will Wagner @ 2005-10-28 14:39 ` Carlos Sobrinho 2005-10-28 14:51 ` Gary Thomas 1 sibling, 1 reply; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 14:39 UTC (permalink / raw) To: ecos-discuss [-- Attachment #1: Type: text/plain, Size: 1024 bytes --] Em Sexta, 28 de Outubro de 2005 15:26, o Gary Thomas escreveu: > Could you post it here (so we may all benefit)? > > Does it use the cyg_XXX infrastructure? I believe that some sort of code or pseudo code could be very usefull to help people develop their own device driver and maybe, it could be added to the anoncvs. BTW, I currently have some device drivers for eCos and AEB-1 (ARM7): * GP2D12 Sharp IR receiver * GP2D02 Sharp IR receiver * SRF08 Ultrasonic Range Finder * 24Cxx E²PROM * Nokias LCD (3310/7110/etc) * Mini graphical library (lines, horizontal/vertical lines, progress bars, fonts, etc with a very low footprint...) Is this code that I should review to match eCos's structs and commit to CVS? Anyone interested? WBR Carlos Sobrinho -- ############################################################################# # It's OKAY -- I'm an INTELLECTUAL, too. # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:39 ` Carlos Sobrinho @ 2005-10-28 14:51 ` Gary Thomas 2005-10-28 15:04 ` Carlos Sobrinho 0 siblings, 1 reply; 13+ messages in thread From: Gary Thomas @ 2005-10-28 14:51 UTC (permalink / raw) To: duckman; +Cc: eCos Discussion On Fri, 2005-10-28 at 15:39 +0100, Carlos Sobrinho wrote: > Em Sexta, 28 de Outubro de 2005 15:26, o Gary Thomas escreveu: > > Could you post it here (so we may all benefit)? > > > > Does it use the cyg_XXX infrastructure? > > I believe that some sort of code or pseudo code could be very usefull to help > people develop their own device driver and maybe, it could be added to the > anoncvs. > > BTW, I currently have some device drivers for eCos and AEB-1 (ARM7): > * GP2D12 Sharp IR receiver > * GP2D02 Sharp IR receiver > * SRF08 Ultrasonic Range Finder > * 24Cxx E²PROM > * Nokias LCD (3310/7110/etc) > * Mini graphical library (lines, horizontal/vertical lines, progress bars, > fonts, etc with a very low footprint...) > > Is this code that I should review to match eCos's structs and commit to CVS? > Anyone interested? Absolutely! The best way would be to send a patch against the [current] CVS to ecos-patches@ecos.sourceware.org We'll review the patch and then apply to the repository, as appropriate. Of course, don't forget the copyright assignment (we have to have very clear ownership of anything included into CVS). Review the documents at http://ecos.sourceware.org/ecos/assign.html -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 14:51 ` Gary Thomas @ 2005-10-28 15:04 ` Carlos Sobrinho 2005-10-28 15:09 ` Gary Thomas 0 siblings, 1 reply; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 15:04 UTC (permalink / raw) To: ecos-discuss; +Cc: Will Wagner [-- Attachment #1: Type: text/plain, Size: 2467 bytes --] Em Sexta, 28 de Outubro de 2005 15:50, o Gary Thomas escreveu: > On Fri, 2005-10-28 at 15:39 +0100, Carlos Sobrinho wrote: > > Em Sexta, 28 de Outubro de 2005 15:26, o Gary Thomas escreveu: > > > Could you post it here (so we may all benefit)? > > > > > > Does it use the cyg_XXX infrastructure? > > > > I believe that some sort of code or pseudo code could be very usefull to > > help people develop their own device driver and maybe, it could be added > > to the anoncvs. > > > > BTW, I currently have some device drivers for eCos and AEB-1 (ARM7): > > * GP2D12 Sharp IR receiver > > * GP2D02 Sharp IR receiver > > * SRF08 Ultrasonic Range Finder > > * 24Cxx E²PROM > > * Nokias LCD (3310/7110/etc) > > * Mini graphical library (lines, horizontal/vertical lines, progress > > bars, fonts, etc with a very low footprint...) > > > > Is this code that I should review to match eCos's structs and commit to > > CVS? Anyone interested? > > Absolutely! The best way would be to send a patch against the [current] > CVS to ecos-patches@ecos.sourceware.org We'll review the patch and then > apply to the repository, as appropriate. > > Of course, don't forget the copyright assignment (we have to have very > clear ownership of anything included into CVS). Review the documents > at http://ecos.sourceware.org/ecos/assign.html > Will do that. As soon as I port the bit bang SPI/I2C to the AEB-1 I'll (try) port the device drivers to the eCos way and then send the copyright assignment. I need to change a little of the code because I currently don't use the cyg_drv_.. but the normal/kernel versions (cyg_mutex instead of cyg_drv_mutex) but this should not be major problem. At least, the graphical lib and the nokias display drivers should be usefull to someone because of the low footprint. I'm estimating a footprint, including driver, fonts and graphical lib of 8/15KB. It has a frame buffer, optimized update (only the painted areas), some optimized primitives and a tiny (6x4) font. Regarding the copyright assignment, the site refers to company, what if I'm a student and this is my hobby and all the work is mine? What should I put? WBR Carlos Sobrinho -- ############################################################################# # Old mercenaries never die. They go to hell and regroup. # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 15:04 ` Carlos Sobrinho @ 2005-10-28 15:09 ` Gary Thomas 2005-10-28 15:13 ` Andrew Lunn 2005-10-28 15:22 ` Carlos Sobrinho 0 siblings, 2 replies; 13+ messages in thread From: Gary Thomas @ 2005-10-28 15:09 UTC (permalink / raw) To: duckman; +Cc: eCos Discussion, Will Wagner On Fri, 2005-10-28 at 16:03 +0100, Carlos Sobrinho wrote: > Em Sexta, 28 de Outubro de 2005 15:50, o Gary Thomas escreveu: > > On Fri, 2005-10-28 at 15:39 +0100, Carlos Sobrinho wrote: > > > Em Sexta, 28 de Outubro de 2005 15:26, o Gary Thomas escreveu: > > > > Could you post it here (so we may all benefit)? > > > > > > > > Does it use the cyg_XXX infrastructure? > > > > > > I believe that some sort of code or pseudo code could be very usefull to > > > help people develop their own device driver and maybe, it could be added > > > to the anoncvs. > > > > > > BTW, I currently have some device drivers for eCos and AEB-1 (ARM7): > > > * GP2D12 Sharp IR receiver > > > * GP2D02 Sharp IR receiver > > > * SRF08 Ultrasonic Range Finder > > > * 24Cxx E²PROM > > > * Nokias LCD (3310/7110/etc) > > > * Mini graphical library (lines, horizontal/vertical lines, progress > > > bars, fonts, etc with a very low footprint...) > > > > > > Is this code that I should review to match eCos's structs and commit to > > > CVS? Anyone interested? > > > > Absolutely! The best way would be to send a patch against the [current] > > CVS to ecos-patches@ecos.sourceware.org We'll review the patch and then > > apply to the repository, as appropriate. > > > > Of course, don't forget the copyright assignment (we have to have very > > clear ownership of anything included into CVS). Review the documents > > at http://ecos.sourceware.org/ecos/assign.html > > > > Will do that. > As soon as I port the bit bang SPI/I2C to the AEB-1 I'll (try) port the device > drivers to the eCos way and then send the copyright assignment. > > I need to change a little of the code because I currently don't use the > cyg_drv_.. but the normal/kernel versions (cyg_mutex instead of > cyg_drv_mutex) but this should not be major problem. > > At least, the graphical lib and the nokias display drivers should be usefull > to someone because of the low footprint. I'm estimating a footprint, > including driver, fonts and graphical lib of 8/15KB. > > It has a frame buffer, optimized update (only the painted areas), some > optimized primitives and a tiny (6x4) font. > > Regarding the copyright assignment, the site refers to company, what if I'm a > student and this is my hobby and all the work is mine? What should I put? As long as the work is truly yours, just put "self" I'd suggest that you send separate patches for each of the major components. That way, we can comment on them individually (it also makes checking and thinking about them much simpler) -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 15:09 ` Gary Thomas @ 2005-10-28 15:13 ` Andrew Lunn 2005-10-28 15:27 ` Carlos Sobrinho 2005-10-28 15:22 ` Carlos Sobrinho 1 sibling, 1 reply; 13+ messages in thread From: Andrew Lunn @ 2005-10-28 15:13 UTC (permalink / raw) To: Gary Thomas; +Cc: duckman, eCos Discussion, Will Wagner > > Regarding the copyright assignment, the site refers to company, > > what if I'm a student and this is my hobby and all the work is > > mine? What should I put? > > As long as the work is truly yours, just put "self" You need to check your university rules. Sometimes anything you do at university belongs to the university... Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 15:13 ` Andrew Lunn @ 2005-10-28 15:27 ` Carlos Sobrinho 0 siblings, 0 replies; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 15:27 UTC (permalink / raw) To: eCos Discussion; +Cc: Andrew Lunn [-- Attachment #1: Type: text/plain, Size: 677 bytes --] Em Sexta, 28 de Outubro de 2005 16:13, o Andrew Lunn escreveu: > You need to check your university rules. Sometimes anything you do at > university belongs to the university... > > Andrew Although I'm still a student of Aveiro's University, no work was made either on the scholarship contract or on classes time. All the work is for my own entertainment made in my home for me and my robot. WBR Carlos Sobrinho -- ############################################################################# # My polyvinyl cowboy wallet was made in Hong Kong by Montgomery Clift! # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ECOS] I2C and SPI porting help 2005-10-28 15:09 ` Gary Thomas 2005-10-28 15:13 ` Andrew Lunn @ 2005-10-28 15:22 ` Carlos Sobrinho 1 sibling, 0 replies; 13+ messages in thread From: Carlos Sobrinho @ 2005-10-28 15:22 UTC (permalink / raw) To: ecos-discuss [-- Attachment #1: Type: text/plain, Size: 1311 bytes --] > As long as the work is truly yours, just put "self" I'll explain better. The graphical code is mine. The Sharp's GP2Dx2 is mine based on their datasheet information. No code in the datasheet, only schematics of the transfers. The same for the sonar. The Nokia device driver is based on the controller's datasheet and 4/5 lines (the initialization) of some PIC assembly code. Do I only need my copyright assignment on this conditions? Regarding the committing, I'll need some help with the CDL part since its new to me. Also, some drivers need a 50/80ms wait and only one has a polled way of checking for new measures (I2C sonar) so I guess they all need the kernel or am I wrong? Also, what should be the way to select the GPIO pins? Should the drivers be device/CPU or platform or board type/specific? WBR Carlos Sobrinho > > I'd suggest that you send separate patches for each of the major > components. That way, we can comment on them individually (it also > makes checking and thinking about them much simpler) > -- ############################################################################# # Give them RADAR-GUIDED SKEE-BALL LANES and VELVEETA BURRITOS!! # ############################################################################# [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-10-28 15:27 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-10-28 14:12 [ECOS] I2C and SPI porting help Carlos Sobrinho 2005-10-28 14:20 ` Will Wagner 2005-10-28 14:22 ` Carlos Sobrinho 2005-10-28 14:27 ` Gary Thomas 2005-10-28 14:37 ` Will Wagner 2005-10-28 14:51 ` Gary Thomas 2005-10-28 14:39 ` Carlos Sobrinho 2005-10-28 14:51 ` Gary Thomas 2005-10-28 15:04 ` Carlos Sobrinho 2005-10-28 15:09 ` Gary Thomas 2005-10-28 15:13 ` Andrew Lunn 2005-10-28 15:27 ` Carlos Sobrinho 2005-10-28 15:22 ` Carlos Sobrinho
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).