|
|
(15 intermediate revisions by the same user not shown) |
Line 14: |
Line 14: |
| ==I2S Master/Slave ESP32 component== | | ==I2S Master/Slave ESP32 component== |
| Provides access to the onboard inter-IC sound (I2S) peripheras allowing for simple digital audio input and output. | | Provides access to the onboard inter-IC sound (I2S) peripheras allowing for simple digital audio input and output. |
| + | |
| + | ==Component Source Code== |
| + | |
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_I2S.fcfx FC_Comp_Source_I2S.fcfx] |
| + | |
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_I2S.fcfx FC_Comp_Source_I2S.fcfx] |
| | | |
| ==Detailed description== | | ==Detailed description== |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| | | |
| | | |
Line 26: |
Line 52: |
| | | |
| | | |
− | ''<span style="color:red;">No additional examples</span>''
| |
| | | |
| | | |
− | ==Downloadable macro reference==
| |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stop'''
| |
− | |-
| |
− | | colspan="2" | Stops the I2S audio stream
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read'''
| |
− | |-
| |
− | | colspan="2" | Wait timeout ticks to receive length number of samples, returns samples received. 24 and 32-bit data must be split into two integer values per sample.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:]] -
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | Data array to populate with incoming data
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Length
| |
− | |-
| |
− | | colspan="2" | Max number of samples to try and receive
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Timeout
| |
− | |-
| |
− | | colspan="2" | Max number of ticks to wait for incoming samples
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckQueue'''
| |
− | |-
| |
− | | colspan="2" | Checks the I2S Event queue for a DMA Buffer full or empty event. For an output returns true when there is an empty DMA buffer available. For an input return true when there is a full DMA buffer available.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Write'''
| |
− | |-
| |
− | | colspan="2" | Wait timeout ticks to send length number of samples, returns samples sent 24 and 32-bit data must be split into two integer values per sample.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:]] -
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | Data array containing outgoing data
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Length
| |
− | |-
| |
− | | colspan="2" | Max number of samples to try and send
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Timeout
| |
− | |-
| |
− | | colspan="2" | Max number of ticks to wait for space in the outgoing buffer
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Start'''
| |
− | |-
| |
− | | colspan="2" | Starts the I2S audio stream, auto started by the initialise function.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
− | |-
| |
− | | colspan="2" | Configures the I2C peripheral ready for data.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXFilter'''
| |
− | |-
| |
− | | colspan="2" | Initialization setting for RX Filter
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Filter
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
− | | width="90%" | Value
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxDataCount'''
| |
− | |-
| |
− | | colspan="2" | Returns the number of valid data bytes in the buffer
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | buffer
| |
− | |-
| |
− | | colspan="2" | The index of the required buffer
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | |
− | |-
| + | ''<span style="color:red;">No additional examples</span>'' |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| + | |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Init'''
| + | |
− | |-
| + | |
− | | colspan="2" | Must be called at least once and after every Uninit call to enable the CAN instance
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitTXBuffer'''
| |
− | |-
| |
− | | colspan="2" | Initialization settings for TX Buffers
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Buffer
| |
− | |-
| |
− | | colspan="2" | TX Buffer ID = 0,1 or 2
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
− | | width="90%" | ID
| |
− | |-
| |
− | | colspan="2" | CAN Address
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Length
| |
− | |-
| |
− | | colspan="2" | Number of bytes to send
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | Data Array (of Length bytes)
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskStd'''
| |
− | |-
| |
− | | colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Mask
| |
− | |-
| |
− | | colspan="2" | Mask number
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Hi
| |
− | |-
| |
− | | colspan="2" | The high byte (bits 8-15) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Lo
| |
− | |-
| |
− | | colspan="2" | The low byte (bits 0-7) of the ID
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxMaskExd'''
| |
− | |-
| |
− | | colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Mask
| |
− | |-
| |
− | | colspan="2" | Mask 0 or 1
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | ID3
| |
− | |-
| |
− | | colspan="2" | The high byte (bits 24-31) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | ID2
| |
− | |-
| |
− | | colspan="2" | The mid-high byte (bits 16-23) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | ID1
| |
− | |-
| |
− | | colspan="2" | The mid-low byte (bits 8-15) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | ID0
| |
− | |-
| |
− | | colspan="2" | The low byte (bits 0-7) of the ID
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
| |
− | |-
| |
− | | colspan="2" | Set the Value of the Named property
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Name
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Value
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilter'''
| |
− | |-
| |
− | | colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | filter
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
− | | width="90%" | id
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxIdent'''
| |
− | |-
| |
− | | colspan="2" | Generic function to set Identifier. CAN registers will be configured depending upon Std/Ext mode setting.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | buffer
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
− | | width="90%" | id
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
| + | ==Macro reference== |
| | | |
| + | ===CheckQueue=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckRx''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckQueue''' |
| |- | | |- |
− | | colspan="2" | Checks to see if any messages are available for 'Buffer' specified | + | | colspan="2" | Checks the I2S Event queue for a DMA Buffer full or empty event. For an output returns true when there is an empty DMA buffer available. For an input return true when there is a full DMA buffer available. |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Buffer
| |
| |- | | |- |
− | | colspan="2" | Send buffer: 0 to 1
| |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===Initialise=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitRXConfig''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' |
| |- | | |- |
− | | colspan="2" | Initialization setting for RX Buffer Config | + | | colspan="2" | Configures the I2C peripheral ready for data. |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Buffer
| |
− | |-
| |
− | | colspan="2" | Buffer Number (0 or 1)
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Value
| |
| |- | | |- |
− | | colspan="2" | Config data byte
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Line 402: |
Line 119: |
| | | |
| | | |
| + | ===Read=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninit''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read''' |
| |- | | |- |
− | | colspan="2" | Uninitialises the CAN, freeing its connections for general use | + | | colspan="2" | Wait timeout ticks to receive length number of samples, returns samples received. 24 and 32-bit data must be split into two integer values per sample. |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | + | | width="90%" | Data |
− | |}
| |
− | | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | + | | colspan="2" | Data array to populate with incoming data |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
| |
| |- | | |- |
− | | colspan="2" | Get the Filter List of the Named Property | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| + | | width="90%" | Length |
| |- | | |- |
| + | | colspan="2" | Max number of samples to try and receive |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Name | + | | width="90%" | Timeout |
| |- | | |- |
− | | colspan="2" | | + | | colspan="2" | Max number of ticks to wait for incoming samples |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===Start=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Start''' |
| |- | | |- |
− | | colspan="2" | Generic function to get the received message Identifier. | + | | colspan="2" | Starts the I2S audio stream, auto started by the initialise function. |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
− | | width="90%" | buffer
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===Stop=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterStd''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Stop''' |
| |- | | |- |
− | | colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter | + | | colspan="2" | Stops the I2S audio stream |
| |- | | |- |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Filter
| |
− | |-
| |
− | | colspan="2" | Filter number
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Hi
| |
− | |-
| |
− | | colspan="2" | The high byte (bits 8-15) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Lo
| |
− | |-
| |
− | | colspan="2" | The low byte (bits 0-7) of the ID
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Line 479: |
Line 176: |
| | | |
| | | |
| + | ===Write=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRxFilterExd''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Write''' |
| |- | | |- |
− | | colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter | + | | colspan="2" | Wait timeout ticks to send length number of samples, returns samples sent 24 and 32-bit data must be split into two integer values per sample. |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT |
− | | width="90%" | Filter | + | | width="90%" | Data |
| |- | | |- |
− | | colspan="2" | Send filter: 0 to 3 | + | | colspan="2" | Data array containing outgoing data |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | ID3 | + | | width="90%" | Length |
| |- | | |- |
− | | colspan="2" | The high byte (bits 24-31) of the ID | + | | colspan="2" | Max number of samples to try and send |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | ID2 | + | | width="90%" | Timeout |
| |- | | |- |
− | | colspan="2" | The mid-high byte (bits 16-23) of the ID | + | | colspan="2" | Max number of ticks to wait for space in the outgoing buffer |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | ID1
| |
− | |-
| |
− | | colspan="2" | The mid-low byte (bits 8-15) of the ID
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | ID0
| |
− | |-
| |
− | | colspan="2" | The low byte (bits 0-7) of the ID
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
− |
| |
− |
| |
| | | |
| | | |
Line 582: |
Line 268: |
| | colspan="2" | I2S DMA Buffer Size | | | colspan="2" | I2S DMA Buffer Size |
| |- | | |- |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
| |
| |- | | |- |
| |} | | |} |