Hi Joep,
You're not alone:) I forget such things too.
Albert

----- Original Message ----- 
From: "Joep Suijs" <[email protected]>
To: <[email protected]>
Sent: Sunday, July 26, 2009 12:53 PM
Subject: [jallib] Re: r1121 commited - add alias for pic_18f devices for the 
time being



Hi Albert,

No problem if it is a 'work in progress'. The thing is that *I* tend
to forget the cleanup in the end ;)

Joep

2009/7/26 a.faber <[email protected]>:
>
> Hi Joep,
> I can clean up the code a bit, the issue is related to the changes to the
> i2c slave, which I have not commited jet. The issue is the some old 18C
> devices have the same i2c statemachine as the 16f devices,, newer 18f
> devices have a slightly more advanced state machine, however, these
> device(s) are not supported by jallib (no device files), so I can remove
> that code section (now looking at the code it is wrong place anyways since
> it should be in the else branch of the if.
> Albert
>
>
> ----- Original Message -----
> From: "Joep Suijs" <[email protected]>
> To: <[email protected]>
> Sent: Sunday, July 26, 2009 11:45 AM
> Subject: [jallib] Re: r1121 commited - add alias for pic_18f devices for 
> the
> time being
>
>
>
> There is still some code commented-out (line 25 - 57; altough for some
> reason, my editor does not highlight it as such...). Could this code
> be removed? And what is i2c_old_statemachine for?
>
> Maybe the line 22-60 can be changed into:
> if ( target_cpu == PIC_16 ) then
> (leaving the else out)?
>
> Joep
>
> 2009/7/26 a.faber <[email protected]>:
>>
>> Hi Seb,
>> It is related to this issue, as far as I can test it, it looks resolved,
>> so
>> issue can be closed
>> Albert
>>
>>
>> ----- Original Message -----
>> From: "Sebastien Lelong" <[email protected]>
>> To: <[email protected]>
>> Sent: Sunday, July 26, 2009 9:50 AM
>> Subject: [jallib] Re: r1121 commited - add alias for pic_18f devices for
>> the
>> time being
>>
>>
>> Is this related to issue 69 ?
>> http://code.google.com/p/jallib/issues/detail?id=69
>> Can we close it ?
>>
>>
>> Seb
>>
>> 2009/7/26 <[email protected]>
>>
>>>
>>> Revision: 1121
>>> Author: [email protected]
>>> Date: Sat Jul 25 15:55:14 2009
>>> Log: add alias for pic_18f devices for the time being
>>> http://code.google.com/p/jallib/source/detail?r=1121
>>>
>>> Modified:
>>> /trunk/include/peripheral/i2c/i2c_hardware.jal
>>>
>>> =======================================
>>> --- /trunk/include/peripheral/i2c/i2c_hardware.jal  Sun Nov 30
>>> 06:10:47
>>> 2008
>>> +++ /trunk/include/peripheral/i2c/i2c_hardware.jal  Sat Jul 25
>>> 15:55:14
>>> 2009
>>> @@ -19,6 +19,77 @@
>>> const _i2c_1mhz = (target_clock / (4 * 1000_000)) - 1
>>> -- --------------------------------------------------------------------
>>>
>>> +if (
>>> +    ( target_cpu != PIC_16 )
>>> +
>>> +    -- exclude PIC18C452 Family
>>> +--    ( target_chip == PIC_18C242 ) |
>>> +--    ( target_chip == PIC_18C252 ) |
>>> +--    ( target_chip == PIC_18C442 ) |
>>> +--    ( target_chip == PIC_18C452 ) |
>>> +
>>> +--    -- exclude PIC18C458 Family
>>> +--    ( target_chip == PIC_18C248 ) |
>>> +--    ( target_chip == PIC_18C258 ) |
>>> +--    ( target_chip == PIC_18C448 ) |
>>> +--    ( target_chip == PIC_18C458 ) |
>>> +--
>>> +--    -- exclude PIC18C601/801
>>> +--    ( target_chip == PIC_18C601 ) |
>>> +--    ( target_chip == PIC_18C801 ) |
>>> +--
>>> +    -- exclude PIC18F4431 Family
>>> +--    ( target_chip == PIC_18F2231 ) |
>>> +--    ( target_chip == PIC_18F2431 ) |
>>> +--    ( target_chip == PIC_18F4231 ) |
>>> +--    ( target_chip == PIC_18F4431 ) |
>>> +
>>> +--    -- exclude PIC18F8720 Family
>>> +--    ( target_chip == PIC_18F6520 ) |
>>> +--    ( target_chip == PIC_18F6620 ) |
>>> +--    ( target_chip == PIC_18F6720 ) |
>>> +--    ( target_chip == PIC_18F8520 ) |
>>> +--    ( target_chip == PIC_18F8620 ) |
>>> +--    ( target_chip == PIC_18F8720 ) |
>>> +--
>>> +--    -- exclude PIC18f1220/PIC18f1230
>>> +--    ( target_chip == PIC_18F1220 ) |
>>> +--    ( target_chip == PIC_18F1230 )
>>> +
>>>    ) then
>>> +    const bit i2c_old_statemachine = 1
>>> +else
>>> +    var volatile byte SSPCON is SSP1CON
>>> +    var volatile byte SSPCON2 is SSP1CON2
>>> +    var volatile byte SSPADD is SSP1ADD
>>> +    var volatile byte SSPSTAT is SSP1STAT
>>> +    var volatile byte SSPBUF is SSP1BUF
>>> +
>>> +    var volatile bit SSPCON2_GCEN is SSP1CON2_GCEN
>>> +    var volatile bit SSPCON2_ACKSTAT is SSP1CON2_ACKSTAT
>>> +    var volatile bit SSPCON2_ACKDT is SSP1CON2_ACKDT
>>> +    var volatile bit SSPCON2_ACKEN is SSP1CON2_ACKEN
>>> +    var volatile bit SSPCON2_RCEN is SSP1CON2_RCEN
>>> +    var volatile bit SSPCON2_PEN is SSP1CON2_PEN
>>> +    var volatile bit SSPCON2_RSEN is SSP1CON2_RSEN
>>> +    var volatile bit SSPCON2_SEN is SSP1CON2_SEN
>>> +
>>> +    var volatile bit SSPSTAT_SMP is SSP1STAT_SMP
>>> +    var volatile bit SSPSTAT_CKE is SSP1STAT_CKE
>>> +    var volatile bit SSPSTAT_D is SSP1STAT_D
>>> +    var volatile bit SSPSTAT_NA is SSP1STAT_NA
>>> +    var volatile bit SSPSTAT_P is SSP1STAT_P
>>> +    var volatile bit SSPSTAT_S is SSP1STAT_S
>>> +    var volatile bit SSPSTAT_R is SSP1STAT_R
>>> +    var volatile bit SSPSTAT_NW is SSP1STAT_NW
>>> +    var volatile bit SSPSTAT_UA is SSP1STAT_UA
>>> +    var volatile bit SSPSTAT_BF is SSP1STAT_BF
>>> +
>>> +    var volatile bit SSPCON_WCOL is SSP1CON_WCOL
>>> +    var volatile bit SSPCON_SSPOV is SSP1CON_SSPOV
>>> +    var volatile bit SSPCON_SSPEN is SSP1CON_SSPEN
>>> +    var volatile bit SSPCON_CKP is SSP1CON_CKP
>>> +    var volatile bit*4 SSPCON_SSPM is SSP1CON_SSPM
>>> +end if
>>>
>>> -- --------------------------------------------------------------------
>>> -- if the device has changed, change the speed if necessary
>>>
>>> >
>>>
>>
>>
>> --
>> Sbastien Lelong
>> http://www.sirloon.net
>> http://sirbot.org
>>
>>
>>
>>
>> >
>>
>
>
>
>
> >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to