Code Monkey home page Code Monkey logo

asp-slave's Introduction

Aspeed I2C Slave

i2c 从设备驱动, 接收 master 的数据并解析, 需要 master 驱动支持注册为 slave

目录

1. 文件目录说明

文件目录 说明
asp_slave.c i2c 从设备驱动

2. 原理

触发alert信号, master 主动向 slave 写

3. cmd 说明

cmd 说明
0x00 cpu数据
0x01 mem数据

3.1 cpu(0x00)

长度(byte) 说明
1 cpu核心数
n 根据核心数, 从CPU0开始的CPU利用率

数据格式

S 0x20 W [A] 0x00 [A] 0x04[A]
	cpu_core [A] ur_cpu0 [A] ur_cpu1 [A] ur_cpun [A] P

3.2 mem(0x01)

长度(byte) 说明
2 内存容量(GB), 发送高8位, 再发送低8位
1 内存利用率

数据格式

S 0x20 W [A] 0x01 [A] 0x03 [A]
	mem_hi [A] mem_lo [A] ur_mem [A] P

X. TODO

  1. 可能修改为以信号的形式通知上层 sdbus 程序获取数据

asp-slave's People

Contributors

zhengdongxiong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.