mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-17 02:08:36 +00:00
[feat][nmsis] add nmsis component and nn,dsp demo
This commit is contained in:
parent
b2aada479b
commit
5d1126d0f0
989 changed files with 286224 additions and 0 deletions
51
examples/dsp/BasicMathFunctions_part3/and.c
Normal file
51
examples/dsp/BasicMathFunctions_part3/and.c
Normal file
|
@ -0,0 +1,51 @@
|
|||
#include "ref.h"
|
||||
|
||||
void ref_and_u16(
|
||||
const uint16_t * pSrcA,
|
||||
const uint16_t * pSrcB,
|
||||
uint16_t * pDst,
|
||||
uint32_t blockSize)
|
||||
{
|
||||
uint32_t blkCnt; /* Loop counter */
|
||||
blkCnt = blockSize;
|
||||
while (blkCnt > 0U)
|
||||
{
|
||||
*pDst++ = (*pSrcA++)&(*pSrcB++);
|
||||
|
||||
/* Decrement the loop counter */
|
||||
blkCnt--;
|
||||
}
|
||||
}
|
||||
|
||||
void ref_and_u32(
|
||||
const uint32_t * pSrcA,
|
||||
const uint32_t * pSrcB,
|
||||
uint32_t * pDst,
|
||||
uint32_t blockSize)
|
||||
{
|
||||
/* Initialize blkCnt with number of samples */
|
||||
uint32_t blkCnt = blockSize;
|
||||
while (blkCnt > 0U)
|
||||
{
|
||||
*pDst++ = (*pSrcA++)&(*pSrcB++);
|
||||
|
||||
/* Decrement the loop counter */
|
||||
blkCnt--;
|
||||
}
|
||||
}
|
||||
|
||||
void ref_and_u8(
|
||||
const uint8_t * pSrcA,
|
||||
const uint8_t * pSrcB,
|
||||
uint8_t * pDst,
|
||||
uint32_t blockSize)
|
||||
{
|
||||
uint32_t blkCnt = blockSize;
|
||||
while (blkCnt > 0U)
|
||||
{
|
||||
*pDst++ = (*pSrcA++)&(*pSrcB++);
|
||||
|
||||
/* Decrement the loop counter */
|
||||
blkCnt--;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue