membase

迅为IMX6ULL开发板Linux RS232/485驱动实验(上)

本秂侑毒 提交于 2020-12-14 11:31:36
在 arm 设备中串口是很常用的一个外设,不仅可以用来打印信息,还可以用于外接设备和其他 传感器 通信。根据不同的电平,串口分为 TTL 和 RS232,但是在 Linux 内核中的驱动程序是一样的,在串口上外接RS485 类似的芯片就可以把 RS232 信号转换为 RS485 信号,非常方便。在 i.MX6UL 终结者开发板上,RS232、 RS485 和 GPS 模块都接到了 UART3 接口上,内核驱动都是一样的。在本章来学习一下串口驱动。 53.1 Linux 下的 UART 驱动框架 53.1.1 uart_driver 结构体 在 Linux 中 uart 和 I2C、SPI 一样,提供了串口驱动框架,只需要按照提供的串口框架函数编译驱动即可。一般来说串口驱动都已经实现好了,我们需要做的就是在设备树文件中,添加相应的设备节点。当设备和驱动匹配成功后,串口就能够正常工作。 在 Linux 中,用 uart_driver 结构体来描述串口,uart_driver 定义在 include/linux/serial_core.h 文件中,内容如下: 295 struct uart_driver { 296 struct module *owner; /* 模块所属者 */ 297 const char *driver_name; /* 驱动名字 */ 298 const

基于STM32F429的内存管理

偶尔善良 提交于 2020-11-18 20:09:05
1.内存管理介绍    内存管理,是指软件运行时对计算机内存资源的分配和使用的技术。其最主要的目的是如 何高效,快速的分配,并且在适当的时候释放和回收内存资源。 内存管理的实现方法有很多种, 他们其实最终都是要实现 2 个函数: malloc 和 free ; malloc 函数用于内存申请, free 函数用于 内存释放。  从上图可以看出,分块式内存管理由内存池和内存管理表两部分组成。内存池被等分为 n 块,对应的内存管理表,大小也为 n ,内存管理表的每一个项对应内存池的一块内存。 内存管理表的项值代表的意义为:当该项值为 0 的时候,代表对应的内存块未被占用,当 该项值非零的时候,代表该项对应的内存块已经被占用,其数值则代表被连续占用的内存块数。 比如某项值为 10 ,那么说明包括本项对应的内存块在内,总共分配了 10 个内存块给外部的某 个指针。 内寸分配方向如图所示,是从顶  底的分配方向。即首先从最末端开始找空内存。当内存 管理刚初始化的时候,内存表全部清零,表示没有任何内存块被占用。 分配原理     当指针 p 调用 malloc 申请内存的时候,先判断 p 要分配的内存块数( m ),然后从第 n 项开 始 ,向下查找,直到找到 m 块连续的空内存块(即对应内存管理表项为 0 ),然后将这 m 个内 存管理表项的值都设置为 m (标记被占用),最后

一、uart&tty驱动

痴心易碎 提交于 2020-04-19 19:48:37
1 一.I.MX6 UART驱动 2 文件路径:\linux_IMX6_CoreC_3. 0 .35_for_Linux\drivers\tty\serial\imx.c 3 1 .驱动入口函数:imx_serial_init() 4 1.1 static int __init imx_serial_init( void ) 5 ret = uart_register_driver(&imx_reg); // 驱动加载的时候调用了这个函数注册串口驱动,将参数imx_reg注册进了tty层 6 struct tty_driver * normal; 7 normal = alloc_tty_driver(drv->nr); // 申请tty驱动,串口设备套上了一层tty驱动的外壳 8 ... 9 tty_set_operations(normal, & uart_ops); 10 // 上面这段代码可以得出一个结论,uart_driver的数据类型其实就是tty_driver,两者进行数据转换之后注册进了tty层。 11 // tty_set_operations(normal, &uart_ops);将uart的操作函数和tty关联起来,应用层对于tty的操作都将对应到uart的操作 12 13 retval = tty_register_driver(normal); //

Membase can someone explain the idea behind their technology

我只是一个虾纸丫 提交于 2020-01-01 05:03:07
问题 It is fourth day already since I've started diving into CouchDB specifically Membase (Couchbase), Membase seems really interesting technology for me due to simplicity of administration, their interface is as magical as informal and simple. The way you add/remove buckets is just fun. Unfortunately I didn't managed to launch their .NET client on Mac OS X (on Windows it worked fine) and also couldn't find out the way to perform Map/Reduce queries so it seemed that Membase Server technology is

Quick Reference Guide to Various NoSQL Databases

允我心安 提交于 2019-12-21 05:15:16
问题 I'm looking for one place that summarizes the main properties of the NoSQL databases that I keep seeing referenced - in particular, MongoDB, Riak, Redis, Memcached, Membase, and Cassandra. Types of queries, acid, architecture for/properties of scaling, etc. All in memory, overflow to disk, backup on disk, or mainly only indexes in memory? 回答1: Probably one of the best source which summarizes basic information (and points you to more detailed source in the first place) about various nosql

Cannot inherit from final class error

笑着哭i 提交于 2019-12-17 20:08:18
问题 What does this error mean .. It runs fine in Eclipse but not in intellij idea Exception in thread "main" java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net

membase server to couchbase server migration : Java client

爱⌒轻易说出口 提交于 2019-12-12 04:45:30
问题 I was using aspymemcached client to connect to my membase server. code look like : public static MemcachedClient MemcachedClient(String bucketName){ URI server1 = new URI("http://192.168.100.111:8091/pools"); URI server2 = new URI("http://127.0.0.1:8091/pools"); ArrayList<URI> serverList = new ArrayList<URI>(); serverList.add(server1); serverList.add(server2); return new MemcachedClient(serverList, bucketName, ""); } For putting object in cache : public static void makeMembaseCacheEntry(final

How can I change default Couchbase item size?

本小妞迷上赌 提交于 2019-12-11 01:19:35
问题 I am using the .NET Couchbase Client API that includes Enyim.Caching. I have a DataTable that is approximately 55 megs and it is not getting cached. I understand that there is a "soft" max for the item size of 20 megs. How can I change the default max item size in order to cache this object? 回答1: Are you using a Memcached bucket or Couchbase bucket? If you're using a Memcached bucket then you're likely hitting the 1MB limit. A quick sample program: var config = new

Spymemcache- Memcache/Membase Faileover

ぐ巨炮叔叔 提交于 2019-12-11 01:09:26
问题 Platform: 64 Bit windows OS, spymemcached-2.7.3.jar, J2EE We want to use two memcache/membase servers for caching solution. We want to allocate 1 GB memory to each memcache/membase server so total we can cache 2 GB data. We are using spymemcached java client for setting and getting data from memcache. We are not using any replication between two membase servers. We loading memcacheClient object at the time of our J2EE application startup. URI server1 = new URI("http://192.168.100.111:8091

How do I keep existing data in couchbase and only update the new data without overwriting

吃可爱长大的小学妹 提交于 2019-12-10 14:55:15
问题 So, say I have created some records/documents under a bucket and the user updates only one column out of 10 in the RDBMS, so I am trying to send only that one columns data and update it in couchbase. But the problem is that couchbase is overwriting the entire record and putting NULL`s for the rest of the columns. One approach is to copy all the data from the exisiting record after fetching it from Cbase, and then overwriting the new column while copying the data from the old one. But that