Hi,
I've included serial_hardware_aliases make its include as conditional
according to target_cpu being PIC_16 or not. All samples compile fine, I
guess this is ok.
I've also noticed some debugging code in i2c_hw_slave_isr, like:
-- Test code to simulate a large delay in the I2C interrupt handling
-- to test if the clock stretching feature is working properly
if defined( I2C_HW_SLAVE_TEST_CLOCK_STRETCHING ) == true then
delay_10us( 20 )
end if
or:
if(defined(i2c_debug) == true) then
; queue01_nb = "*"
; print_byte_hex(queue01_nb, tmpstat)
queue01_nb = "#"
print_byte_hex(queue01_nb, sspcon)
end if
I'm not a big fan about putting such debug code into "production" code,
since it's kind of polluting code's readability (debug code can be prolific
and invade prod code...). There's no clean solution I guess (maybe using
diff/patch ?), but maybe we should normalize the way it's done (naming
convention for debugging constant, ...) in order to control this contagious
code...
What's your opinion on this, guys ?
Cheers
Seb
--
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org
2009/8/12 Sebastien Lelong <[email protected]>
> OK, I'll take of this. About conditional include, I can't test for real,
> but I guess if it's compiling, it's working...
>
> Seb
> --
> Sébastien Lelong
> http://www.sirloon.net
> http://sirbot.org
>
>
> 2009/8/12 a.faber <[email protected]>
>
>
>> Hi Seb,
>> Yes it should be included, and yes it should be included conditionally
>> Albert
>>
>> ----- Original Message -----
>> From: "Sebastien Lelong" <[email protected]>
>> To: <[email protected]>
>> Sent: Wednesday, August 12, 2009 6:09 PM
>> Subject: [jallib] Re: jallib 0.4 release ?
>>
>>
>> > >
>> >> include/jal/unittest.jal
>> >
>> >
>> > Added.
>> >
>> >
>> >>
>> >> include/peripheral/i2c/i2c_hardware_aliases.jal
>> >
>> >
>> > This one has to be added, right ? Albert ?
>> >
>> > (
>> >
>> > should a conditional compile be used in i2c_hardware.jal ? As a
>> > reminder...
>> >
>> > -- 18F devices needs registers to be normalized
>> > if target_cpu == PIC_16 then
>> > include i2c_hardware_aliases
>> > end if
>> >
>> >
>> > )
>> >
>> >
>> >
>> >> sample/16f77_adc_lowres.jal
>> >
>> >
>> > Added.
>> >
>> >
>> > Cheers,
>> > Seb
>> >
>> > >
>> >
>>
>>
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---