Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
shared_buffer.h
00001 #pragma once 00002 #include "rtos.h" 00003 00004 class SharedBuffer 00005 { 00006 public: 00007 SharedBuffer(unsigned int size); 00008 ~SharedBuffer(); 00009 unsigned int read(unsigned char out[], unsigned int size); 00010 unsigned int write(const unsigned char in[], unsigned int size); 00011 void wait(); 00012 private: 00013 unsigned int m_nBufferSize; 00014 unsigned int m_nWriteOffset; 00015 unsigned int m_nDataSize; 00016 unsigned char *m_pBuffer; 00017 rtos::Semaphore sem_Read; 00018 rtos::Semaphore sem_Write; 00019 };
Generated on Tue Jul 12 2022 16:28:53 by
1.7.2
