Hi Seb,
Take a look at the file attached, it's using I2C2 with success.

Vasile

On Mon, Mar 28, 2011 at 3:18 PM, Sebastien Lelong <
[email protected]> wrote:

> OK, I see what you mean.
> I've also seen you're using MSSP registers within enc28j60.jal library.
> Since we don't want to check definition of SPI_USE_MSSP2 multiple time, in
> multiple places, we need to refactor this.
>
> From what I can understand, in sample code, you need to deal
> with spi_master_hw before dealing with enc28j60. We could put all this "if
> defined" thing within spi_mssp_select.jal library, which could be included
> by spi_master_hw.jal, and define appropriate aliases for any other
> subsequent lib/code.
>
>
> const SPI_USE_MSSP2 = true
> include spi_master_hw
> -- normalized aliases available
> ...
> include enc28j60
> ---
>
> If a lib/code needs normalized aliases, but doesn't use spi_master_hw
> (would it be possible ?), it could:
>
> -- zelib.jal or zecode.jal
> const SPI_USE_MSSP2
> include spi_mssp_select
> -- aliases available
>
>
>
> Cheers,
> Seb
>
>
> 2011/3/28 mattschinkel <[email protected]>
>
>> > if defined(SPI_USE_MSSP2) then
>> >    alias _SSPBUF is SSP2BUF
>> >    etc...
>> > end if
>>
>> Yes, this is what I was suggesting, but I see your issue. So, in this
>> case the best thing to do may be for the spi procedures can use other
>> names like:
>>
>> spi_master_hw_buffer
>> spi_master_hw_buffer_status
>> spi_master_hw_ckp
>> spi_master_hw_cke
>> spi_master_hw_enable
>> spi_master_hw_rate
>>
>> Maybe others. The above seem more readable anyways
>>
>> if defined(SPI_USE_MSSP2) then
>>    alias spi_master_hw_buffer is SSP2BUF
>>   etc...
>> end if
>>
>> Matt.
>>
>  --
> 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.
>

-- 
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.

Attachment: max_i2c2.jal
Description: Binary data

Reply via email to