Hai
Is it strange to have iic_software and iic_sw?
When you see this you think: what’s the difference?
When you open the iic_software you read: for duingebied with other pins than 
iic_hardware. 
When you open iic_sw you read: for using together with iic_hardware (when you 
need 2 iic connections).
For people who used iic_software in the past all remains working!
A possibility?
Peter 

Wees nieuwsgierig maar overdrijf niet. 

> Op 14 feb. 2022 om 18:46 heeft Rob CJ <[email protected]> het volgende 
> geschreven:
> 
> 
> Hi Matt,
> 
> Aliases do not solve the problem. The procedure name still exists and so 
> including both iic_software and iic_hardware will lead to a 'function already 
> defined' error. 
> 
> If I am right an alias is only a different name for the same thing but with 
> an alias you can use both the alias and the original name, correct?
> 
> Next to that iic_software uses function prototypes and so the alias has to be 
> after the function prototype but then the function is already mentioned.
> 
> So the only way to solve this is - like Kiste mentioned - a find replace of 
> iic_ by iic_sw for software and iic_hw for hardware iic. It is then up to the 
> JAL user to either do the same or add an alias 😉.
> 
> Please correct me if I am wrong.
> 
> Kind regards,
> 
> Rob
> 
> Van: [email protected] <[email protected]> namens Matthew 
> Schinkel <[email protected]>
> Verzonden: zondag 13 februari 2022 22:47
> Aan: jallib <[email protected]>
> Onderwerp: [jallib] Re: Not able to use both sw IIC and hw IIC due to 
> procedures having the same name.
>  
> Hi Rob, I agree. Change the i2c library variable and procedure names in both 
> libs.
> 
> If there are any libraries using the i2c lib, they should not need to be 
> changed. Instead, add aliases in the samples like what I've done for serial 
> in many samples.
> 
> In 18f4620_sd_card.jal:
> -- some aliases so it is easy to change from serial hw to serial sw.
> alias serial_write is serial_hw_write
> alias serial_read is serial_hw_read
> alias serial_data is serial_hw_data
> alias serial_data_available is serial_hw_data_available
> 
> This allows the user to switch between hardware and software libraries, or 
> use both.
> 
> I don't think there is any need for a legacy library when the user can just 
> add some alias lines to their sample. They'll need to change their sample 
> either way.
> 
> Thanks,
> Matt.
> 
> On Sunday, February 13, 2022 at 1:04:18 PM UTC-5 [email protected] wrote:
> Hi all,
> 
> I got an e-mail from a Jallib user who wants to use both IIC software and IIC 
> hardware. This is, however, not possible because both libraries use the same 
> names in procedures and functions.
> 
> For USART the convention 'sw', 'hw' and 'hw2' is used in the procedures.
> 
> The problem is easily fixed by adding _sw_ to the software iic procedures. I 
> did this for this Jallib member and gave him a modified version of 
> i2c_software. But when changing this and adding this to Jallib then all 
> sample files that use i2c_software should be changed and members that have 
> made projects with this library should modify their programs too.
> 
> Next to that, for consistency, the i2c_hardware should also get the addition 
> (in procedure names) _hw_.
> 
> What do you think? Should this be changed and if so, how?
> 
> Thanks.
> 
> Kind regards,
> 
> 
> Rob
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/1525e85a-c620-474a-8423-24751c38359cn%40googlegroups.com.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/DB6P195MB0183E8D548AFBA81B53B1FA3E6339%40DB6P195MB0183.EURP195.PROD.OUTLOOK.COM.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/1E4DAF2B-DEEF-4F7A-9F7F-6C66125CD132%40gmail.com.

Reply via email to