Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-12 Thread Andy Smith
Hi Andy, On Tue, Aug 10, 2010 at 02:50:02PM -0400, Andy Random wrote: > Andy - since you are a member of London Hackspace and will probably hear > about it before I do, if there is another course run at a later date could > you let the list (or me directly if you prefer) know about it please?

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-10 Thread Andy Random
On Thu, 5 Aug 2010, Andy Smith wrote: I've no idea about your question, however I would like to point you towards London Hackspace (http://london.hackspace.org.uk/) where there is vast Arduino knowledge. Also there is a 2 day Arduino beginner's course on August 28/29 which is incredible value

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-05 Thread Andy Smith
Hi Paul, On Tue, Aug 03, 2010 at 02:12:16PM +0100, p...@stimpsonfamily.co.uk wrote: > Sorry this is a bit OT but I believe there is Arduino expertise here :) I've no idea about your question, however I would like to point you towards London Hackspace (http://london.hackspace.org.uk/) where there

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-04 Thread Peter Bond
> First though I'd go and shoot the hardware engineer, who splits a bitfield > across adjacent bytes ? While I'd concur with the punishment, I'd like to see that extended to include spec writers who think that variable bit-length coding is a good idea... Absolute doddle to do with a shift regis

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-04 Thread Stephen Pelc
Paul said: > I'm writing a piece of code for an Arduino to process > short data blocks received over a serial link. > > I've made a struct to hold the input data block which is > something like: > > struct received_data { > unsigned int start:1; > unsigned int address:4; > unsigned

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread James Courtier-Dutton
On 3 August 2010 15:12, wrote: > > Hi, > > Sorry this is a bit OT but I believe there is Arduino expertise here :) > > I'm writing a piece of code for an Arduino to process short data blocks > received > over a serial link. > > I've made a struct to hold the input data block which is something l

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Bob Dunlop
> Ah, that's interesting. It *definitely* used to use the base type. A few oddball compilers might do this but every one I've used in 30 years has packed the bits (at least those that would fit into a byte). Ardunio = AVR ATMega They use the Gcc AVR compiler in the development system. struct

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Chris Liddell
On 03/08/2010 15:28, Hugo Mills wrote: > On Tue, Aug 03, 2010 at 02:44:42PM +0100, Chris Liddell wrote: >> On 03/08/2010 14:30, Hugo Mills wrote: >>> On Tue, Aug 03, 2010 at 02:19:32PM +0100, Chris Liddell wrote: Declarations like your code don't declare variables comprising that number o

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Hugo Mills
On Tue, Aug 03, 2010 at 02:44:42PM +0100, Chris Liddell wrote: > On 03/08/2010 14:30, Hugo Mills wrote: > > On Tue, Aug 03, 2010 at 02:19:32PM +0100, Chris Liddell wrote: > >> Declarations like your code don't declare variables comprising that > >> number of bits, they still are still the size of t

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Chris Liddell
On 03/08/2010 14:30, Hugo Mills wrote: > On Tue, Aug 03, 2010 at 02:19:32PM +0100, Chris Liddell wrote: >> Declarations like your code don't declare variables comprising that >> number of bits, they still are still the size of the base type (in this >> case unsigned int). All the bit length option

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Hugo Mills
On Tue, Aug 03, 2010 at 02:19:32PM +0100, Chris Liddell wrote: > Declarations like your code don't declare variables comprising that > number of bits, they still are still the size of the base type (in this > case unsigned int). All the bit length option does (if supported by the > compiler) is res

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Hugo Mills
On Tue, Aug 03, 2010 at 02:12:16PM +0100, p...@stimpsonfamily.co.uk wrote: > I'm writing a piece of code for an Arduino to process short data blocks > received > over a serial link. > > I've made a struct to hold the input data block which is something like: > > struct received_data { > unsi

Re: [Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread Chris Liddell
Declarations like your code don't declare variables comprising that number of bits, they still are still the size of the base type (in this case unsigned int). All the bit length option does (if supported by the compiler) is restrict the maximum value of the field (and sometimes not even that - ma

[Hampshire] [Slightly OT] Arduino coding help - pointers to structs

2010-08-03 Thread paul
Hi, Sorry this is a bit OT but I believe there is Arduino expertise here :) I'm writing a piece of code for an Arduino to process short data blocks received over a serial link. I've made a struct to hold the input data block which is something like: struct received_data { unsigned int star