- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I want to receive data from a temperature sensor (TC072) to my SPI Master, so I want to disable the Tx in order to "Receive".
Datasheets mention the function "SPIM_TxDisable()" but I obtain the warning "implicit declaration of function SPIM_TxDisable() is invalid in C99".
Does someone know the reason and how to fix it ?
Thanks a lot,
Emma.
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
According to the datasheet of SPIM, SPIM_TxDisable() is valid when the component is configured as "bidirectional"
So I made a test project with following schematic.
SPIM_1 : full duplex
SPIM_2 : bidirectional
Then I wrote a main.c as
Here, as SPIM_1 is full duplex ( != bidirectional) SPIM_1_TxDisable() is "implicit declaration"
where SPIM_2_TxDisable() does not have the "Stop Mark/Warning".
So if you'd like to use SPIM_TxDisable/Enable function, you need to configure the component as bidirectional.
Or if you use full duplex SPIM, you don't need to use TxDisable/Enable.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi emri_4607881,
Could you please let us know the PSoC used , component name, component version and PSoC Creator version you are using in your application?
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use the PSoC 5LP with the CY8CKIT-050 kit (Device selected Cy8C5868AXI-LP035) , and the PSoC Creator 4.2. The component name is the SPI Master version 2.50.
Thanks,
Emma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
According to the datasheet of SPIM, SPIM_TxDisable() is valid when the component is configured as "bidirectional"
So I made a test project with following schematic.
SPIM_1 : full duplex
SPIM_2 : bidirectional
Then I wrote a main.c as
Here, as SPIM_1 is full duplex ( != bidirectional) SPIM_1_TxDisable() is "implicit declaration"
where SPIM_2_TxDisable() does not have the "Stop Mark/Warning".
So if you'd like to use SPIM_TxDisable/Enable function, you need to configure the component as bidirectional.
Or if you use full duplex SPIM, you don't need to use TxDisable/Enable.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your answer, I will use that!
Have a nice day,
Emma.