概要
ロボット倶楽部のLIN基板を想定して説明する。
使い方
Master設定
ロボット倶楽部のGitHubのからPSoC3_Libraryをクローンする.
クローンしたら、LinMasterからlin_master.cymacro(マクロの追加方法)とlin_master.hとlin_master.cをプロジェクトに追加する.
コンポーネントのパラメータは設定済みです.
Masterプログラム
#include
#include
int main()
{
CyGlobalIntEnable;
initLin();
while(1)
{
//送信
LIN_Master_PutArray(id,length,p_data);
}
}
関数の説明
LIN_Master_GetArray(const uint8 id,const uint8 length,const uint8* buffer)
LIN_Master_ReadRxStatus(void)
LIN_Master_PutArray(const uint8 id,const uint8 length,const uint8* const buffer)
LIN_Master_ReadTxStatus(void)